doc/adr/0010-default-admin-user-bootstrap-for-initial-identity-access.md
Date: 2026-03-15
Accepted
Elsa exposes user-management endpoints for creating, listing, updating, and deleting users. Historically, privileged identity bootstrap concerns were tied to the SecurityRoot policy. That approach coupled two separate concerns:
This coupling created unnecessary friction for integrators:
SecurityRoot policy before they could manage users.SecurityRoot policy remained overloaded with responsibilities beyond truly sensitive identity operations.At the same time, Elsa now provides a dedicated DefaultAdminUser feature that can provision an initial administrative role and user during application startup. This gives integrators a clear, explicit bootstrap mechanism that does not depend on runtime access to user-management endpoints.
We will treat initial administrator bootstrap and regular user management as separate concerns.
DefaultAdminUser for Initial BootstrapIntegrators who need an initial administrator account should use the DefaultAdminUser feature.
This feature is responsible for:
SecurityRoot Requirement from User-Management EndpointsThe following user-management endpoints are no longer gated by the SecurityRoot policy:
POST /identity/usersGET /identity/usersPUT /identity/users/{id}DELETE /identity/users/{id}These endpoints are authorized through their normal endpoint permissions (for example create:user, read:user, update:user, and delete:user).
SecurityRoot for Narrow, Explicit Privileged OperationsThe SecurityRoot policy remains available for operations that are still considered privileged bootstrap or security-root capabilities, such as:
This narrows the purpose of SecurityRoot and keeps it from being the default answer to first-user provisioning.
DefaultAdminUser or provide another trusted bootstrap path if no administrator exists yet.SecurityRoot for user bootstrap must be updated.SecurityRoot still exists, but its scope is narrower and more explicit.SecurityRoot gate is removed.DefaultAdminUserFeature and AdminUserInitializer provide the startup-time bootstrap mechanism.SecurityRoot.SecurityRoot for operations that intentionally remain root-level.