From 46db36eb86b8ff8cbfdf12dae39ad493c8129199 Mon Sep 17 00:00:00 2001 From: Markus Strehle <11627201+strehle@users.noreply.github.com> Date: Tue, 3 Dec 2024 08:54:31 +0100 Subject: [PATCH] Add logs in case of SAML issues (#3173) These issues should be ignored, because they were ignored before. Issue type: 1. Invalid IdP setup, e.g. invalid metadata. Write an error, but start the UAA 2. Invalid resolution of SAMl metadata during runtime. Add warning for such problems. --- .../saml/ConfiguratorRelyingPartyRegistrationRepository.java | 2 +- .../saml/SamlRelyingPartyRegistrationRepositoryConfig.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/main/java/org/cloudfoundry/identity/uaa/provider/saml/ConfiguratorRelyingPartyRegistrationRepository.java b/server/src/main/java/org/cloudfoundry/identity/uaa/provider/saml/ConfiguratorRelyingPartyRegistrationRepository.java index b21eaa01207..c404ad028bc 100644 --- a/server/src/main/java/org/cloudfoundry/identity/uaa/provider/saml/ConfiguratorRelyingPartyRegistrationRepository.java +++ b/server/src/main/java/org/cloudfoundry/identity/uaa/provider/saml/ConfiguratorRelyingPartyRegistrationRepository.java @@ -51,7 +51,7 @@ public RelyingPartyRegistration findByRegistrationId(String registrationId) { } } } catch (Exception e) { - // ignore + log.warn("Cannot retrieve SAML trusted party.", e); } return null; diff --git a/server/src/main/java/org/cloudfoundry/identity/uaa/provider/saml/SamlRelyingPartyRegistrationRepositoryConfig.java b/server/src/main/java/org/cloudfoundry/identity/uaa/provider/saml/SamlRelyingPartyRegistrationRepositoryConfig.java index 7642e645185..a2999e239f1 100644 --- a/server/src/main/java/org/cloudfoundry/identity/uaa/provider/saml/SamlRelyingPartyRegistrationRepositoryConfig.java +++ b/server/src/main/java/org/cloudfoundry/identity/uaa/provider/saml/SamlRelyingPartyRegistrationRepositoryConfig.java @@ -88,7 +88,7 @@ RelyingPartyRegistrationRepository relyingPartyRegistrationRepository(SamlIdenti try { relyingPartyRegistrations.add(RelyingPartyRegistrationBuilder.buildRelyingPartyRegistration(params)); } catch (Saml2Exception e) { - // ignore + log.error("Error building relying party", e); } }