Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

xtr-security-openid-connect-server

Latest version: v7.3.0

Overview

Last scanned
26 Nov 2026
Published
26 Nov 2026
PyPI package Publisher: xterr
12 Versions
1.1K Downloads

Scan summary

xtr-security-openid-connect-server was last scanned on 26 Nov 2026 at version 7.3.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 12 versions; the latest 2 were published within 2 days (25 and 26 Nov 2026).
  • Findings: No rules fired in version 7.3.0.
  • Downloads: 1,132 downloads.

Versions

12 versions published
Versions and the rules that fired in each
VersionPublishedStatus
7.3.0 LATEST 26 Nov 2026 No rules fired
7.2.0 25 Nov 2026 No rules fired
7.1.0 19 Nov 2026 No rules fired
7.0.0 19 Nov 2026 Not shown
6.8.1 13 Nov 2026 Not shown

No rules fired in 7.3.0

Findings

Findings for v7.3.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 7.3.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

xtr-security-openid-connect-server

OpenID Connect for the xtr OAuth 2.0 authorization server.


Why?

xtr-security-oauth2-server issues access tokens: a client that holds one may act for somebody, and learns nothing about who that somebody is. "Sign in with this server" is the other half, and this package is it — an add-on bundle that turns that server into an OpenID Connect provider for the authorization code flow, without changing how the server works.

  • 🪪 An ID token — the token answer to a sign-in carries a signed id_token naming the end-user: iss, sub, aud, exp, iat, auth_time, the nonce the client sent, and an at_hash binding the access token answered beside it.
  • 👤 /userinfo — GET and POST; answers the subject plus the claims the token's scopes reveal, from the application's own users, and fails closed.
  • 🔎 /.well-known/openid-configuration — one document: the authorization server's own description, with the provider's fields contributed to it.
  • 🔁 prompt and max_age — none answers login_required rather than showing a page, login and an expired max_age send the end-user back through the login page and return to the request, consent is read by the application's consent listener.
  • 🔑 One key, one key set — the ID token is signed with the authorization server's own signer and kid, so a client verifies it from the /.well-known/jwks.json that server already publishes.

It follows OpenID Connect Core 1.0 and Discovery 1.0 for the authorization code flow, checked by tests/conformance/, whose README lists every requirement, every deliberate deviation and the optional manual run of the OpenID Foundation suite. Running that suite is not a claim this repository makes.

Out of scope on purpose: no logout of any kind, no implicit or hybrid flow, no pairwise subjects, no claims parameter, no request objects, no dynamic client registration, and no ID token on a refresh.

Install

uv add xtr-security-openid-connect-server     # the provider, its bundle and its endpoints

Requires Python 3.14.4+. It brings xtr-security-oauth2-server and its protocol library along, with the security family, the key layer, the clock, the event dispatcher and the HTTP kernel.

Quick start

A deployment whose authorization server already runs the code flow, signing end-users in.

1. List both bundles
# app/config/bundles.py
from xtr_security_oauth2_server.bundle import OAuth2ServerBundle
from xtr_security_openid_connect_server.bundle import OpenIdConnectServerBundle

BUNDLES = {OAuth2ServerBundle: {"all": True}, OpenIdConnectServerBundle: {"all": True}}

Listing the provider alone is enough: it requires the authorization server's bundle. The provider puts its own flow and token answer in place of the shipped ones, and adds openid to scopes.available when that tuple names anything at all.

2. Say where the users are
# app/identity_provider.py
from __future__ import annotations

from typing import TYPE_CHECKING, final

from xtr_security_core.exception import UserNotFoundError

if TYPE_CHECKING:
    from collections.abc import Mapping

    from xtr_security_oauth2_server_core.entities.client_entity_interface import (
        ClientEntityInterface,
    )

    from xtr_security_openid_connect_server.entities import UserClaimsEntityInterface


@final
class Person:
    """A resource owner the server knows by identifier, with the claims they hold."""

    def __init__(self, identifier: str, claims: Mapping[str, object]) -> None:
        self._identifier = identifier
        self._claims = claims

    def get_identifier(self) -> str:
        return self._identifier

    async def get_claims(self) -> Mapping[str, object]:
        return self._claims


