Commit 94b0433
fix(runner): allow short-form .svc DNS in credential fetch allowlist (#1205)
# Human Edit
The MPP service is `ambient-api-server.ambient-code--ambient-s0.svc`, so
the change to the runner makes sense.
## Summary
- The runner's cluster-local security check for `BACKEND_API_URL` only
allowed `.svc.cluster.local` hostnames
- OSD deployments set `AMBIENT_API_SERVER_URL` (and thus
`BACKEND_API_URL`) using short-form DNS:
`ambient-api-server.ambient-code--<ns>.svc:8000`
- Short-form `.svc` DNS resolves only within the cluster — equivalent to
`.svc.cluster.local` for security purposes
- All credential fetches were silently rejected with `Refusing to send
credentials to external host`
## Test plan
- [ ] Deploy new runner image to OSD `ambient-s0`
- [ ] Start agent session in `credential-test` project
- [ ] Verify runner logs show `Fetching fresh github credentials from:
http://ambient-api-server.ambient-code--ambient-s0.svc:8000/api/ambient/v1/credentials/{id}/token`
- [ ] Verify `Successfully fetched github credentials from backend`
🤖 Generated with [Claude Code](https://claude.ai/code)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Fixed an issue where Kubernetes service DNS names ending in `.svc`
were incorrectly treated as external hosts, preventing credential
transmission. These hostnames are now properly recognized as internal.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: Ambient Code Bot <bot@ambient-code.local>
Co-authored-by: Claude <noreply@anthropic.com>1 parent 533f368 commit 94b0433
1 file changed
Lines changed: 1 addition & 0 deletions
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
| |||
0 commit comments