Skip to content

Introduce Shared-Secret Authentication and Mitigate Node Registration SSRF (Fixed #22, #23)#25

Merged
yulmwu merged 3 commits into
mainfrom
fix/issue-22-23-auth-and-node-ssrf
Jun 19, 2026
Merged

Introduce Shared-Secret Authentication and Mitigate Node Registration SSRF (Fixed #22, #23)#25
yulmwu merged 3 commits into
mainfrom
fix/issue-22-23-auth-and-node-ssrf

Conversation

@yulmwu

@yulmwu yulmwu commented Jun 19, 2026

Copy link
Copy Markdown
Member

Previously, there was no authentication mechanism for privileged APIs in either sbxlet or sbxorch, leading to issues such as #22. Additionally, a potential SSRF vulnerability in the orchestration layer during node registration (#23) was identified and addressed as part of this change.

#22 — Shared-Secret Authentication

sbxorch, sbxlet, and sbxctl now authenticate privileged APIs using a single static shared secret. Communication succeeds only if all three components are configured with the same secret.

  • Configuration:

    • shared_secret in each config file
    • SBX_SHARED_SECRET environment variable
    • sbxctl additionally supports the --secret flag
  • Outbound requests (sbxctl to sbxorch, sbxorch to sbxlet) include an Authorization: Bearer <secret> header

  • Protected routes return 401 Unauthorized if the token does not match (using constant-time comparison)

  • Public routes are limited to GET /healthz and /swagger/*

  • Fail-closed behavior: sbxorch and sbxlet refuse to start if shared_secret is not configured

Note

mTLS and similar mechanisms were considered, but ultimately deemed unnecessary for the current scale of this project, so they have been deferred for now.

#23 — Node Registration SSRF Hardening

Node registration now rejects IP addresses that are:

  • Unspecified
  • Multicast
  • Link-local (including the cloud metadata endpoint 169.254.169.254)

Loopback and private address ranges remain allowed, since they are valid node addresses.

Furthermore, unauthenticated node registration is now prevented through the authentication mechanism introduced in #22.

For more details, please refer to the changes included in this PR.

Contributors

@yulmwu yulmwu self-assigned this Jun 19, 2026
@yulmwu yulmwu added the fixed label Jun 19, 2026
@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Comment thread configs/sbxctl_config.json
@yulmwu yulmwu merged commit 130e757 into main Jun 19, 2026
1 check passed
@yulmwu yulmwu deleted the fix/issue-22-23-auth-and-node-ssrf branch June 19, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant