Thanks to @kevin.wilder for the help in discovering / triaging this.
When you are using SSO with an IdP that has a custom CA, Authservice uses the value of sso.certificateAuthority.cert to communicate with the IdP. This works as expected in most cases. However, specifically when using jwksUri, Authservice does not load this CA cert and fails to grab the JWKS data. This occurs even if you specify jwks.
BigBang Version
This applies to every version of Big Bang if using jwksUri, but only after 1.52.0 if using hardcoded jwks.
Designs
Child items 0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items 0
Link issues together to show that they're related or that one is blocking others.
Learn more.
Related merge requests 2
When these merge requests are accepted, this issue will be closed automatically.
# Global SSO parameterssso: name: SSO url: https://keycloak.<DOMAIN>/auth/realms/baby-yoda saml: # Retrieve from # curl https://keycloak.<DOMAIN>/auth/realms/baby-yoda/protocol/saml/descriptor; echo metadata: <md:EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" entityID="https://keycloak.<DOMAIN>/auth/realms/baby-yoda">...</md:EntityDescriptor> oidc: # The JSON Web Key Set (JWKS) containing the public keys used to verify any JSON Web Token (JWT) issued by the IDP # The jwks is used by Istio authservice # Must be updated for every new deployment of keycloak. Example of where to get the jwks # https://keycloak.<DOMAIN>/auth/realms/baby-yoda/protocol/openid-connect/certs # double quotes must be escaped \"xxxx\" # curl https://keycloak.<DOMAIN>/auth/realms/baby-yoda/protocol/openid-connect/certs | sed 's@"@\\"@g'); echo jwks: "{\"keys\":[...]}" # Recent versions of authservice allow filling in of a URI for jwks which will be fetched on your behalf jwksUri: null # private CA for IdP certificateAuthority: cert: | -----BEGIN CERTIFICATE----- MII... -----END CERTIFICATE-----
Here is the error when using a private CA. This makes sense because authservice tries to use jwksUri and does not trust it. So then authservice SSO fails because authservice does not have the jwks info that is needed.
The workaround solution of setting jwks and nulling jwksUri is undocumented as the jwks key was removed from all relevant documentation and example configs around 4 months ago. @ryan.j.garcia if you would grant me developer role on the bigbang repository I will open a documentation MR.
The ideal solution is for the authservice package chart to volume mount the private certificate authority cert in the appropriate place so that the authservice container will trust the private CA and be able to use the jwksUri.
Just to clarify, this change results in exactly the same issue? Like you cannot use JWKS URI? Or are you facing a different but similar issue? It might be worth opening a new issue, as both Kevin and I solved our JWKS URI CA cert issue via this method.