-
Notifications
You must be signed in to change notification settings - Fork 40
awsprocesscreds.saml.SAMLError: Unable to choose role #15
Comments
You can only log in to roles, that are configured for your ADFS. Directly switching to another role is not possible as it has to be included in the SAML response. But it should be possible to define another profile in your |
Hi @hoegertn thanks for your response! I am a bit of a ADFS / SAML noob so I am probably doing something very wrong, I can not get this to work. I have the following set up:
Again, using the InitialRole is not an issue:
However, if I try to switch role:
|
This looks ok but I configure the credential_process in the |
Moving the credential_process to the I am pretty sure that assuming the role is allowed. Normally I use a tool called aws_auth.py that will retrieve a token and sets it for a profile called |
I believe I am running into this issue:
But I do not understand the comment on that issue that says "a profile references a source profile that has no credentials". |
I do see however that when I use my Is |
I am at a loss how AWS CLI works with credentials caching but I got it working by doing the following:
This saves the With
I can now execute AWS CLI command using different roles:
Probably I totally do not understand how this all is supposed to work and thus I totally slaughtered the intent of the awsprocesscreds tool :) |
Unfortunately process profiles are not supported as a source for assume role profiles currently, which is why this isn't working. There is an existing feature request for supporting that feature at boto/botocore#1329 The provider in this repo requires you to have a specific role, and that needs to be your final role. If you would like to do something more complicated in the mean time, you can always wrap the command. This would not be terribly difficult to do since all you need to do is provide a very simple json blob to make a valid process provider. See here for more details on how to do that. Closing this out in favor of the botocore feature request. |
If I use an
--role-arn
which is different than my "initial" role but is valid for me to switch to, I get the following error:I have obscured the actual account numbers and role names above but the important thing is that they are different roles in different accounts (it is a sub accounts versus a master account in our organization) and I have no problem switching between them in the AWS Console.
I do not get the error if I use the "InitialRole" as the argument to
--role-arn
but obviously then I am not in the account I want to be, nor do I have the correct role.This is when using the ADFS provider and I had to make manual changes to be able to log in as described in issue #11
The text was updated successfully, but these errors were encountered: