After upgrading Tanzu Operations Manager to v3.3.4, all attempts to log in via SAML SSO fail. Every login attempt redirects to /uaa/saml2/authenticate/<idp-alias> and returns an error instead of continuing on to the identity provider:
Unable to build SAML relying party registration for: <idp-alias>
No redirect to the identity provider is attempted and the failure occurs entirely within UAA before an AuthnRequest can be built. The following is also seen in uaa.log:
org.springframework.security.saml2.Saml2Exception: Unable to build SAML relying party registration for: <idp-alias>
Caused by: java.io.FileNotFoundException: class path resource [<?xml version="1.0" encoding="utf-8"?><EntityDescriptor ...>] cannot be opened because it does not exist
at org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistrations.fromMetadataLocation
at org.cloudfoundry.identity.uaa.provider.saml.RelyingPartyRegistrationBuilder.buildRelyingPartyRegistration
Tanzu Operations Manager 3.3.4 (UAA 2.15.0, UAA core v79.3.2)
This is caused by a recent UAA change to honor the skipSslValidation setting when fetching SAML IdP metadata during login (introduced in UAA 2.15.0 / core v79.3.2). Microsoft Entra ID's federation metadata endpoint returns its response with a leading UTF-8 byte-order-mark (U+FEFF). This is normal behavior on Entra's side.
As part of the change above, UAA's logic for classifying fetched/stored metadata (as inline XML data vs. a resource location) no longer correctly accounts for this leading BOM character. Because the BOM sits in front of the XML declaration, UAA fails to recognize the response as valid metadata content and instead attempts to resolve the entire metadata document as if it were a file/classpath location, resulting in the FileNotFoundException above.
R&D has confirmed this root cause and is actively working on a permanent fix. Until it is available, please use the workaround below:
Note: Issue is resolved as of Tanzu UAA version 2.16. Tentatively planned to be fixed in the Tanzu Platform Operation Manager release 3.3.5 or later".