-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
Error 403 in development environment when uploading files to S3 #4018
Comments
I created PR 4019 to show some changes that could possibly help help with issue. In the file cl/settings/third_party/aws.py the variables Knowing that docker-compose is only used locally, I suggest adding the lines in the PR to the compose file so that you could set the variables in the following way:
The AWS environment variables will be then available inside the @quevon24 We could test this to see if works properly locally. Thank you! |
Not strictly an upload problem, but I think this is related to these tokens/keys. I was trying to review #3915 and couldn't copy the test data:
The traceback:
So, I dropped I few print statements
I am not sure if it is a problem with my permissions or my environment, but perhaps you could try to reproduce it? |
To run the clone command you require an API token from courtlistener. You need to create an account in https://www.courtlistener.com/ then you can get your API token here: https://www.courtlistener.com/profile/api-token/ Then you need to set the token with this env variable: CL_API_TOKEN |
Now I see CL_API_TOKEN is documented in the |
Would a better error message in the command have helped you? |
I think so, the line where the token is collected from the environment should complain if the variable does not exist or is an empty string, since the command won't work without that token
|
I'll add an early abort and take the opportunity to check that there is no need to clone any new fields |
@grossir told me that he was having a 403 error when uploading files
An error occurred (403) when calling the HeadObject operation: Forbidden
I was reviewing the problem with @blancoramiro and we discovered that to use temporary credentials it is also required to pass the session token to validate the credentials.
Temporarily, the solution is to add an extra variable to the .env file.
AWS_DEV_SESSION_TOKEN="XXXXXXXX"
and add a line to cl/settings/third_party/aws.py
and then reload .env file:
docker-compose -f docker/courtlistener/docker-compose.yml up -d
@blancoramiro told me that he is going to look for an alternative to this so that we don't have to constantly modify the environment variables in development environment.
The text was updated successfully, but these errors were encountered: