Skip to main content
Level 2
March 6, 2018
Resuelto

How to handle empty SAML attribute in the SAML handler?

  • March 6, 2018
  • 3 respuestas
  • 3497 visualizaciones

I have a requirement to fetch some SAML response attributes. For that I have configured those attributes in the Synchronized Attributes field in the AEM SAML 2.0 Authentiacation Handler. But for some users one of my synchronized attribute will be empty. The admin team reports that this is throwing error. Is there any way to handle empty SAML attribute values.

Este tema ha sido cerrado para respuestas.
Mejor respuesta de MC_Stuff

To prevent saving conditionally the right way is extending SAMLAuthenticationHandler.  Other options are implement authentication post processor or listener to remove the property after it is saved.

3 respuestas

MC_Stuff
Level 10
March 6, 2018

Hi Adarsh,

Configure on the IDP not to pass empty attribute Or some default value if it is empty.  Otherwise need an custom development effort to extend SAMLAuuthenticationhandler to plugin your additional validation.

Thanks,

Level 2
March 6, 2018

Thanks @MC Stuff. I was actually thinking about not to use any filters or extend SAMLAuthenticationHandler but to get the data using Userproperties API. Is there any other configuration that can be done in AEM side to prevent the attribute from saving in the jcr.

MC_Stuff
MC_StuffRespuesta
Level 10
March 6, 2018

To prevent saving conditionally the right way is extending SAMLAuthenticationHandler.  Other options are implement authentication post processor or listener to remove the property after it is saved.