Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-8775 Create Kerberos Descriptor Resource to be accessed via the REST API
  3. AMBARI-9142

Create new API endpoints for cluster and service kerberos descriptors

    XMLWordPrintableJSON

Details

    Description

      Expose cluster and service kerberos descriptors via the REST API.

      Introduce new artifact endpoints as sub-resources for the cluster and service endpoints.
      Kerberos descriptors will be created and obtained via the new artifact endpoints.
      The api has no notion of a kerberos descriptor, instead the descriptor is simply an artifact and the descriptor contents are provided via the 'artifact_data' field.

      To get a cluster kerberos descriptor which was created for the cluster 'c1' with the name 'kerberos_descriptor':

      GET http://AMBARI_SERVER:8080/api/v1/clusters/c1/artifacts/kerberos_descriptor
      
      {
        "href" : "http://172.18.192.1:8080/api/v1/clusters/c1/artifacts/kerberos_descriptor",
        "Artifacts" : {
          "artifact_name" : "kerberos_descriptor",
          "cluster_name" : "c1"
        },
        "artifact_data" : {
          "identities" : [
             ...
          ],
          "services" : [
            ...
          ],
          "properties" : {
            ...
          }
        }
      }
      

      To get a service kerberos descriptor which was created for the cluster 'c1' and service 's1' with the name 'kerberos_descriptor';:

      GET http://AMBARI_SERVER:8080/api/v1/clusters/c1/services/s1/artifacts/kerberos_descriptor
      
      {
        "href" : "http://172.18.192.1:8080/api/v1/clusters/c1/services/s1/artifacts/kerberos_descriptor",
        "Artifacts" : {
          "artifact_name" : "kerberos_descriptor",
          "cluster_name" : "c1",
          "service_name" : "s1"
        },
        "artifact_data" : {
          ...
        }
      }
      

      To create a cluster kerberos descriptor for cluster 'c1' with the name 'kerberos_descriptor':

      POST http://AMBARI_SERVER:8080/api/v1/clusters/c1/artifacts/kerberos_descriptor
      
      {
        "artifact_data" : {
          ... // artifact contents 
        }  
      }
      

      Attachments

        Issue Links

          Activity

            People

              jspeidel John Speidel
              jspeidel John Speidel
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: