Skip to content

Commit 7587637

Browse files
authored
Add Shibboleth sample configuration to SSO documentation (#5294)
2 parents 8ad9c09 + b2fb289 commit 7587637

File tree

2 files changed

+67
-14
lines changed

2 files changed

+67
-14
lines changed

docs/reference/configuration.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -794,15 +794,6 @@ upstream_oauth2:
794794
#action: suggest
795795
#template: "{{ user.email }}"
796796

797-
# Whether the email address must be marked as verified.
798-
# Possible values are:
799-
# - `import`: mark the email address as verified if the upstream provider
800-
# has marked it as verified, using the `email_verified` claim.
801-
# This is the default.
802-
# - `always`: mark the email address as verified
803-
# - `never`: mark the email address as not verified
804-
#set_email_verification: import
805-
806797
# An account name, for display purposes only
807798
# This helps end user identify what account they are using
808799
account_name:

docs/setup/sso.md

Lines changed: 67 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ upstream_oauth2:
213213
email:
214214
action: suggest
215215
template: "{{ user.email }}"
216-
set_email_verification: always
217216
```
218217

219218

@@ -250,7 +249,6 @@ upstream_oauth2:
250249
email:
251250
action: suggest
252251
template: "{{ user.email }}"
253-
set_email_verification: always
254252
```
255253

256254

@@ -291,7 +289,6 @@ upstream_oauth2:
291289
email:
292290
action: suggest
293291
template: "{{ user.email }}"
294-
set_email_verification: always
295292
account_name:
296293
template: "{{ user.name }}"
297294
```
@@ -462,7 +459,6 @@ upstream_oauth2:
462459
email:
463460
action: suggest
464461
template: "{{ user.email }}"
465-
set_email_verification: always
466462
```
467463

468464

@@ -499,7 +495,6 @@ upstream_oauth2:
499495
email:
500496
action: suggest
501497
template: "{{ user.email }}"
502-
set_email_verification: always
503498
account_name:
504499
template: "{{ user.preferred_username }}"
505500
```
@@ -601,3 +596,70 @@ To use a Rauthy-supported [Ephemeral Client](https://sebadob.github.io/rauthy/wo
601596
"id_token_signed_response_alg": "RS256"
602597
}
603598
```
599+
600+
601+
### Shibboleth
602+
603+
[Shibboleth](https://www.shibboleth.net/) is an open-source identity management system commonly used by universities and research institutions.
604+
It is primarily based on SAML but also supports OIDC via the [OIDC OP Plugin](https://shibboleth.atlassian.net/wiki/spaces/IDPPLUGINS/pages/1376878976/OIDC+OP).
605+
606+
These instructions assume you have a running Shibboleth instance with the OIDC plugin configured.
607+
608+
Register MAS as a relying party in Shibboleth:
609+
610+
1. Add a metadata file (e.g. `mas-metadata.xml`) to `%{idp.home}/metadata/` with the following content:
611+
612+
```xml
613+
<?xml version="1.0" encoding="UTF-8"?>
614+
<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
615+
xmlns:oidcmd="urn:mace:shibboleth:metadata:oidc:1.0"
616+
entityID="<client-id>">
617+
<Extensions>
618+
<oidcmd:ClientInformation>
619+
<oidcmd:ClientSecret><client-secret></oidcmd:ClientSecret>
620+
</oidcmd:ClientInformation>
621+
</Extensions>
622+
<SPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
623+
<Extensions>
624+
<oidcmd:OIDCClientInformation scopes="openid profile email"
625+
token_endpoint_auth_method="client_secret_basic">
626+
<oidcmd:GrantType>authorization_code</oidcmd:GrantType>
627+
<oidcmd:ResponseType>code</oidcmd:ResponseType>
628+
</oidcmd:OIDCClientInformation>
629+
</Extensions>
630+
<AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
631+
Location="https://<auth-service-domain>/upstream/callback/<id>"
632+
index="1"/>
633+
</SPSSODescriptor>
634+
</EntityDescriptor>
635+
```
636+
637+
Replace `<client-id>`, `<client-secret>`, `<auth-service-domain>`, and `<id>` with your values.
638+
639+
2. Reference the metadata file in `%{idp.home}/conf/metadata-providers.xml` and reload services.
640+
641+
Authentication service configuration:
642+
643+
```yaml
644+
upstream_oauth2:
645+
providers:
646+
- id: 01JB6YS8N7Q2ZM9CPXW6V0KGRT
647+
human_name: Shibboleth
648+
issuer: "https://<shibboleth-domain>/" # TO BE FILLED
649+
client_id: "<client-id>" # TO BE FILLED
650+
client_secret: "<client-secret>" # TO BE FILLED
651+
token_endpoint_auth_method: client_secret_basic
652+
scope: "openid profile email"
653+
discovery_mode: insecure
654+
fetch_userinfo: true
655+
claims_imports:
656+
localpart:
657+
action: require
658+
template: "{{ user.preferred_username }}"
659+
displayname:
660+
action: suggest
661+
template: "{{ user.name }}"
662+
email:
663+
action: suggest
664+
template: "{{ user.email }}"
665+
```

0 commit comments

Comments
 (0)