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

Send Authorization Header to gRPC endpoint, adds gRPC mTLS support #1114

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

TaridaGeorge
Copy link

This PR adds the following things:

  1. Add the Authorization Header to the gRPC OutgoingContext in order to make use of it directly from the gRPC headers.
  2. adds mTLS support for gRPC hook. grpc hook now have a hooks-grpc-secure flag
--hooks-grpc-secure=true
--hooks-grpc-server-tls-certificate=/home/user/tls.pem
--hooks-grpc-client-tls-certificate=/home/user/client.pem
--hooks-grpc-client-tls-key=/home/user/client_key.pem

@Acconut
Copy link
Member

Acconut commented Apr 17, 2024

Thank you for the PR! These two changes should probably go into two separate PRs as they are distinct from each other.

  1. Add the Authorization Header to the gRPC OutgoingContext in order to make use of it directly from the gRPC headers.

This should not be enabled by default as it allows a user to smuggle an arbitrary header value to the gRPC backend, which can have unintended consequences. Header forwarding should be an opt-in feature and even then be customizable to allow the administrator to select headers to be forwarded. Overall, I am thinking about an option that is similar to the -hooks-http-forward-headers flag that exists for HTTP hooks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants