Skip to content
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

rbac: add method name to :path in headers #7965

Merged
merged 1 commit into from
Dec 24, 2024
Merged

Conversation

dfawley
Copy link
Member

@dfawley dfawley commented Dec 23, 2024

RBAC header matchers should be able to work with :path headers, per A41:

For this design, headers can include :method, :authority, and :path matchers and they should match the values received on-the-wire independent of whether they are stored in Metadata or in separate APIs.

Because grpc-go removes this header from what's read on the wire to what is given to applications in the metadata, we need to add it back in like we do with :method.

RELEASE NOTES:

  • rbac: fix support for :path header matchers, which would previously never successfully match.

@dfawley dfawley added this to the 1.70 Release milestone Dec 23, 2024
@dfawley dfawley requested a review from arjan-bal December 23, 2024 21:39
Copy link

codecov bot commented Dec 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.14%. Comparing base (e912015) to head (a2c79f1).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7965      +/-   ##
==========================================
+ Coverage   82.06%   82.14%   +0.07%     
==========================================
  Files         381      381              
  Lines       38535    38539       +4     
==========================================
+ Hits        31625    31656      +31     
+ Misses       5596     5572      -24     
+ Partials     1314     1311       -3     
Files with missing lines Coverage Δ
internal/xds/rbac/rbac_engine.go 81.21% <100.00%> (+0.46%) ⬆️

... and 23 files with indirect coverage changes

@arjan-bal arjan-bal assigned dfawley and unassigned arjan-bal Dec 24, 2024
@purnesh42H purnesh42H merged commit e8d5feb into grpc:master Dec 24, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants