Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Multi-provider external authentication for Plone

pas.plugins.identity

PyPI Python versions

Documentation CI

GitHub contributors GitHub Repo stars

The backend package for multi-provider external authentication in Plone, built on authlib and joserfc. See also the frontend package @plone-collective/volto-identity.

One canonical Plone user id maps to many external identities — GitHub, Google, another Plone site, any OpenID Connect provider, an emailed magic link — for the same human, without running a separate identity broker.

Features

  • Identity linking. One account, many providers. The identity key is (provider, subject), and an identity already linked to somebody is never silently re-attached: a collision is a hard error, not a merge.
  • Providers configured through the web. A control panel with a form generated from each driver's published schema, so a driver describes its own settings and the frontend composes rather than describes them. Client secrets are write-only through every API surface, GenericSetup export included.
  • Five shipped drivers. github, google, oidc-generic, plone-identity (another Plone site running this package's server layer), and email for magic-link sign-in. Writing another means subclassing BaseDriver and registering a utility.
  • Magic-link sign-in. Single-use signed tokens, at most fifteen minutes, rate limited per address and per IP, answering identically for known and unknown addresses.
  • An audit log. Successes and refusals, per user or site-wide, bounded and purged on write. IP address and user agent are off by default, and the sink is a utility a deployment can replace.
  • A documented event contract, which is what the audit log, the profile machinery and your own integrations all consume. Nothing reaches into anything else.
  • Content-backed profiles and groups, with user properties, enumeration and group membership served entirely from a dedicated catalog. No content object is woken to answer them, and the test suite asserts that rather than claiming it.
  • Federated group membership. Each provider's grants are recorded separately, so signing in through one never revokes what another gave you, and local grants survive both.
  • Migrations from pas.plugins.authomatic and pas.plugins.oidc. Dry-run by default, idempotent, and they report what they would do before you let them do it.
  • Core installs alone. uv add pas.plugins.identity with no extras is a tested configuration, enforced in CI by an import-linter contract rather than by discipline.

Layers and extras

The package installs as a core, with one optional layer beside it. [server] is that layer, and it brings a GenericSetup profile of its own. [sql] is an extra rather than a layer: it adds one audit sink and installs no profile.

Profile What it adds
pas.plugins.identity:default Sign in with external providers, identity linking, the audit log, the control panel, and the content types users and groups are.
pas.plugins.identity.server:default An OAuth 2.1 and OpenID Connect authorization server, so the site can be a provider for others.
Extra Adds Profile
[server] The authorization server layer. pas.plugins.identity.server:default
[sql] An audit sink writing a row per event to a relational database. Needs IDENTITY_AUDIT_DSN. none — name sql in audit_sinks.

Core never imports from the server layer, and CI fails the build if it starts to. Read the layers page for why the boundary is more than tidiness.

Not in scope

  • Being an identity broker. Providers are configured on the site and mapped onto its own users; this package does not proxy one provider to another.
  • Merging two existing accounts. A colliding identity is refused rather than reconciled, because a merge that guesses is worse than a refusal that explains.
  • Storing credentials in a Dexterity field. Passwords stay in source_users, or in an annotation for a site that opts into ICredentialStorage. A field would be serialized, exported, indexed and versioned: four disclosure paths, each of which has to be remembered separately.
  • SAML. Nothing here precludes a driver for it; none ships.

Documentation

Full documentation is published at collective.github.io/pas-plugins-identity, and its source lives in docs/ at the repository root.

The pages closest to this package:

Installation

Requires Plone 6.2 and Python 3.12 or later.

Install pas.plugins.identity with uv.

uv add pas.plugins.identity

For the authorization server as well:

uv add "pas.plugins.identity[server]"

Create the Plone site.

make create-site

Then install pas.plugins.identity from the add-ons control panel, and configure a provider in Site Setup > Identity providers.

Contribute

Prerequisites ✅

Installation 🔧

  1. Clone this repository.

    git clone git@github.com:collective/pas-plugins-identity.git
    cd pas-plugins-identity/backend
    
  2. Install this code base.

    make install
    

Tests

make test

Part of the suite drives a real OpenID Connect provider in a container and is marked docker. To run everything else:

uv run pytest -m "not docker"

License

The project is licensed under GPLv2.

Credits and acknowledgements 🙏

Generated using Cookieplone (2.0.0b3) and cookieplone-templates (91c8455) on 2026-08-20 18:32:15.036687. A special thanks to all contributors and supporters!

Download files

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

Source Distribution

pas_plugins_identity-1.0.0a6.tar.gz (841.2 kB view details)

Uploaded Source

Built Distribution

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

pas_plugins_identity-1.0.0a6-py3-none-any.whl (516.5 kB view details)

Uploaded Python 3

File details

Details for the file pas_plugins_identity-1.0.0a6.tar.gz.

File metadata

  • Download URL: pas_plugins_identity-1.0.0a6.tar.gz
  • Upload date:
  • Size: 841.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.12 {"installer":{"name":"uv","version":"0.12.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pas_plugins_identity-1.0.0a6.tar.gz
Algorithm Hash digest
SHA256 072a0cfca3bab821a6aa1a1b5f8eb6e895fcd00062df8934398f9125428be4ab
MD5 c0afa4e7ddd5852893439ee167d3f752
BLAKE2b-256 d3532a75e32ab6c98dbe799f5f0589316bef875f256ef46999d53294139dc8cc

See more details on using hashes here.

File details

Details for the file pas_plugins_identity-1.0.0a6-py3-none-any.whl.

File metadata

  • Download URL: pas_plugins_identity-1.0.0a6-py3-none-any.whl
  • Upload date:
  • Size: 516.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.12 {"installer":{"name":"uv","version":"0.12.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pas_plugins_identity-1.0.0a6-py3-none-any.whl
Algorithm Hash digest
SHA256 77779edce4a00ca4c35194dbec504713f323b795b650c7a0b9b13b987cb351d1
MD5 c86ebe0a1fc08dde75009f5de75996cd
BLAKE2b-256 8c26ba869e5052aee296329dfb54f2d75013a667e1e45ce04ad0d685200ce3f0

See more details on using hashes here.

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