File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Get handle of UserRegistry or JAAS entries in WAS

 
Thomas Olausson
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there way to get a hold of the UserRegistry in WAS?

I'm using LDAP, and want to create page where logged in people
can change their [ldap] passwords.
I also have custom attributes for user entries that I need to read out.

I can connect myself to LDAP, but then I have duplicated the connection information to the LDAP server in two places.

To my knowledge, there's no easy way to configure a LDAP "connection" just like a jdbc datasource or JMS connection.

If that doesn't work, can I get a handle to JAAS entries in WAS?
I'd like to house the configuration of how to connect to the LDAP server in WAS, maybe through a URL provider, but that doesn't solve the authentication problem

Regards,
/Tom
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's no good way to do it. Just keep on maintaining the connection information in two places.

Kyle
 
Thomas Olausson
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can live with that. But how can I easily make my code transparent to the environment?
We have dev, qa, prod environments and normally apps don't need to worry about the environment (and doesn't even know), because WAS is already config'd for it.

Is there a formal way of getting rid of doing
if(TEST)
connect to ldap-test
else if(QA)
connect to ldap-qa
else if(PROD)
connect to ldap-prod
?

I can move this to properties, but still need code that knows the environment, and the properties couldn't be managed through the WAS console.

Can this be done with a resource environment provider? Haven't found any documentation on what that is though, I'm just suspecting.

Regards,
/Thomas
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic