Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-19681

Credential Store should add hadoop credential provider path property to all affected configuration types

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.5.0
    • 2.5.0
    • ambari-agent
    • None

    Description

      CustomServiceOrchestrator.py function generateJceks adds the property 'hadoop.security.credential.provider.path' only to the last configuration type that requires it. The function iterates over the configtype_credentials dictionary, and at each iteration it updates the variable named config (line 272):

      config = commandJson['configurations'][config_type]
      

      After the iteration is over, and the provider_paths variable is set the function adds the provider paths to the dictionary with the key 'hadoop.security.credential.provider.path' (line 292)

      config[self.CREDENTIAL_PROVIDER_PROPERTY_NAME] = ','.join(provider_paths)
      

      The problem is that at this point the variable config contains the latest config type that needs this property to be set up, while all of them should have it! So if both config_type_1, and config_type_2 have passwords properties present in configtype_credentials, only config_type_2 will have the dictionary entry set for the key 'hadoop.security.credential.provider.path', and it will contain a reference to both of their jceks files!

      Another issue is that there is no reason to collect the provider paths to an array, each config_type should have a reference only to it's own provider.

      Attachments

        1. rb55853.patch
          4 kB
          Nahappan Somasundaram

        Issue Links

          Activity

            People

              smnaha Nahappan Somasundaram
              smnaha Nahappan Somasundaram
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: