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

Secure API Gateways with authentication #16

Open
katjes733 opened this issue Feb 9, 2022 · 1 comment
Open

Secure API Gateways with authentication #16

katjes733 opened this issue Feb 9, 2022 · 1 comment

Comments

@katjes733
Copy link
Owner

katjes733 commented Feb 9, 2022

Currently all API Gateway methods do not require authentication and can therefore be accessed publicly. We need to ensure the methods cannot be invoked in an un-authorized way.

@katjes733
Copy link
Owner Author

katjes733 commented Feb 16, 2022

A simple authorization can simply verify the JWT token coming from Teams. For that a lambda needs to import pyJWT, which can only be accomplished via lambda layer. To build a custom lambda layer in CFN, one requires a zip file with the requirements.
An idea is to create an S3 bucket, run a CodeBuild compiling the required dependencies and copy the output to the s3 bucket requires that CFN waits with the execution until the CodeBuild is complete, which can be accomplished as described here (or possibly using step functions) and then create the layer with the reference to the bucket. This all can be accomplished in CFN and would provide a neat integrated solution using CloudFormation only without the need for external dependencies.
A Prototype for an Authorizer can be found in delta account and API GW is configured for it: w-pasx-TeamsAuthorizer Lambda

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

No branches or pull requests

1 participant