Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-6477

allow loading of keyfile from classpath

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.11.1, 2.12.0
    • camel-ftp
    • None
    • Unknown

    Description

      Currently the SFTP component only allows key files to be loaded from the OS path. It would be much better of the key file were loaded in from the classpath intead.

      Please the forum conversation for more information:
      http://camel.465427.n5.nabble.com/camel-sftp-privateKeyFile-load-from-classpath-tt5734394.html#a5734526

      Attachments

        Activity

          selliott Shaun Elliott created issue -
          siano Stephan Siano made changes -
          Field Original Value New Value
          Attachment 0001-provide-ssh-key-material-as-byte-array-to-SFTP-clien.patch [ 12589371 ]
          siano Stephan Siano added a comment -

          I have attached a patch to the camel-ftp component that has the following functionality:
          1. add a test for the existing (file based) client key authentication
          2. add new configuration parameters knownHostsUri and privateKeyUri that allow to give URIs as parameters (including classpath URIs which is the default) plus implementation and test
          3. add new configuration parameters knownHosts and privateKey that allow to pass references to byte[] (in the OpenSSH format as the files) containing the private key and known hosts material
          4. add a new configuration parameter privateKeyPassphrase, which does the same as the existing privateKeyFilePassphrase (which we should probably deprecate, because it does not only apply to files but to the other privateKey entities, too).

          siano Stephan Siano added a comment - I have attached a patch to the camel-ftp component that has the following functionality: 1. add a test for the existing (file based) client key authentication 2. add new configuration parameters knownHostsUri and privateKeyUri that allow to give URIs as parameters (including classpath URIs which is the default) plus implementation and test 3. add new configuration parameters knownHosts and privateKey that allow to pass references to byte[] (in the OpenSSH format as the files) containing the private key and known hosts material 4. add a new configuration parameter privateKeyPassphrase, which does the same as the existing privateKeyFilePassphrase (which we should probably deprecate, because it does not only apply to files but to the other privateKey entities, too).
          davsclaus Claus Ibsen made changes -
          Assignee Claus Ibsen [ davsclaus ]
          davsclaus Claus Ibsen added a comment -

          Thanks for the patch.

          I have added some notes to the docs as well.

          davsclaus Claus Ibsen added a comment - Thanks for the patch. I have added some notes to the docs as well.
          davsclaus Claus Ibsen made changes -
          Fix Version/s 2.11.1 [ 12323967 ]
          Fix Version/s 2.12.0 [ 12323968 ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          selliott Shaun Elliott added a comment -

          Thanks for the patch and your work to improve this

          selliott Shaun Elliott added a comment - Thanks for the patch and your work to improve this

          People

            davsclaus Claus Ibsen
            selliott Shaun Elliott
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: