Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Combining JASS & Custom Realms

 
Pramoda Bhat
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm working on a product, which is running on weblogic & I need to migrate it to JBOSS.
This has a built in security framework & has its own realms. But the Code is using JAAS for basic authorization & there after the Custom Realm take over.
In Weblogic, it uses the default realm myRealm for Authorization.
Can some one tell me what is the default realm in JBOSS(if any) and how to hand over to the Custom Realms?

Thanks
 
Marco Barenkamp
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JBoss has a default realm "other" that uses the files users.properties and roles.properties.
You have to create those files in the conf directory of your configuration.
# users.properties
user=password

#roles.properties
user=role1,role2

If you want to use an ldap server or db as security realm, you have to
edit the /conf/login-config.xml file accordingly.
 
Pramoda Bhat
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You...
But still my problem is not solved 100%, as I need to know, after basic authentication I need to pass the control to the custom Realms, How do I go about it?
 
Marco Barenkamp
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

the realm is called Securitydomain in JBoss. In the jboss-web.xml (WebApp) or jboss.xml (ejb), you include a security-policy that points to a
securityDomain and that domain is used by the basic auth. That Domain should be configured in login-config.xml and it points to the Datebase,ldapserver etc. that you want to use.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic