-
Notifications
You must be signed in to change notification settings - Fork 630
Refactor the code that rejects for wrong audience #7487
Copy link
Copy link
Closed
Labels
good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/good-first-issueDenotes an issue ready for a new contributor.Denotes an issue ready for a new contributor.triage/acceptedIssues which should be fixed (post-triage)Issues which should be fixed (post-triage)
Metadata
Metadata
Assignees
Labels
good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/good-first-issueDenotes an issue ready for a new contributor.Denotes an issue ready for a new contributor.triage/acceptedIssues which should be fixed (post-triage)Issues which should be fixed (post-triage)
Type
Projects
Status
✅ Done
Currently we have multiple places which validate the OIDC audience of an incoming request. E.g.:
eventing/pkg/channel/event_receiver.go
Lines 248 to 269 in 256a41d
eventing/pkg/broker/ingress/ingress_handler.go
Lines 227 to 251 in 79bb385
or
eventing/pkg/broker/filter/filter_handler.go
Lines 211 to 228 in 79bb385
(and maybe others).
As they all have a similar logic, this could be refactored into a common method and reused.
Originally posted by @Cali0707 in #7449 (comment)