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

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.6.0
    • 2.7.0
    • None
    • None

    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

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

            Dates

              Created:
              Updated:
              Resolved: