Robert Levas created AMBARI-22481:
-------------------------------------

             Summary: Make Ambari LDAP configuration API consistent with 
existing API
                 Key: AMBARI-22481
                 URL: https://issues.apache.org/jira/browse/AMBARI-22481
             Project: Ambari
          Issue Type: Task
          Components: ambari-server
    Affects Versions: 3.0.0
            Reporter: Robert Levas
            Assignee: Robert Levas
            Priority: Critical
             Fix For: 3.0.0


Make Ambari configuration API consistent with existing API. 

The current API entry point (as of AMBARI-21307) to set and test the LDAP 
configuration is {{/api/v1/ldapconfigs}}. This should be more inline with the 
existing entry point for Ambari server related data...  
{{/api/v1/services/AMBARI/components/AMBARI_SERVER}}.  

The new API entry point for Ambari server related configuration data should be 
{{/api/v1/services/AMBARI/components/AMBARI_SERVER/configurations}}.  For the 
LDAP-specific configuration, the configuration category is 
*_"ldap-configuration"_*.  

See AMBARI-22418 for examples on setting and getting this configuration.

For testing the configuration, the following directives should be used:

* {{op=test-connection}}
* {{op=test-attributes}}
* {{op=detect-attributes}}

For example:
*Test the connection for a new set of data*
{noformat:title=URL}
POST 
/api/v1/services/AMBARI/components/AMBARI_SERVER/configurations?op=test-connection
{noformat}
{code:title=Payload}
{
  "Configuration": {    
    "category" : "ldap-configuration",
    "properties": {
        "ambari.ldap.connectivity.server.host": "ldap.forumsys.com",
        "ambari.ldap.connectivity.server.port": "389",
        "ambari.ldap.connectivity.anonymous_bind": "true",
        "ambari.ldap.attributes.user.search_base": "dc=example,dc=com",
        "ambari.ldap.attributes.user.object_class": "person",
        "ambari.ldap.attributes.user.name_attr": "uid",
        "ambari.ldap.attributes.group.object_class": "groupOfUniqueNames",
        "ambari.ldap.attributes.group.name_attr": "cn",
        "ambari.ldap.attributes.group.member_attr": "uniqueMember",
        "ambari.ldap.attributes.group.search_base": "dc=example,dc=com"
      }
  }
}
{code}

*Test the connection for an updated set of data*
{noformat:title=URL}
PUT 
/api/v1/services/AMBARI/components/AMBARI_SERVER/configurations/ldap-configuration?op=test-connection
{noformat}
{code:title=Payload}
{
  "Configuration": {    
    "category" : "ldap-configuration",
    "properties": {
        "ambari.ldap.connectivity.server.host": "new.ldap.host.com"
      }
  }
}
{code}





--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to