Google Cloud Endpoints: Websockets and JWT

5/11/2017

I've been developing a mobile app (iOS) with gRPC via Firebase auth(z). My server is using GKE with the NGinx proxy - so now I'm developing the Web UI for the deeper configuration of a user account. I prefer not to fall back to REST API's, so I was wondering if Google Cloud Endpoints supports websockets, and would it also prevent non-authorised app users from trying to make a request? With websockets I know it's possible, but as I'm tied in with gRPC with Cloud Endpoints, I'm just checking before I fall back to REST API calls (I prefer not to!).

Summary: Does Google Cloud Endpoints support Websockets with JWT auth tokens from Firebase?

Thanks

-- William K
google-cloud-endpoints
google-kubernetes-engine
jwt
nginx
websocket

3 Answers

3/25/2018

The Google Cloud Endpoints ESP doesn't support websockets.

However, Google Cloud Endpoints have open sourced their Extensible Service Proxy implementation. Internally it's implemented as a custom nginx module. Since Nginx supports websockets, it should be feasible to add support to their nginx:esp module.

But it's definitely out of scope for me. :-)

-- Cody A. Ray
Source: StackOverflow

9/25/2018

It looks like ESP supports websockets now, using the "--enable_websocket" flag in the esp config.

-- AlecZorab
Source: StackOverflow

5/22/2017

Currently, Cloud Endpoints doesn't support WebSockets at all.

Btw, what is your use case for WebSockets? WebSocket won't work with gRPC either. If you just want to talk to your gRPC service from Web UI, transcoding should work. It works with JWT from Firebase auth.

-- lizan
Source: StackOverflow