4

I'm using sqoop-1.4.3-cdh4.6.0.jar and i'm wondering if the --password-file option is avialable in that version. If yes, can someone give me an example of how the encryption process would be invoked? provide a command example , i can see that the patch has been introduced with cdh4.6.0 but not sure if sqoop 1.4.3 can use it.

1 Answer 1

5

Chances are it's not in CDH 4.6.0 given https://issues.apache.org/jira/browse/SQOOP-1223. I'd upgrade to Sqoop 1.4.5 to get this functionality.

Here's a quick Sqoop command example:

sqoop import \
    -Dorg.apache.sqoop.credentials.loader.class=org.apache.sqoop.util.password.CryptoFileLoader \
    -Dorg.apache.sqoop.credentials.loader.crypto.passphrase=sqoop2 \
    --connect jdbc:mysql://example.com/sqoop \
    --username sqoop \
    --password-file file:///tmp/pass.enc \
    --table tbl

The important parameters to note are:

  1. org.apache.sqoop.credentials.loader.class - Credentials loader
  2. org.apache.sqoop.credentials.loader.crypto.alg – The Algorithm used to decrypt the file (default is AES/ECB/PKCS5Padding).
  3. org.apache.sqoop.credentials.loader.crypto.salt – The salt used to derive a key with the passphrase (default is SALT).
  4. org.apache.sqoop.credentials.loader.crypto.iterations – Number of PBKDF2 iterations (default is 10000).
  5. org.apache.sqoop.credentials.loader.crypto.salt.key.len – Derived key length (default is 128).
  6. org.apache.sqoop.credentials.loader.crypto.passphrase Passphrase used to derive key.

There are several other options available to you as well more.

1
  • 2
    How do you make the pass.enc?
    – Petro
    Mar 13, 2017 at 21:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.