Skip to content

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

Merged
purnesh42H merged 1 commit intogrpc:masterfrom
dfawley:pathheader
Dec 24, 2024
Merged

rbac: add method name to :path in headers#7965
purnesh42H merged 1 commit intogrpc:masterfrom
dfawley:pathheader

Conversation

@dfawley
Copy link
Copy Markdown
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
@codecov
Copy link
Copy Markdown

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
purnesh42H pushed a commit to purnesh42H/grpc-go that referenced this pull request Jan 9, 2025
purnesh42H added a commit that referenced this pull request Jan 10, 2025
@arjan-bal arjan-bal modified the milestones: 1.70 Release, 1.69 Release Jan 22, 2025
@dfawley dfawley deleted the pathheader branch July 18, 2025 16:42
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jan 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants