forked from collective/collective.saml2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildout.cfg
272 lines (225 loc) · 7.1 KB
/
buildout.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
# Copy to buildout.cfg and uncomment one config
[buildout]
extends =
https://raw.github.com/collective/buildout.plonetest/master/test-4.1.x.cfg
versions=versions
#parts += omelette
package-name = collective.saml2
package-extras = [test]
#########################################################################
# To create a site which people sign into (id provider)
# - In root of site create authority (Saml authority)
# - Entity id (others use this to link to site) = something meaningful
# - certificate = .der file created from .key file. home is set to var/instance1, so relative url ../.. gets you to buildout dir
# - private key = .key file on disk
# - base url = url to zope root, not plone root
#
# - In root of site create "saml_idpsso" (Saml simple idpsso with integrated attribute provider)
#
#
# To test, ie to make a client that will login via id provider.
# - Go to other site
# - create authority in base of site.
# - add saml2 entity into authority and point it at id provider authority/metadata e.g https://staging.ses.vic.gov.au/extranet/mnt/extranet/samlauth/metadata
# - in acl_users, create integrated spsso plugin.
# - set "Default identity provider" to be the name of the entity id used above.
# - ensure this PAS plugin use for everything
# - log out and login using basic authentication (cookie auth won't work).
# - should redirect you to id provider site
# - login and should redirect you back to your site
# - remember to reset your cookies. First login id provider is recorded in cookie
# - in id provider site add the sp site into the auth using it's entity id and url to it's authority metadata.
# - but what if spd is firewalled from idp?
[instance]
eggs+=
${pyxb:egg}
${dm.xmlsec.binding:egg}
extra-paths +=
${buildout:directory}/parts/site-packages/
environment-vars +=
LD_LIBRARY_PATH ${xmlsec1:location}/lib
SAML2_ENABLE_LOGGING ${:SAML2_LOGGING}
# get around cssutils registering itself as a DOMImplemetation and PyXB not askign for features
# see https://sourceforge.net/apps/trac/pyxb/ticket/224
PYTHON_DOM minidom
SAML2_LOGGING = false
[omelette]
recipe = collective.recipe.omelette
eggs = ${instance:eggs}
[versions]
zc.buildout = 1.6.3
setuptools = 0.6c11
lxml = 3.2.5
############
# SAML2
############
[dm.xmlsec.binding]
recipe = zc.recipe.egg:custom
egg =dm.xmlsec.binding>=1.2
environment = xmlsec-env
include-dirs =
${libxml2:location}/include/libxml2
${libxslt:location}/include
${openssl:location}/include
library-dirs =
${libxml2:location}/lib
${libxslt:location}/lib
${openssl:location}/lib
rpath =
${libxml2:location}/lib
${libxslt:location}/lib
${openssl:location}/lib
deps =
${:egg}
${lxml:deps}
${libxml2:deps}
${libxslt:deps}
${xmlsec1:deps}
${openssl:deps}
[xmlsec-env]
PATH=%(PATH)s:${xmlsec1:location}/bin:${libxml2:location}/bin:${openssl:location}/bin:${libxslt:location}/bin
[pyxb]
recipe = zc.recipe.egg:custom
egg = PyXB == 1.2.3
extra_options =
--with-openssl=${openssl:location}
--with-libxml=${libxml2:location}
--with-libxslt=${libxslt:location}
[xmlsec1]
recipe = minitage.recipe.cmmi
url =http://www.aleksey.com/xmlsec/download/xmlsec1-1.2.19.tar.gz
configure-options =
--with-openssl=${openssl:location}
--with-libxml=${libxml2:location}
--with-libxslt=${libxslt:location}
--disable-crypto-dl
--disable-apps-crypto-dl
--with-default-crypto=openssl
configure-darwin = Configure
configure-options-darwin= build=darwin64-x86_64-cc
pkgconfigpath =
${openssl:location}/lib/pkgconfig
${libxslt:location}/lib/pkgconfig
${libxml2:location}/lib/pkgconfig
deps =
${:url}
${libxml2:deps}
${libxslt:deps}
${openssl:deps}
# get round bug
force-osx-target = 10.9
# LXML
[lxml]
recipe = zc.recipe.egg:custom
egg = lxml
include-dirs =
${libxml2:location}/include/libxml2
${libxslt:location}/include
${libiconv:location}/include
${zlib:location}/include
library-dirs =
${libxml2:location}/lib
${libxslt:location}/lib
${libiconv:location}/lib
${zlib:location}/lib
rpath =
${libxml2:location}/lib
${libxslt:location}/lib
${libiconv:location}/lib
${zlib:location}/lib
force=true
environment = lxml-build-environment
deps =
${:egg}
${libxml2:deps}
${libxslt:deps}
${libiconv:deps}
${zlib:deps}
[lxml-build-environment]
XML2_CONFIG = ${libxml2:location}/bin/xml2-config
XSLT_CONFIG = ${libxslt:location}/bin/xslt-config
# 2.9.0 breaks on osx see http://stackoverflow.com/questions/12484664/what-am-i-doing-wrong-when-installing-lxml-on-mac-os-x-10-8-1
[libxml2]
recipe = minitage.recipe.cmmi
url = http://xmlsoft.org/sources/libxml2-2.9.1.tar.gz
force-osx-target = 10.9
configure-options =
--without-python
--without-zlib
configure-darwin = Configure
configure-options-darwin= build=darwin64-x86_64-cc
deps = ${:url} ${zlib:deps}
[libxslt]
recipe = minitage.recipe.cmmi
url = http://xmlsoft.org/sources/libxslt-1.1.28.tar.gz
force-osx-target = 10.9
#extra_options =
configure-options =
--with-libxml-prefix=${libxml2:location}
--without-python
--without-crypto
configure-darwin = Configure
configure-options-darwin= build=darwin64-x86_64-cc
deps = ${:url} ${libxml2:deps}
[libiconv]
recipe = zc.recipe.cmmi
url = http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
deps = ${:url}
#################
# OpenSSL
#################
[openssl]
recipe = minitage.recipe.cmmi>=1.58
url = http://www.openssl.org/source/openssl-1.0.1c.tar.gz
configure = config
configure-darwin = Configure
# we don't won't to build install_docs as it has problems on osx due to symbolic link not copying.
noinstall = true
make-targets = all install_sw
pkgconfigpath =
${zlib:location}/lib/pkgconfig
configure-options =
shared
configure-options-darwin=-mmacosx-version-min=10.5.0 darwin64-x86_64-cc shared
deps = ${:url} ${zlib:deps}
path=${perl:location}/bin
force-osx-target = 10.9
#################
# ZLIB
#################
[zlib]
recipe = zc.recipe.cmmi>= 1.3.5
url = http://prdownloads.sourceforge.net/libpng/zlib-1.2.8.tar.gz?download
#shared = true
deps = ${:url}
[zlib-build]
recipe = plone.recipe.distros
urls = http://zlib.net/zlib-1.2.5.tar.gz
[patch]
recipe = zc.recipe.cmmi
url = http://ftp.gnu.org/gnu/patch/patch-2.6.1.tar.gz
md5sum = d758eb96d3f75047efc004a720d33daf
#################
# Perl
#################
[perl-keep-linker-flags-in-ldflags.patch]
recipe = hexagonit.recipe.download
url = http://www.nexedi.org/static/patches/${:_buildout_section_name_}
md5sum = 9873a89c969bd5a478434c3b8b2d57d8
download-only = true
filename = ${:_buildout_section_name_}
[perl]
recipe = hexagonit.recipe.cmmi
version = 5.14.4
url = http://www.cpan.org/src/5.0/perl-${:version}.tar.bz2
siteprefix = ${buildout:parts-directory}/site_${:_buildout_section_name_}
patch-options = -p1
patches =
${perl-keep-linker-flags-in-ldflags.patch:location}/${perl-keep-linker-flags-in-ldflags.patch:filename}
configure-command =
sh Configure -des \
-Dprefix=${buildout:parts-directory}/${:_buildout_section_name_} \
-Dsiteprefix=${:siteprefix} \
-Dnoextensions=ODBM_File
environment =
PATH=${patch:location}/bin:%(PATH)s