on 2022 Nov 15 2:50 PM
Hi All,
We are upgrading our application from commerce version 2011 to 2205. We have our custom sso extensions (for both storefront and backoffice) which we upgraded based upon latest OOTB samlsinglesignon extension. In local environment it is working fine and getting redirected to IDP but when we are deploying the same in cloud we are getting KeyStoreInitializationException during deployment and the deployment is getting failed without starting the services.
Below is the error we are getting during deployment:
"org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/samlsinglesignon]",<br>"threadId":23,"threadPriority":5,"message":"Exception sending context initialized event to listener instance of class [de.hybris.platform.spring.HybrisContextLoaderListener]"<br>,"contextMap":{"sourceClassName":"org.apache.catalina.core.StandardContext","sourceMethodName":"listenerStart"},<br>"thrown":{"localizedMessage":"Error creating bean with name 'org.springframework.security.filterChains':<br> Cannot resolve reference to bean 'org.springframework.security.web.DefaultSecurityFilterChain#3' while setting bean property 'sourceList' <br> with key [3]; nested exception is org.springframework.beans.factory.BeanCreationException: <br> Error creating bean with name 'org.springframework.security.web.DefaultSecurityFilterChain#3': <br> Cannot resolve reference to bean 'samlMetadataFilter' while setting constructor argument with key [0]; <br> nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name <br> 'samlMetadataFilter' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: <br> Cannot resolve reference to bean 'defaultRelyingPartyRegistrationResolverIdAware' while setting constructor argument; <br> nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultRelyingPartyRegistrationResolverIdAware'<br> defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean 'defaultRelyingPartyRegistrationResolver'<br> while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: <br> Error creating bean with name 'defaultRelyingPartyRegistrationResolver' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: <br> Cannot resolve reference to bean 'relyingPartyRegistrationRepository' while setting constructor argument; <br> nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'relyingPartyRegistrationRepository' <br> defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: Cannot resolve reference to bean <br> 'saml2SigningAndDecryptionCredentials' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: <br> Error creating bean with name 'saml2SigningAndDecryptionCredentials' defined in ServletContext resource [/WEB-INF/security/spring-security-config.xml]: <br> Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: <br> Failed to instantiate [org.springframework.security.saml2.core.Saml2X509Credential]: Factory method 'getSigningAndDecryptionSaml2Credentials' <br> threw exception; nested exception is de.hybris.platform.samlsinglesignon.exceptions.KeyStoreInitializationException: Cant obtain key entry"<br>
Are we missing any configuration? I would really appreciate if someone could provide some guidance.
Thanks & Regards
Request clarification before answering.
If it's working fine on your local, then there are mainly two major configurations needed on CCv2,
1. Your keystore (.JKS file) needs to be uploaded to cloud portal (under 'Security' -> 'Security Files') and should be associated with the appropriate environment.
2. In your 'manifest.json' file 'samlsinglesignon' extension should be listed under "webapps" section.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
After adding appropriate environment in "Connected Environments" field in Security files tab where I have uploaded my jks and metadata file. Issue is resolved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This issue is resolved. It was a SAML configuration issue in cloud. After correcting the configuration it was resolved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.