Fórum

Liferay + SAML

thumbnail
Andrew Jardine, modificado 8 Anos atrás.

Liferay + SAML

Liferay Legend Postagens: 2416 Data de Entrada: 22/12/10 Postagens Recentes
Hey Guys,

Does anyone know if the SAML plugin also supports configurations for "non-root" context setups? I'm not having a lot of success with it and I am wondering if perhaps this is part of my problem.
thumbnail
Amos Fong, modificado 8 Anos atrás.

RE: Liferay + SAML

Liferay Legend Postagens: 2047 Data de Entrada: 07/10/08 Postagens Recentes
Are you affected by this issue?

https://issues.liferay.com/browse/LPS-44619
thumbnail
Andrew Jardine, modificado 8 Anos atrás.

RE: Liferay + SAML

Liferay Legend Postagens: 2416 Data de Entrada: 22/12/10 Postagens Recentes
Hi Amos,

It could be. I'm going to check it out and get back to you. The behaviour we are seeing is that when we go to --

http://localhost:8080/lrportal/c/portal/saml/metadata

... the page simply cylcles back to the page we were on (say in the control panel) rather than displaying the metadata to us.
thumbnail
Andrew Jardine, modificado 8 Anos atrás.

RE: Liferay + SAML

Liferay Legend Postagens: 2416 Data de Entrada: 22/12/10 Postagens Recentes
Hi Amos,

I'm not sure if that LPS is the issue I am having to be honest. My download of the SAML EE portlet is about a week old and it looks like the issue was fixed and closed a while ago. I can also confirm that I am not experiencing the issue when I use a non ROOT context on with the Tomcat bundle. However, when I use the SAML plugin with a non ROOT context (I am using /lrportal) with Websphere Application Server, then I can't seem to get the http://<host>/lrportal/c/portal/saml/metadata to work. Every time I try that URL I am simply cycled back to the same page I was just on. I tried a few other portal level struts actions (/lrportal/c/portal/logout and /lrportal/c/portal/login) and they work without issue.

Can you confirm that the non ROOT context fix for this portlet was done and working on WAS as well as Tomcat?

EDIT: I just noticed in the log this exception at startup -- Liferay 6.2 EE SP14


21:25:51,432 ERROR [server.startup : 2][HotDeployImpl:233] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering hook for saml-portletsaml-portlet
com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering hook for saml-portletsaml-portlet
	at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:46)
	at com.liferay.portal.deploy.hot.HookHotDeployListener.invokeDeploy(HookHotDeployListener.java:317)
	at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:230)
	at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:257)
	at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:96)
	at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:28)
	at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:164)
	at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:154)
	at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:44)
	at com.liferay.portal.kernel.util.PortalLifecycleUtil.flushInits(PortalLifecycleUtil.java:50)
	at com.liferay.portal.servlet.MainServlet.initPlugins(MainServlet.java:837)
	at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:372)
	at javax.servlet.GenericServlet.init(GenericServlet.java:161)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:338)
	at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:168)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.loadOnStartupCheck(ServletWrapper.java:1363)
	at com.ibm.ws.webcontainer.webapp.WebApp.doLoadOnStartupActions(WebApp.java:606)
	at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinally(WebApp.java:576)
	at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:425)
	at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
	at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)
	at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:749)
	at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634)
	at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:426)
	at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:718)
	at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1175)
	at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1370)
	at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
	at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:968)
	at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:774)
	at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2182)
	at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:445)
	at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
	at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:388)
	at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:116)
	at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:994)
	at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:502)
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862)
Caused by: java.lang.NullPointerException
	at com.liferay.portal.deploy.hot.HookHotDeployListener$ServletFiltersContainer.registerFilter(HookHotDeployListener.java:3788)
	at com.liferay.portal.deploy.hot.HookHotDeployListener.initServletFilters(HookHotDeployListener.java:2401)
	at com.liferay.portal.deploy.hot.HookHotDeployListener.doInvokeDeploy(HookHotDeployListener.java:784)
	at com.liferay.portal.deploy.hot.HookHotDeployListener.invokeDeploy(HookHotDeployListener.java:314)
	... 36 more
thumbnail
Andrew Jardine, modificado 8 Anos atrás.

RE: Liferay + SAML

Liferay Legend Postagens: 2416 Data de Entrada: 22/12/10 Postagens Recentes
The failed deploy of the hook is in fact the problem. Apparently this has to do with how Websphere initializes servlet filters. See this --

http://www-01.ibm.com/support/docview.wss?uid=swg1PM62909

The solution was to do the following.

1. Log into the IBM WAS Console
2. In the administrative console, click "Servers" and under Servers click "Server Types" and under Server Types click "WebSphere Application Servers"
3. Click on the server to which the custom property is to be applied
4. Under "Configuration" and "Container settings" click "Web Container Settings" and under Web Container Settings click "Web container"
5. Under "Configuration" and "Additional Properties" click "Custom Properties"
6. In the Custom Properties page, click "New"
7. Add the property com.ibm.ws.webcontainer.initFilterBeforeInitServlet with a value of true
8. Add a second property com.ibm.ws.webcontainer.invokeFilterInitAtStartup with a value of true
9. Restart the server.

.. at this point I am able to go to the /lrportal/c/portal/saml/metadata and get the expected results.
Alex Reznikov, modificado 7 Anos atrás.

RE: Liferay + SAML

New Member Postagens: 2 Data de Entrada: 17/02/14 Postagens Recentes
Hi Andrew
We are also having a very similar problem with multiple instances & SAML. We are using Tomcat rather than Websphere but still it's reassuring to know someone has managed to resolve it.
Cheers
Alex
thumbnail
Andrew Jardine, modificado 7 Anos atrás.

RE: Liferay + SAML

Liferay Legend Postagens: 2416 Data de Entrada: 22/12/10 Postagens Recentes
Hey Alex,

Are you getting the same error or something else? Can you share your stack trace with us?
Alex Rez, modificado 7 Anos atrás.

RE: Liferay + SAML

New Member Postagens: 2 Data de Entrada: 17/02/14 Postagens Recentes
Hi Andrew
We are getting a redirect as you used to but no errors in the console.
Here are the logs from when I'm trying to get the metadata from the SP - http://pastebin.com/raw/7VzMSAMX
Nothing looking suspicious to me...

Regards
Alex