Spring SAML configuration is breaking other http connections -


i using spring saml implement single sign on in application. evreything integrated , works sso perspective. service of application uses http client post via axis started failing following error

{http://xml.apache.org/axis/}stacktrace:javax.net.ssl.sslpeerunverifiedexception: ssl peer failed hostname validation name: null

i have looked answer provided link spring security saml + https page , follow same no avail.

below configuration tlsprotocolsocketfactory

    <bean class="org.springframework.beans.factory.config.methodinvokingfactorybean">     <property name="targetclass" value="org.apache.commons.httpclient.protocol.protocol"/>     <property name="targetmethod" value="registerprotocol"/>     <property name="arguments">         <list>             <value>https</value>             <bean class="org.apache.commons.httpclient.protocol.protocol">                 <constructor-arg value="https"/>                 <constructor-arg>                     <bean class="org.springframework.security.saml.trust.httpclient.tlsprotocolsocketfactory">                         <constructor-arg ref="keymanager"/>                         <constructor-arg><null/></constructor-arg>                         <constructor-arg value="allowall"/>                     </bean>                 </constructor-arg>                 <constructor-arg value="443"/>             </bean>         </list>     </property> </bean> 

i have imported cert of other service in samlkeystore.jks well.

any in issue apreciated

i think may you're looking for: source

you using bean tlsprotocolconfigurer changes trusted certificates , hostname verification of https protocol in http client. can revert behaviour of http client defaults removing bean. need make sure certificates used entities load metadata (https://idp.ssocircle.com/idp-meta.xml) trusted in cacerts, or use endpoints without https (http://idp.ssocircle.com/idp-meta.xml).

alternatively, can disable hostname verification setting property sslhostnameverification allowall on bean tlsprotocolconfigurer. need make sure https certificate of https://www.somepage.com (or ca) included in samlkeystore.jks (see spring saml manual).

you can find more details on tlsprotocolconfigurer bean in spring saml manual, chapter http-based metadata provider ssl.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -