Skip to main content

A tool for generating OIDC identities

Project description

id

CI PyPI version OpenSSF Scorecard SLSA

id is a Python tool for generating OIDC identities. It can automatically detect and produce OIDC credentials on an number of environments, including GitHub Actions and Google Cloud.

Installation

id requires Python 3.7 or newer, and can be installed directly via pip:

python -m pip install id

Usage

You can run id as a Python module via python -m:

python -m id --help

Top-level:

usage: id [-h] [-V] [-v] audience

a tool for generating OIDC identities

positional arguments:
  audience       the OIDC audience to use

optional arguments:
  -h, --help     show this help message and exit
  -V, --version  show program's version number and exit
  -v, --verbose  run with additional debug logging; supply multiple times to
                 increase verbosity (default: 0)

For Python API usage, there is a single importable function, detect_credential:

>>> from id import detect_credential
>>> detect_credential(audience='something')
'<OIDC token>'

This function requires an audience parameter, which is used when generating the OIDC token. This should be set to the intended audience for the token.

Supported environments

id currently supports ambient credential detection in the following environments:

Licensing

id is licensed under the Apache 2.0 License.

Contributing

See the contributing docs for details.

SLSA Provenance

This project emits a SLSA provenance on its release! This enables you to verify the integrity of the downloaded artifacts and ensured that the binary's code really comes from this source code.

To do so, please follow the instructions here.

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

id-1.1.0.tar.gz (10.3 kB view hashes)

Uploaded Source

Built Distribution

id-1.1.0-py3-none-any.whl (12.3 kB view hashes)

Uploaded Python 3

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