• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question: "realm-name" Element in DD

 
Salvador Cecilio
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the purpose of the <realm-name> element in the Deployment Descriptor?

Also I'm having trouble figuring out what a "realm" is.
 
Gaurav Gambhir
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Answer 1

<realm-name>
The name of the realm that is referenced to authenticate the user credentials


Answer 2

Authentication :-
is a process of identifying a person and validating their credentials.

In order to perform this we use Realm

Realm is a place where authentication information is stored.In tomcat the �tomcat-users.xml� file is called memory realm, as tomcat reads this file into memory at startup time.
The tomcat-users.xml file
<tomcat-users>
<role rolename=�Guest�/>
<role rolename=�Member�/>
<user name=�Bill� password=�coder� roles=�Member,Guest� />
</tomcat-users>

map the roles in the vendor specific �users� file to roles established in DD.

<security-role>
<role-name>Admin</role-name>
<role-name>Member</role-name>
<role-name>Guest</role-name>
</security-role>
 
joko mujoko
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

<security-role>
<role-name>Admin</role-name>
<role-name>Member</role-name>
<role-name>Guest</role-name>
</security-role>



according to errata
I Think we just can have <role-name> in <security-role>

Joko
 
joko mujoko
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
soory
I mean just one <role-name>

joko
 
Dilshan Edirisuriya
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeah
I think you can have only one <role-name> in <secutity-role>
 
Gaurav Gambhir
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes Joko and Dilshan you are right I just reffered the HFSJ , that mentions we can have more than one role name in one <security-role> element on Page 643, but now I checked the specifications that says
<!ELEMENT security-role (description?, role-name)>


Thanks Guys
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic