-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
Doesn't recognize AWS_WEB_IDENTITY_TOKEN_FILE, botocore.exceptions.ProfileNotFound: The config profile (default) could not be found #122
Comments
Thanks for reporting - I’ll have a look |
@rfvermut How are your other CLI environment variables set? https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html What sections do you have in your CLI config file and credentials file? https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html |
Everything is completely empty, no configuration. Docker image python:3-buster, pip3 install awscli awscurl
|
I'm unfamiliar with AWS EKS. Does IRSA refer to the IAM roles for service accounts feature? I don't think the behavior is affecterd by The server at example.com doesn't appear to respond to PUT requests so lets change that to a GET request.
So here's what I think is happening. The behavior occurs only when botocore is available to awscurl. Without knowing more about your environment, I will be using pipx to install awscurl in virtualenv and use the awslibs optional dependency to ensure that botocore is available.
With the example command, awscurl via botocore loads the "default" profile (because that's the default value set by the CLI parser The default value is not None as I had previously thought!). Since you have no configuration, botocore fails to find that profile and so fails. But what happens in the previous version?
With the example command, on my local machine, I get a different error, but it's for the same reason; there are no credentials to be found.
If I execute it on an EC2 instance with an attached IAM role, then awscurl via botocore loads the instance credentials from the instance metadata service. @okigan I looks like this behavior was broken by my PR #116 for AWS SSO profiles. I had believed that the default value for profile was I think there is a way to support all the desired credentials sources, but it will take time to find a correct solution. For now I think the right thing to do is to undo my changes and not include them until we find a way to test all the use cases. |
@rfvermut I'm not aware of a way to workaround this with version 0.22.0. For now I suggest you specify 0.21.0 when you install the command. |
@iainelder i will be backing out the SSO feature/commit and releasing bug fix build - that should buy us time to figure out what’s going on here. |
Change reverted: #124, new release will follow shortly |
@rfvermut I am looking for a way to setup a test environment for this, is the following script sufficient to repo? and in which environment does that need to run?
|
First, let me thank you reverting that change so fast. I have a gazillion non-centralized Jenkins scripts that refer to non-pinned install of awscurl and it affected half of our organization. My mistake, always pin your versions. Second, the "just enough" setup for tests would look like this: Get inside a container
Prepare environment
0.23/0.21 will fail trying to decode
0.22 will die as usual.
|
@rfvermut thanks for repro script! |
Commit a501a43 looks to me like it could work. (It's what I was alluding to in my ending comments in #123 (comment)) How would you test it? |
@iainelder i've tested it by checking out and running a501a43.
i am still looking for a way to test load_aws_config, but do not see a way to mock the relevant component. |
@okigan have you looked at moto? it has mocks for many AWS services including STS. We might be able to use it to mock responses from the STS service that we are authenticating against. https://github.com/spulec/moto I have some ideas here, but no time to implement them for a while yet :-) |
This is still an issue. |
Hi y'all,
I don't have enough context on this issue which makes it tricky for me to
troubleshoot this at this time.
I think having an endpoint and a working example (with other tools) could
help.
Thanks!
Igor
…On Tue, Mar 12, 2024 at 1:44 PM Adam Stracener ***@***.***> wrote:
This is still an issue.
—
Reply to this email directly, view it on GitHub
<#122 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADUYXV2OJHEFCETDMW4HV3YX5EIJAVCNFSM47WN54R2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJZGIZTEMBTGEYA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
In AWS EKS environment with IRSA. In version 0.22.
Works fine in 0.21
The text was updated successfully, but these errors were encountered: