- Notifications
You must be signed in to change notification settings - Fork936
feat: implement RFC 6750 Bearer token authentication#18644
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
ThomasK33 merged 1 commit intomainfromthomask33/06-27-feat_oauth2_implement_rfc_6750_bearer_token_support_for_mcp_complianceJul 2, 2025
Merged
feat: implement RFC 6750 Bearer token authentication#18644
ThomasK33 merged 1 commit intomainfromthomask33/06-27-feat_oauth2_implement_rfc_6750_bearer_token_support_for_mcp_complianceJul 2, 2025
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
This was referencedJun 27, 2025
MemberAuthor
ThomasK33 commentedJun 27, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
This was referencedJun 27, 2025
ff83df4
to3665807
Compare5898895
to5be6c6a
Compare3665807
to56126dd
Compare5be6c6a
tofded148
Comparefca6b9a
to68baa21
Compare68baa21
to578e708
Compare9b7f5d9
to7ef25b1
Compare578e708
to26c0eeb
Compare7ef25b1
tof0608bc
Compare26c0eeb
to7b70f7f
Comparef0608bc
toc68a923
Compare7b70f7f
to1a9400e
Comparec68a923
tof55771a
Compare5f946b1
to14d91ac
Comparef55771a
to34af681
Comparea239eaa
to4ca3595
Comparedd8ddee
to54580fa
Compare4ca3595
to23374cd
Compare54580fa
to21cdd55
Compare43fcceb
todb5e215
Compare21cdd55
to2410fd8
Comparedb5e215
to953036f
Compare2410fd8
to7eb343b
Compare7eb343b
to3760dd0
Compare22c2dc6
to14e6e22
Compare3760dd0
to2a41a65
Compare14e6e22
to5791cb0
Compare2a41a65
to52c88e0
Compare7e0ce8a
to59b7a9d
Compare52c88e0
to4799b4b
Compare4799b4b
toa07ba99
Compare- Add RFC 6750 bearer token extraction to APITokenFromRequest as fallback methods- Support Authorization: Bearer <token> header and access_token query parameter- Maintain backward compatibility by prioritizing existing custom methods first- Add WWW-Authenticate headers to 401/403 responses per RFC 6750- Update Protected Resource Metadata to advertise bearer_methods_supported- Add comprehensive test suite for RFC 6750 compliance in rfc6750_test.go- Update MCP test scripts with bearer token authentication tests- Enhance CLAUDE.md with improved Go LSP tool usage guidelinesImplements RFC 6750 Section 2.1 (Authorization Request Header Field) and 2.3 (URI Query Parameter).Maintains full backward compatibility with existing Coder authentication methods.Completes major MCP OAuth2 compliance milestone.Change-Id: Ic9c9057153b40728ad91b377d753a7ffd566add7Signed-off-by: Thomas Kosiewski <tk@coder.com>
a07ba99
to5c1b9f6
Compare09c5055
intomain 41 of 60 checks passed
Uh oh!
There was an error while loading.Please reload this page.
Merge activity
|
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add RFC 6750 Bearer Token Authentication Support
This PR implements RFC 6750 Bearer Token authentication as an additional authentication method for Coder's API. This allows clients to authenticate using standard OAuth 2.0 Bearer tokens in two ways:
Authorization: Bearer <token>
headeraccess_token
query parameterKey changes:
These authentication methods are added as fallback options, maintaining backward compatibility with Coder's existing authentication mechanisms. The existing authentication methods (cookies, session token header, etc.) still take precedence.
This implementation follows the OAuth 2.0 Bearer Token specification (RFC 6750) and improves interoperability with standard OAuth 2.0 clients.