Skip to content

Suggestions for supportng multiple client applications & API key based authentication  #6

@madhub

Description

@madhub

Suggestions for supporting multiple client applications & API key based authentication

Currently server uses jwt token for authentication of web socket request from the tunnel client.
It would be nice if you use simple API key based authentication , where list of valid API key's can be configured via environment variable.

Multiple API keys can use .
Below example shows a API keys per application.

export API_KEYS="apikey1:myapp1,apikey2:myapp2"
node server.js

On the client side
API key & application name are send in the initial WebSocket connection, server will check the API key & app name from the lookup parsed from API_KEYS environment variable. If matches it maintains the Tunnel connection with appname as key

When external clients wants to send request to application , it can pass application name in the URL.

Example : If the tunnel server is running on endpoint https://example.com & a request for app1 & app2 looks as follows
https://example.com/app1
https://example.com/app2
Tunnel Server can extract the application name from the URL & lookup TunnelConnection map & route request to proper web socket connection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions