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

enable transparent cookie forwarding #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

naggie
Copy link

@naggie naggie commented Mar 7, 2018

My implementation replies on using a cookies to authenticate websocket
connections and normal HTTP RESTful endpoints with a mux used to convert
the cookies to metadata.

I believe that this is suitable configuration for the
grpc-websocket-proxy project as it makes the websocket-based requests
more consistent with the standard HTTP based requests (which have
cookies available) at the GRPC gateway.

It also allows the use case of creating a cookie based mechanism to
inject metadata; I simply added an interceptor to convert a specific
cookie into GRPC metadata.

I don't think it introduces a security risk, as handling cookies is
deferred to the GRPC gateway code itself.

Thanks for the websocket gateway, it's made developing a web app that
consumes my GRPC API much easier.

My implementation replies on using a cookies to authenticate websocket
connections and normal HTTP RESTful endpoints with a mux used to convert
the cookies to metadata.

I believe that this is suitable configuration for the
grpc-websocket-proxy project as it makes the websocket-based requests
more consistent with the standard HTTP based requests (which have
cookies available) at the GRPC gateway.

It also allows the use case of creating a cookie based mechanism to
inject metadata; I simply added an interceptor to convert a specific
cookie into GRPC metadata.

I don't think it introduces a security risk, as handling cookies is
deferred to the GRPC gateway code itself.

Thanks for the websocket gateway, it's made developing a web app that
consumes my GRPC API much easier.
@naggie
Copy link
Author

naggie commented Jun 19, 2018

Thinking about this again -- is there any reason why the headers are filtered in the first place?

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

1 participant