Skip to content

Add apiKey authentication#10

Open
RaphaelManke wants to merge 3 commits intoboyney123:masterfrom
RaphaelManke:add-authentication
Open

Add apiKey authentication#10
RaphaelManke wants to merge 3 commits intoboyney123:masterfrom
RaphaelManke:add-authentication

Conversation

@RaphaelManke
Copy link

@RaphaelManke RaphaelManke commented Oct 28, 2022

This PR adds a new config flag to secure the api with an apikey.
fixes #1
The apikey is generated and stored in the aws secretsmanager and checked at each client connect attempt.
The apikey can be set by adding a queryParam apiKey=<valueFromSecret>.

I decided to go with a query parameter because headers can not allways be set e.g. the browser websocket implementation does not support it.

The apiKey can be changed by altering the value of the apiKey secret.

Additionally I added an example cdk app that creates an eventbus and publishes an event every minute.

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.

Add a authorizer function for the API Gateway (Websocket) endpoint

1 participant