Foros de discusión

SAML2 SP null pointer buildEntityDescriptor

thumbnail
Jack Bakker, modificado hace 10 años.

SAML2 SP null pointer buildEntityDescriptor

Liferay Master Mensajes: 978 Fecha de incorporación: 3/01/10 Mensajes recientes
Hi,

I set up IdP on EE v6.1 as per http://www.liferay.com/web/armin.dahncke/blog/-/blogs/setting-up-liferay-portal-6-1-ee-as-an-idp

I can see metadata at /c/portal/saml/metadata

I am trying to set up SP on EE v6.1 (in Developer Studio) as per http://www.liferay.com/web/armin.dahncke/blog/-/blogs/setting-up-liferay-portal-6-1-ee-as-a-sp

However, when I hit: /c/portal/saml/metadata on the SP Liferay I get:

17:00:39,235 ERROR [ajp-bio-8009-exec-1][status_jsp:665] org.opensaml.saml2.metadata.provider.MetadataProviderException: java.lang.NullPointerException
org.opensaml.saml2.metadata.provider.MetadataProviderException: java.lang.NullPointerException
at com.liferay.saml.metadata.MetadataManagerImpl.getEntityDescriptor(MetadataManagerImpl.java:121)
at com.liferay.saml.metadata.MetadataManagerUtil.getEntityDescriptor(MetadataManagerUtil.java:48)
at com.liferay.saml.hook.action.MetadataAction.doExecute(MetadataAction.java:64)

...

Caused by: java.lang.NullPointerException
at com.liferay.saml.util.OpenSamlUtil.buildEntityDescriptor(OpenSamlUtil.java:246)
at com.liferay.saml.metadata.MetadataGeneratorUtil.buildSpEntityDescriptor(MetadataGeneratorUtil.java:128)
at com.liferay.saml.metadata.MetadataManagerImpl.getEntityDescriptor(MetadataManagerImpl.java:112)

---

As a related question, so I can step through source: what version of OpenSAML2 is the EE SAML2 plugin using ?
thumbnail
Jack Bakker, modificado hace 10 años.

RE: SAML2 SP null pointer buildEntityDescriptor

Liferay Master Mensajes: 978 Fecha de incorporación: 3/01/10 Mensajes recientes
Given I am EE customer, I will pick this up in LESA.
thumbnail
Mika Koivisto, modificado hace 10 años.

RE: SAML2 SP null pointer buildEntityDescriptor

Liferay Legend Mensajes: 1519 Fecha de incorporación: 7/08/06 Mensajes recientes
My immediate guess is that you don't have a private keys in the keystore with the same alias as the entityId.
thumbnail
Jack Bakker, modificado hace 10 años.

RE: SAML2 SP null pointer buildEntityDescriptor

Liferay Master Mensajes: 978 Fecha de incorporación: 3/01/10 Mensajes recientes
got a hot fix which solved it for now
Shankar Venkatasalam, modificado hace 10 años.

RE: SAML2 SP null pointer buildEntityDescriptor

New Member Mensajes: 4 Fecha de incorporación: 16/02/11 Mensajes recientes
I am also EE customer and i am also having the same issue.
Mika, i check the entity id is the same.
Jack can you let me know about the Hot fix you got.

Thanks
thumbnail
Jack Bakker, modificado hace 10 años.

RE: SAML2 SP null pointer buildEntityDescriptor

Liferay Master Mensajes: 978 Fecha de incorporación: 3/01/10 Mensajes recientes
Jack can you let me know about the Hot fix you got.

Shankar, best you submit a ticket in LESA to get EE support. For me the fix was for LDS to make my LDS the same as my EE prod deploy.
thumbnail
Kailash Yadav, modificado hace 10 años.

RE: SAML2 SP null pointer buildEntityDescriptor

Regular Member Mensajes: 211 Fecha de incorporación: 18/10/11 Mensajes recientes
@Shankar Venkatasalam, I faced same error yesterday with LR6.1 EE. After checked this forum, I fixed the problem. I used wrong entityId as mika said above, And now it is working fine without any hotfix. Please check again your configuration,
Salman Jan, modificado hace 9 años.

RE: SAML2 SP null pointer buildEntityDescriptor

New Member Mensajes: 4 Fecha de incorporación: 17/08/11 Mensajes recientes
I am seeing the same error, we have deployed Liferay SAML2.0 SSO Hook version SAML2.0ProviderEE6.1.GA2+.lpkg on our Liferay 6.1.2 EE server.

When starting Liferay we are seeing the following error:
Loading zip:/app/domains/portal/liferay61/servers/AdminServer/tmp/_WL_user/saml-portlet/keu8h8/war/WEB-INF/lib/_wl_cls_gen.jar!/service.properties
Loading zip:/app/domains/portal/liferay61/servers/AdminServer/tmp/_WL_user/saml-portlet/keu8h8/war/WEB-INF/lib/_wl_cls_gen.jar!/service.properties
04:57:02,456 ERROR [[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'][HotDeployImpl:191] com.liferay.portal.kernel.deploy.hot.H
otDeployException: Error registering servlet context listeners for saml-portlet
com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering servlet context listeners for saml-portlet
at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:46)
at com.liferay.portal.deploy.hot.ServletContextListenerHotDeployListener.invokeDeploy(ServletContextListenerHotDeployListener.java:37)
at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:188)
at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:216)
at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:96)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:27)
at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:151)
at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:141)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)


Moreover, when calling the metadata URL getting the following error:

05:13:08,124 ERROR [[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'][BaseSamlStrutsAction:45] org.opensaml.saml2.metadata.prov
ider.MetadataProviderException: java.lang.NullPointerException
org.opensaml.saml2.metadata.provider.MetadataProviderException: java.lang.NullPointerException
at com.liferay.saml.metadata.MetadataManagerImpl.getEntityDescriptor(MetadataManagerImpl.java:180)
at com.liferay.saml.metadata.MetadataManagerUtil.getEntityDescriptor(MetadataManagerUtil.java:52)
at com.liferay.saml.hook.action.MetadataAction.doExecute(MetadataAction.java:41)
at com.liferay.saml.hook.action.BaseSamlStrutsAction.execute(BaseSamlStrutsAction.java:42)
at com.liferay.portal.kernel.struts.BaseStrutsAction.execute(BaseStrutsAction.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:67)


The same error have been reported in this blog and the user is suggesting the Liferay provided a fix liferay-hotfix-1552-6120 .
http://www.liferay.com/web/mika.koivisto/blog/-/blogs/getting-started-with-liferay-saml-2-0-identity-provider

Liferay is being used as SAML idP. Here is the snippet of the config:

#
#SAML2.0 SSO Configuration
#
saml.enabled=true
saml.role=idp
saml.entity.id=samlidpdev
saml.require.ssl=false
saml.sign.metadata=true
saml.idp.authn.request.signature.required=true
#saml.metadata.paths=https://portaldev-liferay.sita.aero/c/portal/saml/metadata
saml.keystore.type=jks
saml.keystore.path=/app/doc_share/liferaySixDotOne/saml/idp/keystore.jks
saml.keystore.password=password
saml.keystore.credential.password[samlidpdev]=password


SAML2.0 SSO Version 1.0.2 which is good for 6.1 GA2+ EE

The entity ID matches the one on the keystore. Ayy ideas

Pls advise