fix(runner): allow short-form .svc DNS in credential fetch allowlist#1205
Merged
markturansky merged 1 commit intoalphafrom Apr 4, 2026
Merged
fix(runner): allow short-form .svc DNS in credential fetch allowlist#1205markturansky merged 1 commit intoalphafrom
markturansky merged 1 commit intoalphafrom
Conversation
BACKEND_API_URL is set to short-form Kubernetes service DNS (e.g. ambient-api-server.ambient-code--ambient-s0.svc:8000) in OSD deployments. The cluster-local security check only allowed .svc.cluster.local, causing all credential fetches to be rejected. Short-form .svc hostnames resolve only within the cluster and are equivalent to .svc.cluster.local for security purposes. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
📝 WalkthroughWalkthroughUpdated the backend API hostname allowlist in credential fetching logic to recognize Changes
🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Human Edit
The MPP service is
ambient-api-server.ambient-code--ambient-s0.svc, so the change to the runner makes sense.Summary
BACKEND_API_URLonly allowed.svc.cluster.localhostnamesAMBIENT_API_SERVER_URL(and thusBACKEND_API_URL) using short-form DNS:ambient-api-server.ambient-code--<ns>.svc:8000.svcDNS resolves only within the cluster — equivalent to.svc.cluster.localfor security purposesRefusing to send credentials to external hostTest plan
ambient-s0credential-testprojectFetching fresh github credentials from: http://ambient-api-server.ambient-code--ambient-s0.svc:8000/api/ambient/v1/credentials/{id}/tokenSuccessfully fetched github credentials from backend🤖 Generated with Claude Code
Summary by CodeRabbit
.svcwere incorrectly treated as external hosts, preventing credential transmission. These hostnames are now properly recognized as internal.