Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add apiKey authentication #10

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

RaphaelManke
Copy link
Contributor

@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