Skip to main content

Log in to AWS using OpenID Connect

The aim for this is to create a general purpose CLI OIDC login with a limited set of trusted dependencies.

Tested with Azure AD. Your mileage may vary with other providers, please let us know!

Codeship Status for NitorCreations/aws-oidc-login

Setup (Azure AD example)

  • Create Azure AD App
    • Set public client reply url to http://localhost
    • Add an appRole (may be unnecessary)
    • Add users(s) to the role (to the app)
  • Create an AWS OIDC identity provider
    • Authority URL will be https://login.microsoftonline.com/<AAD tenant id>/oauth2/v2.0
    • Add your AAD app client id as audience
  • Create a web identity role with permissions you'd like
    • Edit trust relationship for the role to allow role assumption with tokens issued by AAD for your app
  • Add parameters under a suitable profile ~/.aws/config:
    • Add your application id (client id) from AAD app
    • Add your AAD tenant id
    • oidc_authority_url=https://login.microsoftonline.com/<AAD tenant id>/oauth2/v2.0
    • oidc_client_id=<id of your AAD app>
    • oidc_role_arn=<ARN of the role you are assuming on AWS>

Install aws-oidc-login

Clone this repo and run pip install aws-oidc-login inside it.

Run

The executable is called aol. Log in with default profile by simply running aol or specify a profile with aol [profile].

See aol -h for more options.

Metadata

Release files for aws-oidc-login 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aws-oidc-login 0.2.0
File Size Uploaded Provenance
aws-oidc-login-0.2.0.tar.gz 7.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for aws-oidc-login 0.2.0
File Interpreter ABI Platform
aws_oidc_login-0.2.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 19.0 kB

Release files / aws-oidc-login-0.2.0.tar.gz

Download URL aws-oidc-login-0.2.0.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
006a58d018c2e6967351e31b0d9d311fa99535ea50d8a4264ac1166b2591ef10
BLAKE2b-256 checksum
How to use checksums
36866c1412eefdfe74d74a86549cda6cfc19f4dcf9d257b9e17babaabc5e6a5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.36.0 CPython/3.7.0

Release files / aws_oidc_login-0.2.0-py2.py3-none-any.whl

Download URL aws_oidc_login-0.2.0-py2.py3-none-any.whl
Size 11.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
5f63ed3a0fc0745749a78f8b92f3a09427e9a0444f672d4115a77dbf31f99680
BLAKE2b-256 checksum
How to use checksums
d1b1e97f06843890f755a7ea581f02e1a274a50ece38603f05c7835e20481cf8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.36.0 CPython/3.7.0

Security for aws-oidc-login 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page