Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to force MFA on OIDC Logins #971

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

pr0gr8mm3r
Copy link

This PR implements the ability to force users logging in through OIDC to have Multi-factor authentication enabled. It does this by looking at the amr claim provided by the IDP. This claim must contain the mfa value. Make sure that the IDP returns the amr claim correctly, otherwise authentication will fail.

Two new env vars have been added:

  • GRIST_OIDC_SP_FORCE_MFA
    If set to "true", the user will be forced to have multi-factor authentication enabled.
  • GRIST_OIDC_SP_MFA_SETTINGS_URL
    This is needed when GRIST_OIDC_SP_FORCE_MFA is set to true. Enter the URL where the user will be able to configure Multi-factor authentication on their account. This will be shown in the UI if the user does not have MFA enabled.

How to test:

Using Keycloak, it's fairly hard to add the amr claim, but Zitadel returns it by default. To test, create a new account on their cloud offering, hook it up to Grist and set GRIST_OIDC_SP_FORCE_MFA to true.
Log in without MFA enabled and get an error page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant