Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

servicelocator for EJB (with security constraints)

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello friends,

We have a EJB (ear) for which we have defined the security constriants in the DD. We use weblogic 10.x.

We have a servicelocator class which caches the EJBHome object to avoid JNDI lookups.

It works great if we dont have any security constraints in the DD.However, the moment we add the security constraint, it stops work with servicelocator.

Has anyone observed similar problems? Any pointers would be of great help.

~Rajesh.B
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So presumably your client is trying to call methods with method permissions the calling principal does not have? What is the error message you see?
 
rajesh bala
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It works fine for methods. Permissions are given.

Following scenario works

1. Do JDNI lookup
2. Get EJBHome
3. Get EJBObject
4. Invoke methods.

Problem with following.
1. Do JNDI lookup and cache EJBHome.
2. Get EJBObject from cached EJBHome (i.e, EJBHome.create())
3. Step 2 itself fails saying authentication failed or so.

Looks like its loosing the security principal details. But this problem does not arise when we do not have security constraints.
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What container are you using? What is the text of the exception message you see? I've seen similar behaviour with JBoss 4.2.2 whereby the principal is not propagated to the client.
 
rajesh bala
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We are using weblogic 10.x. I will capture the stacktrace and paste it as soon as possible.

~Rajesh.B
 
rajesh bala
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Were you able to solve that issue?. It would be great if you could throw some light on that.

~Rajesh.B
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by rajesh bala:
Were you able to solve that issue?. It would be great if you could throw some light on that.

~Rajesh.B



No - it looks like a bug in that build of JBoss (we are just waiting for their support staff to confirm). But if you are using weblogic its not that.
 
rajesh bala
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for the quick replies.

Is it a publicly available bug in JBoss?. If so, could you please point to the url?

~Rajesh.B
 
I hired a bunch of ninjas. The fridge is empty, but I can't find them to tell them the mission.
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic