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

Hive service components should indicate security state

    XMLWordPrintableJSON

Details

    Description

      The Hive service components should indicate security state when queried by Ambari Agent via STATUS_COMMAND. Each component should determine it's state as follows:

      HIVE_METASTORE

      Indicators

      • Command JSON
        • config['configurations']['cluster-env']['security_enabled']
          • = “true”
      • Configuration File: params.hive_client_conf_dir + ‘hive-site.xml’
        • hive.metastore.sasl.enabled"
          • = "true"
          • required
        • hive.server2.authentication
          • = “kerberos”
          • required
        • hive.security.authorization.enabled
          • = “true”
          • required
        • hive.metastore.kerberos.principal
          • not empty
          • required
        • hive.metastore.kerberos.keytab.file
          • not empty
          • path exists and is readable
          • required

      Pseudocode

      if indicators imply security is on and validate
          if kinit(have metastore principal) succeeds
              state = SECURED_KERBEROS
          else
              state = ERROR 
      else
          state = UNSECURED
      

      HIVE_SERVER

      Indicators

      • Command JSON
        • config['configurations']['cluster-env']['security_enabled']
          • = “true”
      • Configuration File: params.hive_client_conf_dir + ‘hive-site.xml’
        • hive.metastore.sasl.enabled"
          • = "true"
          • required
        • hive.server2.authentication
          • = “kerberos”
          • required
        • hive.security.authorization.enabled
          • = “true”
          • required
        • hive.server2.authentication.kerberos.principal
          • not empty
          • required
        • hive.server2.authentication.kerberos.keytab
          • not empty
          • path exists and is readable
          • required
        • hive.server2.authentication.spnego.principal
          • not empty
          • required
        • hive.server2.authentication.spnego.keytab
          • not empty
          • path exists and is readable
          • required

      Pseudocode

      if indicators imply security is on and validate
          if kinit(hive server principal) succeeds
              state = SECURED_KERBEROS
          else
              state = ERROR 
      else
          state = UNSECURED
      

      WEBHCAT_SERVER

      Indicators

      • Command JSON
        • config['configurations']['cluster-env']['security_enabled']
          • = “true”
      • Configuration File: params.hive_client_conf_dir + ‘hive-site.xml’
        • hive.metastore.sasl.enabled"
          • = "true"
          • required
        • hive.server2.authentication
          • = “kerberos”
          • required
        • hive.security.authorization.enabled
          • = “true”
          • required
      • Configuration File: params.config_dir + ‘webhcat-site.xml’
        • templeton.kerberos.secret
          • = “secret”
          • required
        • templeton.kerberos.principal
          • not empty
          • required
        • templeton.kerberos.keytab
          • not empty
          • path exists and is readable
          • required

      Pseudocode

      if indicators imply security is on and validate
          if kinit(webhcat server principal) succeeds
              state = SECURED_KERBEROS
          else
              state = ERROR 
      else
          state = UNSECURED
      

      HIVE_CLIENT

      Indicators

      • Command JSON
        • config['configurations']['cluster-env']['security_enabled']
          • = “true”

      Pseudocode

      if indicators imply security is on and validate
          state = SECURED_KERBEROS
      else
          state = UNSECURED
      

      Note: Due to the cost of calling kinit results should be cached for a period of time before retrying. This may be an issue depending on the frequency of the heartbeat timeout.
      Note: kinit calls should specify a temporary cache file which should be destroyed after command is executed - BUG-29477

      Attachments

        1. AMBARI-8485_02.patch
          38 kB
          Robert Levas
        2. AMBARI-8485_01.patch
          33 kB
          Robert Levas

        Issue Links

          Activity

            People

              rlevas Robert Levas
              rlevas Robert Levas
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: