Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-3767

improve error message when using ConfigEncryptionTool and unlimited strenght jce is not present

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.2.0
    • None
    • None
    • None

    Description

      If the user has not setup unlimited strength jce and uses the ConfigEncryptionTool they get the following error.

      2017/04/27 21:43:15 ERROR [main] org.apache.nifi.properties.ConfigEncryptionTool: Encountered an error
      java.security.InvalidKeyException: Illegal key size
      	at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1039)
      	at javax.crypto.Cipher.init(Cipher.java:1393)
      	at javax.crypto.Cipher.init(Cipher.java:1327)
      	at javax.crypto.Cipher$init$1.call(Unknown Source)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:141)
      	at org.apache.nifi.properties.ConfigEncryptionTool.generateFlowEncryptionCipher(ConfigEncryptionTool.groovy:680)
      	at org.apache.nifi.properties.ConfigEncryptionTool.migrateFlowXmlContent(ConfigEncryptionTool.groovy:630)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210)
      	at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:71)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      	at org.apache.nifi.properties.ConfigEncryptionTool.main(ConfigEncryptionTool.groovy:1184)
      Illegal key size
      

      If the error can be improved to point the user in the direction of unlimited strength jce that would be great.

      Attachments

        Activity

          People

            Unassigned Unassigned
            arpitgupta Arpit Gupta
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: