Skip to main content

CLI authentication for AWS credential exchange

Project description

CK-Prism-CLI - Authentication for AWS Credentials

Authenticates users via CloudKeeper Prism and exchanges tokens for AWS credentials.

Operating System Support

  • macOS
  • Linux
  • WSL on Windows
  • Windows

Python Support

Python 3.6 and above

Prerequisites

Software Prerequisites

  • Python 3.6 or above
  • AWS CLI v2 (optional, for using credentials)

Installation

pip3 install ck-prism

Verify installation:

ck-prism help

If command not found, add Python packages folder to PATH:

  • Linux: /home/{username}/.local/bin
  • macOS: /Users/{username}/Library/Python/{Python Version}/bin

Configuration

Interactive Configuration

ck-prism configure

You'll be prompted for:

Manual Configuration

Edit ~/.ck-prism/config.json:

{
  "default": {
    "realm": "cloudkeeper",
    "client_id": "ckauth-cli",
    "region": "us-east-1",
    "output": "json",
    "role_arn": "arn:aws:iam::123456789012:role/CKAuth-Admin,arn:aws:iam::123456789012:saml-provider/CKAuthProvider",
    "account_id": "123456789012",
    "role_name": "CKAuth-Admin"
  }
}

Named Profiles

ck-prism configure --profile production

Usage

Default Profile

ck-prism login

Named Profile

ck-prism login --profile production

The tool will:

  1. Check for cached tokens
  2. Refresh expired tokens automatically
  3. Open browser for initial authentication (if needed)
  4. Exchange token for AWS credentials
  5. Write credentials to ~/.aws/credentials

Using AWS Credentials

After login, use AWS CLI normally:

aws s3 ls
aws ec2 describe-instances

Or with named profile:

aws s3 ls --profile production

Managing Profiles

List Profiles

ck-prism profiles list

Remove a Profile

Interactive picker (asks for confirmation):

ck-prism profiles remove

By name, skipping confirmation:

ck-prism profiles remove production -y

Removing a profile cleans up:

  • The profile entry in ~/.ck-prism/config.json
  • The cached tokens file in ~/.ck-prism/tokens/
  • The matching section in ~/.aws/credentials

Token Caching

Tokens are cached in ~/.ck-prism/tokens/ and automatically refreshed when needed.

Troubleshooting

  • Command not found: Ensure Python packages directory is in PATH
  • Authentication failed: Re-run ck-prism login
  • Expired credentials: Run ck-prism login again to refresh

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

ck_prism-1.4.0.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

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

ck_prism-1.4.0-py3-none-any.whl (22.8 kB view details)

Uploaded Python 3

File details

Details for the file ck_prism-1.4.0.tar.gz.

File metadata

  • Download URL: ck_prism-1.4.0.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for ck_prism-1.4.0.tar.gz
Algorithm Hash digest
SHA256 73d00e8d1dd01a61b3fef3fc44b20f8d95bc1bb0691f1ecdc627a006fda50b18
MD5 01474811b12be37fdccc9700b3f67e1b
BLAKE2b-256 e0c6abfa7d05dd5766087f1460604024916aacb361f101f87b6c5400d22baba0

See more details on using hashes here.

File details

Details for the file ck_prism-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: ck_prism-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 22.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for ck_prism-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 494ae9ac416421e1d093cee84c487df917af1e9d470802b4dc726c35a4d3fc62
MD5 4891a64de4fb49c0d94101e70f240a0f
BLAKE2b-256 4efcdedc081d1e82d2b12151753c4d54647a7323037ae7f53c7d333b3941d434

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