Skip to content

Commit

Permalink
Merge pull request #2060 from AmaliMatharaarachchi/ti
Browse files Browse the repository at this point in the history
Fix token issuer
  • Loading branch information
CrowleyRajapakse authored Mar 5, 2024
2 parents 7670cc6 + b69a068 commit ebb2e63
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (r *TokenssuerReconciler) Reconcile(ctx context.Context, req ctrl.Request)
jwtIssuerMapping, err := getJWTIssuers(ctx, r.client, jwtKey)
if err != nil {
loggers.LoggerAPKOperator.ErrorC(logging.PrintError(logging.Error2660, logging.CRITICAL,
"Unable to find associated JWTIssuers for %s : %s", req.NamespacedName.String(), err.Error()))
"Unable to resolve JWTIssuers after updating %s : %s", req.NamespacedName.String(), err.Error()))
return ctrl.Result{}, nil
}
UpdateEnforcerJWTIssuers(jwtIssuerMapping)
Expand Down Expand Up @@ -220,7 +220,7 @@ func getJWTIssuers(ctx context.Context, client k8client.Client, namespace types.
jwtIssuer.Spec.SignatureValidation.JWKS.TLS.ConfigMapRef, jwtIssuer.Spec.SignatureValidation.JWKS.TLS.SecretRef)
if err != nil {
loggers.LoggerAPKOperator.ErrorC(logging.PrintError(logging.Error2659, logging.MAJOR,
"Error resolving certificate for JWKS %v", err.Error()))
"Error resolving certificate for JWKS for issuer %s in CR %s, %v", resolvedJwtIssuer.Issuer, utils.NamespacedName(&jwtIssuer).String(), err.Error()))
continue
}
jwks.TLS = &dpv1alpha1.ResolvedTLSConfig{ResolvedCertificate: tlsCertificate}
Expand All @@ -233,8 +233,8 @@ func getJWTIssuers(ctx context.Context, client k8client.Client, namespace types.
jwtIssuer.Spec.SignatureValidation.Certificate.ConfigMapRef, jwtIssuer.Spec.SignatureValidation.Certificate.SecretRef)
if err != nil {
loggers.LoggerAPKOperator.ErrorC(logging.PrintError(logging.Error2659, logging.MAJOR,
"Error resolving certificate for JWKS %v", err.Error()))
return nil, err
"Error resolving certificate for JWKS for issuer %s in CR %s, %v", resolvedJwtIssuer.Issuer, utils.NamespacedName(&jwtIssuer).String(), err.Error()))
continue
}
signatureValidation.Certificate = &dpv1alpha1.ResolvedTLSConfig{ResolvedCertificate: tlsCertificate}
}
Expand Down

0 comments on commit ebb2e63

Please sign in to comment.