A tool that you can use to SSO via AWS Identity Providers and reload aws session in credentials file.
Project description
AWS SAML Login
Works cross platform (Win, Unix, MacOS) Was having a real hard time trying to get cli credentials via SAML SSO so thought about writing this small utility. I can run this daily every morning to get a 12 hour session for myself. Hope you'd find it interesting and useful.
Looking forward to contributions!!
Prerequisites
Need to install
Make sure all the above software are setup properly in PATH
environment variable
Executing
Add properties to your AWS credentials file
[some-profile]
saml_sso_url = <url you use for saml, either okta saml or whatever you use>
saml_role_arn = <your iam role to assume>
saml_principal_arn = <your saml idp arn>
saml_duration = <duration of session in seconds, check iam role for maximum value>
Run
python -m aws-saml
Warning: This will change your credentials file. If you don't want to do that, you can use DRY_RUN=Y python -m aws-saml
which will only print the values.
Installation
pip install aws-cli-sso
Local development/testing
pip install -r requirements.txt
python -m aws-saml
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
File details
Details for the file aws-cli-sso-0.1.1.tar.gz
.
File metadata
- Download URL: aws-cli-sso-0.1.1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f71664a0887782b7da99540e0005056e43e61f2d024d23892a62de5bf59affa |
|
MD5 | ea1c3974bfdcab33a21aaff6cf3d1bf7 |
|
BLAKE2b-256 | 0fcef26e0e78641244a5bdcd681e62685c4d4a27116cec6d2d7f1c3d3e41bcbf |
File details
Details for the file aws_cli_sso-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: aws_cli_sso-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53dfaf0fc048cb6876a1012039732de0be3034a926fa8158eabfba2fffd33868 |
|
MD5 | e2a35d24b1c92fb2dcbbe8b873ac4b38 |
|
BLAKE2b-256 | a8312704be74242dfdf3ebe69a8e95793bc89755a4643a101d31d4b3df0ed7b5 |