Skip to content

Commit c13c886

Browse files
ginkelsandhose
authored andcommitted
Add SSO sample configuration for Authelia
Signed-off-by: Thilo-Alexander Ginkel <[email protected]>
1 parent 26d945d commit c13c886

File tree

1 file changed

+58
-3
lines changed

1 file changed

+58
-3
lines changed

docs/setup/sso.md

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,62 @@ If there is only one upstream provider configured and the local password databas
6868

6969
This section contains sample configurations for popular OIDC providers.
7070

71+
### Authelia
72+
73+
These instructions assume that you have already enabled the OIDC provider support in [Authelia](https://www.authelia.com/).
74+
75+
Add a client for MAS to Authelia's `configuration.yaml` (see the [Authelia OIDC documentation](https://www.authelia.com/configuration/identity-providers/openid-connect/clients/) for full details):
76+
77+
```yaml
78+
identity_providers:
79+
oidc:
80+
clients:
81+
- client_id: "<client-id>" # TO BE FILLED
82+
client_name: Matrix
83+
client_secret: "<client-secret>" # TO BE FILLED
84+
public: false
85+
redirect_uris:
86+
- https://<mas-fqdn>/upstream/callback/<id>
87+
scopes:
88+
- openid
89+
- groups
90+
- profile
91+
- email
92+
grant_types:
93+
- 'refresh_token'
94+
- 'authorization_code'
95+
response_types:
96+
- code
97+
```
98+
99+
Authentication service configuration:
100+
101+
```yaml
102+
upstream_oauth2:
103+
providers:
104+
providers:
105+
- id: <id>
106+
human_name: Authelia
107+
issuer: "https://<authelia-fqdn>" # TO BE FILLED W/O ANY TRAILING SLASHES
108+
client_id: "<client-id>" # TO BE FILLED
109+
client_secret: "<client-secret>" # TO BE FILLED
110+
token_endpoint_auth_method: client_secret_basic
111+
scope: "openid profile email"
112+
discovery_mode: insecure
113+
claims_imports:
114+
localpart:
115+
action: require
116+
template: "{{ user.preferred_username }}"
117+
displayname:
118+
action: suggest
119+
template: "{{ user.name }}"
120+
email:
121+
action: suggest
122+
template: "{{ user.email }}"
123+
set_email_verification: always
124+
```
125+
126+
71127
### Authentik
72128
73129
[Authentik](https://goauthentik.io/) is an open-source IdP solution.
@@ -266,8 +322,8 @@ upstream_oauth2:
266322
### Microsoft Azure Active Directory
267323

268324
Azure AD can act as an OpenID Connect Provider.
269-
Register a new application under *App registrations* in the Azure AD management console.
270-
The `RedirectURI` for your application should point to your authentication service instance:
325+
Register a new application under *App registrations* in the Azure AD management console.
326+
The `RedirectURI` for your application should point to your authentication service instance:
271327
`https://<auth-service-domain>/upstream/callback/<id>` where `<id>` is the same as in the config file.
272328

273329
Go to *Certificates & secrets* and register a new client secret.
@@ -297,4 +353,3 @@ upstream_oauth2:
297353
template: "{{ user.email }}"
298354
set_email_verification: always
299355
```
300-

0 commit comments

Comments
 (0)