Socket
Socket
Sign inDemoInstall

dnxsso

Package Overview
Dependencies
10
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    dnxsso

Sync up AWS CLI v2 SSO login session to legacy CLI v1 credentials


Maintainers
1

Readme

dnxsso

Pull Request Build Status codecov.io Build Status Coverage Status

Yet Another AWS SSO - sync up AWS CLI v2 SSO login session to legacy CLI v1 credentials.

Do I need it?

Prerequisite

TL;DR

pip install dnxsso
  • Do your per normal SSO login and, have at least one org-level SSO login session cache:
aws sso login --profile=dev
  • To sync for all named profiles (e.g. dev, prod, stag, ...), then just:
dnxsso
  • To sync default profile and all named profiles, do:
dnxsso --default
  • To sync default profile only, do:
dnxsso --default-only
  • To sync for selected named profile, do:
dnxsso -p dev
  • To sync for multiple selected named profiles, do:
dnxsso -p dev prod
  • To sync for default profile as well as multiple selected named profiles, do:
dnxsso --default -p dev prod
  • To sync for all named profiles start with prefix pattern lab*, do:
(zsh)
dnxsso -p 'lab*'

(bash)
dnxsso -p lab*
  • To sync for all named profiles start with prefix pattern lab* as well as dev and prod, do:
dnxsso -p 'lab*' dev prod
  • Use -e flag if you want a temporary copy-paste-able time-gated access token for an instance or external machine. It use default profile if no additional arguments pass. The main use case is for those who use default profile, and would like to PIPE like this aws sso login && dnxsso -e | pbcopy. Otherwise for named profile, do dnxsso -e -p dev.

    PLEASE USE THIS FEATURE WITH CARE SINCE ENVIRONMENT VARIABLES USED ON SHARED SYSTEMS CAN GIVE UNAUTHORIZED ACCESS TO PRIVATE RESOURCES:

dnxsso -e
export AWS_ACCESS_KEY_ID=xxx
export AWS_SECRET_ACCESS_KEY=xxx
export AWS_SESSION_TOKEN=xxx
  • You can also use dnxsso subcommand login to SSO login then sync all in one go:
dnxsso login -h
dnxsso login
dnxsso login -e
dnxsso login --this
dnxsso login --profile dev
dnxsso login --profile dev --this
  • Print help to see other options:
dnxsso -h
  • Then, continue per normal with your daily tools. i.e.
    • cdk deploy ...
    • terraform ...
    • cw ls -p dev groups
    • awsbw -L -P dev

Develop

  • Create virtual environment, activate it and then:
make install
make test
python -m dnxsso --trace version
  • Create issue or pull request welcome

License

MIT License

License: MIT

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc