Security, Governance and Platform · Principal
The agent's task was approved yesterday. The employee loses access today. Does the scheduled action run?
The question
Interview question
On Monday an employee approves a customer credit for Friday. On Tuesday the employee leaves the team and their account is suspended. The scheduler still has the signed approval and a tool token that expires next week. May the agent issue the credit on Friday?
Take a few minutes to form your approach. Then open a worked answer and compare the decisions.
Reveal a worked answer
I would pause it at the execution gate. The signature proves that someone approved a specific action on Monday. An unexpired token proves that a credential has not reached its expiry time. Neither proves the employee is allowed to cause that credit on Friday. An authorization decision needs the current principal, action, resource and relevant context at the point where the effect is submitted. Amazon Verified Permissions' integration guidance gives that shape for an attempted operation. Our application still has to define the approval and revocation policy.
There are two legitimate business models, and they have different answers. If this is a delegated action that remains the employee's decision until execution, suspension removes the authority and the action must be reapproved by someone currently allowed to issue the credit. If Monday's approval created a binding business obligation owned by the company, the workflow may continue, but it needs an explicit rule and a current accountable service or human owner. It should not impersonate the former employee merely because their old token still works. The audit trail should connect the original approval, the transfer of responsibility and the final executor.
The submit gate checks the precise credit amount, customer, reason and approval scope against current policy and revocation state. It uses a fresh authorization view with a defined maximum staleness for this kind of financial effect. A cache that has not received Tuesday's suspension cannot be treated as proof of current access. On an uncertain revocation lookup, hold the credit for reconciliation or reapproval. Keep the provider credential narrow and separate from the employee identity. Rotation or invalidation of the employee's token is useful defense, but the business decision cannot rely on token expiry alone.
Timing matters. If the request was submitted to the credit provider before suspension became effective, a later provider response does not mean we should submit it again under another identity. Persist a unique operation key and the submission timestamp, query the provider for the outcome, and reconcile a completed or unknown effect. If suspension was effective before submission, stop and obtain a new authority path. Define the ordering from an authoritative event or policy version, not from two machines' wall clocks with different delays. An approval revocation may also be separate from employment revocation, so record which event changed which permission.
If the interviewer says the customer was promised the credit, I would ask who now owns that promise and what policy lets them fulfill it. That can produce a new approval or a service-owned execution with its own limits. It does not restore the departed employee's authority. The batch passed policy at 9 AM. Can it publish results after the rule changes at noon? deals with a changed policy before a batch is published. Here the central question is the loss of the approving principal's authority while a delayed action remains pending.
Continue reading
Related questions
Read beyond the question
Explore more security, governance and platform
Follow another question in this area, or return to the full Interview Prep index.
Browse this area →