-
-
Notifications
You must be signed in to change notification settings - Fork 33
Zitadel Implementation Status
John R. D'Orazio edited this page Apr 24, 2026
·
5 revisions
This page tracks what has been implemented and what remains to be done for the Zitadel RBAC integration.
- OIDC token validation via JWKS with per-issuer keyset caching (
OidcAuthMiddleware) - Support for both HttpOnly cookie and
Authorization: Bearerheader authentication - Role extraction from Zitadel token claims (
urn:zitadel:iam:org:project:roles) - OIDC availability checking with 503 fallback (
OidcAvailabilityMiddleware) - HTTPS enforcement for auth endpoints in staging/production
- Legacy JWT authentication preserved as fallback (
JwtAuthMiddleware)
- Full client for user management (list, search, fetch by ID) (
ZitadelService) - Role management (grant, revoke, check, update grants)
- Intelligent single-role revocation (preserves other roles on same grant)
- OIDC discovery document caching (1-hour TTL)
- Factory method for environment-based instantiation
- Users submit role requests via
POST /auth/role-requests - Users view their requests via
GET /auth/role-requests - Admins list pending requests via
GET /admin/role-requests - Admins approve/reject via
POST /admin/role-requests/{id}/approve|reject - Approval triggers role grant in Zitadel via Management API
- Role revocation support (status:
revoked)
- Developers register applications with name, description, website
- Application approval workflow (pending → approved/rejected/revoked)
- Resubmission of rejected applications
- API key generation from approved applications (with requested scope)
- API key rotation and revocation
- Key prefix tracking for identification
- Scope control (read/write)
- Expiration support
- List and manage users with roles
- Revoke individual user roles
- Approve/reject/revoke applications
- Notification counts (pending role requests + pending applications)
- Email verification resend
- PostgreSQL schema defined in
infrastructure/init-db.sql - UUID primary keys via pgcrypto
- Repositories: RoleRequest, Application, ApiKey, PermissionRequest, CalendarPermission, AuditLog
- Audit logging of all administrative actions with IP and user agent
- IP-based rate limiting on login endpoint
- Argon2id password hashing
- JWT placeholder detection in staging/production
- CORS origin validation
- HttpOnly cookie support with SameSite attributes
-
ApiKeyMiddlewarewired into Router middleware pipeline (#515) - API key rate limiting enforcement (#516)
- Users submit permission requests via
POST /auth/permission-requests - Users view their own requests via
GET /auth/permission-requests - Admins manage permission requests via
/admin/permission-requests(list, approve, reject, revoke) - Admins manage OpenFGA tuples directly via
/admin/permissions(list, grant, revoke, check) - Supported object types:
national_calendar,diocesan_calendar,wider_region,test_definition - Supported relations:
admin,viewer,editor,deleter -
PermissionRequestRepositorywith full CRUD operations backed bypermission_requeststable
-
OpenFgaClientservice (src/Services/OpenFgaClient.php) for communicating with the OpenFGA API -
OpenFgaAuthorizationMiddlewarefor fine-grained permission checks on/data/*and/testsroutes - HTTP method to relation mapping (PUT/PATCH →
editor, DELETE →deleter) - Path category to object type mapping (nation, diocese, widerregion, tests)
- Authorization model defined in
infrastructure/openfga-model.json - Conditionally applied in the middleware pipeline when OpenFGA is configured
- Admin role bypass (consistent with role-based authorization)
- Zitadel OIDC login flow with Authorization Code Flow and PKCE (#280)
- Role request management UI (#278)
- Application management dashboard for developers (#279)
- Admin user management UI with role revocation and notification badges (#281)
- Centralized admin interfaces (#197)
- Docker Compose setup (Zitadel, Login V2, OpenFGA, PostgreSQL, Adminer)
- Database initialization script with RBAC and permission tables (
infrastructure/init-db.sql) - OpenFGA model initialization script (
scripts/setup-openfga.sh) - Production security documentation
- #517 - Integrate fine-grained authorization with OpenFGA The OpenFGA client, middleware, and permission endpoints are implemented. Remaining work involves completing the integration and ensuring full coverage of authorization checks across all protected routes.
For Users
For Webmasters
For Liturgists
For Developers
For Contributors
Testing
Authentication & RBAC