Token header forwarding for websocket subscription

Hi,

I’m trying to use Tyk GW with our auth token, I was able to forward Authorization header for http graphql queries but i can not find a way how to do it with websocket subscription.

Client is setting token as a query param in WS link, but i can not find the way how to instruct tyk to forward it to our service like we can do it with 6. Header Forwarding ?

Thanks in advance,
Amer

I don’t think our WebSocket feature has support for HTTP headers. Headers is a HTTP protocol which is think is unavailable on the TCP protocol that our WebSocket feature uses. If I am not wrong, our GraphQL WebSockets is utilizing our WebSocket feature underneath, so the same would apply.

We have 2 available options for secured authentication in WebSockets:

I haven’t used custom auth with WebSockets, so I am unsure how this may work.

@agata-wit Do you have idea how this might work?

I’ve spoken to the squad and they say it should be possible with header forwarding. Have you tried it @trkich ?