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

Make use of authenfication in API Gateway #269

Closed
siforf564 opened this issue Mar 14, 2023 · 4 comments · Fixed by #405
Closed

Make use of authenfication in API Gateway #269

siforf564 opened this issue Mar 14, 2023 · 4 comments · Fixed by #405
Assignees
Milestone

Comments

@siforf564
Copy link
Contributor

Use cognito auth to interact with api gateway.

@siforf564 siforf564 self-assigned this Mar 14, 2023
@siforf564 siforf564 added done and removed done labels Mar 14, 2023
@siforf564
Copy link
Contributor Author

I think we have no choices but using Lambda auth in API gatweay to do this

@sboivinsystra
Copy link
Contributor

sboivinsystra commented Jun 7, 2023

api gateway should use a lambda to check the auth before running (so only quezel_x user can launch a quelzal_x lambda function)

@sboivinsystra sboivinsystra added this to the 4.8 milestone Jun 7, 2023
@sboivinsystra sboivinsystra modified the milestones: 4.8, 4.9 Jul 28, 2023
@sboivinsystra
Copy link
Contributor

Lambda auth for cognito cannot work as only the header in passed. As we want to check that the request body match the Auth. we connot use that.

My solution is a Auth step in each Step function. Calling a lambda function that get pass the Auth token and the payload. and check that the token has the correct access for the S3 bucket for this given model.

This auth lambda function should be added as the first step of each Step function definition.

@sboivinsystra
Copy link
Contributor

could pass the header to the step function (instead of providing it in the body). but this would make the auth step necessary as the event object would have body and head keys

https://kennbrodhagen.net/2015/12/02/how-to-access-http-headers-using-aws-api-gateway-and-lambda/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants