• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what is realm-name of login-config in DD

 
yamini nadella
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
realm-name is used for basic authentication. but what is this realm-name?
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
realm-name is just some name you've assigned to a real of credentials you set up in your ejb container. It's done in a server-specific way, so be sure to check out your server's documentation on how to do it.
 
V Sharma
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
realm-name : depends the scenario we are talking about.If no ejbs are involved

Checkout the below web.xml and things will be clear :

<security-constraint>
<web-resource-collection>
<web-resource-name>TEST</web-resource-name>
<url-pattern>/servlet/HelloWorld</url-pattern>
<http-method>POST</http-method>
<description>Some Test Realm</description>
</web-resource-collection>
<auth-constraint>
<description>Test</description>
<role-name>*</role-name>
</auth-constraint>
<display-name>Test</display-name>
</security-constraint>

<login-config>
<auth-method>FORM</auth-method>
<REALM-NAME>TEST</REALM-NAME>
</login-config>
<security-role>
<role-name>junk</role-name>
</security-role>
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry -- I forgot which forum I was in. Replace "ejb" with "web".
 
Leena Diwan
Ranch Hand
Posts: 351
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nathaniel, realm-name is used with BASIC authentication, aint it?

Regards,
Leena
 
Leena Diwan
Ranch Hand
Posts: 351
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found this. I hope the following information would be helpful:

Security Realms
A security realm is a mechanism used for protecting Web application resources. It gives you the ability to protect a resource with a defined security constraint and then define the user roles that can access the protected resource. Tomcat has this type of realm functionality built in. The component that provides this functionality is the org.apache.catalina.Realm interface. It provides a mechanism by which a collection of usernames, passwords, and their associated roles can be integrated into Tomcat. If you download the Tomcat source, you will find this interface in the following location:

<tomcat_home>/src/catalina/src/share/org/apache/catalina/Realm.java

Regards,
Leena
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic