private String getCredential() throws IOException {
      String credential = null;
      CredentialProvider.CredentialEntry credEntry = provider.getCredentialEntry(alias);

      if (credEntry != null) {
        char[] password = credEntry.getCredential();
        if (password != null) {
          credential = String.valueOf(password);
        }
      }

      return credential;
    }
Gets the clear text password from the credential provider.

@return - Decrypted password for the specified alias.
@throws IOException
ambari-server/src/main/java/org/apache/ambari/server/credentialapi/CredentialUtil.java