Skip to content

ADR-0012: Authorization validity and access revocation

Status: Accepted — 2026-09-23. The project owner approved this decision. Acceptance establishes the architectural contract; it does not establish a completed implementation or successful execution of outstanding checks.

Accepted refinement — 2026-09-24: final admission also binds task authority and acting-client identity, atomically reserves shared budgets and coordinates effect commitment under ADR-0014/0016. Existing validity modes, source barriers, dates and unrun checks remain in force.

English | Русский

ADR-0005 defines the authorization boundary, while ADR-0009 allows a static local policy or an external provider. Neither a successful sign-in nor a previously allowed action establishes how long another action remains permitted. A changing policy, expired identity, delayed response or unavailable provider must have a defined effect on admission.

This decision defines validity policy for an action in an access domain, not classes of extensions. The same extension may work with a local catalog or an organization’s service without choosing its own checking frequency. Authentication and secret storage belong to ADR-0011. Publication signatures, trust-root rotation and artifact revocation lists remain separate from permission decisions; an authorization allow never bypasses ADR-0007’s publisher/content checks.

  • A small team can use explicit local rules without a clock-dependent remote service.
  • The owner can require a new decision or permit precisely bounded reuse, with visible consequences for revocation.
  • Expiry, cancellation, account changes and policy updates cannot turn an old result into new authority.
  • A permission check does not claim an atomic transaction with an external action or repeat that action after uncertainty.
OptionBenefitLimitation
Always call an external serviceSimple remote checking ruleMakes local deployments depend on a service and still cannot make check and effect atomic
Cache permissions until logoutFewer requestsUnbounded stale rights and no defensible revocation bound
Owner-selected validity contract per action/domainLocal baseline and explicit remote guaranteesRequires context binding, time bounds and invalidation coordination

Every protected action passes the core’s admission check. The selected validity contract determines what evidence that check may use. Reuse is explicitly bounded and never selected as a response to an unavailable required authority. An extension cannot select a validity mode, extend a deadline or submit a previous allow as a credential.

The selected logical configuration profile is rukh.authorization-validity/1, selected in trusted owner configuration. It contains mode, dispatchMaxDelayMs, and, for reuse, allowMaxAgeMs and denyMaxAgeMs. Each value is a finite non-negative integer within the registered implementation’s limits. A trusted action registration can require a stricter contract; domain policy and invocation restrictions can only reduce its allowance. Incompatible requirements reject configuration or the affected action rather than selecting a weaker mode.

ModeEvidence admitted by the coreExpiry and unavailable authority
pinned-localEvaluate the exact active local policy/group data against the current bound context. This is the ADR-0009 baseline, explicitly selected by the ownerPolicy data changes only on an approved profile commit. It makes no promise to follow an unobserved remote change. Required identity and resource attributes must still be valid; dynamic missing inputs cannot be treated as local constants
check-before-useObtain a decision for this one action attempt from its authoritative provider; no cross-action reuseA missing, late or invalid decision prevents admission. This is the default for an external provider
bounded-reuseA previously verified decision for an exactly matching request, with reuse explicitly supported by the selected provider contract and permitted by owner policyThe earliest bound wins. No stale-use grace period, background extension of validity or conversion to public/local access. A new current decision is required after expiry

The smallest public CLI retains pinned-local and ADR-0009’s explicit public preset. No periodic network request, user account or broker server is added. An organization may select the other contracts independently for its registered actions. A local rule set depending on a changing external directory is not wholly pinned: the directory inputs must meet the selected validity requirements or evaluation fails as indeterminate.

bounded-reuse explicitly accepts that a still-valid result can be used while its authority is unreachable. This permission exists before any outage and lasts only for the remaining original bound. An action requiring check-before-use, a known revocation, an invalid session or an unreadable invalidation fence cannot use that exception. Merely having an unexpired access token or a previous successful HTTP response does not establish decision validity. Token introspection also treats caching as a freshness trade-off and caps cached results by their expiration. RFC 7662, section 4.

The adapter’s normalized decision remains the ADR-0005 result. A provider implementing this profile can additionally return the declared validity metadata below. These are Rukh adapter fields, not a requirement for every remote service to implement a new protocol. A plain allow/deny with no declared reuse contract is single-use. The adapter may translate documented source guarantees; it cannot invent a lease from a boolean response or an HTTP cache header. AuthZEN defines action evaluation; Rukh’s validity profile is an additional owner/adapter contract. AuthZEN Authorization API 1.0.

ItemBinding and validation
DecisionExact request correlation, allow / deny / indeterminate, restrictions and safe reason under ADR-0005. indeterminate, transport failure and malformed responses are never cached as permissions
Provider validityOptional validity: {contract, maxAgeMs, notAfter, policyRevision, sourceBarrier}. contract identifies the supported profile; reuse requires a positive finite maxAgeMs. Absolute notAfter, source policy revision and synchronization barrier are included when supplied or required by that contract; absence is not invented freshness evidence
Request bindingOwner namespace/profile, access domain, active profile/configuration revisions, provider registration/version/configuration digest, principal kind/authority/subject and bindingId, exact release/command, invocation kind, operation/action version, validated resource and decision-relevant inputs
Authentication bindingFor authenticated contexts: authSessionId, sessionEpoch and authenticationExpiresAt from ADR-0011. A local context has no fabricated identity tuple. credentialRevision alone does not change authorization when a renewal preserves the same authenticated context
Local stateCore-owned observation time, computed monotonic expiry, current authorizationGeneration, restrictions and exact request fingerprint. An extension cannot provide these values

The trusted action registration identifies all input/context/resource fields that affect its decision. Its fingerprint uses the full validated typed values and canonical resource identity, not only a command name or URL prefix. Unknown dependencies, mutable attributes without a usable version/validity bound, one-time obligations or non-repeatable authorization challenges make that action non-reusable. The initial implementation does not reuse a broad grant for a narrower request: exact matches only. It does not reuse an allow between invocations, even for the same user; the key additionally includes invocationId, or the loader/owner activityId when no extension invocation exists.

Fingerprints and records stay private to the core. Sensitive inputs are represented in the lookup key by a process-local keyed digest, are not logged, and are retained only as needed for that live activity. Results are not serialized into a descriptor, command generation, environment or extension response. The reuse store is process-local memory; restart starts empty. A future persistent cache would need its own storage and time-trust guarantees.

The core derives one local monotonic expiry from the earliest of owner allowance, provider allowance, authenticated-context expiry, any absolute decision expiry and other required input validity bounds. A relative provider lifetime is conservatively anchored at request start, not receipt: request duration consumes its usable age. A contract measuring age from earlier evaluation must also supply sufficient evidence of that earlier bound. A response arriving after its permitted use is not revived by reception or another read.

Absolute-time evidence requires an approved clock policy with a declared uncertainty margin; the core subtracts that margin rather than adding a grace period. With no defensible clock bound, it rejects reuse dependent on that timestamp. It detects elapsed suspension through an appropriate clock or invalidates affected entries on resume; rollback, unexplained clock discontinuity or lost time confidence clears reusable decisions. Restart never reconstructs a monotonic lease from old disk data. Wall-clock time cannot extend an already computed monotonic expiry.

Each action has one decision attempt. It first checks whether an exactly matching reusable record remains admissible; otherwise it obtains a new decision within ADR-0005’s request budget. Forced re-evaluation requested by a trusted action contract never falls back to its cached allow. Failed re-evaluation does not change an expired record into a usable one, and negative or invalidation evidence overrides an earlier allow. A current denial removes a matching older allow. Concurrent responses are tied to their original attempt and captured generation; an older superseded response cannot restore a result invalidated by a newer decision or fence.

No automatic retries of failed provider requests or protected actions follow from this policy. A new explicit attempt obtains its own correlation. A provider may combine read-only work internally only when its advertised contract preserves attempt binding and deadlines; it cannot combine or replay external effects.

authorizationGeneration is a core-owned invalidation fence for one owner/access-domain/provider binding, distinct from ownerConfigRevision and from a remote policyRevision. The owner-state coordinator makes this fence and session invalidation visible to cores sharing that profile’s state. The baseline uses the same kind of local locked metadata as ADR-0007/0011 and needs no daemon. Decision bodies remain process-local. A coordinator unable to provide the required ordering rejects affected admission; it does not trust a stale in-memory copy because storage is unavailable.

Policy activation, logout/session invalidation, incompatible provider replacement and a verified revocation advance the corresponding fence or change its bound revision. All relevant facts are captured before evaluation and checked again at dispatch. The provider’s network request and mandatory pre-action audit are outside the short admission lock. After they finish, the core checks an allow within all owner/invocation restrictions, the live invocation, session epoch, active policy/profile, current authorization generation, exact request binding, remaining validity and audit prerequisites in one ordered admission step. deny and indeterminate never dispatch an action; auditing a denial cannot authorize it. Queued work is checked when it reaches that step, not only when it enters a queue.

