Status: experimental E3 foundation
Issue: #670
Parent: #667
Depends on: E2 tenant scope (#669 / PR #690)
E2 answers:
Which tenant/project owns this resource?
E3 answers:
Is this authenticated actor/service allowed to perform this action against that exact resource and scope?
Enterprise execution must pass both checks. Scope is not authorization, and authorization cannot repair a scope mismatch.
ActorContext is normalized identity input from a trusted authentication adapter.
It distinguishes:
An actor context contains:
Issue text, WorkUnit text, provider/model output, labels, comments, prompts, and ResultManifest content are not valid identity sources.
The existing identity-binding-v0.1 contract remains provenance evidence only. It must not be promoted into authorization merely because it says an identity was verified.
v0.1 uses:
Roles are inputs from trusted identity/policy adapters. This module does not infer organization/team membership itself.
The baseline kernel evaluates:
The rule table is explicit and replaceable through AuthorizationPolicy.
The default baseline preserves IDKMesh authority boundaries:
worker/node -> execute/claim, not integrate
reviewer -> verify, not integrate
dispatcher -> dispatch, not integrate
integrator human -> integrate
owner/admin human -> policy/integration authority according to rule
provider/node -> never integrate under the baseline
An actor can hold more than one trusted role, but the requested action is checked against its exact rule and actor type.
For selected actions, effective risk at or above the rule threshold returns:
requires_approval
until a distinct eligible approver is supplied.
The baseline requires distinct approval for high/critical:
A principal cannot approve its own high-risk request.
The approver must:
The request carries an explicit approval reference so later audit instrumentation can bind the decision to the external approval/review evidence.
Policy rules may raise the effective risk of an action.
For example, manage_policy has a high risk floor. A caller cannot label a policy mutation “low” to bypass separation of duties.
The decision records both:
v0.1 uses:
public < internal < confidential < restricted
The actor and approver must have clearance at least as high as the request classification.
This is an authorization attribute check only. E5 (#672) owns external-provider/egress policy; E3 does not make a restricted external route valid.
Authorization takes an explicit evaluated_at_epoch.
The actor/approver is denied or rejected as approval evidence when:
The decision records the exact identity_revision and policy revision used. Later service caches must key/invalidate against those revisions; a stale cached decision is not permanent authority.
The request has an explicit TenantScope, and its ScopedResourceRef must carry the exact same scope.
The actor and any approver must also be bound to that exact tenant/project.
A resource from another tenant/project returns deny / scope_mismatch.
The retained adversarial fixture is:
tests/fixtures/enterprise_authz/cross-tenant-authorization.json
The kernel returns one of:
allow;deny;requires_approval.Representative stable codes include:
authorized;authorized_with_distinct_approval;scope_mismatch;actor_scope_denied;actor_unauthenticated;actor_revoked;actor_expired;actor_type_denied;role_denied;data_clearance_denied;distinct_approval_required;self_approval_forbidden;approver_scope_denied;approver_role_denied.AuthorizationDecision is auditable policy evidence.
Its machine-readable projection always declares:
{
"authority": {
"executes_action": false,
"canonical_state_write": false,
"merge": false
}
}
An allow result means the trusted policy evaluator authorizes a later
executor to attempt that bounded operation. The decision object does not
perform the operation and cannot merge code on its own.
The future E8 service request path should be:
authenticated request
-> trusted ActorContext
-> mandatory TenantScope
-> ScopedResourceRef scope match
-> AuthorizationPolicy evaluation
-> allow / deny / requires_approval
-> audit decision
-> only then side effect / secret materialization / connector call
Authorization should run again when a relevant identity or policy revision changes.
v0.1 does not claim:
Those remain E3/E5/E8 integration work.