Repository navigation
[Design Discussion] Adding AuthZEN-Compatible Access Evaluation APIs to ThunderID #3236
Replies: 2 comments
Implementation UpdateMost of the original design remains the same. During implementation, we made one model alignment to better fit ThunderID’s current resource server and permission model. The external AuthZEN API still follows the standard shape: Internally, ThunderID maps the request as follows: The main implementation detail is that
Difference from the AuthZEN Access Request and Approval ProfileThe AuthZEN Access Request and Approval Profile defines approval workflow capabilities on top of access evaluation, such as requestable denials, access request endpoints, task handles, callbacks or polling, approval result binding, and re-evaluation after approval. The current ThunderID implementation does not implement that approval workflow profile yet. It currently supports access evaluation and action search only. Out of scope for the current implementation:
The current metadata therefore advertises only the implemented evaluation/search endpoints, not the access request approval profile metadata. The approval/requestable-denial workflow can be considered separately as a future extension. |
Implementation UpdateWe changed AuthZEN endpoint protection to use Direct Auth Secret instead of requiring a system-scope access token. The external AuthZEN API still follows the standard shape: Internally, ThunderID maps the request as follows: The main implementation detail is that AuthZEN evaluation endpoints are protected using the Direct Auth Secret mechanism. Callers such as the Wayfinder backend send the configured secret in the |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Related Feature Issue
#2575
Problem Summary
ThunderID currently supports a coarse-grained authorization model that is used mainly for internal evaluation flows, such as login flow authorization and OAuth client credentials scope filtering. In this model, internal callers provide a list of requested permissions or scopes and receive the subset that the subject is authorized to use.
This creates two limitations. First, ThunderID does not currently expose its authorization decision capability through a standard API for external parties or trusted applications. Second, the current model is not a fine-grained access control model, because it focuses on filtering permissions rather than evaluating a specific subject-resource-action request.
The proposed AuthZEN-based design introduces a fine-grained access evaluation model. Instead of only asking “which permissions from this list are allowed?”, a caller can ask “can this subject perform this action on this resource?” using subject, resource, action, and optional context, and receive an allow/deny decision.
High-Level Approach
The proposed approach is to add a new authzen package that exposes AuthZEN-style HTTP endpoints and translates those requests into ThunderID’s internal authorization model.
Instead of keeping the core authorization service centered around GetAuthorizedPermissions, the design moves toward explicit access evaluation:
The external AuthZEN API still uses the standard subject, resource, action, and context shape. Internally, ThunderID maps that model to its existing resource server and permission model.
The existing RBAC remains the decision engine, but the interface is extendable for future decision engines too(e.g. ABAC, external PDPs). For compatibility with ThunderID’s current resource server model, the AuthZEN
action.namefield is treated as the full registered permission string from ThunderID’s resource server model. No permission transformation is required.The RBAC engine evaluates this permission directly against the subject’s assigned roles as done currently.
Architecture Overview
The AuthZEN adapter maps:
AuthZEN to ThunderID Model Mapping:
The AuthZEN request keeps the standard subject/resource/action/context structure, but the fields are interpreted according to ThunderID’s existing authorization model.
subject.idIdentifies the entity whose access is being evaluated. ThunderID uses this ID to resolve group memberships and role assignments.
resource.typeRepresents the ThunderID resource server handle, for example booking. ThunderID resolves this handle to the internal resource server ID and uses it to validate that action.name is a registered permission under that resource server.
action.nameCarries the full registered ThunderID permission string, for example booking:read. This value is mapped internally to Permission.Name, passed to the RBAC engine, and checked against the subject’s assigned roles.
contextCarries optional request context for future policy engines or additional validation. The initial RBAC implementation does not rely on context for the final decision.
subject.typeAccepted as part of the AuthZEN subject model and preserved in the internal authorization request. It can be used to distinguish entity categories such as user, application, or agent. The current RBAC decision is still based on the subject ID, resolved groups, and assigned roles.
subject.propertiesPreserved for future policy engines such as ABAC. The current RBAC implementation does not use subject properties for the decision.
resource.idAccepted as part of the AuthZEN resource model and reserved for future instance-based authorization. The current RBAC implementation does not use it for the authorization decision.
resource.propertiesPreserved for future policy engines. The current RBAC implementation does not use resource properties for the decision.
action.propertiesPreserved for future policy engines. The current RBAC implementation does not use action properties for the decision.
Authz Service Interface Before vs Proposed:
Before:
The previous authorization service interface was permission-list based:
The request model was:
The response model was:
Proposed:
The proposed authorization service interface is access-evaluation based:
The request model is:
The response model is:
Batch evaluation uses:
The proposed interface changes the authorization service from returning an authorized list of permissions to evaluating explicit access requests. This aligns the internal service contract with AuthZEN’s subject/resource/action/context model while keeping batch evaluation support for existing OAuth and flow authorization use cases.
Impacted Areas
Alternatives Considered
Option 1:
Keep existing GetAuthorizedPermissions and add AuthZEN as a thin wrapper
This would minimize internal changes, but the core authorization model would remain permission-list based. The AuthZEN layer would need to convert every access evaluation into permission filtering, which makes the design less natural for future policy engines.
Option 2:
Implement AuthZEN directly on top of the role service
This is simpler for the current RBAC implementation, but it bypasses the authorization service and engine abstraction. That would make future authorization models harder to support.
Questions for Community Input
The initial implementation doesn’t consider the following in the evaluation decision since ThunderID doesn’t support these as of now:
The interface is designed to be extended when this needs to be supported. Please let know if there are any other requirements that need to be considered if we are to add this support in the future?
All reactions