gcl_iam
gcl_iam is a Python library for adding JWT authentication and policy-based
authorization to RESTAlchemy services. It provides:
- HS256 and RS256 token verification, including previous-key fallback during key rotation;
- remote JWKS discovery and token introspection through an IAM service;
- request-scoped identity, project and permission data;
- wildcard permissions in the
service.resource.actionformat; - project-aware, nested, projectless and OTP-aware RESTAlchemy controllers;
- permission-driven field visibility; and
- OAuth-style HTTP error responses.
The library requires Python 3.10 or newer and is licensed under Apache 2.0.
Documentation
The complete documentation is available in four languages. Every language has the same files, section order and code examples:
New users should start with installation and the getting-started guide.
Quick example
from gcl_iam import drivers
from gcl_iam import middlewares as iam_middlewares
from restalchemy.api import middlewares
iam_driver = drivers.HttpDriver(
iam_endpoint="https://iam.example.com/v1/iam/clients/my-service",
audience="my-service",
hs256_jwks_decryption_key="<32-byte A256GCM key>",
)
application = middlewares.attach_middlewares(
application,
[
middlewares.configure_middleware(
iam_middlewares.GenesisCoreAuthMiddleware,
iam_engine_driver=iam_driver,
),
iam_middlewares.ErrorsHandlerMiddleware,
],
)
Use real secret management for IAM credentials and encryption keys. Never put them in source code.
Development
Create the standard development environment and run the unit tests:
tox -e develop
tox -e py310
Additional checks are available as tox -e ruff-check and tox -e mypy.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gcl_iam-1.4.0.tar.gz.
File metadata
- Download URL: gcl_iam-1.4.0.tar.gz
- Upload date:
- Size: 162.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7888e63b295ae1e54f6a43b22f51dbeeb0b69f2c155895d556c68873af1eb2e7
|
|
| MD5 |
1bd12bab2058406fb435a97b106bd991
|
|
| BLAKE2b-256 |
937bbb547b0d5e8609985828a8e4a700e7e2608ddef8218f5fe5e4bf2e1975dc
|
Provenance
The following attestation bundles were made for gcl_iam-1.4.0.tar.gz:
Publisher:
publish-to-pypi.yml on exordos/gcl_iam
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gcl_iam-1.4.0.tar.gz -
Subject digest:
7888e63b295ae1e54f6a43b22f51dbeeb0b69f2c155895d556c68873af1eb2e7 - Sigstore transparency entry: 2684357915
- Sigstore integration time:
-
Permalink:
exordos/gcl_iam@615a3c2a2eb4cc0e678332a798f0c2ebb2b4f0c5 -
Branch / Tag:
refs/tags/1.4.0 - Owner: https://github.com/exordos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@615a3c2a2eb4cc0e678332a798f0c2ebb2b4f0c5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file gcl_iam-1.4.0-py3-none-any.whl.
File metadata
- Download URL: gcl_iam-1.4.0-py3-none-any.whl
- Upload date:
- Size: 93.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89b9b86ed00a4b13998205943315c777d15a07015337e070e3456490e3ddec58
|
|
| MD5 |
aff72e09108439835e25c1eba8b177c9
|
|
| BLAKE2b-256 |
e46ada9cd26debbe3ef5e7b777dee55646bee95143a4f14820e8a21d978681f3
|
Provenance
The following attestation bundles were made for gcl_iam-1.4.0-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on exordos/gcl_iam
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gcl_iam-1.4.0-py3-none-any.whl -
Subject digest:
89b9b86ed00a4b13998205943315c777d15a07015337e070e3456490e3ddec58 - Sigstore transparency entry: 2684357932
- Sigstore integration time:
-
Permalink:
exordos/gcl_iam@615a3c2a2eb4cc0e678332a798f0c2ebb2b4f0c5 -
Branch / Tag:
refs/tags/1.4.0 - Owner: https://github.com/exordos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@615a3c2a2eb4cc0e678332a798f0c2ebb2b4f0c5 -
Trigger Event:
push
-
Statement type: