Skip to main content

Aserto Identity Providers

Common identity providers for use with Aserto client libraries

Installation

Using Pip

pip install aserto-idp

Using Poetry

poetry add aserto-idp

Current Identity Providers

OpenID Connect

from aserto_idp.oidc import identity_provider

Usage

With aserto-authorizer-grpc

from aserto.client import IdentityContext, IdentityType
from aserto_idp.oidc import AccessTokenError, identity_provider

oidc_provider = identity_provider(issuer=OIDC_ISSUER, client_id=OIDC_CLIENT_ID)

try:
    subject = await oidc_provider.subject_from_jwt_auth_header(request.headers["Authorization"])

    identity_context = IdentityContext(
        type=IdentityType.IDENTITY_TYPE_SUB,
        identity=subject,
    )
except AccessTokenError:
    identity_context = IdentityContext(type=IdentityType.IDENTITY_TYPE_NONE)

With aserto

from aserto import Identity
from aserto_idp.oidc import AccessTokenError, IdentityProvider

oidc_provider = identity_provider(issuer=OIDC_ISSUER, client_id=OIDC_CLIENT_ID)

try:
    subject = await oidc_provider.subject_from_jwt_auth_header(request.headers["Authorization"])

    identity = Identity(type="SUBJECT", subject=subject)
except AccessTokenError:
    identity = Identity(type="NONE")

Metadata

Release files for aserto-idp 0.3.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 aserto-idp 0.3.1
File Size Uploaded Provenance Actions
aserto-idp-0.3.1.tar.gz 5.1 kB Without provenance Details for aserto-idp-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aserto-idp 0.3.1
File Interpreter ABI Platform Actions
aserto_idp-0.3.1-py3-none-any.whl Python 3 none any Details for aserto_idp-0.3.1-py3-none-any.whl

Total release size: 11.3 kB

Release files / aserto-idp-0.3.1.tar.gz

Download URL aserto-idp-0.3.1.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6240f0cb452ea76a13ba114a314837f014372946d04ed3a3cd82f17807f3c74c
BLAKE2b-256 checksum
How to use checksums
06cd59e1f5672b55602050d2bed1488f860cf9f47f095fd4d0ac47c45af7ac99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.7.12 Darwin/23.0.0

Release files / aserto_idp-0.3.1-py3-none-any.whl

Download URL aserto_idp-0.3.1-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
439fe873aca22f497a4ef7189caafaa9d71ef5606a094f2345544157ae24c0f3
BLAKE2b-256 checksum
How to use checksums
65c22bd5ec2180a281d9341dbde208db2d2412ba569b0a095b57527277f3115f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.7.12 Darwin/23.0.0

Security for aserto-idp 0.3.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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