Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-20992

Split the config "hive.metastore.dbaccess.ssl.properties" into more meaningful configs

    XMLWordPrintableJSON

Details

    Description

      HIVE-13044 brought in the ability to enable TLS encryption from the HMS Service to the HMSDB by configuring the following two properties:

      1. javax.jdo.option.ConnectionURL: JDBC connect string for a JDBC metastore. To use SSL to encrypt/authenticate the connection, provide database-specific SSL flag in the connection URL. (E.g. "jdbc:postgresql://myhost/db?ssl=true")
      2. hive.metastore.dbaccess.ssl.properties: Comma-separated SSL properties for metastore to access database when JDO connection URL. (E.g. javax.net.ssl.trustStore=/tmp/truststore,javax.net.ssl.trustStorePassword=pwd)

      However, the latter configuration option is opaque and poses some problems. The most glaring of which is it takes in any java.lang.System system property, whether it is TLS-related or not. This can cause some unintended side-effects for other components of the HMS, especially if it overrides an already-set system property. If the user truly wishes to add an unrelated Java property, setting it statically using the "-D" option of the java command is more appropriate. Secondly, the truststore password is stored in plain text. We should add Hadoop Shims back to the HMS to prevent exposing these passwords, but this effort can be done after this ticket.

      I propose we deprecate hive.metastore.dbaccess.ssl.properties, and add the following properties:

      • hive.metastore.dbaccess.ssl.use.SSL (metastore.dbaccess.ssl.use.SSL)
        • Set this to true to for using SSL/TLS encryption from the HMS Service to the HMS backend store
        • Default: false
      • hive.metastore.dbaccess.ssl.truststore.path (metastore.dbaccess.ssl.truststore.path)
        • Truststore location
        • Directly maps to javax.net.ssl.trustStore System property
        • Default: None
        • E.g. /tmp/truststore
      • hive.metastore.dbaccess.ssl.truststore.password (metastore.dbaccess.ssl.truststore.password)
        • Truststore password
        • Directly maps to javax.net.ssl.trustStorePassword System property
        • Default: None
        • E.g. password
      • hive.metastore.dbaccess.ssl.truststore.type (metastore.dbaccess.ssl.truststore.type)
        • Truststore type
        • Directly maps to javax.net.ssl.trustStoreType System property
        • Default: JKS
        • E.g. pkcs12

      We should guide the user towards an easier TLS configuration experience. This is the minimum configuration necessary to configure TLS to the HMSDB. If we need other options, such as the keystore location/password for dual-authentication, then we can add those on afterwards.

      Also, document these changes - javax.jdo.option.ConnectionURL does not have up-to-date documentation, and these new parameters will need documentation as well.

      Note "TLS" refers to both SSL and TLS. TLS is simply the successor of SSL.

      Attachments

        1. HIVE-20992.patch
          11 kB
          Morio Ramdenbourg
        2. HIVE-20992.2.patch
          13 kB
          Morio Ramdenbourg
        3. HIVE-20992.3.patch
          13 kB
          Morio Ramdenbourg
        4. HIVE-20992.4.patch
          14 kB
          Morio Ramdenbourg
        5. HIVE-20992.5.patch
          14 kB
          Morio Ramdenbourg
        6. HIVE-20992.6.patch
          15 kB
          Morio Ramdenbourg
        7. HIVE-20992.7.patch
          15 kB
          Morio Ramdenbourg

        Issue Links

          Activity

            People

              mramdenbourg Morio Ramdenbourg
              mramdenbourg Morio Ramdenbourg
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: