Skip to content

Commit ce30037

Browse files
authored
Add SSO MFA docs (#50533)
* Add SSO MFA docs. * Address comments from zmb3. * Fix links; minor style fix. * Address comments. * Try removing leading / in example links. * Address Nic's comments.
1 parent 62ad3fe commit ce30037

File tree

3 files changed

+173
-1
lines changed

3 files changed

+173
-1
lines changed

docs/pages/admin-guides/access-controls/sso/sso.mdx

Lines changed: 111 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ spec:
213213
- '2001:db8::/96'
214214
```
215215

216-
## Configuring SSO
216+
## Configuring SSO for login
217217

218218
Teleport works with SSO providers by relying on the concept of an
219219
**authentication connector**. An authentication connector is a configuration
@@ -411,6 +411,116 @@ values to match your identity provider:
411411

412412
At this time, the `spec.provider` field should not be set for any other identity providers.
413413

414+
## Configuring SSO for MFA checks
415+
416+
Teleport administrators can configure Teleport to delegate MFA checks to an
417+
SSO provider as an alternative to registering MFA devices directly with the Teleport cluster.
418+
This allows Teleport users to use MFA devices and custom flows configured in the SSO provider
419+
to carry out privileged actions in Teleport, such as:
420+
421+
- [Per-session MFA](../guides/per-session-mfa.mdx)
422+
- [Moderated sessions](../guides/moderated-sessions.mdx)
423+
- [Admin actions](../guides/mfa-for-admin-actions.mdx)
424+
425+
Administrators may want to consider enabling this feature in order to:
426+
427+
- Make all authentication (login and MFA) go through the IDP, reducing administrative overhead
428+
- Make custom MFA flows, such as prompting for 2 distinct devices for a single MFA check
429+
- Integrate with non-webauthn devices supported directly by your IDP
430+
431+
<Admonition type="note">
432+
SSO MFA is an enterprise feature. Only OIDC and SAML auth connectors are supported.
433+
</Admonition>
434+
435+
### Configure the IDP App / Client
436+
437+
There is no standardized MFA flow unlike there is with SAML/OIDC
438+
login, so each IDP may offer zero, one, or more ways to offer MFA checks.
439+
440+
Generally, these offerings will fall under one of the following cases:
441+
442+
1. Use a separate IDP app for MFA:
443+
444+
You can create a separate IDP app with a custom MFA flow. For example, with
445+
Auth0 (OIDC), you can create a separate app with a custom [Auth0 Action](https://auth0.com/docs/customize/actions)
446+
which prompts for MFA for an active OIDC session.
447+
448+
2. Use the same IDP app for MFA:
449+
450+
Some IDPs provide a way to fork to different flows using the same IDP app.
451+
For example, with Okta (OIDC), you can provide `acr_values: ["phr"]` to
452+
[enforce phishing resistant authentication](https://developer.okta.com/docs/guides/step-up-authentication/main/#predefined-parameter-values).
453+
454+
For a simpler approach, you could use the same IDP app for both login and MFA
455+
with no adjustments. For Teleport MFA checks, the user will be required to
456+
relogin through the IDP with username, password, and MFA if required.
457+
458+
<Admonition type="warning">
459+
While the customizability of SSO MFA presents multiple secure options previously
460+
unavailable to administrators, it also presents the possibility of insecure
461+
misconfigurations. Therefore, we strongly advice administrators to incorporate
462+
strict, phishing-resistant checks with WebAuthn, Device Trust, or some similar
463+
security features into their custom SSO MFA flow.
464+
</Admonition>
465+
466+
### Updating your authentication connector to enable MFA checks
467+
468+
Take the authentication connector file `connector.yaml` created in [Configuring SSO for login](#configuring-sso-for-login)
469+
and add MFA settings.
470+
471+
<Tabs>
472+
<TabItem label="OIDC">
473+
474+
```yaml
475+
(!examples/resources/oidc-connector-mfa.yaml!)
476+
```
477+
478+
</TabItem>
479+
<TabItem label="SAML">
480+
481+
```yaml
482+
(!examples/resources/saml-connector-mfa.yaml!)
483+
```
484+
485+
You may use `entity_descriptor_url` in lieu of `entity_descriptor` to fetch
486+
the entity descriptor from your IDP.
487+
488+
We recommend "pinning" the entity descriptor by including the XML rather than
489+
fetching from a URL.
490+
491+
</TabItem>
492+
</Tabs>
493+
494+
Update the connector:
495+
496+
```code
497+
$ tctl create -f connector.yaml
498+
```
499+
500+
### Allowing SSO as an MFA method in your cluster
501+
502+
Before you can use the SSO MFA flow we created above, you need to enable SSO
503+
as a second factor in your cluster settings. Modify the dynamic config resource
504+
using the following command:
505+
506+
```code
507+
$ tctl edit cluster_auth_preference
508+
```
509+
510+
Make the following change:
511+
512+
```diff
513+
kind: cluster_auth_preference
514+
version: v2
515+
metadata:
516+
name: cluster-auth-preference
517+
spec:
518+
# ...
519+
second_factors:
520+
- webauthn
521+
+ - sso
522+
```
523+
414524
## Working with an external email identity
415525

416526
Along with sending groups, an SSO provider will also provide a user's email address.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
kind: oidc
2+
version: v3
3+
metadata:
4+
name: oidc_connector
5+
spec:
6+
# Login settings
7+
client_id: <LOGIN-CLIENT-NAME>
8+
client_secret: <LOGIN-CLIENT-SECRET>
9+
# issuer_url and redirect_url are shared by both login and MFA, meaning the same OIDC provider must be used.
10+
issuer_url: https://idp.example.com/
11+
redirect_url: https://mytenant.teleport.sh:443/v1/webapi/oidc/callback
12+
# ...
13+
14+
# MFA settings
15+
mfa:
16+
# Enabled specified whether this OIDC connector supports MFA checks.
17+
enabled: true
18+
# client_id and client_secret should point to an IdP configured
19+
# app configured to handle MFA checks. In most cases, these values
20+
# should be different from your login client ID and Secret above.
21+
client_id: <MFA-CLIENT-NAME>
22+
client_secret: <MFA-CLIENT-SECRET>
23+
# prompt can be set to request a specific prompt flow from the IdP. Supported
24+
# values depend on the IdP.
25+
prompt: none
26+
# acr_values are Authentication Context Class Reference values. These values
27+
# are context-specific and vary depending on the IdP.
28+
acr_values: []
29+
# max_age is the amount of time in seconds that an IdP session is valid for.
30+
# Defaults to 0 to always force re-authentication for MFA checks. This should
31+
# only be set to a non-zero value if the IdP is setup to perform MFA checks on
32+
# top of active user sessions.
33+
max_age: 0
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#
2+
# Example resource for a SAML connector
3+
# This connector can be used for SAML endpoints like Okta
4+
#
5+
kind: saml
6+
version: v2
7+
metadata:
8+
# the name of the connector
9+
name: okta
10+
spec:
11+
# Login settings
12+
display: Okta
13+
entity_descriptor_url: https://example.okta.com/app/<LOGIN-APP-ID>/sso/saml/metadata
14+
# acs is shared by both login and MFA, meaning the same SAML provider must be used.
15+
acs: https://<cluster-url>/v1/webapi/saml/acs/new_saml_connector
16+
# ...
17+
18+
# MFA settings
19+
mfa:
20+
# Enabled specifies whether this SAML connector supports MFA checks.
21+
enabled: true
22+
# entity_descriptor_url should point to an IdP configured app that handles MFA checks.
23+
# In most cases, this value should be different from the entity_descriptor_url above.
24+
entity_descriptor_url: https://example.okta.com/app/<MFA-APP-ID>/sso/saml/metadata
25+
# force_reauth determines whether existing login sessions are accepted or if
26+
# re-authentication is always required. Defaults to "yes". This should only be
27+
# set to false if the app described above is setup to perform MFA checks on top
28+
# of active user sessions.
29+
force_reauth: yes

0 commit comments

Comments
 (0)