@final
class PeopleIdentityProvider:
    """Finds the end-user a token names, and the claims that describe them."""

    async def get_user_entity_by_identifier(
        self,
        identifier: str,
        client: ClientEntityInterface,
    ) -> UserClaimsEntityInterface:
        del client  # Every client is told the same about a person here.
        if identifier != "alice":
            raise UserNotFoundError(identifier)
        return Person(
            "alice",
            {"name": "Alice", "email": "alice@example.com", "email_verified": True},
        )
# app/config/packages/openid_connect_server.py
from xtr_dependency_injection import configure
from xtr_security_openid_connect_server.bundle import OpenIdConnectServerConfig

from app.identity_provider import PeopleIdentityProvider

__all__ = ["openid_connect_server"]


@configure
def openid_connect_server() -> OpenIdConnectServerConfig:
    return OpenIdConnectServerConfig(
        identity_provider=PeopleIdentityProvider,
        login_path="/login",
        login_firewall="main",
    )

The bundle registers the class named here, so the container builds it from its constructor. Do not register it a second time. It is built per request, like the userinfo endpoint that asks it, so its constructor may take the request's services — a repository over the session of the request's unit of work.

3. Serve the endpoints and guard them
# app/config/routes/openid_connect_server.py
from __future__ import annotations

from typing import TYPE_CHECKING

from xtr_http_kernel.routing.decorator import as_routes

if TYPE_CHECKING:
    from collections.abc import Mapping

    from fastapi import APIRouter, FastAPI

__all__ = ["openid_connect_server"]


@as_routes
def openid_connect_server(app: FastAPI, resources: Mapping[str, APIRouter]) -> None:
    app.include_router(resources["openid_connect_server"])
    app.include_router(resources["openid_connect_server_well_known"])
# app/config/packages/security.py — the two firewalls this package needs
from xtr_dependency_injection import configure
from xtr_security.bundle import FirewallConfig, SecurityConfig
from xtr_security_jwt.bundle import JwtAuthenticatorConfig
from xtr_security_oauth2_server.bundle import OAuth2AuthenticatorConfig
from xtr_security_openid_connect_server.bundle import PROMPT_LISTENER

__all__ = ["security"]


@configure
def security() -> SecurityConfig:
    return SecurityConfig(
        providers={"people": ...},
        firewalls={
            "main": FirewallConfig(
                pattern=r"^/(authorize|login)",
                stateless=False,
                provider="people",
                authenticators=(JwtAuthenticatorConfig(),),
                listeners=(PROMPT_LISTENER,),
            ),
            "userinfo": FirewallConfig(
                pattern=r"^/userinfo",
                provider="people",
                authenticators=(OAuth2AuthenticatorConfig(),),
            ),
        },
    )

PROMPT_LISTENER is the qualifier of the step that decides prompt and max_age. Only the application knows which firewall signs end-users in, so only it can list the step there — and that firewall must keep a session, because the authorization request waits in it while the end-user signs in again. A configured login_firewall that does not list it fails the build, since max_age and prompt=login would otherwise go unenforced.

4. Sign in
$ # the client sends the browser to:
$ #   /authorize?response_type=code&client_id=dashboard&redirect_uri=https://dashboard.example.com/callback
$ #            &scope=openid%20profile%20email&state=xyz&nonce=n-0S6_WzA2Mj&code_challenge=…&code_challenge_method=S256
$ curl -s -u dashboard:s3cret -d grant_type=authorization_code -d code=… \
       -d redirect_uri=https://dashboard.example.com/callback -d code_verifier=… \
       https://authorization.example.com/token
{"token_type":"Bearer","expires_in":3600,"access_token":"ey…","refresh_token":"def…","id_token":"ey…"}

$ curl -s -H "Authorization: Bearer ey…" https://authorization.example.com/userinfo
{"sub":"alice","name":"Alice","email":"alice@example.com","email_verified":true}

Configure

<app>/config/packages/openid_connect_server.py returns an OpenIdConnectServerConfig. Every field has a default, so the bundle builds and boots with no configuration at all.

Field Default What it does
identity_provider None The application's class implementing IdentityProviderInterface. The bundle registers it, built per request, so its constructor may take the request's services. Unset, the provider still boots; /userinfo reports the setting by name
claim_sets {} The claims a scope of the application's own reveals, by scope — {"company": ("company_id",)}. One of the protocol's four scopes is refused
id_token_ttl None How long an ID token lasts. None has it expire with the access token answered beside it
login_path "/login" Where an end-user asked to sign in again is sent
login_firewall "main" The firewall signing them in there, whose session keeps the request to return to
authorize_path "/authorize" Where this deployment serves the authorization endpoint, which is where the prompt step acts

The authorization server's own settings decide the rest, in <app>/config/packages/oauth2_server.py: authorization_server.issuer is the iss every ID token claims (never the request's Host), and authorization_server.signature_algorithm is what the ID token is signed with — the same key, signer and kid as an access token. EdDSA names no digest for the at_hash, so the curve of that key decides it — SHA-512 over Ed25519, SHAKE256 over Ed448 — read off the key the first time it is needed, never while the application builds. A shared-secret algorithm (HS256, HS384, HS512) fails the build: every client holding the secret could mint ID tokens. The login_required and consent_required refusals carry iss like every other redirect.

Three settings of that server this bundle puts in place itself, and refuses to be undone: enable_auth_code_grant=False (this package registers the flow answering that grant type), response_type_class=IdTokenResponse, and enable_metadata_endpoint left on. An application @configure transform runs after a bundle's prepend, so one changing any of them fails the build with a message naming the setting.

The four claim sets OpenID Connect Core defines ship held and cannot be changed: profile, email, address and phone. An end-user granting email agrees to share what email means, and a set redefining it would hand a client other claims under the name they agreed to. Add the scopes a deployment answers for to scopes.available, or /authorize refuses a client asking for them.

Endpoints

Two route resources, registered by <app>/config/routes/openid_connect_server.py:

Resource Route Path Methods
openid_connect_server openid_connect_server_userinfo /userinfo GET, POST
openid_connect_server_well_known openid_connect_server_configuration /.well-known/openid-configuration GET
  • /userinfo reads no credential of its own: it answers from the token the request's firewall settled on, which is why it fails closed — with no firewall in front of it, there is no token and every request is refused. A token that is not one of this server's, or one a client was issued for itself, is 401 invalid_token; one not granted openid is 403 insufficient_scope; each carries an RFC 6750 Bearer challenge. A success is 200, application/json, cache-control: no-store, {"sub": …, **claims} — sub first and never replaced by a claim of the identity provider's. A POST carries Content-Type: application/x-www-form-urlencoded (parameters allowed), even with an empty body; any other content type, or none, is 400 invalid_request. The access token is read from the Authorization header only.
  • /.well-known/openid-configuration answers the authorization server's description with the provider's fields contributed to it: userinfo_endpoint (the issuer plus the path this application mounts the endpoint at, so moving it under a prefix moves the published URL), subject_types_supported: ["public"], id_token_signing_alg_values_supported, claims_supported (claim names, never scope names), and claims_parameter_supported, request_parameter_supported and request_uri_parameter_supported, all false. The authorization server's own /.well-known/oauth-authorization-server carries the same fields: it is one description, answered at two paths. The resource is kept apart from the movable one because Discovery 1.0 fixes the document at that path under the issuer.
  • /authorize and /token stay the authorization server's own endpoints. This package changes what happens behind them: the authorization endpoint answers GET and a posted form, a request asking for openid must name its redirect_uri (a request without it still may leave it out, as OAuth 2.0 allows a client registered with one URI), prompt=select_account is refused rather than ignored, and the token answer to a sign-in carries the id_token. A refresh never does.

A deployment that keeps the authorization server's RS256 default publishes RS256 as its ID token signature algorithm, which is what Discovery 1.0 § 3 requires of the document and Core § 15.1 of the provider. A deployment configured for another signature_algorithm publishes only that one: the ID token is signed with the authorization server's key, and there is one of those.

Services

OpenIdConnectServerBundle registers, under the types an application injects:

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases xtr-security-openid-connect-server

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Frame 2085668439 (1)
Group 1261154229