Repository navigation
auth: let the data-plane identity call the native file access RPCs - #1371
Merged
Merged
Conversation
This was referenced Nov 3, 2026
nikhilbirmiwal-pplx
approved these changes
Nov 3, 2026
nikhilbirmiwal-pplx
left a comment
Member
There was a problem hiding this comment.
Checked that guest_bridge_method admits exactly the two NativeFileAccessApi methods only on Cluster-role policies (activation listener), with ingress activation RPCs, other methods, and Worker roles still denied; caller must still pass the Cluster allowlist.
NancyKwongPerplexity
force-pushed
the
native-file-access-rpcs
branch
from
November 3, 2026 19:39
5f36148 to
1640ffb
Compare
NancyKwongPerplexity
force-pushed
the
data-plane-native-file-access-authz
branch
from
November 3, 2026 19:40
c38e35f to
fe9375c
Compare
NancyKwongPerplexity
force-pushed
the
native-file-access-rpcs
branch
from
November 3, 2026 21:23
1640ffb to
3975a74
Compare
Allow the guest-bridge (data-plane edge) service accounts to call NativeFileAccessApi's AuthorizeNativeFileRequest and PrepareNativeFileCall on a Cluster-role listener, which is where space-api's activation listener serves them. Every other method there, including the ingress activation RPCs and any later NativeFileAccessApi method, stays refused for that identity, and a worker grants it none of them. The caller must still be in the listener's Cluster allowlist (SPACE_CLUSTER_API_AUTH_ALLOWED_SERVICE_ACCOUNTS); that is deployment configuration and unchanged here. Nothing calls the RPCs yet.
NancyKwongPerplexity
force-pushed
the
data-plane-native-file-access-authz
branch
from
November 3, 2026 21:53
fe9375c to
d078cb5
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
Lets the data-plane edge identity call the two native file access RPCs that #1365 adds to space-api's activation listener.
guest_bridge_method(crates/libs/common/svc/src/auth/k8s.rs) now admits/space.node.api.v1.NativeFileAccessApi/AuthorizeNativeFileRequestand/…/PrepareNativeFileCallon a Cluster-role listener, which is where the activation listener serves them.Everything else stays refused for that identity:
PrepareIngress,QueueImplicitWake);NativeFileAccessApimethod, which needs its own review;The caller must still appear in the listener's Cluster allowlist (
SPACE_CLUSTER_API_AUTH_ALLOWED_SERVICE_ACCOUNTS). That is deployment configuration, unchanged here. Nothing calls the RPCs yet.Validation
At this head (
fe9375c8), onmainat0271415a:git range-diffreports it identical).cargo fmt --all -- --check,scripts/generate-env-contract.sh --check,scripts/check-rust-error-policy.shandscripts/source_guards/env_test_hook_boundary.pypass.cargo clippy --locked --all-targets --all-features -p pplx-space-common-svc -- -D warningspasses.cargo check --workspace --all-targets --lockedpasses.cargo archagainstmain's baseline, renames andARCHITECTURE.toml: 0 required findings and 112 advisory, the same findings asmain.cargo nextest run --config 'profile.test.package.pplx-space-api.opt-level=0' --all-features --all-targets, one package at a time, with Postgres and Redis from the nextest setup scripts andSPACE_CI_REQUIRE_TEST_DEPS=1:pplx-space-common-svc134 passed;pplx-space-api2189 passed, 1 skipped;pplx-space-native-files2 passed;pplx-space-public-api-http9 passed;pplx-space-data-plane-server395 passed;pplx-space-internal-api-server436 passed.New test:
auth::k8s::tests::data_plane_identity_may_ask_the_api_to_decide_native_file_requests. With the data-plane account in the Cluster allowlist, it checks that both methods are admitted, that a future method on the service and both ingress activation methods arePERMISSION_DENIED, and that a worker refuses the methods. Mutation check: withk8s.rsrestored to its previous version, the test fails on the first admitted method withPermissionDenied: guest-bridge service account is not allowed for this node-api method.Kind ran before the rebase, at
c38e35fconmainat55174478. The rebase changed nothing in this PR, so it was not rerun. Kind (Firecracker, Kubernetes substrate) on a Linux KVM devbox:scripts/tests/smoke-kind-typed.sh nativewithSPACE_SMOKE_KIND_ADMIN_TOKEN_FILEset.main(55174478)c38e35fc)Both runs executed the same 35 scenarios, each with exit 0, so Native behaviour is unchanged, as expected with nothing calling the RPCs. The only file scenario in the native inventory is
native_contract.file_idempotency_conflict, so this run does not exercise the new RPCs.Severity and risk
Severity: does not apply (authorization for an RPC with no caller).
Risk: this widens what the data-plane identity may call by exactly the two named methods on Cluster-role listeners. space-api's activation listener is the only one that serves them; on the internal API's cluster listener they are unimplemented. To roll back, revert this PR.
Rollout
To take effect, a deployment must also list the data-plane service account in the activation listener's Cluster allowlist and let the data plane reach the listener. That is deployment configuration, outside this repository.
Stack
This is PR 5 of 5 and depends on
native-file-access-rpcs(#1365). Merge in order: #1362, #1363, #1364, #1365, then this PR.AI assistance: Claude Code drafted the code, tests, and this description; the author reviewed them.