-
Notifications
You must be signed in to change notification settings - Fork 604
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
Authenticate requests from mt-broker-ingress to underlying channel #7473
Authenticate requests from mt-broker-ingress to underlying channel #7473
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #7473 +/- ##
==========================================
- Coverage 76.81% 76.71% -0.10%
==========================================
Files 253 253
Lines 14136 14212 +76
==========================================
+ Hits 10858 10903 +45
- Misses 2736 2759 +23
- Partials 542 550 +8 ☔ View full report in Codecov by Sentry. |
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.
One nit, otherwise looks good! (sorry I missed the nit earlier)
config/brokers/mt-channel-broker/roles/ingress-serviceaccount-oidc.yaml
Outdated
Show resolved
Hide resolved
…oidc.yaml Co-authored-by: Calum Murray <[email protected]>
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Cali0707, creydr 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 |
dispatchInfo, err := h.eventDispatcher.SendEvent(ctx, *event, *channelAddress, kncloudevents.WithHeader(headers)) | ||
opts := []kncloudevents.SendOption{ | ||
kncloudevents.WithHeader(headers), | ||
kncloudevents.WithOIDCAuthentication(&types.NamespacedName{ |
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.
JWT token will be added when cloudEvent dispatcher is going to send the event, which is what I am implementing here https://github.com/knative/eventing/pull/7452/files right, just to confirm @creydr
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.
Not sure if I understood you correctly, but this PR here is for broker-ingress. In the ApiServerSource, we need something similar. The difference is, that the ApiServerSource does not use the kncloudevents.Dispatcher, which does all this for you. The ApiServerSource uses the CloudEvents SDK client, which requires you to add the JWT "manually" as part of the Authorization header (what you're doing here).
Fixes #7472
Proposed Changes
mt-broker-ingress-oidc
service account and audience of channel)