Skip to main content

armasec-lite

Injectable FastAPI auth via OIDC, with three dependencies instead of ten.

License Python PyPI Build Status GitHub Issues Pull Requests GitHub Contributors

armasec-lite validates bearer tokens against your identity provider's JWKS, checks scopes and issuer/audience claims, and guards a route with a single Depends(). It is a dependency-minimal reimplementation of armasec 3.x with the same public API, built almost entirely on the standard library. Runtime dependencies are fastapi, cryptography and pydantic.

Install

uv add armasec-lite

The pytest fixtures, including the mock OIDC provider, live behind an extra:

uv add "armasec-lite[test]"

Usage

"""Secure a single route against one OIDC domain."""

import os

from armasec_lite import Armasec
from fastapi import Depends, FastAPI

app = FastAPI()
armasec = Armasec(
    domain=os.environ.get("ARMASEC_DOMAIN"),
    audience=os.environ.get("ARMASEC_AUDIENCE"),
)


@app.get("/stuff", dependencies=[Depends(armasec.lockdown("read:stuff"))])
async def check_access():
    return {"message": "Successfully authenticated!"}

Runnable variants, including multiple domains, match_keys, permission extractors and the plugin system, are in examples/.

Documentation

docs.vantagecompute.ai/developer/armasec-lite

License

MIT. See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

armasec_lite-0.1.7.tar.gz (106.3 kB view details)

Uploaded Source

Built Distribution

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

armasec_lite-0.1.7-py3-none-any.whl (77.9 kB view details)

Uploaded Python 3

File details

Details for the file armasec_lite-0.1.7.tar.gz.

File metadata

  • Download URL: armasec_lite-0.1.7.tar.gz
  • Upload date:
  • Size: 106.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for armasec_lite-0.1.7.tar.gz
Algorithm Hash digest
SHA256 bcece9e48f551dc0c67a065e0d93c5a0574c9fbfe35e02d8c24f9c5aa2f20412
MD5 15f00b1fc2902b7104e12e9ec7ea3205
BLAKE2b-256 9112a1d03ab7506689d289630ca4dfd25fb3ae98e6a2d88e259d7f6daed5a758

See more details on using hashes here.

Provenance

The following attestation bundles were made for armasec_lite-0.1.7.tar.gz:

Publisher: release.yml on vantagecompute/armasec-lite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file armasec_lite-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: armasec_lite-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 77.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for armasec_lite-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 58e9db12ff4f0981baa7b80ccff183eeabb2218a369f018f51a4968da4fc1ffb
MD5 2781fd7bdda921c0738d7703d8d8879a
BLAKE2b-256 3994adc61b40e3741e70fbba0e4f2d8419edc5a744c5bd51b65df8074ff60e2a

See more details on using hashes here.

Provenance

The following attestation bundles were made for armasec_lite-0.1.7-py3-none-any.whl:

Publisher: release.yml on vantagecompute/armasec-lite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.8

2 files

This release

0.1.7 This release

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

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