-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add support for AWS SSO #2091
Comments
@mo-saeed - Thank you for your post. Marking this as a feature request. |
@swetashre Thanks a lot, Do you think this can be done soon ? any estimation ? |
@s0enke your link is about SSO the service. |
It would be awesome if this could be implemented! |
Also chiming in on this because this is one of the only ways to use accounts with Control Tower. Currently having to manually re-auth every hour is painful :( |
I am using AWS CLI V2 with SSO. I really need this feature. |
We removed all our persistent keys once AWS CLI supported SSO only to discover that the boto sdk has no concept of SSO login which is highly frustrating. It would be great to get this support as soon as possible. The same is true of other SDKs it seems - I have the same issue with PowerShell. |
Getting this current with aws cli v2 would be ideal for the same reasons others mentioned above. Example working config for the cli but not with boto3 sdk: Currently any cli profile defined like above that uses SSO throws the below exception: Assuming this relates to: |
I have created and shared a script as a workaround until the |
How long before this feature is added? We also have AWS Control Tower spawning new accounts. Adding groups and managing permission sets manually every-time is a nightmare. |
We have moved to the aws cliv2 SSO method in our organization as well and have to manually update the credentials file after profile login with sso method. |
I took at stab at writing a credential_process to solve this problem, which means you won't need to call scripts randomly, most applications are already smart enough to properly re-call the process when the credentials expire: https://github.com/flyinprogrammer/aws-sso-fetcher it also does some caching so that sequential calls use a file until the credential expires. |
boto/botocore#1988 (comment) is a version of this in Python that also works for now just to make that more visible here. |
aws-sso-credential-process (written by me) is the python tool referenced above. It uses the code from botocore v2, including the capability to open the web browser automatically (like |
Many AWS customers use Okta as their primary idP. With yesterday's announcement it is more enticing to leverage AWS SSO (specially for AWS CLI v2), however, having to rely on the above workarounds is not something that will necessarily fly on large enterprise AWS customers. I think this should be prioritized. Thank you. |
Boto3 itself can be still continue functioning with SSO login session by leveraging environment variables -- which takes precedent in finding credentials over shared credentials file. i.e. To guide users to export those environment variables found from SSO user portal after they have login through portal. However, many tools (especially CLI-based) that depends on boto3 and, it is hard to instruct end-users to export those env variables before using the tool -- plus it is timed-constraint token and expires, thus user has to update those env var time-to-time, so none ideal use case. Inadvertently, most tools credentials check fall back to shared credentials file. From aws/aws-cli#4982 and few days I search for solution, before I ended up yawsso to sync v1 credentials from v2 SSO login session cache -- extending @sgtoj script, just to depends only on CLI v2 itself. So that I could keep going my daily ops support to users like terraform, cdk, cw, awsbw, etc.. While waiting to resolve this issue sooner in respective upstreams! |
Support for loading credentials cached by |
Update: it works! |
Confirmed 1.14.16 is working for me after ensuring I was on the right AWS_PROFILE. Cheers! |
@mmerickel After tripping over the wrong |
Now SSO credential provider is supported with botocore v1 branch. So it can be used with boto3. |
The original request is still needed/missing, which is to be able to manage SSO Permission Sets. Currently the only way we know how to do this is in the browser directly. |
I also add myself to @alittle-csdisco 's comment. In complex situations with AWS Organization with dozens, if not hundreds, of AWS accounts and thousand of users it is unthinkable to manage the assignment of roles manually via the web interface. Hours and hours of manual work, obviously prone to error, in the most delicate aspect of all account management. It is an epic lack of AWS. This is in addition to the fact that AWS SSO does not support nested ADD groups. 🤦♂️ @swetashre this request is a year that is included in the feature requests. Is there hope that something will be done in the near future? The whole discussion below went off-topic. @mo-saeed 's request was quite clear but completely ignored. |
Guys, We have built a library which can automate most of the AWS SSO activities for now. That was the original request.
https://github.com/schubergphilis/awsssolib Here is the pypi link: https://pypi.org/project/awsssolib/ Sample snippet:
The Role should have access to aws sso and sso-directory Hope this helps all of you for now. :) |
I think this issue can be closed, as AWS SSO has released APIs for assignment management and read access to the identity store, both of which are present in boto3: |
Reviewed and agree that this can be closed— thanks for the input, everyone! Please let us know if you have any questions. |
|
Hi,
It would be great if you can add support for AWS SSO.
needed actions:
The text was updated successfully, but these errors were encountered: