awscli_saml_sso is a command line tool that aims to get temporary credentials from SAML identity provider in order to authenticate to awscli.
Project description
awscli_saml_sso is a command line tool that aims to get temporary credentials from SAML identity provider in order to authenticate to awscli.
Installation
You need a fully functional python 3 environment, then you can install tool from pypi:
pip install awscli-saml-sso
Usage
You only need to run the following command in terminal:
awscli_saml_sso
# Please configure your identity provider url [https://<fqdn>:<port>/adfs/ls/IdpInitiatedSignOn.aspx?loginToRp=urn:amazon:webservices]:
> ...
# Please choose the role you would like to assume:
# [ 0 ]: arn:aws:iam::<account_number>:role/<role_name>
# [ 1 ]: arn:aws:iam::<account_number>:role/<role_name>
# ...
# Selection: <select among numbered roles>
# ----------------------------------------------------------------
# Your new access key pair has been stored in the AWS configuration file /home/.aws/credentials under the saml profile.
# Note that it will expire at 2020-12-01 13:17:27+00:00.
# After this time, you may safely rerun this script to refresh your access key pair.
# To use this credential, call the AWS CLI with the --profile option (e.g. aws --profile saml ec2 describe-instances).
# ----------------------------------------------------------------
# Simple API example listing all S3 buckets:
# ['your-lovely-bucket', ...]
ask you to fill in required identity provider url in the form of https://<fqdn>:<port>/adfs/ls/IdpInitiatedSignOn.aspx?loginToRp=urn:amazon:webservices
open web browser to fulfil SSO authentication through your identity provider
retrieve attached AWS roles and ask you to choose role you would like to assume
provide a saml profile in /home/.aws/credentials filled with temporary credentials
At the end, you just need to use AWS cofigured saml profile to authenticate your awscli calls
aws --profile saml ec2 describe-instances
OR
AWS_PROFILE=saml aws ec2 describe-instances
Features
Authenticate through SAML identity provider in web browser
Select among retrieved AWS roles you are allowed to assume
Store temporary credentials in aws configuration files
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
awscli_saml_sso is open source software released under the GNU GPLv3.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for awscli_saml_sso-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f982b4be1f47cd1de94560776a5ca364c9f80719149e683c737a684920c511d |
|
MD5 | 8a2e6004a04ad48c7a5eb8d18ec15b96 |
|
BLAKE2b-256 | 946fe667526ee0afb59909f6b531526f9a4e55df4726106e5e0371b25cdc8f5a |