Guria / aws-js-practitioner

https://aws-js-practitioner-dev.guria.dev/
1 stars 0 forks source link

Task 7. Authorization #35

Open Guria opened 2 years ago

Guria commented 2 years ago

Task 7 assignment

Note for reviewers

Task 7 Artifacts (Pull Request #34)

Task 7.1

:heavy_check_mark: create a new service called authorization-service :heavy_check_mark: create a lambda function called basicAuthorizer in the Authorization Service. :heavy_check_mark: lambda has an environment variable with the following credentials: USER_GURIA=TEST_PASSWORD :heavy_check_mark: basicAuthorizer lambda takes Basic Authorization token, decodes it and checks that credentials provided by token exist in the lambda environment variable. :heavy_check_mark: lambda returns 403 HTTP status if access is denied for this user (invalid authorization_token) and 401 HTTP status if Authorization header is not provided. :heavy_check_mark: credentials are not stored under VCS and provided to environment from repository encrypted secrets

Task 7.2

:heavy_check_mark: basicAuthorizer lambda is set to /import path of the API Gateway as lambda authorizer.

Task 7.3

:heavy_check_mark: request from the client application to the /import path has Basic Authorization header Authorization: Basic {authorization_token} :heavy_check_mark: {authorization_token} is a base64-encoded GURIA:TEST_PASSWORD :heavy_check_mark: client gets authorization_token value from browser localStorage

Additional tasks: :heavy_plus_sign: client application should display alerts for the responses in 401 and 403 HTTP statuses.

Links to deployment

All PRs are merged. So app is deployed from main branch.

Web App deployed to Cloudfront and available at following addresses:

VladOstk commented 2 years ago

Good job, mark 6