Suggest a token label only when the hostname names a machine #27
No reviewers
Labels
No labels
⏳in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grey.ooo/someones.computer_agent!27
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/token-label-suggestion"
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?
sc loginprints and opens a link to the platform's token page carrying?label=<short hostname> (sc), so the form arrives named — the label answers"which box is this?" when someone later comes to revoke a token, and this side
is the only one that knows the answer.
Three cases where the name it proposed was worse than no name:
Matts MacBook ProMatts MacBook Pro (sc)(sc)marker3f2a1b4c5d6e(a container with no--hostname)3f2a1b4c5d6e (sc)The container id is declined for the reason
localhostalready is: it isregenerated every boot, so it names a container that is gone by the time anyone
reads the token list. Both Docker forms (12 and 64 hex) are covered. A
Kubernetes pod name keeps its human half in front, so it still passes, as do
the near misses a real machine might legitimately be called — wrong length, a
non-hex digit, and the uppercase form Docker never generates.
The platform side of this — numbering a suggestion the user already holds,
bramble (sc)→bramble (sc) 2, which only that side can see — is a separatePR: someones.computer#773.
Verified
go vet,gofmt, andgo test ./...green;labelForHostgains cases forwhitespace, the length cut, both container-id forms, and three near misses.
WIP: Suggest a token label only when the hostname names a machineto Suggest a token label only when the hostname names a machine