English 中文(简体)
Jboss5, unauthenticated calls to secured EJB via @RunAs
原标题:

I m attempting to call methods on a secured EJB from an unauthenticated source (a Message Driven Bean hooked up to a queue). The MDB has an EJB injected into it via @EJB, which is fine, but the target EJB has @SecurityDomain("stuff") and @RequireRole("user"), and on execution generates huge stack traces around:

17:14:03,275 ERROR [STDERR] java.lang.NullPointerException
17:14:03,276 ERROR [STDERR]  at org.jboss.ejb3.security.helpers.EJBContextHelper.getCallerPrincipal(EJBContextHelper.java:99)
17:14:03,276 ERROR [STDERR]  at org.jboss.ejb3.EJBContextImpl.getCallerPrincipal(EJBContextImpl.java:136)

I have tried to fix this by providing the role through an interim EJB annotated with @SecurityDomain("stuff") @RunAs("sysuser"), this interim bean has the original target EJB injected into it. My understanding is that the target EJB would have methods invoked from the interim bean under the Role of "sysuser". Yet, I still get the same stack traces, resulting in a database rollback of the create.

Is the Path MDB -> SecureEJB possible in some variation other without these stack traces? Is the proxy approach on the right path for success or is there something I need to add in to the mix?

Cheers, Andy

问题回答




相关问题
Signed executables under Linux

For security reasons, it is desirable to check the integrity of code before execution, avoiding tampered software by an attacker. So, my question is How to sign executable code and run only trusted ...

MALICIOUS_CODE EI_EXPOSE_REP Medium

I run findbugs against all of my code and only tackle the top stuff. I finally got the top stuff resolved and now am looking at the details. I have a simple entity, say a user: public class User ...

XSS on jsbin.com

Anyone know if jsbin.com implements any protection for XSS or other javascript attacks? I see jsbin links used fairly regularly on sites like this one and I can t find any indication from the site ...

Make md5 strong

Im making a website that will intergrate with game that only support md5 hashing metod (atm). Which ofc is not especially safe anymore. But how could i make it stronger? Should I just generate long ...

Why running a service as Local System is bad on windows?

I am trying to find out the difference between difference service account types. I tumbled upon this question. The answer was because it has powerful access to local resources, and Network Service ...

Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

热门标签