-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix(oidc): missing introspection claims #7049
Conversation
ArtifactsThese changes are published for testing on Buildkite, DockerHub and GitHub Container Registry. Docker Container
|
WalkthroughThe recent update focuses on enhancing the OAuth introspection functionality within the system. It introduces a cleaner separation of concerns by refactoring the Changes
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7049 +/- ##
==========================================
+ Coverage 73.28% 73.63% +0.34%
==========================================
Files 345 345
Lines 29996 29919 -77
Branches 839 839
==========================================
+ Hits 21982 22030 +48
+ Misses 7141 7018 -123
+ Partials 873 871 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
This fixes a regression of the claims returned by the introspection endpoint. Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
2167e2a
to
bb922b6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Review Status
Configuration used: CodeRabbit UI
Files ignored due to path filters (2)
go.mod
is excluded by!**/*.mod
,!**/*.mod
go.sum
is excluded by!**/*.sum
,!**/*.sum
Files selected for processing (3)
- internal/handlers/handler_oauth_introspection.go (2 hunks)
- internal/oidc/config.go (2 hunks)
- internal/oidc/types.go (1 hunks)
Additional Context Used
GitHub Check Runs (1)
codecov/patch failure (3)
internal/handlers/handler_oauth_introspection.go: [warning] 43-43: internal/handlers/handler_oauth_introspection.go#L43
Added line #L43 was not covered by tests
internal/oidc/config.go: [warning] 481-482: internal/oidc/config.go#L481-L482
Added lines #L481 - L482 were not covered by tests
internal/oidc/config.go: [warning] 486-487: internal/oidc/config.go#L486-L487
Added lines #L486 - L487 were not covered by tests
Additional comments not posted (2)
internal/oidc/config.go (1)
170-172
: The addition of theIntrospection
field to theIssuersConfig
struct is a clear and straightforward enhancement to support introspection-related functionality.internal/oidc/types.go (1)
998-998
: The addition ofIntrospectionJWTResponseClient
interface implementation forRegisteredClient
is correctly done and follows Go's idiomatic way to ensure interface compliance at compile time. This is a good practice for type safety.
bb922b6
to
9076693
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Status
Configuration used: CodeRabbit UI
Files ignored due to path filters (2)
go.mod
is excluded by!**/*.mod
,!**/*.mod
go.sum
is excluded by!**/*.sum
,!**/*.sum
Files selected for processing (4)
- internal/handlers/handler_oauth_introspection.go (2 hunks)
- internal/oidc/config.go (3 hunks)
- internal/oidc/config_test.go (1 hunks)
- internal/oidc/types.go (1 hunks)
Files skipped from review as they are similar to previous changes (3)
- internal/handlers/handler_oauth_introspection.go
- internal/oidc/config.go
- internal/oidc/types.go
Additional Context Used
Additional comments not posted (2)
internal/oidc/config_test.go (2)
260-330
: The test functionTestConfig_GetIssuerFuncs
is well-structured and covers various scenarios for issuer configurations. It's a good practice to include such comprehensive tests, especially when dealing with critical functionality like OIDC introspection. However, consider adding a brief comment above each test case within thetestCases
slice to explain the specific scenario it's testing. This will improve readability and maintainability, making it easier for future contributors to understand the purpose of each test case quickly.
332-378
: TheTestMisc
function tests various miscellaneous functionalities within theoidc.Config
struct. While it's good to have such a comprehensive test, the function nameTestMisc
is quite generic. Consider renaming it to something more descriptive of the functionalities it's testing, such asTestConfig_IntrospectionAndResponseModeBehaviors
. This would improve clarity and make it easier to understand the scope of the tests at a glance.
Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
9076693
to
0f14c6b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Status
Configuration used: CodeRabbit UI
Files ignored due to path filters (2)
go.mod
is excluded by!**/*.mod
,!**/*.mod
go.sum
is excluded by!**/*.sum
,!**/*.sum
Files selected for processing (4)
- internal/handlers/handler_oauth_introspection.go (2 hunks)
- internal/oidc/config.go (3 hunks)
- internal/oidc/config_test.go (1 hunks)
- internal/oidc/types.go (1 hunks)
Files skipped from review as they are similar to previous changes (4)
- internal/handlers/handler_oauth_introspection.go
- internal/oidc/config.go
- internal/oidc/config_test.go
- internal/oidc/types.go
Additional Context Used
This fixes a regression of the claims returned by the introspection endpoint. Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
This fixes a regression of the claims returned by the introspection endpoint.
Summary by CodeRabbit