Skip to main content

A simple CLI utility for automating token generations with kubernetes.

Project description

Configure Azure CLI from CLI

# Authenticate with Azure CLI Creds from Terminal -- Temporal
az login 

# Creating an Azure Active Directory Registered Application
az ad sp create-for-rbac --name <app-name> --role Contributor --scopes /subscriptions/<subscription-id>


# Set Environment Variables with the Values
AZURE_CLIENT_ID	appId value from the generated JSON
AZURE_TENANT_ID	tenant value from the generated JSON
AZURE_CLIENT_SECRET	password value from the generated JSON

Environment Setup

# create venv
python3 -m venv venv

# Activate the venv
source venv/bin/activate

# Install packages
pip install -r requirements.txt

# Switch to developer mode
python3 setup.py develop

# Run for helper commands
tokengen -h

Why Python Secrets?

# From Python Docs
The secrets module is used for generating cryptographically strong random numbers suitable for managing data such as passwords, account authentication, security tokens, and related secrets.

In particularly, secrets should be used in preference to the default pseudo-random number generator in the random module, which is designed for modelling and simulation, not security or cryptography.

Logging Improvement

- Exception if the secret doesnt exist
- Exception if the secret name is invalid
- Azure Authenticate with Env variables or kubernetes (hmm..!)

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

tokengen-0.0.9.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

tokengen-0.0.9-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file tokengen-0.0.9.tar.gz.

File metadata

  • Download URL: tokengen-0.0.9.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for tokengen-0.0.9.tar.gz
Algorithm Hash digest
SHA256 56e5fd4ab6a99db451df0ae0c3661374f63ab60c638c849247d7719ceec9fb59
MD5 36399835668f0ef4de68635c0d177e5d
BLAKE2b-256 3c54ee18b6e671b2d5ee3241c24fbc6940dbbcb8ed0d4e9d83cfdc59b099241e

See more details on using hashes here.

File details

Details for the file tokengen-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: tokengen-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for tokengen-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 77a4bef8c718239db3e3ed047b820cdff04e64c7c47c65fac3ef236669e5ad3e
MD5 66293a8ba66f6caf38a40e6c3d1e7749
BLAKE2b-256 fb946192f33e0de9807e7bf6a68dca1bd556e84a83598db49341be43dc349ce1

See more details on using hashes here.

Supported by

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