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 aifi-tokengen --role Contributor --scopes /subscriptions/<subscription-id>

az ad sp create-for-rbac --name aifi-tokengen --role Contributor --scopes /subscriptions/46081af3-7258-44cd-899c-db7516f0a121

# 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.

Issues

Performance Time Too High For Initial Pull

  1. Take a look at the registry.gitlab.com/aifi-ml/production/cloud-api/utils image
  • See if that can be changed to an alpine image for node

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.1.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

tokengen-0.0.1-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tokengen-0.0.1.tar.gz
  • Upload date:
  • Size: 6.4 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.1.tar.gz
Algorithm Hash digest
SHA256 c8f37c1b6dcc116f8b5a623d9f1ec448c10b0d0a1390cde8f0deafe2d8ca36e5
MD5 c62d2b554b6ea72b80efe291893660ae
BLAKE2b-256 4be9d8823ea49d2c77c8e5ba3fc7ccd71410047d025937f2fc90a2cb47278caa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tokengen-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.3 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9f4f1fd7118443b6be6ad8e6414c3e1a67aad31ed882aeddadc3ebaf5707903e
MD5 33990a3c99231914031d01968397e502
BLAKE2b-256 9c5dffb2769b26016729e2942550f72c1db94ae5677a971ae7deca5d96454a08

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