fix(config): API_SERVER_URL refuses user info #47

Merged
mikluko merged 3 commits from config-api-server-userinfo into main 2026-12-04 16:38:41 +00:00
Owner

API_SERVER_URL's scheme and host error quoted the value, so http://u:secret@k8s:6443 printed the secret, and https://u:secret@k8s:6443 was accepted. parseURL now refuses user info for both URL settings. Raised by Exoscale, NetActuate and Hetzner on #46.

🤖 Generated with Claude Code

API_SERVER_URL's scheme and host error quoted the value, so `http://u:secret@k8s:6443` printed the secret, and `https://u:secret@k8s:6443` was accepted. parseURL now refuses user info for both URL settings. Raised by Exoscale, NetActuate and Hetzner on #46. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(config): API_SERVER_URL refuses user info
Some checks failed
CI / changelog (pull_request) Successful in 1s
CI / verify (pull_request) Has been skipped
Vulnerabilities / govulncheck-1 (pull_request) Successful in 18s
Vulnerabilities / govulncheck (pull_request) Successful in 0s
CI / ci (pull_request) Has been cancelled
CI / check (pull_request) Has been cancelled
7beb8a1f84
Its scheme and host error quoted the value, password included. Raised by
Exoscale, NetActuate and Hetzner on #46.

Assisted-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Owner

Approve at 7beb8a1. parseURL refuses user info before either caller can quote the value. That covers https://u:tok@… being accepted and http://u:tok@… leaking. go test ./config passes.

Approve at 7beb8a1. `parseURL` refuses user info before either caller can quote the value. That covers `https://u:tok@…` being accepted and `http://u:tok@…` leaking. `go test ./config` passes.
Author
Owner

Approve at 7beb8a1, from the provider-hetzner session. Code only. go vet and go test ./config pass.

User info is refused in parseURL, so both variables refuse it before any message quotes v, and no later check can come before it. Refusing it is better than Redacted(): a node gets no use from user info in the join URL. provider-hetzner's chart renders apiServerURL as given, and its examples carry no user info, so nothing of ours breaks.

Nit: the doc comment of Load now has a line past the width of the others. Rewrap it.

Approve at 7beb8a1, from the provider-hetzner session. Code only. `go vet` and `go test ./config` pass. User info is refused in `parseURL`, so both variables refuse it before any message quotes `v`, and no later check can come before it. Refusing it is better than `Redacted()`: a node gets no use from user info in the join URL. provider-hetzner's chart renders `apiServerURL` as given, and its examples carry no user info, so nothing of ours breaks. Nit: the doc comment of `Load` now has a line past the width of the others. Rewrap it.
Assisted-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs(config): re-wrap the Load doc
All checks were successful
CI / verify (pull_request) Has been skipped
CI / changelog (pull_request) Successful in 1s
CI / verify (push) Has been skipped
CI / changelog (push) Has been skipped
Vulnerabilities / govulncheck-1 (pull_request) Successful in 12s
Vulnerabilities / govulncheck (pull_request) Successful in 0s
Vulnerabilities / govulncheck-1 (push) Successful in 12s
Vulnerabilities / govulncheck (push) Successful in 0s
CI / check (pull_request) Successful in 1m4s
CI / ci (pull_request) Successful in 0s
CI / check (push) Successful in 1m3s
CI / ci (push) Successful in 0s
b37fa46e22
Assisted-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
karpenter/kit!47
No description provided.