Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

LDAP registry attributes from Container Managed Security

 
Denise Smith
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic