{ "info": { "author": "wnkz", "author_email": "wnkz@users.noreply.github.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Operating System :: MacOS", "Operating System :: POSIX", "Programming Language :: Python :: 3.7" ], "description": "# aws-sso\n\n[![GitHub Actions status](https://github.com/wnkz/aws-sso/workflows/Python%20package/badge.svg)](https://github.com/wnkz/aws-sso)\n[![GitHub Actions status](https://github.com/wnkz/aws-sso/workflows/Upload%20Python%20Package/badge.svg)](https://github.com/wnkz/aws-sso)\n[![PyPi Version](https://img.shields.io/pypi/v/awssso.svg?style=flat)](https://pypi.python.org/pypi/awssso/)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/awssso)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/awssso)\n\n\nThis package provides a command line interface to get AWS credentials with [AWS SSO](https://aws.amazon.com/single-sign-on/).\n\nThe aws-cli package works on Python versions:\n - 3.7.x and greater\n\n#### Attention!\n\nThis package relies on [Selenium](https://www.seleniumhq.org/) and Google Chrome to work.\nTherefore, you need [Google Chrome](https://www.google.com/chrome/) and [ChromeDriver](https://chromedriver.chromium.org/) to be installed.\n\nThis is being developped and tested on macOS, if you encounter problems on other platforms, please open an issue.\n\n### Dependencies\n\n#### macOS\n\n```shell\nbrew cask install chromedriver\n```\n\n#### Linux\n\n```\n\u00af\\_(\u30c4)_/\u00af\n```\n\n## Installation\n\n```shell\npip install awssso\n```\n\n## Getting Started\n\n### Help\n\nFor each command you can get help with `--help` flag.\n\n```\nusage: awssso configure [-h] [-p PROFILE] [-a AWS_PROFILE] [-f] [--url URL]\n [--username USERNAME]\n\noptional arguments:\n -h, --help show this help message and exit\n -p PROFILE, --profile PROFILE\n AWS SSO Profile (default: default)\n -a AWS_PROFILE, --aws-profile AWS_PROFILE\n AWS CLI Profile (default: AWS_PROFILE, fallback: same\n as --profile)\n -f, --force-refresh force token refresh\n --url URL\n --username USERNAME\n```\n\n### Configure a profile\n\n```\n$ awssso configure\n[?] URL: https://d-0123456789.awsapps.com/start/\n[?] AWS CLI profile: my-awssso-profile\n[?] Username: me@example.com\n[?] Password: **************\n[?] MFA Code: 042042\n[?] AWS Account: 000000000000 (Master)\n 111111111111 (Log archive)\n 222222222222 (Audit)\n > 000000000000 (Master)\n\n[?] AWS Profile: AWSAdministratorAccess\n AWSServiceCatalogEndUserAccess\n > AWSAdministratorAccess\n```\n\nThis will create a configuration file in `~/.awssso/config`.\n\n### Get credentials\n\n```\n$ awssso login\n```\n\nThis will get the credentials for the `profile` as defined in the configuration file\nand use `aws-cli` to set those credentials to the correct AWS Profile.\n\n---\n\n```\n$ awssso login -e\nexport AWS_ACCESS_KEY_ID=ACCESS_KEY_ID\nexport AWS_SECRET_ACCESS_KEY=SECRET_ACCESS_KEY\nexport AWS_SESSION_TOKEN=SESSION_TOKEN\n```\n\nThis will echo `export` commands to stdout ; can be used like this `$(awssso login -e)`\n\n---\n\n```\n$ awssso login -c\nhttps://signin.aws.amazon.com/federation?Action=login&Destination=https%3A%2F%2Fconsole.aws.amazon.com%2F&SigninToken=TOKEN\n```\n\nThis will generate a Sign In URL to the AWS Console ; URL will open in a new tab if used with `--browser`.\n\n---\n\nYou can also use this tool as a [credential_process](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sourcing-external.html) for awscli. To do so, configure your awscli configuration file like so:\n\n```\n[profile my-sso-profile]\ncredential_process = awssso login -p my-awssso-profile --json\n```\n\nAnd then simply use awscli normally:\n\n```\n$ aws --profile my-sso-profile s3 ls\n```\n\n## Base concepts\n\naws-sso has its own configuration file (`~/.awssso/config`). \nEach section in this file corresponds to an AWS SSO profile. Those profiles are different from AWS profiles.\n\nWhen using the `login` command, it'll set credentials for the configured AWS Profile by invoking `aws configure`.\n\nInside `~/.awssso/` are also stored cookie files for each pair of username / url. This allows not prompting for MFA code at each login.\n\nSecrets are stored using [keyring](https://pypi.org/project/keyring/) so for example on macOS they are stored in Keychain. \nFor each username / url aws-sso stores three secrets:\n\n* password\n* authn-token\n* authn-expiry-date\n\naws-sso doesn't make new login attempts until authn-token is expired. \naws-sso also stores credentials using keyring to avoid making too many STS calls.\n\n## Releases\n\nThe release notes for AWS SSO can be found [here](CHANGELOG.md).\n\n## Known issues\n\nKnown issues can be found [here](KNOWNISSUES.md).\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/wnkz/aws-sso", "keywords": "aws,sso,cloud,cli,credentials", "license": "Apache License 2.0", "maintainer": "", "maintainer_email": "", "name": "awssso", "package_url": "https://pypi.org/project/awssso/", "platform": "", "project_url": "https://pypi.org/project/awssso/", "project_urls": { "Homepage": "http://github.com/wnkz/aws-sso" }, "release_url": "https://pypi.org/project/awssso/1.1.1/", "requires_dist": [ "awscli (<2.0.0,>=1.16.10)", "boto3 (<2.0.0,>=1.9.0)", "halo", "inquirer (<3.0.0,>=2.6.0)", "keyring (<20.0.0,>=19.0.0)", "requests", "selenium (<4.0.0,>=3.14.0)", "secretstorage ; platform_system == \"Linux\"" ], "requires_python": "", "summary": "Command Line tool for AWS SSO Credentials", "version": "1.1.1" }, "last_serial": 5907107, "releases": { "0.0.1a2": [ { "comment_text": "", "digests": { "md5": "6f6887d7e42133187a4d6998edef68b0", "sha256": "a5241dc7f32d078eb3d8761e2f0cea5723f3ad182504ca12c195508eca896f2c" }, "downloads": -1, "filename": "awssso-0.0.1a2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6f6887d7e42133187a4d6998edef68b0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12886, "upload_time": "2019-08-22T18:21:05", "url": "https://files.pythonhosted.org/packages/d6/aa/9bfa120cd42a5e635805f9b1ae3d8f8941cdeeb9628f5bd79bce6ece9005/awssso-0.0.1a2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9c0ca576991971ee89b3564860d821bf", "sha256": "66c1893f2c0f829314135b045d3f9e16d0aa8481c87bcd30e852f2455542d909" }, "downloads": -1, "filename": "awssso-0.0.1a2.tar.gz", "has_sig": false, "md5_digest": "9c0ca576991971ee89b3564860d821bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20926, "upload_time": "2019-08-22T18:21:07", "url": "https://files.pythonhosted.org/packages/35/6c/31f9aa0617da77c2f52fb71dce826c75a42facb6d5b11789638c548a00d5/awssso-0.0.1a2.tar.gz" } ], "0.0.1a3": [ { "comment_text": "", "digests": { "md5": "87d66edfcc2396bd26ae693343620b16", "sha256": "67cd0b1888e06c76b74766956ff1a144871fe503a17948fe8807d84fbc5b04c1" }, "downloads": -1, "filename": "awssso-0.0.1a3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "87d66edfcc2396bd26ae693343620b16", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13549, "upload_time": "2019-08-26T14:24:53", "url": "https://files.pythonhosted.org/packages/81/04/da188a771a2490336ceb1276725625b20142fe696335d9c8f2f0b565fbc9/awssso-0.0.1a3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1a83530947ba0b44c5becfe1320f8b45", "sha256": "bb58599a9248fe83db068382ae0d8d9b0b241292c5501bec5fa8ac94cb670095" }, "downloads": -1, "filename": "awssso-0.0.1a3.tar.gz", "has_sig": false, "md5_digest": "1a83530947ba0b44c5becfe1320f8b45", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21288, "upload_time": "2019-08-26T14:24:54", "url": "https://files.pythonhosted.org/packages/12/4e/ca96e336e215a5a5ac901a9f76323039271fc8a2589a2e71fa696dd6000d/awssso-0.0.1a3.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "654606dec2c1c370602a03bad8cd798f", "sha256": "53ab29beb95b71914cd6ca2b2178f5151973bc7c5cf5bbb449bd949bf57cc0d6" }, "downloads": -1, "filename": "awssso-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "654606dec2c1c370602a03bad8cd798f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15280, "upload_time": "2019-09-16T17:58:29", "url": "https://files.pythonhosted.org/packages/cc/aa/4bb548bd24a9cb8ec17a67f7b9417f4457721be1d848c140e073d20c345c/awssso-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4c6e43473bc3dd00938924a0a772a87e", "sha256": "e3377e146bdc553e60fa0fb623af77d8cb88a9958526345e1f3a06368775d805" }, "downloads": -1, "filename": "awssso-1.0.0.tar.gz", "has_sig": false, "md5_digest": "4c6e43473bc3dd00938924a0a772a87e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24618, "upload_time": "2019-09-16T17:58:31", "url": "https://files.pythonhosted.org/packages/b9/96/c76e2f3437976ca8d178a139cc1c0cd24e350222e3580fa7c1e8c263ce58/awssso-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "d98098bd0c0704472de64ada124cec4f", "sha256": "713893b9b3751fbe6575d6979cf8b64254f97b2cb74937b5ab87e22734382d54" }, "downloads": -1, "filename": "awssso-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "d98098bd0c0704472de64ada124cec4f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 15987, "upload_time": "2019-09-27T15:52:30", "url": "https://files.pythonhosted.org/packages/66/5b/946c0474b6cb78ebbc662607e6f046272e172f3941a260431badf5debefa/awssso-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f2037ea296756c8442fd472fe8d8e702", "sha256": "c3c7fbb91aee3e690b5ef65b722a9299e204de202279ce178b66281e7e4fc869" }, "downloads": -1, "filename": "awssso-1.1.0.tar.gz", "has_sig": false, "md5_digest": "f2037ea296756c8442fd472fe8d8e702", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25778, "upload_time": "2019-09-27T15:52:31", "url": "https://files.pythonhosted.org/packages/c6/15/cb5c1876f2848a419627e5f2ab4c494ba1e2f217da779a4ac637f84869f1/awssso-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "ddac89981c2801145b35d5094abcbac4", "sha256": "57e91e83a437e06729ad0ea6e6d03cda1c6be43d665a685e2eb28dd44ea6cfbf" }, "downloads": -1, "filename": "awssso-1.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ddac89981c2801145b35d5094abcbac4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16319, "upload_time": "2019-09-30T14:13:26", "url": "https://files.pythonhosted.org/packages/6d/43/80c23f09e3c5ecba1da8e79fd194858d2d0ff2a26f4351b49ff205844bf9/awssso-1.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b9253e4a4ce67b86214f0611623f1e67", "sha256": "9fc1b3299df40bf0c393ef49d6c9136f422f51a7dfc382d832bec1a679570049" }, "downloads": -1, "filename": "awssso-1.1.1.tar.gz", "has_sig": false, "md5_digest": "b9253e4a4ce67b86214f0611623f1e67", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26160, "upload_time": "2019-09-30T14:13:28", "url": "https://files.pythonhosted.org/packages/c7/a3/d081c049585d3b93d7e34a3efa71fccc29a68715f4e026c2dcd07eb03d43/awssso-1.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ddac89981c2801145b35d5094abcbac4", "sha256": "57e91e83a437e06729ad0ea6e6d03cda1c6be43d665a685e2eb28dd44ea6cfbf" }, "downloads": -1, "filename": "awssso-1.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ddac89981c2801145b35d5094abcbac4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16319, "upload_time": "2019-09-30T14:13:26", "url": "https://files.pythonhosted.org/packages/6d/43/80c23f09e3c5ecba1da8e79fd194858d2d0ff2a26f4351b49ff205844bf9/awssso-1.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b9253e4a4ce67b86214f0611623f1e67", "sha256": "9fc1b3299df40bf0c393ef49d6c9136f422f51a7dfc382d832bec1a679570049" }, "downloads": -1, "filename": "awssso-1.1.1.tar.gz", "has_sig": false, "md5_digest": "b9253e4a4ce67b86214f0611623f1e67", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26160, "upload_time": "2019-09-30T14:13:28", "url": "https://files.pythonhosted.org/packages/c7/a3/d081c049585d3b93d7e34a3efa71fccc29a68715f4e026c2dcd07eb03d43/awssso-1.1.1.tar.gz" } ] }