-
Notifications
You must be signed in to change notification settings - Fork 2
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
KMS-514: Added authentication to CRUD apis #22
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #22 +/- ##
==========================================
+ Coverage 99.52% 99.54% +0.02%
==========================================
Files 67 72 +5
Lines 836 888 +52
Branches 183 190 +7
==========================================
+ Hits 832 884 +52
Misses 4 4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
name: edlAuthorizer | ||
type: request | ||
resultTtlInSeconds: 0 | ||
deleteAll: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
recreateDatabase: | ||
handler: serverless/src/recreateDatabase/handler.default | ||
timeout: ${env:LAMBDA_TIMEOUT, '900'} | ||
events: | ||
- http: | ||
method: delete | ||
cors: ${file(./serverless-configs/${self:provider.name}-cors-configuration.yml)} | ||
path: deleteAll |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
Overview
What is the feature?
Adding authentication when creating, updating, deleting concepts.
What is the Solution?
Added
edlAuthorizer
to aws-functions.yml to any lambdas that write/delete data, this function will inspect the headers for a launchpad token and validate it against EDL.What areas of the application does this impact?
Any operations that involve writing concepts will be authenticated now.
Testing
You'll need to comment out:
noAuth: true in serverless.yml
Restart serverless offline, make sure you have EDL_PASSWORD set in your env (same as MMT one).
Try hitting endpoints that require authentication, these should fail if you don't supply a token.
To supply a token, you'll need to pass -H "Authorization: $TOKEN" to your calls.
Attachments
Please include relevant screenshots or files that would be helpful in reviewing and verifying this change.
Checklist