The admission step is the local point at which permission to start that operation is consumed. Changes observed before it prevent dispatch; changes afterwards concern an operation already admitted. There is no claim of an atomic transaction between a local decision and a remote service. The protected service still enforces its own rights. The same allow cannot become an extension-held reusable ticket, and new requests after finalization remain forbidden by ADR-0002/0004.

This sequence shows the final check after a slow decision or audit. Cached evidence follows the same final check.

Accepted permission admission and invalidation
Accepted permission admission and invalidationThe core captures context and obtains evidence, then checks current fences and invocation state before dispatch. An intervening policy or session change prevents the action without repeating it.Protected operationOwner statePermission providerCoreExtension or loaderProtected operationOwner statePermission providerCoreExtension or loaderalt[Allowed, current and activity live][Changed, expired or closing]Declared action and validated inputsCapture profile, session and generationBound contextEvaluate this attempt when neededDecision and supported validity evidenceComplete required pre-action auditOrdered final admission checkAdmission committedStart operation onceResult or uncertain effectOperation result with known effect statusNo admissionDefined error, no dispatchAccepted permission admission and invalidationThe core captures context and obtains evidence, then checks current fences and invocation state before dispatch. An intervening policy or session change prevents the action without repeating it.Protected operationOwner statePermission providerCoreExtension or loaderProtected operationOwner statePermission providerCoreExtension or loaderalt[Allowed, current and activity live][Changed, expired or closing]Declared action and validated inputsCapture profile, session and generationBound contextEvaluate this attempt when neededDecision and supported validity evidenceComplete required pre-action auditOrdered final admission checkAdmission committedStart operation onceResult or uncertain effectOperation result with known effect statusNo admissionDefined error, no dispatch

Local configuration updates take effect through ADR-0007/0009’s joint profile commit. Editing or merging a remote Git file is not yet revocation at a client pinned to another revision. For external providers, a new evaluation or an optional authenticated invalidation feed can reveal revocation. The initial contract does not require a subscription server and does not promise immediate fleet-wide delivery.

An optional feed is an owner-registered adapter facility. Each event is bound to the provider/access domain and its declared source epoch/sequence; it may invalidate decisions but never grant an action. The core advances its own authorization generation and discards affected entries. The initial implementation invalidates the whole bound domain rather than interpreting arbitrary publisher-supplied resource selectors. Duplicate events are harmless; an out-of-order/gapped sequence, disconnected required feed or unverified event source makes feed-dependent reuse unavailable until a fresh, verified synchronization barrier. Old pending evaluations cannot repopulate the cache across that barrier. Adapters without these guarantees advertise no feed-based revocation bound.

An observed revocation also records the minimum required sourceBarrier atomically with local invalidation. Every subsequent evaluation must demonstrate that it reflects at least that barrier, including a request started after invalidation. Otherwise a lagging replica could issue a new-looking but stale allow. The barrier is scoped to this provider/source epoch and interpreted by its registered contract; the core does not lexically compare opaque revision strings. An adapter may satisfy it through comparable authoritative revisions or an acknowledged consistent-read barrier. If neither is supported, affected admission remains unavailable until explicit verified resynchronization. Merely waiting for a timer, emptying the cache or receiving another unversioned allow cannot clear this fence. The required barrier survives restart with the coordinated invalidation record; losing that record requires recovery before admission. A later authoritative grant may restore access only after satisfying the barrier and all other checks.

If policy requires revocation within a stated interval, the registered provider must declare a bound on its own policy propagation in addition to Rukh’s maximum reuse age. The owner validates the combined bound and any required feed’s loss-detection time; a cache TTL alone is not an end-to-end revocation guarantee. Missing guarantees produce unsupported, not a promise of immediate revocation. A verified revocation already observed by the core wins immediately at the next local admission, even when the old decision still has time remaining.

This state view concerns one reusable decision, not the lifetime of an extension or token.

