Loading…
Loading…
Explains how the Admin API authorization service resolves user roles, determines required permissions for endpoints, and manages special access modes.
The Admin Authorization Service is the central component responsible for Role-Based Access Control (RBAC) within the Admin API. It determines a principal's (user's) role for each incoming request and verifies if that role has sufficient permissions to access the requested endpoint.
This service solves the problem of enforcing granular access control across all Admin API endpoints. It acts as a gatekeeper, ensuring that principals can only view data and perform actions appropriate for their assigned role.
For every HTTP request to the Admin API, an authorization filter invokes this service. The service resolves the principal's identity, determines their role and special capabilities, and attaches this information to the request as an AuthContext for use by downstream components. Its sources of truth for authorization decisions are database role bindings, bootstrap configuration from environment variables, and claims within the product license.
The service evaluates authorization for each request in a multi-step process, which includes resolving the principal's role, determining special capabilities like "Platform Operator" status, and checking against endpoint-specific permission requirements. The system employs several layers of caching to ensure high performance.
HttpServletRequest using the IdentityResolver component. This provides a verified email address for the acting user.ADMIN role.platformOperator: true if the principal is authorized to manage the platform itself, such as tenant lifecycles in a multi-tenant environment.dataAccess: true if the principal is permitted to view tenant-specific data. A restricted platform operator might have platformOperator=true but dataAccess=false.AuthContext object. This context is then attached to the request via attributes for other parts of the application to use.The service resolves a principal's role by checking several sources in a specific order. The first source to grant a role wins.
flowchart TD
A[Principal's Email] --> B{Is system in Pristine Mode?};
B -- Yes --> C[Pro<customer>e principal to ADMIN<br>Flip system to Protected Mode];
C --> Z(Role is ADMIN);
B -- No --> E{Resolve from sources};
subgraph E [Role Resolution Sources]
direction TD
E1[1. Check DB Role Bindings (Cache)] -- Found --> E_OUT(Role Assigned);
E1 -- Not Found --> E2[2. Check Bootstrap Principals];
E2 -- Found --> E_OUT;
E2 -- Not Found --> E3[3. Check Bootstrap Groups];
E3 -- Found --> E_OUT;
E3 -- Not Found --> E4[Role is NONE];
E4 --> E_OUT;
end
E --> Z;If the system has zero active Identity Providers (IdPs) configured, it enters "Open Mode."
ADMIN role.idpConfigRepository.countActive(). This check is cached for 30 seconds.S2R-ADM-AUTH OPEN_MODE — no active IdP configured; every request is treated as ADMIN... and is logged at most once per minute.WARNING
Open Mode is an insecure state intended only for initial setup. To secure the platform, you must configure at least one Identity Provider, which disables Open Mode and enables RBAC.
For new deployments, the system starts in pristine mode.
ADMIN role. The system then atomically transitions from pristine to protected mode. All subsequent role resolutions follow the standard logic.authModeRepository.pro<customer>eIfPristine to prevent race conditions. The new admin is granted full platformOperator and dataAccess capabilities for their initial request.A Platform Operator is a privileged role designed for managing the platform infrastructure, particularly in multi-tenant deployments. This is distinct from a tenant's own ADMIN.
s2r.admin.bootstrap.platform-operator-emails environment variable.admin or operator role binding in the database under the special __platform__ tenant.meta.platform_operators claim within the signed product license./admin/v1/tenants) or tenant API keys (/admin/v1/tenant-api-keys), require Platform Operator status. An attempt by a non-platform operator (even a tenant ADMIN) to access these endpoints is denied with error S2R-ADM-0407.To support platform operators who should manage infrastructure without accessing tenant data, the service implements a "data access wall."
platformOperator=true, dataAccess=false) is denied access to all Admin API endpoints except for a minimal, explicit allow-list. Access to any other endpoint is denied with error S2R-ADM-0408.isPlatformOperatorAllowedPath) includes infrastructure-management surfaces:
/health/**/admin/v1/eula/**/admin/v1/license/**/admin/v1/tenants/**/admin/v1/tenant-api-keys/**/admin/v1/me/admin/v1/ping/admin/v1/saas/region/admin/v1/settings/install-profileTo optimize performance, the service heavily caches authorization data. All caches are invalidated when relevant data changes.
| Cache | TTL | Scope | Description | Invalidation Trigger |
|---|---|---|---|---|
| Role Bindings | 30s | Per Tenant | Caches the role-to-principal mappings for the current tenant. | PrincipalRoleBindingsChangedEvent, TenantAuthModeChangedEvent |
| Auth Mode | 30s | Per Tenant | Caches the tenant's current auth mode (pristine or protected). | authModeRepository.pro<customer>eIfPristine, TenantAuthModeChangedEvent |
| Platform Operators | 30s | Global | Caches the set of platform operator emails from the database and license. | Any role binding change (invalidateBindingsCache) |
| Open Mode Status | 30s | Global | Caches the boolean flag indicating if the system is in Open Mode. | Manual call to invalidateOpenModeCache() (e.g., after IdP config change) |
The service can grant roles to principals at startup using environment variables. This is useful for bootstrapping the first users or for integrating with an external identity system that provides group information. These variables accept a list of emails or group identifiers, separated by commas, semicolons, or whitespace.
| Environment Variable | Type | Default | Description |
|---|---|---|---|
s2r.admin.bootstrap.admin-emails | String | "" | A list of principal emails to be granted the ADMIN role. |
s2r.admin.bootstrap.developer-emails | String | "" | A list of principal emails to be granted the DEVELOPER role. |
s2r.admin.bootstrap.operator-emails | String | "" | A list of principal emails to be granted the OPERATOR role. |
s2r.admin.bootstrap.reader-emails | String | "" | A list of principal emails to be granted the READER role. |
s2r.admin.bootstrap.platform-operator-emails | String | "" | A list of principal emails to be granted the Platform Operator capability. |
s2r.admin.bootstrap.admin-groups | String | "" | A list of IAM group emails. Principals belonging to these groups are granted the ADMIN role. |
s2r.admin.bootstrap.developer-groups | String | "" | A list of IAM group emails. Principals belonging to these groups are granted the DEVELOPER role. |
s2r.admin.bootstrap.operator-groups | String | "" | A list of IAM group emails. Principals belonging to these groups are granted the OPERATOR role. |
s2r.admin.bootstrap.reader-groups | String | "" | A list of IAM group emails. Principals belonging to these groups are granted the READER role. |
NOTE
When any s2r.admin.bootstrap.*-groups variable is set, a one-time cleanup task runs to delete legacy, hard-coded group role bindings from the s2r_role_binding table to ensure a clean, tenant-agnostic state.
The service exposes several public methods used by the authorization filter and other internal components. It also sets specific attributes on the HttpServletRequest for downstream consumption.
The following attributes are set on the HttpServletRequest object after successful authorization.
| Attribute Name | Type | Description |
|---|---|---|
s2r.actor.email | String | The verified email of the principal making the request. |
s2r.actor.role | AppRole | The resolved role of the principal (e.g., ADMIN, OPERATOR). |
s2r.correlation.id | String | The correlation ID for the request, taken from the X-Correlation-Id header or newly generated. |
s2r.actor.platform-operator | Boolean | true if the principal is a Platform Operator. |
s2r.actor.data-access | Boolean | true if the principal is permitted to access tenant data. |
The service maintains a detailed, explicit list of rules that map API endpoints to the minimum role required for access. The path used for matching is a canonicalized "routed path," which is resilient to URL encoding and other forms of obfuscation.
IMPORTANT
Default-Deny Policy: For any state-changing request (e.g., POST, PUT, PATCH, DELETE) that does not match an explicit rule below, the service defaults to requiring the ADMIN role. This ensures that new write endpoints are secure by default. Read-only GET requests generally default to READER, while HEAD and OPTIONS default to OPERATOR.
These endpoints are accessible to any authenticated principal, regardless of role.
/health/**/admin/v1/eula/**READER RoleGET requests not explicitly requiring a higher role./admin/v1/ping/admin/v1/assistant/** (In-product documentation assistant)DEVELOPER RoleThis role is required for actions related to service definition and lifecycle management.
GET /admin/v1/services/.../unconstrained-string-fieldsPOST /admin/v1/services (Create service)DELETE /admin/v1/services/{serviceId}POST /admin/v1/services/{serviceId}/versions (Create version):activate or :rollback actions.:generate-openapi action.:apply-string-regexes, :set-boolean-handling, :set-upstream-failure-status, :set-null-handling, :set-fault-detail-exposure, :set-mtom-request, :set-datetime-handling, :set-array-collapse, :set-numeric-handling, :set-whitespace-handling, :set-binary-handling, :set-duration-handling, :set-required-handling, :set-header-propagation, :set-field-casing, :set-envelope-wrap, :set-error-shape, :set-xsi-type-handling, or :set-field-ordering.PUT /admin/v1/operations/{opId}/mappingPOST /admin/v1/operations/{opId}/mapping:regeneratePOST /admin/v1/services/{serviceId}/mapping:regeneratePOST /admin/v1/services/{serviceId}/versions/{versionId}/mapping-synthesis:apply/admin/v1/wsdl/** (WSDL import)/admin/v1/openapi/import/** (OpenAPI import)OPERATOR RoleThis role is required for operational tasks, service configuration, and diagnostics.
GET /admin/v1/services/.../spec-refinementPOST /admin/v1/services/.../spec-refinement:applyGET requests to /admin/v1/debug/capture/**GET /admin/v1/debug/capture/.../downloadPATCH /admin/v1/operations/{opId}PATCH /admin/v1/services/{serviceId}:set-validation-regex/admin/v1/operations/{opId}/field-encodings and /admin/v1/operations/{opId}/transform-rules/admin/v1/services:bulk-action/admin/v1/services/{serviceId}/backend-profiles, /synthetic-monitor, and /test-datasets/admin/v1/backend-profiles/** (except DELETE, which is ADMIN)DELETE /admin/v1/test-datasets/{id}/admin/v1/datapower/**, /admin/v1/f5/instances/**, /admin/v1/discovery/vendor-enablement, /admin/v1/discovery/environments, /admin/v1/learned-example-error-markersPUT /admin/v1/master-discovery/rows/{id}/alert/admin/v1/async-executions/**/admin/v1/soap-to-json/preview, /admin/v1/soap-to-json/preview-with-overrides, /admin/v1/roundtrip/replay/**/admin/v1/license/request, /admin/v1/specaria/license-requestADMIN RoleThis role is required for system-wide configuration, security-sensitive operations, and any unclassified write operations.
GET requests to /admin/v1/settings/**GET requests to /admin/v1/permission-bindings/**GET requests to /admin/v1/updates/**GET requests to /admin/v1/topology/**GET requests to /admin/v1/support-consent/**GET requests to /admin/v1/specaria/telemetry/**/admin/v1/idp-config/**GET requests to /admin/v1/connectors/**GET requests to /admin/v1/agents/**GET requests to /admin/v1/tenants/** (also requires Platform Operator)GET requests to /admin/v1/tenant-api-keys/** (also requires Platform Operator)GET /admin/v1/settings/conversion-defaults:previewGET /admin/v1/updates/deployment-idGET /admin/v1/updates/notificationsPOST /admin/v1/license and /admin/v1/license/upload/admin/v1/trusted-proxy-declarations/**/admin/v1/services/.../consumer-ip-grants/**DELETE /admin/v1/backend-profiles/{id}:regenerate-all, :rehydrate-wsdl-artifacts, or :create-wsdl-artifacts-from-discovery.| Log Message / Condition | Meaning | Resolution |
|---|---|---|
S2R-ADM-AUTH OPEN_MODE — no active IdP configured... | The system is running without RBAC because no Identity Providers are configured. All requests are being treated as ADMIN. | This is an insecure state. Configure an IdP in the system settings to enable RBAC and protect the Admin API. |
S2R-ADM-AUTH pristine-bootstrap failed... | An error occurred during the automatic pro<customer>ion of the first user to ADMIN. | The system defensively falls back to the standard role resolution logic. The user will not be pro<customer>ed, and the system will likely remain in pristine mode. Check system logs for the underlying exception. |
S2R-ADM-AUTH license platform-operator roster read failed... | The service could not read the list of platform operators from the product license due to an error. | The system fails-closed, treating the list of operators from the license as empty. Authorization will proceed using only operators defined in the database and environment variables. |
Access denied with error S2R-ADM-0407 | A principal without the Platform Operator capability attempted to access a platform-level endpoint (e.g., /admin/v1/tenants). | This is expected behavior. Only Platform Operators can access these endpoints. The principal must be granted this capability via bootstrap configuration, a __platform__ tenant role binding, or the license. |
Access denied with error S2R-ADM-0408 | A restricted Platform Operator (with dataAccess=false) attempted to access an endpoint not on their explicit allow-list. | This is the "data access wall" functioning as designed, preventing a fleet-management operator from viewing tenant data. The operator should only use the allowed backoffice surfaces. |
| Unresolvable or malformed request path | A request with a path that cannot be safely canonicalized (e.g., contains invalid URL escapes) is received. | The service fails-closed by requiring the highest level of privilege: ADMIN role and the Platform Operator capability. This prevents attackers from bypassing authorization rules with a malformed URL. |