tpagectl: 401 and 403 conflated as authentication failed #550
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thwap/thwap-pagesd#550
Loading…
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?
In
runCreate(internal/tpagectl/site/create.go), both 401 and 403 map toauthentication failed: …, but the daemon's 403 means "not authorized to register for this owner" (authorization/owner mismatch), not bad credentials.Suggested fix: distinguish wording — 401 → authentication failure, 403 → authorization failure (not permitted for this owner). Also untested: the 403 path and the non-auth error passthrough (e.g. 409 conflict should surface the raw error without the "authentication failed" prefix).
Ref: PR #548
Fixed in #634:
site createdistinguishes 401 ("authentication failed") from 403 ("not authorized to register site for owner ..."), with a regression test.