DSGT-DLP / Deep-Learning-Playground

Web Application where people new to Deep Learning can input a dataset and toy around with basic Pytorch modules without writing any code
MIT License
24 stars 8 forks source link

[BUG]: dlp-cli backend id-token command not working for AWS SSO #1084

Closed karkir0003 closed 8 months ago

karkir0003 commented 9 months ago

Operating system

MacOS

Bug description

When we run dlp-cli backend id-token <email acct> to get bearer token for testing our backend APIs, we run into an error message along the lines of botocore.exceptions.ClientError: An error occurred (AccessDeniedException) when calling the GetSecretValue operation: User is not authorized to perform: secretsmanager:GetSecretValue on resource: DLP/Firebase/Admin_SDK because no identity-based policy allows the secretsmanager:GetSecretValue action

Steps to reproduce

dlp-cli backend id-token <your email acct here> after aws configure sso

github-actions[bot] commented 9 months ago

Hello @karkir0003! Thank you for submitting the 🐞Bug Request Form. We appreciate your contribution. :wave:

We will look into it and provide a response as soon as possible.

To work on this bug request, you can follow these branch setup instructions:

  1. Checkout the main branch:

     git checkout nextjs
  2. Pull the latest changes from the remote main branch:

     git pull origin nextjs
  3. Create a new branch specific to this bug request using the issue number:

     git checkout -b bug-1084

    Feel free to make the necessary changes in this branch and submit a pull request when you're ready.

    Best regards, Deep Learning Playground (DLP) Team

karkir0003 commented 9 months ago

Steps to resolve:

  1. [COMPLETE] Karthik to copy the DLP Firebase secrets to us-east-1
  2. Lucas to go to cli.py and fix the init_firebase function to use the correct region

Testing the code: dlp-cli backed id-token <your email>

karkir0003 commented 9 months ago

relevant files:

cli.py: https://github.com/DSGT-DLP/Deep-Learning-Playground/blob/nextjs/training/cli.py (this file retrieves the secret using boto3 client)

dlp-cli backend id-token command: https://github.com/DSGT-DLP/dlp-cli/blob/main/cmd/backend/id_token/id_token.go