PVWA - SAML Authentication fails with error "Authentication failure. Please contact your Administrator." after upgrading to PVWA 14.4 or above
Symptom
After upgrading to PVWA 14.4 or above, SAML Authentication fails with error:
Authentication failure. Please contact your Administrator.
One of the following errors are seen in C:\windows\temp\PVWA\PVWA.App.log:
Error #1
Failed to receive an SSO response from the identity provider || || c7: Failed to receive an SSO response from the identity provider ---> ComponentSpace.SAML2.Exceptions.SAMLProtocolException: The SAML recipient https://<FQDN>/PasswordVault/api/auth/saml/logon doesn't match the local service provider name or assertion consumer service URL.
or
Error #2
Failed to receive an SSO response from the identity provider || ComponentSpace.SAML2.Exceptions.SAMLProtocolException: The SAML response destination https://<FQDN>/PasswordVault/api/auth/saml/logon/ doesn't match the expected destination https://<FQDN/PasswordVault/api/auth/saml/logon.
Environment
14.4;14.6;15.0 Privileged Access Manager (PAM, self-hosted) Password Vault Web Access
PVWA 14.4 or above
Cause
There is a behavior change from PVWA 14.4 with new "AssertionConsumerServiceUrl" parameter in saml.config file.
Resolution
For error #1:
Update the saml.config (c:\inetpub\wwwroot\PasswordVault) and add "AssertionConsumerServiceUrl" parameter in the "ServiceProvider" section.
e.g.
<ServiceProvider Name="PasswordVault" Description="PasswordVault Service Provider" AssertionConsumerServiceUrl="~/api/auth/saml/logon" />
For error #2:
Update the saml.config (c:\inetpub\wwwroot\PasswordVault) and add "/" at the end of "AssertionConsumerServiceUrl" parameter value in the "ServiceProvider" section.
e.g.
<ServiceProvider Name="PasswordVault" Description="PasswordVault Service Provider" AssertionConsumerServiceUrl="~/api/auth/saml/logon/" />
Perform an iisreset on the PVWA server for the change to take effect.