Skip to content

fix(server): skip auth for proxy-to-sandbox paths; strict path matching#250

Open
Pangjiping wants to merge 1 commit intoalibaba:mainfrom
Pangjiping:fix/server/proxy
Open

fix(server): skip auth for proxy-to-sandbox paths; strict path matching#250
Pangjiping wants to merge 1 commit intoalibaba:mainfrom
Pangjiping:fix/server/proxy

Conversation

@Pangjiping
Copy link
Collaborator

Summary

  • Do not validate OPEN-SANDBOX-API-KEY when request is proxied to sandbox
    (/sandboxes/{id}/proxy/... or /v1/sandboxes/{id}/proxy/...).
  • Use strict regex for exempt path to avoid false positives
    (e.g. /proxy/sandboxes/... no longer exempt).
  • Reject paths containing '..' to prevent path traversal auth bypass.
  • Add _is_proxy_path() and tests for exemption and security cases.

Testing

  • Not run (explain why)
  • Unit tests
  • Integration tests
  • e2e / manual verification

Breaking Changes

  • None
  • Yes (describe impact and migration path)

Checklist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working component/server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: HealthAdapter missing authentication headers when use_server_proxy=True, causing health check to always fail with 401

3 participants