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

HDFS service components should indicate security state

    XMLWordPrintableJSON

    Details

      Description

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

      NAMENODE

      Indicators

      • Command JSON
        • config['configurations']['cluster-env']['security_enabled']
          • = “true”
      • Configuration File: params.hadoop_conf_dir + '/core-site.xml'
        • hadoop.security.authentication
          • = “kerberos”
          • required
        • hadoop.security.authorization
          • = “true”
          • required
        • hadoop.rpc.protection
          • = “authentication”
          • required
        • hadoop.security.auth_to_local
          • not empty
          • required
      • Configuration File: /params.hadoop_conf_dir + '/hdfs-site.xml'
        • dfs.namenode.keytab.file
          • not empty
          • path exists and is readable
          • required
        • dfs.namenode.kerberos.principal
          • not empty
          • required

      Pseudocode

      if indicators imply security is on and validate
          if kinit(namenode principal) && kinit(https principal) succeeds
              state = SECURED_KERBEROS
          else
              state = ERROR 
      else
          state = UNSECURED
      

      DATANODE

      Indicators

      • Command JSON
        • config['configurations']['cluster-env']['security_enabled']
          • = “true”
      • Configuration File: params.hadoop_conf_dir + '/core-site.xml'
        • hadoop.security.authentication
          • = “kerberos”
          • required
        • hadoop.security.authorization
          • = “true”
          • required
        • hadoop.rpc.protection
          • = “authentication”
          • required
        • hadoop.security.auth_to_local
          • not empty
          • required
      • Configuration File: params.hadoop_conf_dir + '/hdfs-site.xml'
        • dfs.datanode.keytab.file
          • not empty
          • path exists and is readable
          • required
        • dfs.datanode.kerberos.principal
          • not empty
          • required

      Pseudocode

      if indicators imply security is on and validate
          if kinit(datanode principal) && kinit(https principal) succeeds
              state = SECURED_KERBEROS
          else
              state = ERROR 
      else
          state = UNSECURED
      

      SECONDARY_NAMENODE

      Indicators

      • Command JSON
        • config['configurations']['cluster-env']['security_enabled']
          • = “true”
      • Configuration File: params.hadoop_conf_dir + '/core-site.xml'
        • hadoop.security.authentication
          • = “kerberos”
          • required
        • hadoop.security.authorization
          • = “true”
          • required
        • hadoop.rpc.protection
          • = “authentication”
          • required
        • hadoop.security.auth_to_local
          • not empty
          • required
      • Configuration File: params.hadoop_conf_dir + '/hdfs-site.xml'
        • dfs.secondary.namenode.keytab.file
          • not empty
          • path exists and is readable
          • required
        • dfs.secondary.namenode.kerberos.principal
          • not empty
          • required

      Pseudocode

      if indicators imply security is on and validate
          if kinit(namenode principal) && kinit(https principal) succeeds
              state = SECURED_KERBEROS
          else
              state = ERROR 
      else
          state = UNSECURED
      

      HDFS_CLIENT

      Indicators

      • Command JSON
        • config['configurations']['cluster-env']['security_enabled']
          • = “true”
      • Configuration File: params.hadoop_conf_dir + '/core-site.xml'
        • hadoop.security.authentication
          • = “kerberos”
          • required
        • hadoop.security.authorization
          • = “true”
          • required
        • hadoop.rpc.protection
          • = “authentication”
          • required
        • hadoop.security.auth_to_local
          • not empty
          • required
      • Env Params: hadoop-env
        • hdfs_user_keytab
          • not empty
          • path exists and is readable
          • required
        • hdfs_user_principal
          • not empty
          • required

      Pseudocode

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

      JOURNALNODE

      Indicators

      • Command JSON
        • config['configurations']['cluster-env']['security_enabled']
          • = “true”
      • Configuration File: params.hadoop_conf_dir + '/core-site.xml'
        • hadoop.security.authentication
          • = “kerberos”
          • required
        • hadoop.security.authorization
          • = “true”
          • required
        • hadoop.rpc.protection
          • = “authentication”
          • required
        • hadoop.security.auth_to_local
          • not empty
          • required
      • Configuration File: /params.hadoop_conf_dir + '/hdfs-site.xml'
        • dfs.journalnode.keytab.file
          • not empty
          • path exists and is readable
          • required
        • dfs.journalnode.kerberos.principal
          • not empty
          • required

            Pseudocode

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

      ZKFC

      Indicators

      • Command JSON
        • config['configurations']['cluster-env']['security_enabled']
          • = “true”
      • Configuration File: params.hadoop_conf_dir + '/core-site.xml'
        • hadoop.security.authentication
          • = “kerberos”
          • required
        • hadoop.security.authorization
          • = “true”
          • required
        • hadoop.rpc.protection
          • = “authentication”
          • required
        • hadoop.security.auth_to_local
          • not empty
          • required

      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-8477_01.patch
          37 kB
          Robert Levas
        2. AMBARI-8477_01.patch
          36 kB
          Robert Levas
        3. AMBARI-8477_01.patch
          36 kB
          Robert Levas
        4. AMBARI-8477_02.patch
          37 kB
          Robert Levas
        5. AMBARI-8477_03.patch
          40 kB
          Robert Levas
        6. AMBARI-8477_04.patch
          46 kB
          Robert Levas
        7. AMBARI-8477_04.patch
          46 kB
          Robert Levas
        8. AMBARI-8477_05_fix.patch
          1 kB
          Robert Levas
        9. AMBARI-8477_05.patch
          44 kB
          Robert Levas

          Issue Links

            Activity

              People

              • Assignee:
                rlevas Robert Levas
                Reporter:
                rlevas Robert Levas
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: