credentials: distinguish "no backend" from real keyring.Open errors #589
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#589
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
internal/tpagectl/credentials/credentials.gotheopen()helper maps everykeyring.Openerror toErrUnavailable. A genuinely present-but-broken backend (Secret Service running but dbus disconnected, locked/failed keychain, permission denied) is therefore indistinguishable from "no keychain on this machine", which silently triggers the plaintext config-file fallback (0600).Prefer checking
keyring.ErrNoAvailBackend/ the "No suitable keyring backend" condition and returningErrUnavailableonly for that; surface other open errors so callers don't quietly downgrade from secure storage on real failures.See #588
Already resolved in PR #588:
credentials.open()maps onlykeyring.ErrNoAvailImpltoErrUnavailable; genuine keyringOpenerrors now propagate asopen keychain: ..., andGet()propagates non-ErrKeyNotFoundread errors. Verified during the CLI-lump pass; closing without further change.