-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 PKCE verifier for OIDC #1812
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe changes enhance the OpenID Connect (OIDC) registration and callback process by implementing Proof Key for Code Exchange (PKCE). A new Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Client
participant OIDCProvider
participant Headscale
User->>Client: Initiate OIDC registration
Client->>Headscale: RegisterOIDC(machKey, verifier)
Headscale-->>Client: Store RegistrationInfo
User->>OIDCProvider: Authorise
OIDCProvider-->>User: Redirect with auth code
User->>Client: Redirect back with auth code
Client->>Headscale: OIDCCallback(authCode, regInfo)
Headscale->>Headscale: Validate RegistrationInfo
Headscale->>OIDCProvider: Exchange auth code for token
OIDCProvider-->>Headscale: Return access token
Headscale-->>Client: Return access token
Recent review detailsConfiguration used: .coderabbit.yaml Files selected for processing (2)
Additional comments not posted (6)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
I imagine this can go in and be rebased on top of #2020, whenever that is ready. |
@Rorical if you have time to rebase this in the next few days, then it might be able to make it into the next release. |
This could be resolved soon. I'm away from my headscale instance for months and haven't realized current status of this project, so I need some time to check what's going on. Based on the purpose of pkce, I recommend to add a oidc config parameter |
Testing and documentation will be added soon |
https://www.rfc-editor.org/rfc/rfc7636.html
To fix the error "Could not exchange code for the token" when using the PKCE method, a verifier should be generated and used during the authentication process.
Summary by CodeRabbit
New Features
RegistrationInfo
, to manage OIDC-related information effectively.Bug Fixes