Accepted reusable decision lifetime
Accepted reusable decision lifetimeA decision becomes reusable only after verified bounded evidence. Expiry, invalidation or loss of required synchronization prevents further use. A later explicit attempt obtains new evidence rather than extending the old result.No reusable evidenceEvaluation pendingValid bounded decisionExpired or invalidatedNew action attemptVerified reusable result andcurrent fencesSingle-use result or failureMatching use within originalboundExpiry, revocation or contextchangeRequired synchronization lostNew explicit attempt afterrecoveryActivity ends or record evictedAccepted reusable decision lifetimeA decision becomes reusable only after verified bounded evidence. Expiry, invalidation or loss of required synchronization prevents further use. A later explicit attempt obtains new evidence rather than extending the old result.No reusable evidenceEvaluation pendingValid bounded decisionExpired or invalidatedNew action attemptVerified reusable result andcurrent fencesSingle-use result or failureMatching use within originalboundExpiry, revocation or contextchangeRequired synchronization lostNew explicit attempt afterrecoveryActivity ends or record evicted
SituationRequired result
Known denial before extension launchrejected under ADR-0002; no extension code starts. An environment already prepared under separate permission is not undone
Revocation after extension launch, before a new core operationThat operation is denied or receives context_invalidated; the extension may handle the error. This is not retroactively rejected for the invocation
Operation already admitted or external effect uncertainDo not claim rollback, cancel history or repeat the effect. The operation’s result and audit retain uncertainty under ADR-0002
Owner elects to close an execution scopeUse existing owner_shutdown and bounded cleanup under ADR-0004. Revocation does not introduce a fourth cancellation cause or overwrite an earlier one
Continuous protected work requires ongoing authorityIts trusted service contract must declare recheck/stop boundaries and guarantee them. If unsupported, reject that operation; ordinary start permission cannot imply a continuous guarantee
Earlier catalog page or action inspectionAdvisory only. Installation, activation, execution and each protected action have independent checks. Discovery continues to follow ADR-0005’s snapshot/live rules

The default revocation effect is to block new protected admissions, not automatically kill an entire command. Already admitted work can finish within its declared contract. Long-running core services use explicit safe operation boundaries where required; a network packet or UI redraw is not automatically a new permission action. A native extension retains its OS permissions and may act outside core services, as ADR-0001 states. Strong OS confinement and remote resource revocation are not supplied by a cache or by stopping the CLI.

Loader and runtime preparation activities follow the same authority rules for their actual effects. A discovery allow does not authorize downloads or runtime installation. A multi-step plan cannot continue admitting newly protected effects after its permission/context has become invalid. Completed verified bytes may remain staged or installed, but activation requires its own current admission; commitment and uncertain effects follow ADR-0007/0008. Permissions are not stored inside those artifacts as permanent grants.

ResourceAccepted default
External provider modecheck-before-use, no reusable allow or deny
Opt-in bounded-reuse owner maximaAllow 30 seconds, deny 5 seconds; shorter provider/identity/input bounds win
Delay from a newly verified decision to dispatchdispatchMaxDelayMs = 1000; audit/queue delay consumes it. Expiry returns an operation error without automatic re-evaluation or repeating audit/actions
Reuse store1,024 entries and 8 MiB per core, at most 32 KiB per entry; activity close removes its records
State coordinationAt most 1 second per state operation, also bounded by the owning work budget; failure prevents admission
Provider request and normalized dataADR-0005’s existing time/size limits apply; validity metadata fits inside the same bound

These are design defaults to validate, not measured guarantees. Owner settings may tighten them; larger finite values require a supported tested profile. The 1-second dispatch delay also caps a cached result after it is selected for a pending attempt; selecting it never extends its original expiry. Eviction is safe and causes new evaluation on a later attempt, not unlimited memory growth. No record persistence, speculative protected calls or background cache refresh is required by the baseline.

The existing operation vocabulary is preserved: deny is a decision, indeterminate means no usable decision, authentication_required requests an explicit authentication path, context_invalidated rejects a changed binding, unsupported rejects an unmet validity guarantee, and unavailable, deadline_exceeded, cancelled or limit_exceeded describe failures. There are no new final invocation outcomes. A cache miss is not a denial; an expired record alone is not proof that a user lost rights. Diagnostics may say that current authority could not be established without exposing private policy or credentials.

Trusted audit records capture the selected validity contract, original decision observation and effective expiry, relevant revisions/generations and whether reuse was used. Each protected effect retains its own required audit; reusing a decision does not reuse an audit acknowledgment for another effect. Extension logs are not this evidence. Detailed durable audit storage remains a separate contract.

Refinement: task admission and effect reservations — 2026-09-24

Section titled “Refinement: task admission and effect reservations — 2026-09-24”

The request binding and exact-match reuse key additionally include the core-owned taskId, taskAuthorityRef, taskEpoch and actorBinding from ADR-0014, together with all decision-relevant task/ancestor restrictions. A subject with several task grants does not share cached authority between them. Issuance evidence, free-form purpose, authentication and API credentials have their separate meanings; purpose is not executable policy. CLI and MCP traverse this same admission boundary.

Final admission retains all checks above and additionally resolves the current task and ancestor chain, recipient actor, earliest deadline, current owner/subject rights and remaining shared budgets. A revoked ancestor, stale task epoch, substituted actor or unavailable required ledger prevents dispatch even when a broker allow or credential remains valid. A missing source barrier cannot be bypassed by reissuing task authority. Policy expansion cannot widen an already issued task; stricter current policy can narrow or invalidate it.

For a controlled effect governed by ADR-0016, the ordered admission transition must reserve the trusted maximum operation charge under ADR-0014 and commit the corresponding effect record/one-use permit before the effect can start. These form one coordinated decision across participating core processes: neither a permission check followed by an unsynchronized counter decrement nor a process-local balance is sufficient. Slow provider evaluation and required pre-action audit remain outside the short admission transaction. The exact record ordering and recovery semantics belong to ADR-0016; an unresolved commit cannot be treated as no admission or retried as another effect. This does not claim control of arbitrary native effects; a profile requiring that control must select the supported boundary or reject the operation.

Reusable evidence is only authorization evidence. It never reuses a budget reservation, effect permit or audit acknowledgment. Unknown effects keep their reservation across cancellation, expiration and restart until authoritative reconciliation; a denied new request cannot release a previous operation’s hold. If a required ceiling has no trustworthy pre-dispatch maximum or the required execution restriction cannot be enforced, admission returns unsupported. ADR-0015 defines the actual confinement boundary; local admission cannot control a native process’s ambient OS actions.

Task revocation, like permission revocation, blocks new admissions by default. It neither rewrites committed invocation outcomes nor introduces a cancellation cause. The existing owner_shutdown path and non-renewable finalization budget remain. Task state may outlive an execution scope only to retain authority history and protective accounting; it does not authorize background work.

Additional implementation checks remain unrun: race final admission across cores and sibling delegations; invalidate task/ancestor/actor while a decision or audit is pending; hit the final remaining budget unit; and crash around reservation/effect commitment. Verify all old authentication/source barriers together with new task fences, with no automatic replay or capacity release after uncertain effects.

  • Local pinned deployments remain usable with one catalog and explicit rules; external integrations choose their freshness requirements without changing extensions.
  • Bounded reuse trades immediate observation for an explicit maximum age. It cannot promise zero-latency revocation or replace the protected service’s enforcement.
  • Correct dispatch needs coordinated state and expiry checks; a fast cache lookup alone is insufficient. Existing invocation and shutdown budgets remain authoritative.

The project owner accepted this decision on 2026-09-23. The following list remains required implementation verification, not a claim that these checks passed at acceptance.

For implementation verification, validate a reference provider and owner-state coordinator with deterministic clocks and controlled failures:

  1. Compare pinned local evaluation, single-use external decisions and explicitly reusable results; missing validity evidence, changed inputs or authority never widens reuse.
  2. Exercise request delay, queue/audit delay, exact expiry boundaries, suspend/resume, clock uncertainty and restart. No read or token rotation prolongs an old authorization bound.
  3. Race policy commits, logout, provider replacement, revocation and conflicting late responses against final admission in one and several core processes. Only an action ordered before invalidation may already have started.
  4. Simulate unavailable providers, lost/gapped feeds and a lagging replica returning an allow after observed revocation. Required current decisions fail closed, unexpired explicitly reusable evidence obeys its original contract, and the durable source barrier prevents both old and newly requested stale responses from restoring access.
  5. Exercise an already running command, multi-step preparation, uncertain external results and audit failures. Preserve outcome/cancellation rules and never replay an external effect. Check memory, coordination and revocation bounds under load.

These checks have not been run for ADR-0012. Existing broker stubs do not demonstrate these validity, coordination or revocation guarantees. The owner accepted the architecture on 2026-09-23; these checks remain implementation obligations.

Diagram

Drag to move · + / − to zoom · 0 to fit · Esc to closeDrag to move and pinch to zoom

100%