Repository navigation
fix(manager): only the Operator may hold a deployment's tunnel - #832
Merged
Merged
Conversation
Route-level test with a validator that issues each role, the way an embedder does. It fails on main: a deployment viewer, telemetry writer or binding resolver can open the deployment's tunnel, and image provisioning and sandbox push credentials can pull charts and the Operator image. Refs ALIEN-1200 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Tunnel connect accepted any deployment-scoped token, so a viewer, telemetry writer or binding resolver could take the connection and receive the deployment's tunnel traffic. It now also requires can_sync_deployment, the rule the Operator's sync uses. Chart and Operator image pulls were routed before the capability refusal. Capability credentials are now refused before any pull is routed. The test's Operator case now opens a real tunnel with the Operator's own client over TCP, instead of only checking the 101 response. Fixes ALIEN-1200 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Member
Author
|
@greptileai review |
A path that names no repository, such as /v2/_catalog, is refused with 400 for every caller. Refusing capability roles first turned that into 403 for them. The role check now runs after path validation and still before charts and the Operator image are routed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Member
Author
|
@greptileai review |
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.
Fixes ALIEN-1200: two authorization gaps in routes added for self-hosted Kubernetes installs. Neither has shipped in a release yet.
Tunnel connect checked the scope, not the role.
GET /v1/tunnel/connectaccepted any deployment-scoped token. Whoever holds that connection receives every request sent through the deployment's tunnels, including the caller's ownAuthorizationheader. So a deployment viewer, telemetry writer or remote-binding resolver could take over a deployment's tunnel traffic. It now also requirescan_sync_deployment, the rule the Operator's sync already uses.Chart and Operator image pulls skipped the capability refusal.
proxy_pullroutedcharts/andalien-operatorbeforerefuse_capability_pull, so image-repository-provisioning and sandbox-push credentials could pull them. They are now refused before any pull is routed.The standalone manager's own token store only issues deployment-scoped tokens to Operators and issues neither capability role. So this matters wherever a custom
AuthValidatorissues those roles.Testing.
crates/alien-manager/tests/access_roles.rsruns the real tunnel and registry routes with a validator that issues each role:DENIEDon chart and Operator-image pulls. A project developer gets past the role check (404, since this manager serves neither).The test was pushed first on its own. The review of that commit confirmed both access-denial checks fail without the fix.
🤖 Generated with Claude Code