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

KMS key names are incorrectly encoded when creating key

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.0
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: None
    • Labels:
      None
    • Target Version/s:

      Description

      Creating a key that contains special character(s) in its name will result in failure when creating, while that key is in fact created ok on the underlying key provider.

      E.g.

      $hadoop key create "key name"
      key name has not been created. java.io.IOException: HTTP status [500], exception [java.net.URISyntaxException], message [Illegal character in path at index 11: /v1/key/key name] 
      java.io.IOException: HTTP status [500], exception [java.net.URISyntaxException], message [Illegal character in path at index 11: /v1/key/key name] 
      	at org.apache.hadoop.util.HttpExceptionUtils.validateResponse(HttpExceptionUtils.java:159)
      	at org.apache.hadoop.crypto.key.kms.KMSClientProvider.call(KMSClientProvider.java:548)
      	at org.apache.hadoop.crypto.key.kms.KMSClientProvider.call(KMSClientProvider.java:506)
      	at org.apache.hadoop.crypto.key.kms.KMSClientProvider.createKeyInternal(KMSClientProvider.java:672)
      	at org.apache.hadoop.crypto.key.kms.KMSClientProvider.createKey(KMSClientProvider.java:680)
      	at org.apache.hadoop.crypto.key.KeyShell$CreateCommand.execute(KeyShell.java:483)
      	at org.apache.hadoop.crypto.key.KeyShell.run(KeyShell.java:79)
      	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
      	at org.apache.hadoop.crypto.key.KeyShell.main(KeyShell.java:515)
      
      

      but

      $ hadoop key list
      Listing keys for KeyProvider: KMSClientProvider[https://hostname:16000/kms/v1/]
      key name
      

        Attachments

        1. HADOOP-12962.02.patch
          5 kB
          Xiao Chen
        2. HADOOP-12962.01.patch
          5 kB
          Xiao Chen

          Activity

            People

            • Assignee:
              xiaochen Xiao Chen
              Reporter:
              xiaochen Xiao Chen
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: