public static Map<String, Object> createCredentialRequestProperties(String clusterName, Credential credential) {
    ImmutableMap.Builder<String, Object> properties = ImmutableMap.builder();

    properties.put(CredentialResourceProvider.CREDENTIAL_CLUSTER_NAME_PROPERTY_ID, clusterName);
    properties.put(CredentialResourceProvider.CREDENTIAL_ALIAS_PROPERTY_ID, credential.getAlias());
    properties.put(CredentialResourceProvider.CREDENTIAL_PRINCIPAL_PROPERTY_ID, credential.getPrincipal());
    properties.put(CredentialResourceProvider.CREDENTIAL_KEY_PROPERTY_ID, credential.getKey());
    properties.put(CredentialResourceProvider.CREDENTIAL_TYPE_PROPERTY_ID, credential.getType().name());

    return properties.build();
  }
@return {@code Optional} with the cluster's kerberos descriptor artifact if it exists, otherwise empty {@code Optional}
ambari-server/src/main/java/org/apache/ambari/server/topology/addservice/ResourceProviderAdapter.java