Identity, Authorization, and Least Privilege › Limitations and impact
Language AI HandbookAll chapters The evaluator assumes its request facts are already authenticated and resolved. Consent provenance and the first issuer's right to grant authority are outside the fixture's checks. A service design must identify where it gets the user identity, workload identity, applicable tenant, requested resource, and approval facts. Each field needs a clear owner and an authority boundary. A well-typed record filled from untrusted text is still untrusted.
The example also assumes the checked action describes what the operation tier applies. If the action is delayed or the resource moves, a still-live grant may no longer be appropriate for the new state. Enforce the conditions needed for the action at the point of use. A conditional write or transaction can tie state validation and the write together when the relevant state shares a consistency boundary. Where two systems cannot update together, document what freshness the service can enforce and handle stale decisions explicitly.
The approval fixture checks the recorded principal, actor, operation, target and validity window. In a deployed application, a person may need to see what would change, whose authority will be used, and why the workflow is waiting. A service may also need to bind the approval to parameters, a draft version, an authorized approver, or a single effect. Choosing these bindings is a policy decision about the risk of that workflow. The shape of the trusted approval record should follow it.
The fixture represents a scoped credential with ordinary Python records. It does not decide token format, signature validation, or how a platform compares credential audience to the service identity. If a deployment uses OAuth, review the profile and its applicable audience and scope requirements. If it uses a different form of delegation, verify that the equivalent checks apply at every intended boundary.
Treat the reported decision as evidence of a rule evaluation, with the underlying assumptions kept visible. One unit test can show that the first request outside a grant's lifetime is rejected by the evaluator. A service test can exercise whether a real queued request reaches the same policy boundary with current authority and the correct resource. For changes to identity resolution, look at requests that still have the same local node or object name but a different authenticated context.
When designing the audit trail, decide what will help explain and replay a disputed authorization result. A useful record can include the task, rule and policy version, actor and subject references, a safe resource reference, the requested operation, and the outcome. Preserve provenance and access controls for those records. An audit channel may be highly sensitive even when it contains no raw credential.
The service can then hand an allowed action to an execution environment with its own credential and resource boundaries.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!