{"record":{"id":"9b56f067060bdfb2","repo":"t8y2/dbx","slug":"identifier-w-9b56f0","errorCode":null,"errorMessage":"identifier: %w","messagePattern":"identifier: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/hive-go/config.go","lineNumber":780,"sourceCode":"\tvar decodeErr error\n\tfor _, encoding := range []*base64.Encoding{\n\t\tbase64.RawURLEncoding,\n\t\tbase64.URLEncoding,\n\t\tbase64.RawStdEncoding,\n\t\tbase64.StdEncoding,\n\t} {\n\t\tdecoded, decodeErr = encoding.DecodeString(encoded)\n\t\tif decodeErr == nil {\n\t\t\tbreak\n\t\t}\n\t}\n\tif decodeErr != nil {\n\t\treturn nil, nil, decodeErr\n\t}\n\treader := strings.NewReader(string(decoded))\n\tidentifier, err := readHadoopByteArray(reader)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"identifier: %w\", err)\n\t}\n\tpassword, err := readHadoopByteArray(reader)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"password: %w\", err)\n\t}\n\tif len(identifier) == 0 || len(password) == 0 {\n\t\treturn nil, nil, errors.New(\"token identifier and password must be non-empty\")\n\t}\n\tif _, err := readHadoopByteArray(reader); err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"kind: %w\", err)\n\t}\n\tif _, err := readHadoopByteArray(reader); err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"service: %w\", err)\n\t}\n\tif reader.Len() != 0 {\n\t\treturn nil, nil, errors.New(\"token contains trailing data\")\n\t}\n\treturn identifier, password, nil","sourceCodeStart":762,"sourceCodeEnd":798,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/hive-go/config.go#L762-L798","documentation":"This error means the identifier (owner) field of the Hadoop delegation token could not be read from the decoded token bytes. decodeHadoopDelegationToken reads length-prefixed byte arrays in order: identifier, password, kind, service; the first read failed, usually due to a truncated or corrupt token payload. The wrapping identifies which field failed during parsing.","triggerScenarios":"Supplying a delegation token whose decoded bytes are shorter than the first length-prefixed field, or whose leading bytes are not a valid Hadoop VInt length.","commonSituations":"Token truncated by logging/clipboard; token encoded twice or half-decoded; Hadoop version producing a token layout variant the parser misreads.","solutions":["Re-obtain an intact delegation token from the server and pass it verbatim","Check that the token string was not truncated or altered by shell quoting/line wrapping","Verify base64 decoding succeeded (no whitespace or invalid characters)"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"decoded, err := base64.StdEncoding.DecodeString(token)\n// decoded must be long enough: >= 2 VInt + payload; check len(decoded) > 4 before use","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"identifier:\") {\n\treturn fmt.Errorf(\"token payload corrupt/truncated: %w\", err)\n}","preventionTips":["Never truncate tokens in logs or copy/paste flows","Round-trip test tokens through decode before storing them","Use tokens only from the intended Hadoop service"],"tags":["hive","delegation-token","serialization"],"backgroundTag":"delegation-token-decode-failed","analyzedSha":"c0390bff16418b651f4728520d99adf8ce48829a","analyzedAt":"2026-09-05T23:05:10.900Z","contentChangedAt":"2026-09-05T23:05:10.900Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}