feat(permissions): add the sandbox permission sets - #395
Open
ItamarZand88 wants to merge 1 commit into
Open
Conversation
Greptile SummaryThe PR adds provision, management, execute, and heartbeat permission sets for sandbox resources while separating session-content access from lifecycle and monitoring permissions.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| crates/alien-permissions/permission-sets/sandbox/execute.jsonc | Adds execution-only AWS token minting and an Azure Data Owner assignment scoped to one sandbox group. |
| crates/alien-permissions/permission-sets/sandbox/heartbeat.jsonc | Adds metadata-only heartbeat grants and limits Azure access to the bound sandbox group. |
| crates/alien-permissions/permission-sets/sandbox/management.jsonc | Adds session lifecycle permissions without session-content credentials and removes Azure stack-level scope. |
| crates/alien-permissions/permission-sets/sandbox/provision.jsonc | Adds image and sandbox-group provisioning grants with AWS creation-tag conditions and documented Azure creation scope. |
| crates/alien-permissions/src/generators/azure_runtime.rs | Maps the Container Apps SandboxGroup Data Owner role name to its Azure role identifier. |
| crates/alien-terraform/src/emitters/azure/helpers.rs | Avoids requesting unsupported stack grants from permission sets that intentionally expose only resource bindings. |
| crates/alien-permissions/tests/azure_runtime.rs | Verifies execute, management, and heartbeat cannot generate stack-scoped Azure grants while resource grants remain available. |
| crates/alien-permissions/tests/aws_sensitive_invariant.rs | Classifies MicroVM session-content credentials as sensitive implicit actions. |
| crates/alien-permissions/tests/azure_sensitive_invariant.rs | Classifies Azure sandbox command, file, and Data Owner capabilities as sensitive. |
| crates/alien-permissions/tests/aws_abac_validation.rs | Requires request-tag constraints for wildcard-scoped MicroVM image creation. |
| crates/alien-permissions/tests/operation_coverage.rs | Adds critical provider-operation coverage for sandbox provisioning, execution, and management. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
Provision["sandbox/provision"] --> Parent["Sandbox image or group"]
Management["sandbox/management"] --> Lifecycle["Create, list, stop sessions"]
Execute["sandbox/execute"] --> Contents["Commands and file access"]
Heartbeat["sandbox/heartbeat"] --> Metadata["Parent state and session counts"]
Parent --> Lifecycle
Lifecycle --> Contents
Reviews (19): Last reviewed commit: "feat(permissions): add the sandbox permi..." | Re-trigger Greptile
ItamarZand88
force-pushed
the
itamar/alien-75-sandbox-3-permissions
branch
from
August 11, 2026 09:10
b03c4c7 to
454d8f0
Compare
ItamarZand88
force-pushed
the
itamar/alien-75-sandbox-3-permissions
branch
from
August 11, 2026 12:11
454d8f0 to
e7e0597
Compare
ItamarZand88
force-pushed
the
itamar/alien-75-sandbox-3-permissions
branch
from
August 11, 2026 13:19
e7e0597 to
53618cb
Compare
ItamarZand88
force-pushed
the
itamar/alien-75-sandbox-3-permissions
branch
from
August 11, 2026 13:51
53618cb to
20a0772
Compare
ItamarZand88
force-pushed
the
itamar/alien-75-sandbox-3-permissions
branch
from
August 11, 2026 16:53
20a0772 to
1170ea7
Compare
ItamarZand88
force-pushed
the
itamar/alien-75-sandbox-3-permissions
branch
from
August 11, 2026 17:11
1170ea7 to
b84c357
Compare
ItamarZand88
force-pushed
the
itamar/alien-75-sandbox-3-permissions
branch
from
August 11, 2026 17:28
b84c357 to
c129036
Compare
ItamarZand88
force-pushed
the
itamar/alien-75-sandbox-3-permissions
branch
from
August 11, 2026 18:40
c129036 to
64d14df
Compare
ItamarZand88
force-pushed
the
itamar/alien-75-sandbox-3-permissions
branch
from
August 11, 2026 18:49
64d14df to
e7785d8
Compare
ItamarZand88
force-pushed
the
itamar/alien-75-sandbox-3-permissions
branch
from
August 11, 2026 19:16
e7785d8 to
49bfe79
Compare
ItamarZand88
force-pushed
the
itamar/alien-75-sandbox-3-permissions
branch
from
August 11, 2026 19:24
49bfe79 to
3561d35
Compare
ItamarZand88
force-pushed
the
itamar/alien-75-sandbox-3-permissions
branch
from
August 11, 2026 19:49
3561d35 to
cf18963
Compare
ItamarZand88
force-pushed
the
itamar/alien-75-sandbox-3-permissions
branch
from
August 11, 2026 20:08
cf18963 to
243a3b7
Compare
ItamarZand88
force-pushed
the
itamar/alien-75-sandbox-3-permissions
branch
from
August 11, 2026 21:22
243a3b7 to
09b80af
Compare
ItamarZand88
force-pushed
the
itamar/alien-75-sandbox-3-permissions
branch
from
August 11, 2026 21:26
09b80af to
3f47f93
Compare
ItamarZand88
force-pushed
the
itamar/alien-75-sandbox-3-permissions
branch
from
August 11, 2026 22:16
3f47f93 to
7801481
Compare
ItamarZand88
force-pushed
the
itamar/alien-75-sandbox-3-permissions
branch
from
August 11, 2026 22:24
7801481 to
47b76f5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the four cloud permission sets a sandbox needs —
provision,management,executeandheartbeat— so a deployment can build a sandbox image, start and stop sessions, and run code in one, each with only the access that job requires.The sets divide along one line: reaching inside a live session is separate from managing sessions.
provisionbuilds and tears down the image a session launches from, and tags it — that tag is the boundary everything else scopes against.managementstarts, stops and lists sessions. It can end a session it cannot read.executemints the credential that reaches inside a session, and is the only set that does. This is the line the whole split exists to draw.heartbeatcounts sessions and reads image metadata, and nothing else.A resource link hands a workload
execute, so anything a workload should not have has to live outside it.What I did
Each cloud authorizes these operations differently, and the sets follow the platform rather than a house shape:
RunMicrovm,TerminateMicrovm,SuspendMicrovm,ResumeMicrovm,GetMicrovmand the auth-token mint are all scoped to this sandbox's own image ARNs. Three actions (CreateMicrovmImage,ListMicrovmImages,ListMicrovms) are authorized against no resource type at all; creation is bounded by boundary tags in the request instead, and the two list actions are name-only reads.managementtakes the lifecycle four andexecutetakes the role that carries the data plane.Files touched
crates/alien-permissions/permission-sets/sandbox/*.jsonc— the four sets.crates/alien-permissions/src/generators/azure_runtime.rs— one role-id mapping.crates/alien-permissions/tests/*— the invariant and coverage tests below.How I tested
managementfails the test. It passed before the change, which is why the test was extended.cargo test -p alien-permissions— 134 tests.Security review of this diff, since these grants are what a customer's cloud enforces:
management,provisionorheartbeatholder reaching session contents — refused by construction and pinned by test on both clouds; the auth-token mint and the Azure data-plane role appear inexecutealone.CreateMicrovmShellAuthTokenis granted nowhere, and is named in the test constants so adding it has to be deliberate.Nothing turned up.