[Design of JBoss Portal] - JACC issues with the portal
by Wyoming
Hello
We use JBoss (4.0.5.GA) with JACC Authorisation.
When I tried to use the portal (2.6-DR) with JACC I found out some strange behaviour!
The first issue is:
I deployed my own portlet web application called "testportlet.war".
If I call "Request.isUserInRole()" in my portlet and debug down into "DelegatingPolicy.implies()" then i see that the JACC contextID is not "testportlet.war" what I expected. Instead the contextID is:
- "portal-server.war" when I have called the portlet directly in the portal
- "portal-wsrp.war" when I have called the portlet via WSRP
This doesn't make sense because like this the roles used for security checking have to be defined in one or even two of the portal's web.xml files.
If I fix the value of the contextID in the debugger then this leads me to the next problem:
The permissions loaded to the contextID "testportlet.war" do all have a servlet name "" (empty string). But the comparing permission that is created in "JaccAuthorizationRealm.hasRole()" has another servlet name:
- "PortalServletWithPathMapping" calling the portlet directly in the portal
- "MarkupService" when I have called the portlet via WSRP
If I change the servlet name to "" in the debugger then it runs perfectly in both calling cases.
So on my opinion these are bugs or does anyone have an idea how to change the behaviour by changing the configuration.
regards
Marcel
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031671#4031671
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031671
17 years, 3 months
[Design of JBoss internal QA (Test Suite)] - JBoss 4.2.0 - jboss.examples:service=HASingletonMBeanExample
by ldimaggi@redhat.com
I'm trying to debug this failure in the 4.2.0 testsuite:
Suite: org.jboss.test.cluster.test.HASingletonElectionPolicyTestCase(Default-UDP)
Test: testElectionPolicy
Type: error
Exception: javax.management.InstanceNotFoundException
Message: jboss.examples:service=HASingletonMBeanExample_1 is not registered.
In the server.log, I'm seeing this:
----------------------------------
10:03:57,801 INFO [ServiceConfigurator] Problem configuring service jboss.examples:service=HASingletonMBeanExample-HASingletonController_1
org.jboss.deployment.DeploymentException: No Attribute found with name: HASingletonElectionPolicyMBean
----------------------------------
This is why the tests are failing. The thing that I'm stuck with is that the HASingletonElectionPolicyMBean class in question is present in jbossha.jar:
----------------------------------
[root@dhcp83-138 META-INF]# jar -tvf /var/lib/jbossas/server/cluster-UDP-0/lib/jbossha.jar | grep HASingletonElectionPolicyMBean
257 Mon Mar 19 19:01:36 EDT 2007 org/jboss/ha/singleton/HASingletonElectionPolicyMBean.class
----------------------------------
But - I guess that there is an attribute with the same name (HASingletonElectionPolicyMBean) defined where? Can anyone suggest how to debug this this?
Thanks,
Len DiMaggio
ldimaggi(a)redhat.com
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031608#4031608
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031608
17 years, 3 months
[Design of AOP on JBoss (Aspects/JBoss)] - Re: MethodInvocation.getArguments return value for 0 argumen
by flavia.rainone@jboss.com
I also think that it would be fine if we apply no arguments null to b/a/t/f.
If we don't apply the same policy, it would make a difference. Look at this:
| public void before(@Args Object arguments)
| {
| ...
| }
|
| public Object around(Invocation invocation) throws Throwable
| {
| ...
| }
|
Suppose both advices are applied to a POJO->method() execution joinpoint:
| public class POJO
| {
| public void method()
| {
| ...
| }
| }
|
If we apply different policies to before and around, i.e.:
- keep null @Args only for FieldRead (current policy), which means "before" advice would receive a non-null array in the example above
- Invocation needs to contain a null array because the arguments length is 0
We would need to change JoinPointGenerator because it currently copies arguments array used on before advice to the invocation that will be passed as parameter to "around" advice, and this would break the null args invocation policy.
This is just an example. But it illustrates how interaction between b/a/t/f and around makes a difference when there are no arguments, if we use different null policies.
Nonetheless, I can also implement different policies on both, if that is the case.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031593#4031593
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031593
17 years, 3 months