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

how to define principal realm

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anybody give me a one sentence definition of a principal realm?
 
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Kshitij Ktambe:
Can anybody give me a one sentence definition of a principal realm?



A principal realm is some vendor-specific 'mechanism' by which you tell the container how to assign Principals to users or groups. For instance, you can have the container validating users against a database or a LDAP server. Let's take JBoss, for instance: it comes with, amongst the others, a security realm by which you can have your Application server authenticating logged in users against a database, and then assigning users to groups and roles. This is necessary for the EJB Container because, in case security has been set (or used) for an EJB, the Container needs to know the 'principal' who invoked a certain method.

Sorry if this is not a 'one sentence' answer, but I needed more than one sentence to explain myself.
 
Kshitij Ktambe
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Marco I really appreciate your help. But I am totally lost. So, let us remove the ONE SENTENCE restrication. Can you PLEASE elaborate
1. PRINCIPAL
2. REALM
3. PRINCIPAL REALM
one by one.

There are no dumb questions
 
alzamabar
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Kshitij Ktambe:
Thanks Marco I really appreciate your help. But I am totally lost. So, let us remove the ONE SENTENCE restrication. Can you PLEASE elaborate
1. PRINCIPAL
2. REALM
3. PRINCIPAL REALM
one by one.

There are no dumb questions



1. Principal This is a java object type part of the security package. Let's say that this is a wrapper around a user. When users log in, a Principal object is assigned to them. A bean class can, for instance, invoke the Principal.getName() method to modify bean's security behaviours at an instance level (programmatically), rather than at a class level (declaratively). This will be the only practical use the bean developer will do from within a bean class. The container than will check the principal (and all the method permissions associated with it by the application assembler in the <assembly-descriptor> section of the deployment descriptor) to grant method access to a client;

2) A realm is the way someone tells the container where to go and validate a user and how to wrap a Principal around a user. Most of the time this is provided by the application servers (or web containers like Tomcat, for instance), but the open source ones let you write your own realm, should you like.

3) Is obvious. Is the combination of the two
 
Kshitij Ktambe
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Marco. Appreciate your help.
 
reply
    Bookmark Topic Watch Topic
  • New Topic