{"record":{"id":"1997b5c66a3c19aa","repo":"goharbor/harbor","slug":"unsupported-auth-scheme-v","errorCode":null,"errorMessage":"unsupported auth scheme: %v","messagePattern":"unsupported auth scheme: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/pkg/registry/auth/authorizer.go","lineNumber":137,"sourceCode":"\tif len(challenges) == 0 {\n\t\ta.authorizer = null.NewAuthorizer()\n\t\treturn nil\n\t}\n\tcm := map[string]challenge.Challenge{}\n\tfor _, challenge := range challenges {\n\t\tcm[challenge.Scheme] = challenge\n\t}\n\tif challenge, exist := cm[\"bearer\"]; exist {\n\t\ta.authorizer = bearer.NewAuthorizer(challenge.Parameters[\"realm\"],\n\t\t\tchallenge.Parameters[\"service\"], basic.NewAuthorizer(a.username, a.password),\n\t\t\ta.client.Transport)\n\t\treturn nil\n\t}\n\tif _, exist := cm[\"basic\"]; exist {\n\t\ta.authorizer = basic.NewAuthorizer(a.username, a.password)\n\t\treturn nil\n\t}\n\treturn fmt.Errorf(\"unsupported auth scheme: %v\", challenges)\n}\n\n// Check whether the request targets to the registry.\n// If doesn't, the request shouldn't be handled by the authorizer.\n// e.g. the requests sent to backend storage(s3, etc.)\nfunc (a *authorizer) isTarget(req *http.Request) bool {\n\tindex := strings.Index(req.URL.Path, \"/v2/\")\n\tif index == -1 {\n\t\treturn false\n\t}\n\tif req.URL.Host != a.url.Host || req.URL.Scheme != a.url.Scheme ||\n\t\treq.URL.Path[:index+4] != a.url.Path {\n\t\treturn false\n\t}\n\treturn true\n}\n","sourceCodeStart":119,"sourceCodeEnd":154,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/pkg/registry/auth/authorizer.go#L119-L154","documentation":"Returned by the registry authorizer's initialize when the /v2/ challenges advertise neither 'bearer' nor 'basic' schemes (or no challenges map to a supported scheme). After preferring bearer and basic, no supported authorizer can be constructed, so the scheme list is reported. It fires when the registry uses an authentication scheme Harbor's client does not implement.","triggerScenarios":"Thrown at src/pkg/registry/auth/authorizer.go:137 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the registry's WWW-Authenticate challenges on /v2/","Configure the registry to use bearer token or basic authentication","Check for proxies that rewrite or strip auth challenge headers","Verify the registry is a supported Docker Registry v2 implementation"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","contentChangedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}