You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Hadoop QA (JIRA)" <ji...@apache.org> on 2017/11/27 20:41:00 UTC

[jira] [Commented] (AMBARI-22481) Make Ambari LDAP configuration API consistent with existing API

    [ https://issues.apache.org/jira/browse/AMBARI-22481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16267464#comment-16267464 ] 

Hadoop QA commented on AMBARI-22481:
------------------------------------

{color:green}+1 overall{color}.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12899468/AMBARI-22481_trunk_01.patch
  against trunk revision .

    {color:green}+1 @author{color}.  The patch does not contain any @author tags.

    {color:green}+1 tests included{color}.  The patch appears to include 6 new or modified test files.

    {color:green}+1 release audit{color}.  The applied patch does not increase the total number of release audit warnings.

    {color:green}+1 javac{color}.  The applied patch does not increase the total number of javac compiler warnings.

    {color:green}+1 core tests{color}.  The patch passed unit tests in ambari-server.

Console output: https://builds.apache.org/job/Ambari-trunk-test-patch/12743//console

This message is automatically generated.

> 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
>
>         Attachments: AMBARI-22481_trunk_01.patch
>
>
> 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 configuration 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}
> {code:title=Success Response}
> Status 201: Created
> {
>   "operationResults" : {
>     "test-connection" : {
>       "status" : "success"
>     }
>   }
> }
> {code}
> {code:title=Error Response}
> Status 201: Created
> {
>   "operationResults" : {
>     "test-connection" : {
>       "status" : "error",
>       "message" : "An unexpected error has occurred."
>     }
>   }
> }
> {code}
> *Test the connection for an updated set of configuration 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}
> {code:title=Success Response}
> Status 200: OK
> {
>   "operationResults" : {
>     "test-connection" : {
>       "status" : "success"
>     }
>   }
> }
> {code}
> {code:title=Error Response}
> Status 200: OK
> {
>   "operationResults" : {
>     "test-connection" : {
>       "status" : "error",
>       "message" : "An unexpected error has occurred."
>     }
>   }
> }
> {code}
> *Test the attributes of a user for a new set of configuration data*
> {noformat:title=URL}
> POST /api/v1/services/AMBARI/components/AMBARI_SERVER/configurations?op=test-attributes
> {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"
>       }
>   },
>  "RequestInfo":{
>   	"parameters":{
>   		"ambari.ldap.test.user.name": "euclid"
>   	}
>   }
> }
> {code}
> {code:title=Success Response}
> Status 201: Created
> {
>   "operationResults" : {
>     "test-attributes" : {
>       "status" : "success",
>       "response" : {
>         "groups" : [
>           "Mathematicians"
>         ]
>       }
>     }
>   }
> }
> {code}
> {code:title=Error Response}
> Status 201: Created
> {
>   "operationResults" : {
>     "test-attributes" : {
>       "status" : "error",
>       "message" : "An unexpected error has occurred."
>     }
>   }
> }
> {code}
> *Test the attributes of a user for an updated set of configuration data*
> {noformat:title=URL}
> PUT /api/v1/services/AMBARI/components/AMBARI_SERVER/configurations/ldap-configuration?op=test-attributes
> {noformat}
> {code:title=Payload}
> {
>   "Configuration": {    
>     "category" : "ldap-configuration",
>     "properties": {
>         "ambari.ldap.attributes.group.member_attr": "uniqueMember"
>       }
>   },
>  "RequestInfo":{
>   	"parameters":{
>   		"ambari.ldap.test.user.name": "euclid"
>   	}
>   }
> }
> {code}
> {code:title=Success Response}
> Status 200: OK
> {
>   "operationResults" : {
>     "test-attributes" : {
>       "status" : "success",
>       "response" : {
>         "groups" : [
>           "Mathematicians"
>         ]
>       }
>     }
>   }
> }
> {code}
> {code:title=Error Response}
> Status 200: OK
> {
>   "operationResults" : {
>     "test-attributes" : {
>       "status" : "error",
>       "message" : "An unexpected error has occurred."
>     }
>   }
> }
> {code}
> *Detect the attributes for a user and a group for a new set of configuration data*
> {noformat:title=URL}
> POST /api/v1/services/AMBARI/components/AMBARI_SERVER/configurations?op=detect-attributes
> {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.group.search_base": "dc=example,dc=com"
>       }
>   }
> }
> {code}
> {code:title=Success Response}
> Status 201: Created
> {
>   "operationResults" : {
>     "detect-attributes" : {
>       "status" : "success",
>       "response" : {
>         "attributes" : {
>           "ambari.ldap.attributes.group.name_attr" : "cn",
>           "ambari.ldap.attributes.user.object_class" : "person",
>           "ambari.ldap.attributes.group.member_attr" : "memberUid",
>           "ambari.ldap.attributes.user.group_member_attr" : "N/A",
>           "ambari.ldap.attributes.user.search_base" : "dc=example,dc=com",
>           "ambari.ldap.attributes.group.object_class" : "posixGroup",
>           "ambari.ldap.attributes.group.search_base" : "dc=example,dc=com",
>           "ambari.ldap.connectivity.server.host" : "ldap.forumsys.com",
>           "ambari.ldap.connectivity.anonymous_bind" : "true",
>           "ambari.ldap.connectivity.server.port" : "389",
>           "ambari.ldap.attributes.user.name_attr" : "sAMAccountName"
>         }
>       }
>     }
>   }
> }
> {code}
> {code:title=Error Response}
> Status 201: Created
> {
>   "operationResults" : {
>     "detect-attributes" : {
>       "status" : "error",
>       "message" : "An unexpected error has occurred."
>     }
>   }
> }
> {code}
> *Detect the attributes for a user and a group for an updated set of configuration data*
> {noformat:title=URL}
> PUT /api/v1/services/AMBARI/components/AMBARI_SERVER/configurations/ldap-configuration?op=test-attributes
> {noformat}
> {code:title=Payload}
> {
>   "Configuration": {    
>     "category" : "ldap-configuration",
>     "properties": {
>       "ambari.ldap.connectivity.anonymous_bind": "false",
>       "ambari.ldap.connectivity.bind_dn": "cn=read-only-admin,dc=example,dc=com",
>       "ambari.ldap.connectivity.bind_password": "password"
>     }
>   }
> }
> {code}
> {code:title=Success Response}
> Status 200: OK
> {
>   "operationResults" : {
>     "detect-attributes" : {
>       "status" : "success",
>       "response" : {
>         "attributes" : {
>           "ambari.ldap.connectivity.bind_password" : "password",
>           "ambari.ldap.attributes.group.name_attr" : "cn",
>           "ambari.ldap.attributes.user.object_class" : "person",
>           "ambari.ldap.attributes.group.member_attr" : "memberUid",
>           "ambari.ldap.attributes.user.group_member_attr" : "N/A",
>           "ambari.ldap.attributes.user.search_base" : "dc=example,dc=com",
>           "ambari.ldap.connectivity.bind_dn" : "cn=read-only-admin,dc=example,dc=com",
>           "ambari.ldap.attributes.group.object_class" : "posixGroup",
>           "ambari.ldap.attributes.group.search_base" : "dc=example,dc=com",
>           "ambari.ldap.connectivity.server.host" : "ldap.forumsys.com",
>           "ambari.ldap.connectivity.anonymous_bind" : "false",
>           "ambari.ldap.connectivity.server.port" : "389",
>           "ambari.ldap.attributes.user.name_attr" : "sAMAccountName"
>         }
>       }
>     }
>   }
> }
> {code}
> {code:title=Error Response}
> Status 200: OK
> {
>   "operationResults" : {
>     "detect-attributes" : {
>       "status" : "error",
>       "message" : "An unexpected error has occurred."
>     }
>   }
> }
> {code}



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