Win a copy of Practice Tests for OCP Java 17 Certification Exam (1Z0-829) this week in the OCPJP forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Get handle of UserRegistry or JAAS entries in WAS

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic