aspose file tools*
The moose likes Websphere and the fly likes LDAP registry attributes from Container Managed Security Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "LDAP registry attributes from Container Managed Security " Watch "LDAP registry attributes from Container Managed Security " New topic
Author

LDAP registry attributes from Container Managed Security

Denise Smith
Ranch Hand

Joined: Jul 26, 2005
Posts: 36
We're using container managed security with AD. everything works great but now we'd like to use that same registry to obtain other registry attributes. We'd like to find away to use something on the server like a url provider that can be set up. We know we can write java code to make a new initial context like so:

env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.ldap.LdapCtxFactory");
// set security credentials, note using simple cleartext
// authentication
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, adminName);
env.put(Context.SECURITY_CREDENTIALS, adminPassword);
// connect to my domain controller
env.put(Context.PROVIDER_URL, url);
ctx = new InitialLdapContext(env, null);

But...we would either like to use a url provider that is set up on the server or access the directory that is already set up on the server for our authentication and authorization. Can someone help me to find out how to make a context from a url provider declared on the server ( i can do a jndi lookup to the provider but I don't know how to make the context from that) or tell me how to use what is already on the server to make a new context like the code above)


Surround yourself with learners...They will educate you!
 
Consider Paul's rocket mass heater.
 
subject: LDAP registry attributes from Container Managed Security