0

In my application i need to connect to LDAP server. I am able to connect to the server by hard-coding the password, but i don't want to hard-code the credentials. Please help me in this.

I tried googling, but wasn't able to find how to connect without hard-coding my credentials.

NREZ
  • 942
  • 9
  • 13

2 Answers2

1

Possible help to you: Connecting LDAP server from java application

You can update your applications' preferences dynamically, I suppose.

Community
  • 1
  • 1
xvar
  • 103
  • 1
  • 1
  • 7
  • In this example they have read the crediantials from property file. Is there any way in java, so that i can read it dynamically from the WAS authentication i use? – user1929839 Jul 22 '13 at 12:01
  • That's a pity, but I know nothing about WAS authentification, so maybe I'm saying obvious things. If you can get some kind of a string with your authentification parameters, you can parse it by regex creating HashMap for example. After that you can get your pass: myHashMap.get("password"); – xvar Jul 22 '13 at 14:14
  • @xvar You can't get your password from Windows, or any other sanely designed security system either. – user207421 Jul 22 '13 at 22:14
0

I suppose you can use kerberos infrastructure using GSS-API in Java, since we do this a lot with shell scripts and so.

Aif
  • 11,015
  • 1
  • 30
  • 44