From fdb047b3392246973677b4751c22df43421d7ccc Mon Sep 17 00:00:00 2001 From: Eguzki Astiz Lezaun Date: Tue, 28 Nov 2023 17:41:19 +0100 Subject: [PATCH] kuadrant authpolicy command: skip when oidc not found --- pkg/kuadrantapi/authpolicy.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/kuadrantapi/authpolicy.go b/pkg/kuadrantapi/authpolicy.go index d6ffee5..b302edd 100644 --- a/pkg/kuadrantapi/authpolicy.go +++ b/pkg/kuadrantapi/authpolicy.go @@ -124,6 +124,11 @@ func AuthPolicyAuthenticationSchemeFromOAS(doc *openapi3.T) map[string]kuadranta oidcScheme := findOIDCSecuritySchemesFromRequirements(doc, secRequirements) + if oidcScheme == nil { + // no oidc sec scheme found + continue + } + authName := utils.OpenAPIOperationName(path, verb, operation) authentication[authName] = kuadrantapiv1beta2.AuthenticationSpec{