You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Configurable memoization of IdP selection when using MDQ
This commit introduces four optional configuration parameters that can be used
to modify the default SATOSA behaviour:
- CONTEXT_STATE_DELETE
- remember_selected_idp_from_disco
- use_disco_when_forceauthn
- mirror_saml_forceauthn
By default, SATOSA deletes the context state when it receives an
authentication response from an identity provider. The first configuration
option, CONTEXT_STATE_DELETE, allows us disable this behaviour and thus
keeping state across different authentication flows, when the user uses
the same browser.
The second configuration option, remember_selected_idp_from_disco,
controls whether SATOSA will remember and reuse the IdP that is returned
from a discovery service. If ForceAuthn is set in the authentication
request, then the user will then the user the IdP will be redirected to
the discovery service (if it is configured) and ForceAuthn will be set
in the authentication request towards the selected IdP.
These two options together allow us to modify the current behaviour so
that within a given session, a user will select only once the identity
provider and then SATOSA will store this information in the state
cookie. When the cookie expires, the user will be redirected again to
the discovery service.
The third configuration option, use_disco_when_forceauthn, controls
whether SATOSA will redirect the use to the discovery service, even when
remember_selected_idp_from_disco is true and for the current session
there is the entity id of an IdP stored in the cookie state. This
behaviour provides a way for SPs that need to force a new IdP selection
(e.g. for account linking purposes) to use ForceAuthn to achieve this.
The fourth configuration option, mirror_saml_forceauthn, adds configuration
option to mirror ForceAuthn. By default, when the SATOSA SAML frontend
receives a SAML authentication request with ForceAuthn set to `True`, this
information is not mirrored in the SAML authentication request that is
generated by the SATOSA SAML backend towards the upstream identity provider.
If the configuration parameter `mirror_saml_forceauthn` is set to `True`,
then the default behaviour changes and the SATOSA SAML backend will set
ForceAuthn to true when it proxies a SAML authentication request with
ForceAuthn set to `True`.
The default values of these configuration options are tuned so that the
default behaviour of SATOSA is not changed.
Signed-off-by: Ivan Kanakarakis <[email protected]>
|`BASE`| string |`https://proxy.example.com`| base url of the proxy |
39
39
|`COOKIE_STATE_NAME`| string |`satosa_state`| name of cooke SATOSA uses for preserving state between requests |
40
+
|`CONTEXT_STATE_DELETE`| bool |`True`| controls whether SATOSA will delete the state after receiving the authentication response from the upstream IdP|
40
41
|`STATE_ENCRYPTION_KEY`| string |`52fddd3528a44157`| key used for encrypting the state cookie, will be overriden by the environment variable `SATOSA_STATE_ENCRYPTION_KEY` if it is set |
|`CUSTOM_PLUGIN_MODULE_PATHS`| string[]|`[example/plugins/backends, example/plugins/frontends]`| list of directory paths containing any front-/backend plugin modules |
@@ -322,6 +323,45 @@ config:
322
323
disco_srv: http://disco.example.com
323
324
```
324
325
326
+
##### Remember the IdP provided in the discovery service
327
+
328
+
The `remember_selected_idp_from_disco` parameter controls whether the user will have to always select a
329
+
target provider when a discovery service is configured. If the parameter is set to `True` and ForceAutn is not set,
330
+
SATOSA will remember and reuse the selected target provider for the duration that context.state is valid.
331
+
The default behaviour is `False`.
332
+
333
+
```yaml
334
+
config:
335
+
sp_config: [...]
336
+
remember_selected_idp_from_disco: True
337
+
```
338
+
339
+
##### Use the configured discovery service if ForceAuthn is set to true
340
+
341
+
The `use_disco_when_forceauthn` parameter controls whether the user will be redirected to the configured
342
+
discovery service when the SP sends a SAML authentication request with `ForceAuthn` set to `True`. The
343
+
default behaviour is `False`.
344
+
345
+
```yaml
346
+
config:
347
+
sp_config: [...]
348
+
use_disco_when_forceauthn: True
349
+
```
350
+
351
+
##### Mirror the SAML ForceAuthn option
352
+
353
+
By default when the SATOSA SAML frontend receives a SAML authentication request with ForceAuthn set to `True`,
354
+
this information is not mirrored in the SAML authentication request that is generated by the SATOSA SAML backend
355
+
towards the upstream identity provider. If the configuration parameter `mirror_saml_forceauthn` is set to `True`,
356
+
then the default behaviour changes and the SATOSA SAML backend will set ForceAuthn to true when it proxies a SAML
357
+
authentication request with ForceAuthn set to `True`. The default behaviour is `False`.
0 commit comments