phil / identity-provider-bundle
An open identity brick for Symfony, one module per method: verified accounts, Argon2id passwords checked against breaches, passkeys, TOTP and recovery codes, sign-in links, SMS verification, step-up, remote sign-out of devices, linked federated identities, and an OpenID Connect provider with PKCE, r
Package info
github.com/parler-haut-interagir-librement/identity-provider-bundle
Type:symfony-bundle
pkg:composer/phil/identity-provider-bundle
Requires
- php: >=8.5
- ext-mbstring: *
- ext-openssl: *
- ext-sodium: *
- doctrine/orm: ^3.7
- phil/passwords: ^0.1@dev || ^0.2@dev
- phil/url: ^0.1@dev
- psr/clock: ^1.0
- psr/event-dispatcher: ^1.0
- symfony/config: ^8.2
- symfony/dependency-injection: ^8.2
- symfony/event-dispatcher: ^8.2
- symfony/http-foundation: ^8.2
- symfony/http-kernel: ^8.2
- symfony/password-hasher: ^8.1
- symfony/property-access: ^8.2
- symfony/routing: ^8.2
- symfony/security-bundle: ^8.2
- symfony/security-core: ^8.2
- symfony/security-csrf: ^8.2
- symfony/security-http: ^8.2
- symfony/service-contracts: ^3.6
- symfony/uid: ^8.2
- twig/twig: ^3.21
- web-token/jwt-library: ^4.2
Requires (Dev)
- doctrine/dbal: ^4.5
- doctrine/doctrine-bundle: ^3.3
- phil/audit-bundle: ^0.1@dev
- phil/ux-kit: >=0.5.0-alpha <1.0
- phpunit/phpunit: ^13.4
- psr/log: ^3.0
- symfony/browser-kit: ^8.2
- symfony/clock: ^8.2
- symfony/console: ^8.2
- symfony/css-selector: ^8.2
- symfony/dom-crawler: ^8.1
- symfony/framework-bundle: ^8.2
- symfony/http-client-contracts: ^3.6
- symfony/key-management: ^8.2
- symfony/mailer: ^8.2
- symfony/mime: ^8.2
- symfony/notifier: ^8.2
- symfony/translation: ^8.2
- symfony/translation-contracts: ^3.6
- symfony/twig-bridge: ^8.2
- symfony/twig-bundle: ^8.2
- symfony/ux-twig-component: ^3.7
Suggests
- phil/audit-bundle: To write every event of the accounts to a hash-chained audit trail
- phil/ux-kit: For the recipes the templates draw — Alert, Button, Card, Field, Input —, through the Symfony UX Toolkit
- symfony/console: For the commands of the clients, the rotation of the keys and the purge
- symfony/key-management: To encrypt the TOTP secrets and the private signing keys under a key management service
- symfony/mailer: For the emails: address verification, password reset, sign-in links, risky sign-ins
- symfony/notifier: For the SMS codes, through its texter
- symfony/stimulus-bundle: For the Stimulus controller of passkeys
- symfony/ux-twig-component: For the pages, drawn with the recipes of the kit
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-16 01:17:32 UTC
README
An open identity brick for Symfony: accounts, one module per way to sign in, and an OpenID Connect provider.
phil/identity-provider-bundle keeps accounts — an address and whether it was verified, a name, a password hashed with
Argon2id —, and every way to prove one: passwords checked against breaches by phil/passwords, passkeys (WebAuthn),
an authenticator application (TOTP) with recovery codes, sign-in links by email through the login_link authenticator
of Symfony Security, a phone number verified by a text message, and identities of federated providers whose packages
plug into a port. It asks for a second step when an account has an authenticator application, asks again before
sensitive actions on the sudo mode of Symfony Security 8.2, lists the devices and sessions of an account and closes
them from another device, and warns of a sign-in from a new device.
It is also an OpenID Connect provider written on the components of Symfony, its tokens signed and verified by
web-token/jwt-library: discovery, a key set that rotates, the authorization code flow with PKCE, ID and access
tokens, refresh tokens rotated with reuse detection, userinfo, revocation (RFC 7009), introspection (RFC 7662),
RP-initiated logout, consent per client, and clients registered in the database. It passes the Basic OP, Config OP and
RP-Initiated Logout OP plans of the OpenID Foundation's conformance suite, run in Docker by tests/Conformance/run.sh.
Each method is a module the configuration turns on or off, with its own routes, tables and pages: a site that does not want sign-in links or text messages turns them off, and they cannot be reached. The bundle keeps the minimum about people — no address of their connection, no token of a federated provider — and its events carry identifiers only.
Status
| Part | State |
|---|---|
| Accounts: registration without telling who has an account, verified addresses by signed links, the account page | Implemented and tested |
Passwords: Argon2id, strength and breach checks by phil/passwords, reset by a link signed over the password, progressive lock |
Implemented and tested |
| Passkeys: registration, sign-in, rename, removal; the last way to sign in kept | Implemented and tested |
| Authenticator application (TOTP), recovery codes, the second step of a sign-in | Implemented and tested |
Sign-in links by email (login_link of Symfony Security) |
Implemented and tested |
Phone number verified by a text message, through the Notifier component or an SmsSender of your own |
Implemented and tested |
Step-up on Symfony 8.2: PHIL_STEP_UP, AuthenticationMethodBadge proofs (RFC 8176), requestReAuthentication() |
Implemented and tested |
| Devices and sessions: list, one or all closed from another device, risky sign-in warned | Implemented and tested |
Federated identities through the port ExternalProvider, linked without merging on an unverified address |
Implemented and tested |
OpenID Connect provider: discovery, JWKS with rotation, code flow with PKCE, tokens signed by web-token/jwt-library, refresh rotation, userinfo, revocation, introspection, logout, consent |
Implemented and tested |
| Doctrine stores on SQLite, MySQL 8.4 and PostgreSQL 17; memory stores for tests | Implemented and tested |
| Templates drawn with the recipes of the kit, a Stimulus controller for passkeys | Implemented and tested |
Audit trail through phil/audit-bundle when installed; secrets encrypted by the KeyManagement component when configured |
Implemented and tested |
| OpenID Foundation conformance suite: Basic OP, Config OP and RP-Initiated Logout OP plans, in Docker | Run and passed — see OpenID conformance |
| Certification by the OpenID Foundation, security review by someone else | Before use in production — see Threat model and Reviewer guide |
Sign-in across devices by QR code, enterprise SSO (SAML), children's accounts with a guardian, guest accounts, service accounts, audited impersonation and the act claim (RFC 8693), back-channel logout, dynamic client registration, pairwise subjects, request objects, SMS as a second factor, passkey-first registration, account deletion |
Planned |
Documentation
| Document | What it covers |
|---|---|
| Installation | Requirements, the bundle, the firewall, the routes, the tables and the recipes of the kit. |
| Configuration | Every option, module by module, with an example. |
| Accounts and passwords | Registration, verified addresses, the account page, passwords, their reset and the lock. |
| Passkeys | WebAuthn: the ceremonies, what is checked, the Stimulus controller. |
| Authenticator application and recovery codes | TOTP, recovery codes and the second step of a sign-in. |
| Sign-in links and phone numbers | The login_link authenticator and the verification by text message. |
| Step-up | PHIL_STEP_UP on the sudo mode of Symfony Security 8.2, and the re-authentication page. |
| Devices and sessions | Sessions tied to rows, closed from another device; risky sign-ins. |
| Federated providers | The port ExternalProvider and the rules that link identities to accounts. |
| OpenID Connect provider | Endpoints, clients, keys and their rotation, tokens, consent, logout. |
| Threat model | Assets, trust boundaries, what the bundle defends against and how, open risks. |
| Reviewer guide | The scope of the security review, its entry points, and how to run the tests and the suite. |
| OpenID conformance | The OpenID Foundation's conformance suite in Docker: how to run it, and its results. |
| Extension points | The services to replace, the tags to add to, and when they are stable. |
| Testing | The bundle's tests, the servers its integration tests read, and the fuzz targets. |
| Reference | Every class, service, route, table and event of the bundle. |
Quick start
// config/bundles.php Phil\IdentityProviderBundle\PhilIdentityProviderBundle::class => ['all' => true],
# config/packages/phil_identity_provider.yaml phil_identity_provider: site_name: Example login_route: app_login mailer: { from: accounts@example.com } modules: { passkeys: true, totp: true, recovery_codes: true } passkeys: { rp_id: example.com, origins: ['https://example.com'] }
# config/routes/phil_identity_provider.yaml phil_identity_provider: resource: . type: phil_identity_provider
The firewall names the bundle's user provider, user checker and authenticators: see Installation.
Requirements
PHP 8.5 or later with the mbstring, openssl and sodium extensions, Symfony 8.2 or later, Doctrine ORM 3.7 or
later, web-token/jwt-library 4.2 or later, phil/passwords and phil/url.
Contributing
Contributions are welcome on the PHIL monorepo: read the contribution guide and the code of conduct. Report a vulnerability privately, as the security policy explains, never in a public issue.
License
MIT, © Philippe Gamache, doing business as Le Gnome Archiviste; a Parler Haut Interagir Librement project. See LICENSE.