harden: refuse a token over non-loopback http on every config-layer request #605
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea#605
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
madtea refuses to send the API token to a non-loopback
http://URL on its main request paths (RequireSecureScheme). The environment rung ofGetCredentialsWithSourcedoes not run that check, andauth whoamipasses its result toVerifyServerAuth. Soauth whoamiwith anhttp://MADTEA_URLsends the token in cleartext. The refusal rule itself lives only in a code comment, with no decision record.Fix
doAuthedRequest, which attaches the token for everyinternal/configrequest, runsRequireSecureSchemebefore it sets the header. Loopbackhttpand token-less requests still go out.gitea.url, a key madtea does not read. It now namesMADTEA_URLandmadtea.url.Acceptance
http://URL is refused before any request is sent.https, and loopbackhttpstill go out.