fix(config): key credentials by the forge host alone, per ADR 0025 #604

Merged
hexajon merged 1 commit from fix/forgehost-host-only into main 2026-09-23 15:20:17 +00:00
Owner

Summary

ADR 0025 keys credentials by the forge host alone. forgeHost kept the URL path, so a forge under a sub-path (https://example.com/gitea) was keyed example.com/gitea. forgeHost now returns host[:port] only. The API URL itself keeps its path; only the credential key and the host comparisons change.

Behavior change: a user whose madtea.url has a sub-path must run madtea auth login once after the upgrade, because the stored key no longer matches. Sub-path forges on one host now share one credential. They already share one browser origin, which the Forgejo reverse-proxy docs warn about.

Side effect: the whoami origin mismatch check no longer reports a false mismatch between a sub-path madtea.url and its origin host.

## Summary ADR 0025 keys credentials by the forge host alone. `forgeHost` kept the URL path, so a forge under a sub-path (`https://example.com/gitea`) was keyed `example.com/gitea`. `forgeHost` now returns `host[:port]` only. The API URL itself keeps its path; only the credential key and the host comparisons change. Behavior change: a user whose `madtea.url` has a sub-path must run `madtea auth login` once after the upgrade, because the stored key no longer matches. Sub-path forges on one host now share one credential. They already share one browser origin, which the Forgejo reverse-proxy docs warn about. Side effect: the `whoami` origin mismatch check no longer reports a false mismatch between a sub-path `madtea.url` and its origin host.
fix(config): key credentials by the forge host alone, per ADR 0025
All checks were successful
drift / govulncheck (pull_request) Has been skipped
drift / surface-diff (pull_request) Successful in 1m3s
drift / forgejo-smoke (pull_request) Has been skipped
ci / mcp-conformance (pull_request) Successful in 1m57s
ci / mcp-conformance (push) Successful in 0s
drift / govulncheck (push) Has been skipped
drift / surface-diff (push) Successful in 1s
drift / forgejo-smoke (push) Has been skipped
ci / gate (push) Successful in 13m44s
ci / gate (pull_request) Successful in 25m48s
d870ef9c74
forgeHost kept the URL path, so a forge under a sub-path
(https://example.com/gitea) was keyed example.com/gitea. ADR 0025 keys
credentials by the forge host alone. forgeHost now returns host[:port] only.

A user with a sub-path madtea.url must run madtea auth login once after the
upgrade, because the old key no longer matches.
Sign in to join this conversation.
No reviewers
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
sixfold-space/madtea!604
No description provided.