• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Accessing groups in a session bean

 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
So I created my own little LoginModule, based on the DatabaseServerLoginModule supplied by JBoss. All works fine and the login succeeds and fails where expected.
In the loginmodule I add several groups of principals to the subject.
I have a group called Roles, and 3 other groups.
I only use the Roles group to make sure the user logs in. Our security system is based on Siebel, where they use Positions and Responsibilities, so I add these groups and fill them accordingly.
Now, in a bean I can access the context and ask for the CallerPrincipal, doing a getName() on that principal gives me the username. But how can I access the groups I created in the loginmodule? (I need those for some application specific security handling)
 
Author
Posts: 367
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You don't enumerate the groups, you ask if the person is in the group/role:
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic