@Override
  public void removeCredential(String alias) throws AmbariException {
    if ((alias != null) && !alias.isEmpty()) {
      lock.lock();
      try {
        KeyStore ks = loadCredentialStore();
        if (ks != null) {
          try {
            ks.deleteEntry(alias);
            persistCredentialStore(ks);
          } catch (KeyStoreException e) {
            throw new AmbariException("Failed to delete the KeyStore entry - the key store may not have been initialized", e);
          }
        }
      } finally {
        lock.unlock();
      }
    }
  }
Removes the specified credential from this CredentialStore
<p/>
This implementation is thread-safe, allowing one thread at a time to access the credential store.

@param alias a string declaring the alias (or name) of the credential
@throws AmbariException if an error occurs while removing the new credential
ambari-server/src/main/java/org/apache/ambari/server/security/encryption/AbstractCredentialStore.java