Skip to content

Commit 6daef5f

Browse files
authored
Merge branch 'master' into ck_default_userinfo_request_method
2 parents 579ea73 + e87467a commit 6daef5f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+2180
-968
lines changed

NOTICE

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
Copyright 2016 Umeå universitet
22

3+
Contributions to this work were made on behalf of the GÉANT project,
4+
a project that has received funding from the European Union’s
5+
Horizon 2020 research and innovation programme under Grant Agreement No. 731122 (GN4-2).
6+
On behalf of the GÉANT project, GEANT Association is the sole owner of the copyright
7+
in all material which was developed by a member of the GÉANT project.
8+
GÉANT Vereniging (Association) is registered with the Chamber of Commerce in Amsterdam
9+
with registration number 40535155 and operates in the UK as a branch of GÉANT Vereniging.
10+
Registered office: Hoekenrode 3, 1102BR Amsterdam, The Netherlands.
11+
UK branch address: City House, 126-130 Hills Road, Cambridge CB2 1PQ, UK.
12+
313
Licensed under the Apache License, Version 2.0 (the "License");
414
you may not use this file except in compliance with the License.
515
You may obtain a copy of the License at

doc/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ in the [example directory](../example).
4343
| `BACKEND_MODULES` | string[] | `[openid_connect_backend.yaml, saml2_backend.yaml]` | list of plugin configuration file paths, describing enabled backends |
4444
| `FRONTEND_MODULES` | string[] | `[saml2_frontend.yaml, openid_connect_frontend.yaml]` | list of plugin configuration file paths, describing enabled frontends |
4545
| `MICRO_SERVICES` | string[] | `[statistics_service.yaml]` | list of plugin configuration file paths, describing enabled microservices |
46-
| `USER_ID_HASH_SALT` | string | `61a89d2db0b9e1e2` | salt used when creating the persistent user identifier, will be overriden by the environment variable `SATOSA_USER_ID_HASH_SALT` if it is set |
46+
| `USER_ID_HASH_SALT` | string | `61a89d2db0b9e1e2` | **DEPRECATED - use the hasher micro-service** salt used when creating the persistent user identifier, will be overriden by the environment variable `SATOSA_USER_ID_HASH_SALT` if it is set |
4747
| `LOGGING` | dict | see [Python logging.conf](https://docs.python.org/3/library/logging.config.html) | optional configuration of application logging |
4848

4949

@@ -119,7 +119,7 @@ linking, the `user_id_to_attr` configuration parameter should be set, since that
119119
service will overwrite the user identifier generated by the proxy.
120120

121121

122-
### hash
122+
### hash **DEPRECATED - use the hasher micro-service**
123123
The proxy can hash any attribute value (e.g., for obfuscation) before passing
124124
it on to the client. The `hash` key should contain a list of all attribute names
125125
for which the corresponding attribute values should be hashed before being
@@ -171,7 +171,7 @@ Metadata from remote URL:
171171

172172
For more detailed information on how you could customize the SAML entities,
173173
see the
174-
[documentation of the underlying library pysaml2](https://github.com/rohe/pysaml2/blob/master/doc/howto/config.rst).
174+
[documentation of the underlying library pysaml2](https://github.com/rohe/pysaml2/blob/master/docs/howto/config.rst).
175175

176176

177177
##### Providing `AuthnContextClassRef`
@@ -410,7 +410,7 @@ which should be used when configuring the attribute mapping (see above).
410410
### Ping frontend for simple heartbeat monitoring
411411

412412
The ping frontend responds to a query with a simple
413-
200 OK and is intended to be used as a simple heartbeat monitor,
413+
200 OK and is intended to be used as a simple heartbeat monitor,
414414
for example by a load balancer. The default configuration file can
415415
be found [here](../example/plugins/frontends/ping_frontend.yaml.example).
416416

@@ -581,7 +581,7 @@ The SATOSA proxy is a Python WSGI application and so may be run using any WSGI c
581581

582582
Gunicorn 'Green Unicorn' is a Python WSGI HTTP Server for UNIX and is the server used most often
583583
to run the proxy. In a production deployment the Gunicorn server is often proxied by a
584-
full featured general purpose web server (in a reverse proxy architecture) such as Nginx or
584+
full featured general purpose web server (in a reverse proxy architecture) such as Nginx or
585585
Apache HTTP Server to help buffer slow clients and enable more sophisticated error page rendering.
586586

587587
Start the proxy server with the following command:

example/internal_attributes.yaml.example

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,5 @@ attributes:
4040
orcid: [name.family-name.value]
4141
openid: [family_name]
4242
saml: [sn, surname]
43-
hash: [edupersontargetedid]
4443
user_id_from_attrs: [edupersontargetedid]
4544
user_id_to_attr: edupersontargetedid

example/plugins/backends/openid_backend.yaml.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ config:
44
provider_metadata:
55
issuer: https://op.example.com
66
client:
7+
verify_ssl: yes
78
auth_req_params:
89
response_type: code
910
scope: [openid, profile, email, address, phone]

example/plugins/backends/saml2_backend.yaml.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ config:
3939
text: "http://sp.logo.url/"
4040
width: "100"
4141
height: "100"
42+
authn_requests_signed: true
4243
want_response_signed: true
4344
allow_unsolicited: true
4445
endpoints:
@@ -48,5 +49,6 @@ config:
4849
discovery_response:
4950
- [<base_url>/<name>/disco, 'urn:oasis:names:tc:SAML:profiles:SSO:idp-discovery-protocol']
5051
name_id_format: 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient'
52+
name_id_format_allow_create: true
5153
# disco_srv must be defined if there is more than one IdP in the metadata specified above
5254
disco_srv: http://disco.example.com

example/plugins/frontends/openid_connect_frontend.yaml.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ config:
99
response_types_supported: ["code", "id_token token"]
1010
subject_types_supported: ["pairwise"]
1111
scopes_supported: ["openid", "email"]
12+
extra_scopes:
13+
foo_scope:
14+
- bar_claim
15+
- baz_claim

example/plugins/frontends/saml2_frontend.yaml.example

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,14 @@ config:
5252
"https://accounts.google.com": LoA1
5353

5454
endpoints:
55-
single_sign_on_service: {'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST': sso/post,
56-
'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect': sso/redirect}
55+
single_sign_on_service:
56+
'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST': sso/post
57+
'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect': sso/redirect
58+
59+
# If configured and not false or empty the common domain cookie _saml_idp will be set
60+
# with or have appended the IdP used for authentication. The default is not to set the
61+
# cookie. If the value is a dictionary with key 'domain' then the domain for the cookie
62+
# will be set to the value for the 'domain' key. If no 'domain' is set then the domain
63+
# from the BASE defined for the proxy will be used.
64+
common_domain_cookie:
65+
domain: .example.com
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
module: satosa.micro_services.hasher.Hasher
2+
name: Hasher
3+
config:
4+
# default settings that apply to every requester
5+
"":
6+
# default salt configuration is required
7+
salt: abcdef0123456789
8+
9+
# the hash algorithm to use (default: sha512)
10+
alg: sha256
11+
12+
# whether subject_id should be hashed (default: yes)
13+
subject_id: yes
14+
15+
# a list of attributes to hash (default: [])
16+
attributes:
17+
- edupersontargetedid
18+
19+
# specific settings for requester 'some_entityid'
20+
some_entityid:
21+
# for this requester use sha1
22+
alg: sha1
23+
24+
# do not hash any attributes
25+
# if this is missing the defaults will be used
26+
attributes: []
27+
28+
# specific settings for requester 'some_other_entityid'
29+
some_other_entityid:
30+
# for this requester only use this salt
31+
salt: abcd1234
32+
33+
# do not hash subject_id
34+
subject_id: no
35+
36+
# only hash the following attributes
37+
attributes:
38+
- gender
39+
- identifier
Lines changed: 55 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,65 @@
1-
module: plugins.microservices.ldap_attribute_store.LdapAttributeStore
1+
module: LdapAttributeStore
22
name: LdapAttributeStore
33
config:
4-
ldap_url: ldaps://ldap.example.org
5-
bind_dn: cn=admin,dc=example,dc=org
6-
bind_password: xxxxxxxx
7-
search_base: ou=People,dc=example,dc=org
8-
search_return_attributes:
9-
# format is LDAP attribute name : internal attribute name
10-
sn: surname
11-
givenName: givenname
12-
mail: mail
13-
employeeNumber: employeenumber
14-
isMemberOf: ismemberof
15-
idp_identifiers:
16-
# Ordered list of identifiers asserted as attributes by
17-
# IdP to use when constructing search filter to find
18-
# user record in LDAP directory. This example searches
19-
# in order for eduPersonUniqueId, eduPersonPrincipalName
20-
# combined with SAML persistent, eduPersonPrincipalName
21-
# combined with eduPersonTargetedId,
22-
# eduPersonPrincipalName, SAML persistent, and
23-
# eduPersonTargetedId.
24-
- epuid
25-
-
26-
- eppn
27-
- name_id: urn:oasis:names:tc:SAML:2.0:nameid-format:persistent
28-
-
29-
- eppn
30-
- edupersontargetedid
31-
- eppn
32-
- name_id: urn:oasis:names:tc:SAML:2.0:nameid-format:persistent
33-
- edupersontargetedid
34-
ldap_identifier_attribute: uid
35-
# Whether to clear values for attributes incoming
36-
# to this microservice. Default is no or false.
37-
clear_input_attributes: no
38-
# List of LDAP attributes to use as input to hashing to create
39-
# NameID.
40-
user_id_from_attrs:
41-
- employeeNumber
4+
"":
5+
ldap_url: ldaps://ldap.example.org
6+
bind_dn: cn=admin,dc=example,dc=org
7+
bind_password: xxxxxxxx
8+
search_base: ou=People,dc=example,dc=org
9+
search_return_attributes:
10+
# Format is LDAP attribute name : internal attribute name
11+
sn: surname
12+
givenName: givenname
13+
mail: mail
14+
employeeNumber: employeenumber
15+
isMemberOf: ismemberof
16+
# LDAP connection pool size
17+
pool_size: 10
18+
# LDAP connection pool seconds to wait between calls out to server
19+
# to keep the connection alive (uses harmless Abandon(0) call)
20+
pool_keepalive: 10
21+
ordered_identifier_candidates:
22+
# Ordered list of identifiers to use when constructing the
23+
# search filter to find the user record in LDAP directory.
24+
# This example searches in order for eduPersonUniqueId, eduPersonPrincipalName
25+
# combined with SAML persistent NameID, eduPersonPrincipalName
26+
# combined with eduPersonTargetedId, eduPersonPrincipalName,
27+
# SAML persistent NameID, and eduPersonTargetedId.
28+
- attribute_names: [epuid]
29+
- attribute_names: [eppn, name_id]
30+
name_id_format: urn:oasis:names:tc:SAML:2.0:nameid-format:persistent
31+
- attribute_names: [eppn, edupersontargetedid]
32+
- attribute_names: [eppn]
33+
- attribute_names: [name_id]
34+
name_id_format: urn:oasis:names:tc:SAML:2.0:nameid-format:persistent
35+
add_scope: issuer_entityid
36+
- attribute_names: [edupersontargetedid]
37+
add_scope: issuer_entityid
38+
ldap_identifier_attribute: uid
39+
# Whether to clear values for attributes incoming
40+
# to this microservice. Default is no or false.
41+
clear_input_attributes: no
42+
# List of LDAP attributes to use as input to hashing to create
43+
# NameID.
44+
user_id_from_attrs:
45+
- employeeNumber
46+
# Where to redirect the browser if no record is returned
47+
# from LDAP. The default is not to redirect.
48+
on_ldap_search_result_empty: https://my.vo.org/please/go/enroll
4249
# Configuration may also be done per-SP with any
4350
# missing parameters taken from the default if any.
4451
# The configuration key is the entityID of the SP.
4552
#
4653
# For example:
47-
https://sp.myserver.edu/shibboleth-sp
54+
https://sp.myserver.edu/shibboleth-sp:
4855
search_base: ou=People,o=MyVO,dc=example,dc=org
49-
eduPersonPrincipalName: employeenumber
56+
search_return_attributes:
57+
employeeNumber: employeenumber
58+
ordered_identifier_candidates:
59+
- attribute_names: [eppn]
5060
user_id_from_attrs:
5161
- uid
62+
# The microservice may be configured to ignore a particular SP.
63+
https://another.sp.myserver.edu:
64+
ignore: true
65+

example/proxy_conf.yaml.example

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ FRONTEND_MODULES:
1313
- "plugins/frontends/saml2_frontend.yaml"
1414
MICRO_SERVICES:
1515
- "plugins/microservices/static_attributes.yaml"
16-
USER_ID_HASH_SALT: "61a89d2db0b9e1e27d490d050b478fe71f352fddd3528a44157f43e339c6c62f2362fb413179937d96172bf84233317"
1716
LOGGING:
1817
version: 1
1918
formatters:
@@ -40,4 +39,4 @@ LOGGING:
4039
propagate: no
4140
root:
4241
level: INFO
43-
handlers: [info_file_handler]
42+
handlers: [info_file_handler]

0 commit comments

Comments
 (0)