test(agent-proxy): cover username-only basic auth rewrite#316
test(agent-proxy): cover username-only basic auth rewrite#316saifsmailbox98 wants to merge 2 commits into
Conversation
|
💬 Discussion in Slack: #pr-review-cli-316-test-agent-proxy-cover-username-only-basic-auth-rewrite Posted by Review Police — reviews, comments, new commits, and CI failures will stream into this channel. |
|
| Filename | Overview |
|---|---|
| packages/agentproxy/rewrite_test.go | Adds TestBasicAuthUsernameOnly to assert that a username-only credential produces the correct Basic Auth header (base64("user:") == dXNlcjo=); follows existing test patterns precisely. |
Reviews (1): Last reviewed commit: "test(agent-proxy): cover username-only b..." | Re-trigger Greptile
Description 📣
Basic auth on a proxied service now allows a username with no password (
Authorization: Basic base64(username:)), which is how APIs like Ashby authenticate. No production code change was needed here sinceapplyCredentialsalready setshaveBasicon the username alone and emits an empty password segment when none is present. This just adds a test to lock that behavior in.Companion PR (backend/frontend/docs): Infisical/infisical#7296
Type ✨
Tests 🛠️
TestBasicAuthUsernameOnlyasserts a username-only credential producesAuthorization: Basic dXNlcjo=(base64("user:")).go test ./packages/agentproxy/ -run TestBasicAuth