Skip to main content

JumpCloud AWS CLI Authentication with Device Trust

Project description

JumpCloud AWS CLI Authentication Utility

A Python utility for authenticating with AWS CLI using JumpCloud SAML and Device Trust certificates.

Features

  • Browser-based authentication with JumpCloud
  • Automatic Device Trust certificate handling
  • SAML assertion capture and parsing
  • AWS STS role assumption
  • AWS CLI credential configuration
  • Cross-platform (works on macOS, Windows, and Linux)

Installation

Basic Installation

pip install jumpcloud-awscli

Installation with ChromeDriver (Optional)

The package requires ChromeDriver to work with Selenium. You can either:

  1. Install ChromeDriver separately (recommended for macOS users):

    For macOS:

    brew install --cask chromedriver
    xattr -d com.apple.quarantine $(which chromedriver)
    

    For Windows: Download from ChromeDriver website and add to PATH

    For Linux:

    # Debian/Ubuntu
    sudo apt-get install chromium-chromedriver
    
    # CentOS/RHEL
    sudo yum install chromedriver
    
  2. Or use Python ChromeDriver package (may have SSL issues on some systems):

    pip install jumpcloud-awscli[chromedriver]
    

Requirements

  • Python 3.6+
  • Chrome or Chromium browser
  • AWS CLI installed and configured
  • JumpCloud account with Device Trust certificates installed

macOS SSL Certificate Issues

If you're on macOS and encounter SSL certificate errors, run:

/Applications/Python*/Install\ Certificates.command

This should fix the SSL certificate verification problems.

Usage

Basic Usage

# Authenticate with JumpCloud and update AWS credentials
jumpcloud-aws --url "https://sso.jumpcloud.com/saml2/yourapp"

All Options

jumpcloud-aws --url "https://sso.jumpcloud.com/saml2/yourapp" \
              --profile "jumpcloud" \
              --duration 43200 \
              --region "us-west-2" \
              --debug

Using Environment Variables

You can set the JumpCloud URL as an environment variable:

# Set the environment variable
export JUMPCLOUD_AWS_URL="https://sso.jumpcloud.com/saml2/yourapp"

# Then you can run without the --url parameter
jumpcloud-aws

How It Works

  1. Launches a Chrome browser session to authenticate with JumpCloud
  2. The browser automatically presents your Device Trust certificate during authentication
  3. After successful authentication, it captures the SAML assertion
  4. Parses the SAML assertion to extract available AWS roles
  5. Lets you select a role (if multiple are available)
  6. Uses AWS STS to assume the selected role with the SAML assertion
  7. Updates your AWS CLI credentials file with temporary credentials

Troubleshooting

Chrome/ChromeDriver Issues

If you encounter issues with Chrome or ChromeDriver, verify:

  1. Chrome is installed
  2. ChromeDriver is correctly installed (run chromedriver --version to check)
  3. The ChromeDriver version matches your Chrome version

Debug Mode

For more detailed output, use the --debug flag:

jumpcloud-aws --url "https://sso.jumpcloud.com/saml2/yourapp" --debug

Common Issues

  • Certificate selection problems: If prompted for a certificate and it fails, check that your JumpCloud Device Trust certificate is properly installed.
  • Authentication timeouts: If the process times out during authentication, check your network connection and ensure you're using the correct JumpCloud credentials.
  • No roles found: Verify that your JumpCloud user has the proper AWS application role assignments.
  • SSL certificate errors: On macOS, run /Applications/Python*/Install\ Certificates.command to install the proper SSL certificates.

License

MIT License

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

jumpcloud_awscli-0.1.1.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jumpcloud_awscli-0.1.1-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file jumpcloud_awscli-0.1.1.tar.gz.

File metadata

  • Download URL: jumpcloud_awscli-0.1.1.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.0

File hashes

Hashes for jumpcloud_awscli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8a416b92b7212e48c079612723a428a4bfe5e45865cac74a3a1aae81a982c85d
MD5 5e19f4a76116a6945bf82278b6972f16
BLAKE2b-256 ca392939955fc7b4ec47634213cfdf7d2370ab3763c3e4d322989c0d795526ab

See more details on using hashes here.

File details

Details for the file jumpcloud_awscli-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for jumpcloud_awscli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eba65d4547b9d2f6136197b6f0899f7d86f2a133f2f7f8c594465e1dc6765a50
MD5 213217d48c01eb948bfe46274c78b3c7
BLAKE2b-256 96729690f9729501cec6695d793e51f1042c7d9c7330133b9b8089a5ebab013b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page