Skip to content

Task7 auth#6

Open
Tati-Moon wants to merge 11 commits intomainfrom
task7-Auth
Open

Task7 auth#6
Tati-Moon wants to merge 11 commits intomainfrom
task7-Auth

Conversation

@Tati-Moon
Copy link
Owner

@Tati-Moon Tati-Moon commented Jul 14, 2024

Task 7

https://github.com/rolling-scopes-school/aws/blob/main/aws-developer/07_authorization/task.md

Links

Settings:

Token Generator
userName = 'Tati-Moon'
password = (from task)

add to console localStorage.setItem('authorization_token', "SOME_VALID_TOKEN");
or
add to console localStorage.setItem('authorization_token', "SOME_INVALID_TOKEN");
or
add to console localStorage.setItem('authorization_token', "");

CVS:

title,description,price,count
some,some,666,666
or
title,description,price,count,photo
Product x, Product x,111,9,https://d1yjjnpx0p53s8.cloudfront.net/styles/logo-thumbnail/s3/0025/1559/brand.gif?itok=vXujPldk

Evaluation Criteria

  • 100/100

  • ### Task 7.1

  1. Created a new service called authorization-service
  2. Created a lambda function called basicAuthorizer under the Authorization Service
  3. Lambda have environment variables: GITHUB_LOGIN and GITHUB_PASSWORD

image

  • ### Task 7.2
  1. Added Lambda authorization to the /import path of the Import Service API Gateway.
  2. Used basicAuthorizer lambda as the Lambda authorizer
  • ### Task 7.3
  1. The request from the client application to the /import path of the Import Service was required to have a Basic Authorization header:
    Authorization: Basic {authorization_token}

  2. The {authorization_token} was a base64-encoded {your_github_account_login}
    example: Authorization: Basic sGLzdRxvZmw0ZXs0UGFzcw==

  3. The client obtained the authorization_token value from the browser's localStorage:
    const authorization_token = localStorage.getItem('authorization_token')

image

  • ### Additional

The client application displayed alerts for responses with 401 and 403 HTTP statuses. This behavior was added to the nodejs-aws-fe-main/src/index.tsx file.

image

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.

1 participant