{"record":{"id":"2828f92d736d71f8","repo":"goharbor/harbor","slug":"failed-to-create-oidc-provider-error-v","errorCode":null,"errorMessage":"failed to create OIDC provider, error: %v","messagePattern":"failed to create OIDC provider, error: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/pkg/oidc/helper.go","lineNumber":95,"sourceCode":"\t\t\tif err := p.create(ctx); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn p.instance.Load().(*gooidc.Provider), nil\n}\n\nfunc (p *providerHelper) create(ctx context.Context) error {\n\ts, err := config.OIDCSetting(ctx)\n\tif err != nil {\n\t\tlog.Errorf(\"Failed to get OIDC configuration, error: %v\", err)\n\t\treturn err\n\t}\n\tc := clientCtx(ctx, s.VerifyCert)\n\tprovider, err := gooidc.NewProvider(c, s.Endpoint)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to create OIDC provider, error: %v\", err)\n\t}\n\terr = provider.Claims(&EndpointsClaims)\n\tif err != nil {\n\t\treturn err\n\t}\n\tp.instance.Store(provider)\n\tp.creationTime = time.Now()\n\treturn nil\n}\n\nvar provider = &providerHelper{}\n\n// Used only when an admin disables OIDC certificate verification.\n// The default path verifies certificates; this fallback still requires TLS 1.2+.\nvar insecureTransport = &http.Transport{\n\tTLSClientConfig: &tls.Config{\n\t\tMinVersion:         tls.VersionTLS12,\n\t\tInsecureSkipVerify: true, // nolint:gosec // G402: gated by admin-controlled OIDCSetting.VerifyCert","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/pkg/oidc/helper.go#L77-L113","documentation":"Error \"failed to create OIDC provider, error: %v\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/pkg/oidc/helper.go:95 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}