[JBoss Portal] - Re: Portal Authentication with Acegi
by Antoine_h
Thanks a lot !
I have just started looking at Acegi.
That was my first question...
for using in portlets.
what could be is : try to inject the principal coming from acegi into the portlet.
For this : find where this is done in the portal management of portlets (which service or interceptor is doing this).
May be look at the jmx service for the locale interceptor :
name="portal:service=Interceptor,type=Server,name=Locale"
the way it works is similar, and if I remember, there is a security service in the same stack of interceptors.
that should be the place.
but still, it would be only the principal, so you won't get all the features from acegi...
so direct access of Acegi SecurtityContextHolder, from within the portlet code, should be better.
for what I have seen in Acegi doc (very well done), you access the Acegi authentication context through a singleton class (SecurtityContextHolder), that is ThreadLocal.
As SecurtityContextHolder is a ThreadLocal singleton, I guess there is something more to do, to have the same singleton for all the portlets. The one that was built during the authentification process (not a new one from the portlet instance thread).
so the thing would be to have this SecurtityContextHolder stored in the session, or in a jmx service that give it for each active session...
Thing to look at : what classloader/thread is making the instance of SecurtityContextHolder ?... and see how to get it from there, for any portlet.
hope it helps...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4028755#4028755
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4028755
19Â years, 1Â month
[JBoss Portal] - Re: JBoss AS startup, portlet does not get initialized
by frankr
Did not touch the deployment order (would not even know how to change that ;-))
It's a Seam / MyFaces application. In the web.xml the initialization for Seam and MyFaces is done. Nothing special in the portlet.xml and portlet-instances.xml.
The application does have a dependency on some EJB components so I defined the following in jboss-web.xml:
<jboss-web>
| <context-root>myapp</context-root>
| <depends>
| jboss.j2ee:service=EARDeployment,url='myapp-ear-1.0-SNAPSHOT.ear'
| </depends>
| </jboss-web>
I have created a custom login portlet. For that reason my jboss-portlet.xml looks like this:
<portlet-app>
| <portlet>
| <portlet-name>MyAppPortlet</portlet-name>
| </portlet>
|
| <portlet>
| <portlet-name>AdditionalNavigationPortlet</portlet-name>
| <transaction>
| <trans-attribute>Required</trans-attribute>
| </transaction>
| </portlet>
|
| <portlet>
| <portlet-name>UserHeaderPortlet</portlet-name>
| <transaction>
| <trans-attribute>Required</trans-attribute>
| </transaction>
| </portlet>
|
| <service>
| <service-name>UserModule</service-name>
| <service-class>
| org.jboss.portal.identity.UserModule
| </service-class>
| <service-ref>:service=Module,type=User</service-ref>
| </service>
| <service>
| <service-name>PortalObjectContainer</service-name>
| <service-class>
| org.jboss.portal.core.model.portal.PortalObjectContainer
| </service-class>
| <service-ref>:container=PortalObject</service-ref>
| </service>
| <service>
| <service-name>InstanceContainer</service-name>
| <service-class>
| org.jboss.portal.core.model.instance.InstanceContainer
| </service-class>
| <service-ref>:container=Instance</service-ref>
| </service>
| <service>
| <service-name>PortalAuthorizationManagerFactory</service-name>
| <service-class>
| org.jboss.portal.security.spi.auth.PortalAuthorizationManagerFactory
| </service-class>
| <service-ref>
| :service=PortalAuthorizationManagerFactory
| </service-ref>
| </service>
| </portlet-app>
That's about all I can think of. Any clues?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4028750#4028750
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4028750
19Â years, 1Â month
[JBoss jBPM] - Re: Setting up JBoss database for deployment
by Hattifnat
Thanks a lot - now I understand how it should work and what is happening here. But the current state is such:
I started the JBoss server, so I presume I have the Hypersonic database running (my web browser jmx console shows it as StateString: Running).
I should link the hypersonic.cfg.xml to this database.
I can see that DatabasePath of the HypersonicDB is "/usr/local/jbpm-starters-kit-3.1.4/jbpm-server/server/jbpm/data/hypersonic/localDB". I should point the cfg file to this path.
I open the default src/main/config/hibernate.cfg.xml file from the project which contains such entries:
<property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
| <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
| <property name="hibernate.connection.url">jdbc:hsqldb:mem:.;sql.enforce_strict_size=true</property>
| <property name="hibernate.connection.username">sa</property>
| <property name="hibernate.connection.password"></property>
|
| <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
|
As much as I understand the crucial is the entry
<property name="hibernate.connection.url">jdbc:hsqldb:mem:.;sql.enforce_strict_size=true</property>
|
So try to put there "jdbc:hsqldb:/usr/local/jbpm-starters-kit-3.1.4/jbpm-server/server/jbpm/data/hypersonic/localDB"
but this doesn't work...
I'm sure I still don't quite understand how this database should be linked. Could someone explain it to me? Am I going the right way at all? Thanks for any help :)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4028749#4028749
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4028749
19Â years, 1Â month