{"record":{"id":"ee546347f4b1cd7b","repo":"tailscale/tailscale","slug":"removekey-aums-must-specify-a-key-id","errorCode":null,"errorMessage":"RemoveKey AUMs must specify a key ID","messagePattern":"RemoveKey AUMs must specify a key ID","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"tka/aum.go","lineNumber":190,"sourceCode":"\t}\n\n\tif a.State != nil {\n\t\tif err := a.State.staticValidateCheckpoint(); err != nil {\n\t\t\treturn fmt.Errorf(\"checkpoint state: %v\", err)\n\t\t}\n\t}\n\n\tswitch a.MessageKind {\n\tcase AUMAddKey:\n\t\tif a.Key == nil {\n\t\t\treturn errors.New(\"AddKey AUMs must contain a key\")\n\t\t}\n\t\tif a.KeyID != nil || a.State != nil || a.Votes != nil || a.Meta != nil {\n\t\t\treturn errors.New(\"AddKey AUMs may only specify a Key\")\n\t\t}\n\tcase AUMRemoveKey:\n\t\tif len(a.KeyID) == 0 {\n\t\t\treturn errors.New(\"RemoveKey AUMs must specify a key ID\")\n\t\t}\n\t\tif a.Key != nil || a.State != nil || a.Votes != nil || a.Meta != nil {\n\t\t\treturn errors.New(\"RemoveKey AUMs may only specify a KeyID\")\n\t\t}\n\tcase AUMUpdateKey:\n\t\tif len(a.KeyID) == 0 {\n\t\t\treturn errors.New(\"UpdateKey AUMs must specify a key ID\")\n\t\t}\n\t\tif a.Meta == nil && a.Votes == nil {\n\t\t\treturn errors.New(\"UpdateKey AUMs must contain an update to votes or key metadata\")\n\t\t}\n\t\tif a.Key != nil || a.State != nil {\n\t\t\treturn errors.New(\"UpdateKey AUMs may only specify KeyID, Votes, and Meta\")\n\t\t}\n\tcase AUMCheckpoint:\n\t\tif a.State == nil {\n\t\t\treturn errors.New(\"Checkpoint AUMs must specify the state\")\n\t\t}","sourceCodeStart":172,"sourceCodeEnd":208,"githubUrl":"https://github.com/tailscale/tailscale/blob/6e0912f97994f927632b34ae9e63b53d6516a6ac/tka/aum.go#L172-L208","documentation":"AUM.StaticValidate requires a RemoveKey message to name the key to remove via KeyID. It fires when KeyID is empty, so there is no target for the removal.","triggerScenarios":"Thrown at tka/aum.go:190 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set KeyID to the 32-byte ID of the key being removed"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6e0912f97994f927632b34ae9e63b53d6516a6ac","analyzedAt":"2026-08-18T08:17:25.280Z","contentChangedAt":"2026-08-18T08:17:25.280Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}