-
Notifications
You must be signed in to change notification settings - Fork 153
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
Pass headers when fetching next links #47659
Comments
Proposal: a For example: HTTP/1.1 200 OK
Grip-Hold: stream
Grip-Channel: foo; prev-id=1
Grip-Link: </stream>; rel=next; set-header="Authorization:Bearer {token}" When such set headers are used for authentication, the origin could set client-specific or shared creds at its option. If the URIs and set headers are identical for more than one client, then request collapsing could be performed. For convenience we could also have a way to tell Pushpin to simply pass along a certain request header, with a HTTP/1.1 200 OK
Grip-Hold: stream
Grip-Channel: foo; prev-id=1
Grip-Link: </stream>; rel=next; pass-header=Authorization In the case of client-specific auth creds, this would avoid needing to duplicate the creds again in the Multiple instances of |
While we're at it, consider adding a generic header to indicate whenever a request originated from the proxy. This could be useful for trusting the request URI, as well as for trusting any headers set by the above extension (which the client could otherwise set on its own and the backend wouldn't be able to tell the difference). E.g.:
This could be used when following Of course, to fully trust a request from the proxy, the backend also needs to validate |
With HTTP streaming, it's possible to set a "next link". Next links are followed without passing along extra headers, such as the original client request headers. This means authenticating a request of a next link requires authentication material to be included in the link itself, for example by include an auth token as a query parameter. It might be nice if there were a way for requests of next links to use headers for auth.
Note that next links are intended to be shared by multiple clients to enable request collapsing, so a headers-based solution should have a way to provide special shared creds generated by the origin server, rather than only simply passing the original client request headers which would likely include client-specific creds.
The text was updated successfully, but these errors were encountered: