wso2 / samples-is

Apache License 2.0
78 stars 230 forks source link

SAML2 artifact binding not working with SSO samples #221

Open chamathns opened 4 years ago

chamathns commented 4 years ago

Enabling artifact binding in SAML2 throws the following exception.


**Exception**

javax.servlet.ServletException: Filter execution threw an exception

**Root Cause**

java.lang.NoClassDefFoundError: javax/xml/soap/SOAPException
    org.wso2.carbon.identity.sso.agent.saml.SAML2SSOManager.processArtifactResponse(SAML2SSOManager.java:380)
    org.wso2.carbon.identity.sso.agent.SAML2SSOAgentFilter.doFilter(SAML2SSOAgentFilter.java:107)

**Root Cause**

java.lang.ClassNotFoundException: javax.xml.soap.SOAPException
    org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1358)
    org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1180)
    org.wso2.carbon.identity.sso.agent.saml.SAML2SSOManager.processArtifactResponse(SAML2SSOManager.java:380)
    org.wso2.carbon.identity.sso.agent.SAML2SSOAgentFilter.doFilter(SAML2SSOAgentFilter.java:107)
ImalshaG commented 1 year ago

Our sample app (saml2-web-app-pickup-dispatch) does not support SAML artifact binding with JDK11.

A workaround to test this flow is to run the tomcat in java 8 and comment out the following 2 lines and patch it to the product-IS. https://github.com/wso2/carbon-identity-framework/blob/bad7a9321fc518188ffbeab22247a1307902f0e5/components/identity-core/org.wso2.carbon.identity.core/src/main/java/org/wso2/carbon/identity/core/util/IdentityUtil.java#L647-L648

Tested in IS 7.0.0-m4-SNAPSHOT pack.