Skip to main content

Middleware for FastAPI/Starlette to check requests coming through Google Cloud IAP.

Project description

fastapi-google-iap

PyPI - Version PyPI - Python Version PyPI - License PyPI - Downloads codecov

A FastAPI plugin for Google Cloud Identity-Aware Proxy (IAP) authentication.

Installation

pip install fastapi-google-iap

Usage

from fastapi import FastAPI
from fastapi_google_iap import GoogleIapMiddleware

app = FastAPI()

app.use_middleware(
    GoogleIapMiddleware,
    audience="/projects/999999999999/apps/example-project",
    unprotected_routes=["/healthz"],
    restrict_to_domains=["example.com"],
)

License

This project is licensed under the terms of the MIT license.

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

fastapi-google-iap-1.0.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

fastapi_google_iap-1.0.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file fastapi-google-iap-1.0.1.tar.gz.

File metadata

  • Download URL: fastapi-google-iap-1.0.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for fastapi-google-iap-1.0.1.tar.gz
Algorithm Hash digest
SHA256 15df6fc3c667beda11b22e1f89c841d985bccbd34bcfb71ed02d41a845452324
MD5 0eb47a57e02d2a2df8f7eb1c1d138e27
BLAKE2b-256 684064cd8b00b41f0e0644d2c9b81efa5e2582f463887fe2caeb15d94889867f

See more details on using hashes here.

File details

Details for the file fastapi_google_iap-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for fastapi_google_iap-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b919fdd3f5bd29606db2b8f0ca8efabb59f5796319cce9799512d0583d140d65
MD5 9b5c5391be06003bd383187b28826e0c
BLAKE2b-256 97e0149c7394d9b1a4d69e9cfa6a8b042dd7e5d356097430035a3ac46f498827

See more details on using hashes here.

Supported by

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