Add ECDSA support for OIDC id tokens#1048
Merged
sourishkrout merged 1 commit intomainfrom Feb 20, 2026
Merged
Conversation
Signed-off-by: Sebastian (Tiedtke) Huckleberry <sebastiantiedtke@gmail.com>
There was a problem hiding this comment.
Pull request overview
This pull request adds ECDSA (Elliptic Curve Digital Signature Algorithm) support to the OIDC authentication implementation, allowing the system to verify JWT tokens signed with ES256, ES384, and ES512 algorithms in addition to the existing RSA support.
Changes:
- Extended JWKS parsing to handle both RSA and EC (Elliptic Curve) key types
- Updated token verification to accept both RSA and ECDSA signing methods
- Enhanced test infrastructure to generate and verify tokens with both signing algorithms
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pkg/agent/iam/oidc.go | Added EC key parsing in downloadJWKS() with proper curve validation using crypto/ecdh, updated verifyToken() to accept ECDSA signing methods, changed publicKeys map type to any to support both RSA and ECDSA keys, and enhanced TestIDP to generate tokens with both signing methods |
| pkg/agent/iam/oidc_test.go | Added TestOIDC_DownloadJWKS_EC to verify EC key downloading and parsing, and TestOIDC_VerifyToken_ES256 to test ES256 token verification and interoperability with RS256 tokens |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This allows well-knowns to contain not just RSA keys.