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

Support nonce and acr with OIDC + Tests #883

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

Conversation

fflorent
Copy link
Collaborator

@fflorent fflorent commented Mar 6, 2024

Context

  • Some Identity provider don't support PKCE and instead impose Nonce;
  • They also may impose passing some ACR values;
  • And require to pass the state and the idToken in the logout

Proposed solution

  • Introduce the GRIST_OIDC_IDP_ENABLED_PROTECTIONS variable who can contain comma-separated values with either: STATE, NONCE and PKCE, and defaults to STATE,PKCE;
  • Introduce the GRIST_OIDC_IDP_ACR_VALUES variable with space separated values;
  • Once logged in (after the callback), store the state and the idToken for the logout, and clear any other values;
  • Introduce unit tests with mocks;
  • Also redirect to the error page when something went wrong while signing in;

@fflorent fflorent force-pushed the support-nonce-and-acr-with-oidc branch 3 times, most recently from e78e2f3 to 8b90c90 Compare March 7, 2024 10:59
@fflorent
Copy link
Collaborator Author

Opening the PR for checking whether the tests work in the CI

@fflorent fflorent marked this pull request as ready for review March 19, 2024 11:23
@fflorent fflorent changed the title Support nonce and acr with OIDC + Tests [Draft] Support nonce and acr with OIDC + Tests Mar 19, 2024
@fflorent fflorent force-pushed the support-nonce-and-acr-with-oidc branch 21 times, most recently from 56706b3 to 1bf114a Compare March 21, 2024 06:49
@fflorent fflorent changed the title [Draft] Support nonce and acr with OIDC + Tests Support nonce and acr with OIDC + Tests Mar 21, 2024
@fflorent fflorent force-pushed the support-nonce-and-acr-with-oidc branch from bb81a2a to d83df2e Compare June 5, 2024 12:50
@fflorent
Copy link
Collaborator Author

fflorent commented Jun 5, 2024

@SleepyLeslie I sent you in private everything you need to try my PR using Agent Connect. Please keep me informed otherwise.

Copy link
Collaborator

@SleepyLeslie SleepyLeslie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @fflorent for the updates and Agent Connect info. I'm waiting for an approval to sign up for Agent Connect. I'll get back to you as soon as I finish testing. Otherwise this looks good to me now, and should be able to get merged soon!

image

@fflorent
Copy link
Collaborator Author

@SleepyLeslie Hmm, I have given the env variables to use, but using your own email won't work.
There are credentials to use and some simple questions to answer, but asked in French.

I suggest we take some time to take a look at that together if you want to, that will be probably simpler and faster. It may take 10 / 15 minutes in case testing is just what you need, or more if you have questions regarding my developments.

I send you an email to see what slot we could find.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Needs feedback
Development

Successfully merging this pull request may close these issues.

None yet

4 participants