id
id is a Python tool for generating OIDC identities. It can automatically
detect and produce OIDC credentials on a number of environments, including
GitHub Actions, GitLab pipelines and Google Cloud.
Installation
id requires Python 3.8 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] [-d] 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)
-d, --decode decode the OIDC token into JSON (default: False)
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.
If no supported environment is found, detect_credential returns None. If a supported
environment is found but detect_credential fails to retrieve a token, it raises
AmbientCredentialError.
Supported environments
id currently supports ambient credential detection in the following environments:
- GitHub Actions
- Google Cloud
- Buildkite
- GitLab (See environment variables below)
- CircleCI
Tokens in environment variables
GitLab provides OIDC tokens through environment variables. The variable name must be
<AUD>_ID_TOKEN where <AUD> is the uppercased audience argument where all
characters outside of ASCII letters and digits are replaced with "_". A leading digit
must also be replaced with a "_".
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.
Metadata
Release files for id 1.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| id-1.6.1.tar.gz | 18.1 kB | With provenance | Details for id-1.6.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| id-1.6.1-py3-none-any.whl | Python 3 | none | any | Details for id-1.6.1-py3-none-any.whl |
Total release size: 32.8 kB
Release files / id-1.6.1.tar.gz
| Download URL | id-1.6.1.tar.gz |
|---|---|
| Size | 18.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d0732d624fb46fd4e7bc4e5152f00214450953b9e772c182c1c22964def1a069
|
|
BLAKE2b-256 checksum How to use checksums |
6d04c2156091427636080787aac190019dc64096e56a23b7364d3c1764ee3a06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 4, 2026.
Transparency logRelease files / id-1.6.1-py3-none-any.whl
| Download URL | id-1.6.1-py3-none-any.whl |
|---|---|
| Size | 14.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f5ec41ed2629a508f5d0988eda142e190c9c6da971100612c4de9ad9f9b237ca
|
|
BLAKE2b-256 checksum How to use checksums |
4277de194443bf38daed9452139e960c632b0ef9f9a5dd9ce605fdf18ca9f1b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 4, 2026.
Transparency logSecurity for id 1.6.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for id-1.6.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 4, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.