From 2c171ca8fafc1d688b9b965d1255a81aba6aa7ee Mon Sep 17 00:00:00 2001 From: Ade Lee Date: Thu, 16 Apr 2015 22:26:03 -0400 Subject: Add nuxwdog functionality to Dogtag This is the first of several commits. This adds a LifecycleListener to call init() on the nuxwdog client before any connectors or webapps start up, and call sendEndInit() once initialization completes. Code is also added to prompt for and test required passwords on startup. All that is required to use nuxwdog is to start the server using nuxwdog. An environment variable will be set that will trigger creation of the NuxwdogPasswordStore. We expect tags for the required passwords to be in cms.passwordList --- .../cmscore/src/com/netscape/cmscore/ldapconn/LdapAuthInfo.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'base/server/cmscore/src/com/netscape/cmscore/ldapconn') diff --git a/base/server/cmscore/src/com/netscape/cmscore/ldapconn/LdapAuthInfo.java b/base/server/cmscore/src/com/netscape/cmscore/ldapconn/LdapAuthInfo.java index eb3fde26c..4fd09a711 100644 --- a/base/server/cmscore/src/com/netscape/cmscore/ldapconn/LdapAuthInfo.java +++ b/base/server/cmscore/src/com/netscape/cmscore/ldapconn/LdapAuthInfo.java @@ -62,7 +62,7 @@ public class LdapAuthInfo implements ILdapAuthInfo { init(config, host, port, secure); } - public String getPasswordFromStore(String prompt) { + public String getPasswordFromStore(String prompt) throws EBaseException { String pwd = null; CMS.debug("LdapAuthInfo: getPasswordFromStore: try to get it from password store"); @@ -82,7 +82,7 @@ public class LdapAuthInfo implements ILdapAuthInfo { // Finally, interactively obtain the password from the user if (pwdStore != null) { CMS.debug("LdapAuthInfo: getPasswordFromStore: password store available"); - pwd = pwdStore.getPassword(prompt); + pwd = pwdStore.getPassword(prompt, 0); // pwd = pstore.getString(prompt); if (pwd == null) { CMS.debug("LdapAuthInfo: getPasswordFromStore: password for " + prompt + @@ -90,7 +90,7 @@ public class LdapAuthInfo implements ILdapAuthInfo { // pwd = pstore.getString("internaldb"); - pwd = pwdStore.getPassword("internaldb"); // last resort + pwd = pwdStore.getPassword("internaldb", 0); // last resort } else CMS.debug("LdapAuthInfo: getPasswordFromStore: password found for prompt in password store"); } else -- cgit