Skip to main content

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.action format;
  • 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.

Metadata

Release files for gcl-iam 1.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gcl-iam 1.4.1
File Size Uploaded Provenance Actions
gcl_iam-1.4.1.tar.gz 163.1 kB With provenance Details for gcl_iam-1.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gcl-iam 1.4.1
File Interpreter ABI Platform Actions
gcl_iam-1.4.1-py3-none-any.whl Python 3 none any Details for gcl_iam-1.4.1-py3-none-any.whl

Total release size: 256.6 kB

Release files / gcl_iam-1.4.1.tar.gz

Download URL gcl_iam-1.4.1.tar.gz
Size 163.1 kB
Tags Source
SHA-256 checksum
How to use checksums
747cdbbcd0321978d782bc8d2113d1be358f239020b62409f668fc3e1070c790
BLAKE2b-256 checksum
How to use checksums
5ee57bdab88f9d7e82e7ab4ca63b255b4ad53b1c60c60d2abf12b778fde07677
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 28, 2026.

Transparency log

Release files / gcl_iam-1.4.1-py3-none-any.whl

Download URL gcl_iam-1.4.1-py3-none-any.whl
Size 93.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cc89403c5ba8aa5d929f756d6b217966b96b0c5c85191cbee1a6a158c664b916
BLAKE2b-256 checksum
How to use checksums
c5e42c1104ef8af70f09ccf1fde62aaf28049e69f3129a78b3be71ab3357ee1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 28, 2026.

Transparency log

Security for gcl-iam 1.4.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.

Select from 2 files

Attestation for gcl_iam-1.4.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 Oct 28, 2026.

Transparency log

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

Release history Release notifications | RSS feed

This release

1.4.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page