-
Notifications
You must be signed in to change notification settings - Fork 595
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
mt-broker-ingress check audience of received token #7336
mt-broker-ingress check audience of received token #7336
Conversation
1081cf6
to
d948abb
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #7336 +/- ##
==========================================
- Coverage 76.87% 76.70% -0.17%
==========================================
Files 252 253 +1
Lines 13822 13851 +29
==========================================
Hits 10625 10625
- Misses 2667 2694 +27
- Partials 530 532 +2
☔ View full report in Codecov by Sentry. |
/cc @pierDipi I added some "conformance" tests for addressables in this PR too, to check, if they handle requests with OIDC tokens correctly. |
e8af194
to
1d0de43
Compare
1d0de43
to
f3a17f3
Compare
/cc @pierDipi |
/unhold |
Hi @pierDipi, |
I'm looking |
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.
It looks good, just one edge case handling
AddressableRejectInvalidAudience(gvr, kind, name), | ||
AddressableRejectCorruptedSignature(gvr, kind, name), | ||
AddressableRejectExpiredToken(gvr, kind, name), | ||
AddressableAllowsValidRequest(gvr, kind, name), |
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.
If these functions are only used internally, can we make them package private?
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.
Same for the top level one, I believe only AddressableOIDCConformance should be public
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.
I agree. Currently we have only the problem, that some addressables have the audience feature implemented, but not the token validation (and vice versa). So they fail on AddressableOIDCConformance
yet - only either AddressableOIDCTokenConformance
or AddressableHasAudiencePopulated
.
But IMO no issue with making AddressableReject*
and AddressableAllowsValidRequest
private.
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.
/lgtm
/approve
Non blocking comment
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: creydr, pierDipi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
Fixes #7290
Proposed Changes
/hold
until we have knative-extensions/reconciler-test#595 for the tests