Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-11481

ClassCastException while using a key created by keytool to create encryption zone.

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.0
    • Fix Version/s: 2.7.0
    • Component/s: None
    • Labels:
      None
    • Target Version/s:

      Description

      I'm using transparent encryption. If I create a key for KMS keystore via keytool and use the key to create an encryption zone. I get a ClassCastException rather than an exception with decent error message. I know we should use 'hadoop key create' to create a key. It's better to provide an decent error message to remind user to use the right way to create a KMS key.

      [LOG]
      ERROR[user=hdfs] Method:'GET' Exception:'java.lang.ClassCastException: javax.crypto.spec.SecretKeySpec cannot be cast to org.apache.hadoop.crypto.key.JavaKeyStoreProvider$KeyMetadata'

        Attachments

        1. HDFS-7067.001.patch
          4 kB
          Charles Lamb
        2. HDFS-7067.002.patch
          4 kB
          Charles Lamb
        3. hdfs7067.keystore
          6 kB
          Charles Lamb

          Activity

            People

            • Assignee:
              clamb Charles Lamb
              Reporter:
              yiyao Yi Yao
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: