Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Websockets disconnecting when using OAuth2 VerifyJWTAccessToken

Hi,

Running into an odd issue when we try to send messages via Websocket on a proxy which uses the OAuth2 policy (using the VerifyJWTAccessToken operation). After sending one message (sometimes a few can go through) the connection disconnects. We do not have this issue with API key verification or unauthenticated requests.

We suspected that something might be wrong with our configuration or backends, so we tried to use as simple of things as possible. We used https://github.com/DinoChiesa/devjam3-20170405/tree/master/Resources/oauth2-cc to generate tokens. For the verification step, we set up a simple proxy which just sets the secret key, extracts the token from a query parameter, and then runs OAuth2 VerifyJWTAccessToken, and for the server we used the test websocket server seen here: https://github.com/DinoChiesa/Apigee-Websocket-Example . With this stripped down example, we still will get disconnections fairly consistently when sending messages via websocket.

Thanks in advance!

EDIT: just tried with opaque tokens instead of JWT, and it worked there. We'd really like to support JWT from our API so I'm wondering if there's any configuration I need to change to get that working?

4 3 549
3 REPLIES 3