grpc-go icon indicating copy to clipboard operation
grpc-go copied to clipboard

grpc: add a call option to override the `:authority` header on a per-RPC basis

Open easwars opened this issue 2 years ago • 3 comments

This is one of the items mentioned in https://github.com/grpc/grpc-go/issues/4717 which did not get done. The below description has been copied over verbatim from https://github.com/grpc/grpc-go/issues/4717. This is low priority and we want to implement this only if there is sufficient interest for it.

  • [ ] Add a call option to override the :authority header on a per-RPC basis. #3444
    • [ ] An optional interface will be added, to be implemented by AuthInfo implementations, to validate this override.
      • Implementations will need to perform a hostname validation check on the peer certificate, received during the handshake, to validate this override.
      • RPCs will fail if this call option is set, but:
        • AuthInfo for the subChannel does not implement this interface
        • validation by AuthInfo fails
    • [ ] Existing TLS based credentials implementations will be enhanced to support this.
    • [ ] Existing xDS credentials implementation will be enhanced to support this.
      • Use list of SANs provided by management server to validate.
    • [ ] Insecure credentials will allow for any authority value.

easwars avatar May 16 '22 23:05 easwars

@easwars

I created a PR that adds a new CallOption for setting :authority per RPC: https://github.com/grpc/grpc-go/pull/5787 Could you please check this PR...?

110y avatar Nov 10 '22 09:11 110y

@easwars @ginayeh Happy to work on this issue if this is still of priority. If so, can I have some pointers on where to start next? I would also appreciate some clarity on what needs to be done. Thank you!

JaydenTeoh avatar Oct 01 '23 17:10 JaydenTeoh

Thanks for your interest @JaydenTeoh. IMO, this issue requires some more clarification and might be easier for someone internal to pick this up. Sorry for the mislabel.

If you are still interested, please look for other issues marked "Status: Help Wanted" or "Hacktoberfest".

arvindbr8 avatar Oct 23 '23 19:10 arvindbr8