Expose workspace environment to Cedar policies #297

Closed
opened 2026-10-27 13:35:45 +00:00 by sam · 0 comments
Owner

Goal

Policies can test resource.workspace.environment (e.g. production).

Evidence

org.Workspace.Environment exists (internal/domain/org/org.go:81); internal/infrastructure/access/entities.go:68-76 gives the workspace entity only org; schema has no environment.

Rules

Read CLAUDE.md. Do only what the Goal and Stop when need. File anything else you notice as a bead; do not fix it. Run task check once at the end; if it fails twice on the same problem, comment on this bead and stop.

Stop when

  • Schema and entity carry environment.
  • forbid ... when { resource.workspace.environment == "production" } validates on save and denies run in such a workspace (extend the access test table).
    Then commit (Conventional Commits, scoped by package), bd close this bead and stop.

Close reason

Fixed on feat/org-epic (PR #1634)


Imported from beads archie-core-kgxw.10 · GitHub #1319 · type feature · priority P2 · created 2026-10-05 · closed 2026-10-11

## Goal Policies can test resource.workspace.environment (e.g. production). ## Evidence org.Workspace.Environment exists (internal/domain/org/org.go:81); internal/infrastructure/access/entities.go:68-76 gives the workspace entity only org; schema has no environment. ## Rules Read CLAUDE.md. Do only what the Goal and Stop when need. File anything else you notice as a bead; do not fix it. Run `task check` once at the end; if it fails twice on the same problem, comment on this bead and stop. ## Stop when - [ ] Schema and entity carry environment. - [ ] forbid ... when { resource.workspace.environment == "production" } validates on save and denies run in such a workspace (extend the access test table). Then commit (Conventional Commits, scoped by package), `bd close` this bead and stop. ### Close reason Fixed on feat/org-epic (PR #1634) --- _Imported from beads `archie-core-kgxw.10` · GitHub #1319 · type feature · priority P2 · created 2026-10-05 · closed 2026-10-11_
sam added the mediumfeature labels 2026-10-27 13:35:45 +00:00
sam self-assigned this 2026-10-27 13:35:45 +00:00
sam closed this issue 2026-10-27 13:35:45 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#297