{"record":{"id":"799a52bdd7e1bb19","repo":"JuliusBrussee/caveman","slug":"kms-auth-token-is-required","errorCode":null,"errorMessage":"kms: auth token is required","messagePattern":"kms: auth token is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"shared/platform/kms/kms.go","lineNumber":94,"sourceCode":"\tprovider := strings.ToLower(strings.TrimSpace(cfg.Provider))\n\tif provider != ProviderScaleway {\n\t\treturn nil, fmt.Errorf(\"kms: unsupported provider %q\", provider)\n\t}\n\tregion, keyID := strings.TrimSpace(cfg.Region), strings.TrimSpace(cfg.KeyID)\n\tif err := validateLocation(region, keyID); err != nil {\n\t\treturn nil, err\n\t}\n\tdecryptKeyIDs := map[string]struct{}{keyID: {}}\n\tfor _, allowedKeyID := range cfg.AllowedDecryptKeyIDs {\n\t\tallowedKeyID = strings.TrimSpace(allowedKeyID)\n\t\tif err := validateLocation(region, allowedKeyID); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdecryptKeyIDs[allowedKeyID] = struct{}{}\n\t}\n\ttoken := strings.TrimSpace(cfg.AuthToken)\n\tif len(token) < 20 {\n\t\treturn nil, errors.New(\"kms: auth token is required\")\n\t}\n\tbaseURL := strings.TrimRight(strings.TrimSpace(cfg.APIBaseURL), \"/\")\n\tif baseURL == \"\" {\n\t\tbaseURL = scalewayAPI\n\t}\n\tparsed, err := url.Parse(baseURL)\n\tif err != nil || parsed.Scheme == \"\" || parsed.Host == \"\" || parsed.User != nil || parsed.RawQuery != \"\" || parsed.Fragment != \"\" {\n\t\treturn nil, errors.New(\"kms: invalid API base URL\")\n\t}\n\tclient := cfg.HTTPClient\n\tif client == nil {\n\t\tclient = &http.Client{\n\t\t\tTimeout: 8 * time.Second,\n\t\t\tCheckRedirect: func(_ *http.Request, _ []*http.Request) error {\n\t\t\t\treturn http.ErrUseLastResponse\n\t\t\t},\n\t\t}\n\t}","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/shared/platform/kms/kms.go#L76-L112","documentation":"Error \"kms: auth token is required\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at shared/platform/kms/kms.go:94 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the KMS auth token."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"27d5a3981a347890211bb1bf2439e5c821a63bc9","analyzedAt":"2026-08-15T09:26:11.751Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}