Skip to content

feat(authz): define 3-tier atespace authorization model and node restriction - #1233

Merged
Taahir Ahmed (ahmedtd) merged 6 commits into
agent-substrate:mainfrom
SHRUTI6991:ate-api-authz
Sep 11, 2026
Merged

Taahir Ahmed (ahmedtd) merged 6 commits into
agent-substrate:mainfrom
SHRUTI6991:ate-api-authz

Conversation

@SHRUTI6991

@SHRUTI6991 Shruti Nair (SHRUTI6991) commented Aug 26, 2026 •

Copy link
Copy Markdown
Collaborator

Working on #1563

Overview

This PR defines the initial OpenFGA authorization model (internal/authz/model.fga) and comprehensive test suite (internal/authz/model_test.fga.yaml) for Substrate control-plane and data-plane operations.

Key Features & Design

  1. Global Cluster Scope (Singleton):

    • Modeled as a singleton (cluster:root).
    • owner: Can create Atespaces (can_create_atespace), and automatically inherits owner across all child Atespaces via owner from parent_cluster.
    • viewer: Read-only access (can_get), allowing cluster-level inspection/listing, and automatically inherits viewer across all child Atespaces via viewer from parent_cluster.
  2. 3-Tier Atespace Governance:

    • owner: Full administrative control; can set policy (can_set_policy), get policy (can_get_policy), create templates/actors, update, and delete the Atespace (can_delete).
    • editor: Can create templates/actors (can_create_actor, can_create_actor_template), get/update resources and the Atespace (can_update, can_get).
    • viewer: Read-only access (can_get, can_get_policy). All subjects require explicit authentication (no wildcard user:*).
  3. Direct Binding Boundaries:

    • User role bindings stop at the Atespace boundary.
    • Child actor and actor_template instances derive their access directly from parent_atespace.
  4. Node Restriction for Credential Minting:

    • Links the physical topology graph (scheduled_worker: [worker], host_node: host_node from scheduled_worker).
    • can_mint_ateom_actor_credential is restricted exclusively to the active host_node running the scheduled worker pod.
  5. Lifecycle Permissions:

    • can_resume: Ingress routers or Atespace editors can resume actors.
    • can_suspend: Actors' workload identities or Atespace editors can trigger suspend.
  6. Naming Conventions:

    • Roles and graph edges are nouns (owner, viewer, parent_cluster, host_node).
    • Permission checks evaluated at runtime consistently use the can_ prefix (can_get, can_set_policy, can_create_actor, can_mint_ateom_actor_credential).

Verification

  • OpenFGA Model Tests: All 5 test suites (101/101 checks) pass:
    docker run --rm -v $(pwd)/internal/authz:/workspace -w /workspace openfga/cli:latest model test --tests model_test.fga.yaml
    # Tests 5/5 passing, Checks 101/101 passing

- Establish 3-tier Atespace governance: owner, editor, viewer
- Add cluster-level superadmin inheritance (owner from parent_cluster)
- Restrict template and actor operations to inherit from parent Atespace
- Implement Node Restriction graph (host_node from scheduled_worker) for credential minting
- Add tests covering cluster admin propagation, atespace isolation, templates, actors, and node restriction (80/80 checks passing)
@SHRUTI6991 Shruti Nair (SHRUTI6991) changed the title Sample OpenFGA schema. feat(authz): define 3-tier atespace authorization model and node restriction Sep 8, 2026
@SHRUTI6991
Shruti Nair (SHRUTI6991) marked this pull request as ready for review September 8, 2026 21:27
@SHRUTI6991

Copy link
Copy Markdown
Collaborator Author

/assign Taahir Ahmed (@ahmedtd)

Comment thread internal/authz/model.fga Resolved
Comment thread internal/authz/model.fga Resolved
Comment thread internal/authz/model.fga Resolved
Comment thread internal/authz/model.fga Resolved
Comment thread internal/authz/model.fga Resolved
@ahmedtd
Taahir Ahmed (ahmedtd) merged commit 6725335 into agent-substrate:main Sep 11, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants