掲示板

SAML2 SP null pointer buildEntityDescriptor

thumbnail
10年前 に Jack Bakker によって更新されました。

SAML2 SP null pointer buildEntityDescriptor

Liferay Master 投稿: 978 参加年月日: 10/01/03 最新の投稿
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
10年前 に Jack Bakker によって更新されました。

RE: SAML2 SP null pointer buildEntityDescriptor

Liferay Master 投稿: 978 参加年月日: 10/01/03 最新の投稿
Given I am EE customer, I will pick this up in LESA.
thumbnail
10年前 に Mika Koivisto によって更新されました。

RE: SAML2 SP null pointer buildEntityDescriptor

Liferay Legend 投稿: 1519 参加年月日: 06/08/07 最新の投稿
My immediate guess is that you don't have a private keys in the keystore with the same alias as the entityId.
thumbnail
10年前 に Jack Bakker によって更新されました。

RE: SAML2 SP null pointer buildEntityDescriptor

Liferay Master 投稿: 978 参加年月日: 10/01/03 最新の投稿
got a hot fix which solved it for now
10年前 に Shankar Venkatasalam によって更新されました。

RE: SAML2 SP null pointer buildEntityDescriptor

New Member 投稿: 4 参加年月日: 11/02/16 最新の投稿
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
10年前 に Jack Bakker によって更新されました。

RE: SAML2 SP null pointer buildEntityDescriptor

Liferay Master 投稿: 978 参加年月日: 10/01/03 最新の投稿
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
10年前 に Kailash Yadav によって更新されました。

RE: SAML2 SP null pointer buildEntityDescriptor

Regular Member 投稿: 211 参加年月日: 11/10/18 最新の投稿
@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,
9年前 に Salman Jan によって更新されました。

RE: SAML2 SP null pointer buildEntityDescriptor

New Member 投稿: 4 参加年月日: 11/08/17 最新の投稿
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