http-extensions icon indicating copy to clipboard operation
http-extensions copied to clipboard

Support expected authority changes

Open richanna opened this issue 5 years ago • 4 comments

In some cases, the authority of the effective request URI may be expected to change, for example from "public-service-name.example.com" to "service-host-1.public-service-name.example.com". This is commonly the case for services that are hosted behind a load-balancing gateway, where the client sends requests to a publicly known domain name for the service, and these requests are transformed by the gateway into requests to specific hosts in the service fleet.

One possible way to handle this would be to special-case the Host header field to allow verifier to substitute a known expected value, or a value provided in another header field (e.g., Via) when generating the Signature Input, provided that the verifier also recognizes the real value in the Host header. Alternatively, this logic could apply to an (audience) content identifier.

richanna avatar May 25 '20 22:05 richanna

I'd add the following tasks:

  • [ ] add an example of request-response
  • [ ] add paragraph in Security Considerations

An (audience) can be reasonable as that decouples the verifier identity from the target.

ioggstream avatar May 26 '20 13:05 ioggstream

The authority is now a separate field from the host header, which should help this case. The draft does not yet contain language that special cases as described here.

jricher avatar Jul 16 '21 19:07 jricher

It seems that for cases like this, the use of the @authority derived component is the right approach, and either have the reverse-proxy do the verification and add its own signature, the latter of which is checked downstream, or the context is passed downstream allowing the derivation of the @authority value using some application-specific ruleset.

Suggest we close this without changes.

jricher avatar Jul 14 '22 15:07 jricher

I agree that @authority is the right tool to address this, however the current language for it and @target-uri seem to not leave a lot of leeway for the verifier to substitute values as appropriate. I will put some draft text together.

richanna avatar Jul 28 '22 18:07 richanna