Skip to main content

A Tigrbl Multi‑tenant OpenID‑Connect / OAuth2 Identity‑Provider server by Swarmauri.

Project description

Tigrbl Logo

PyPI - Downloads Hits PyPI - Python Version PyPI - License PyPI - tigrbl_auth


Tigrbl Auth 🔐

Secure, multi-tenant identity services for the Tigrbl ecosystem.

Terminology 📚

  • Tenant 🏢 – a namespace used to group related resources such as repositories or clients.
  • Principal 👤 – an owner of resources, for example an individual user or an organization.

Auto Authn: Multi-Tenant OpenID Connect Provider 🚦

Auto Authn is an async, SQL-backed Identity Provider for OpenID Connect 1.0 and OAuth 2.1. It provides per-tenant isolation and is designed to scale for SaaS deployments.

Features ✨

  • 🏢 Per-tenant issuer URLs with isolated user and client tables.
  • 🔐 RSA-based JWT signing with helpers for key rotation.
  • 🐅 Powered by Tigrbl.
  • 🔎 OIDC discovery endpoints and JWKS generation.
  • 🛡️ Configurable PostgreSQL or SQLite storage with optional Redis support.

Installation 📦

pip install tigrbl_auth

Extras are available for common database drivers:

# PostgreSQL
pip install tigrbl_auth[postgres]

# SQLite
pip install tigrbl_auth[sqlite]

Quick Start 🚀

from tigrbl.engine import engine
from tigrbl import TigrblApp
from tigrbl_auth.db import dsn
from tigrbl_auth.routers.surface import surface_api

app = TigrblApp(engine=engine(dsn))
surface_api.mount_jsonrpc(prefix="/rpc")
surface_api.attach_diagnostics(prefix="/system")
app.include_router(surface_api)

The embedded surface_api exposes resource and flow operations for in-process usage via namespaces like surface_api.core.User.create.

Check the documentation for detailed setup and configuration.

To run the API locally with Uvicorn:

uvicorn tigrbl_auth.app:app --reload

The service exposes an OpenID Connect discovery document at /.well-known/openid-configuration and publishes its JSON Web Key Set at /.well-known/jwks.json.

Configuration ⚙️

Auto Authn reads settings from environment variables. Common options include:

  • PG_DSN or the combination of PG_HOST, PG_PORT, PG_DB, PG_USER, PG_PASS for database connectivity.
  • REDIS_HOST, REDIS_PORT, REDIS_DB, and REDIS_PASSWORD for Redis session storage (optional).
  • JWT_SECRET for token signing and LOG_LEVEL to control logging verbosity.

Docker 🐳

A lightweight Dockerfile is provided. Build and run the service with:

docker build -t tigrbl-auth .
docker run -p 8000:8000 tigrbl-auth

Visit http://localhost:8000/docs to explore the interactive API documentation.

Contributing 🤝

Contributions are welcome! Please open an issue or submit a pull request to discuss improvements.

License 📜

Apache-2.0

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

tigrbl_auth-0.3.2.dev17.tar.gz (66.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tigrbl_auth-0.3.2.dev17-py3-none-any.whl (103.6 kB view details)

Uploaded Python 3

File details

Details for the file tigrbl_auth-0.3.2.dev17.tar.gz.

File metadata

  • Download URL: tigrbl_auth-0.3.2.dev17.tar.gz
  • Upload date:
  • Size: 66.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for tigrbl_auth-0.3.2.dev17.tar.gz
Algorithm Hash digest
SHA256 68f6da41c26578757fc6eef817d1fe13a03c03e0c684371627f9c7a92ae6b307
MD5 198365d7df1378e4fa99dfa2f592261e
BLAKE2b-256 2f1b42bf11978c0a58d36e6749a84af3e2db31bac5f2dbcea33bc9c9477f609e

See more details on using hashes here.

File details

Details for the file tigrbl_auth-0.3.2.dev17-py3-none-any.whl.

File metadata

  • Download URL: tigrbl_auth-0.3.2.dev17-py3-none-any.whl
  • Upload date:
  • Size: 103.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for tigrbl_auth-0.3.2.dev17-py3-none-any.whl
Algorithm Hash digest
SHA256 696cd97fa4683331a99bc5bf7c1caf9c32f9032c98960195de6fbb95e5218060
MD5 2f1f9600742d2dd20d50bd9d85b7be6a
BLAKE2b-256 919c4caa3e22b097c62a96fb64749dc2d6e868a88ec93f6c42325a6b78244c82

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page