使用密码文件选项的 sqoop 和密码加密 [英] sqoop and password encryption using password-file option

查看:56
本文介绍了使用密码文件选项的 sqoop 和密码加密的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 sqoop-1.4.3-cdh4.6.0.jar,我想知道 --password-file 选项在那个版本中是否可用.如果是的话,有人能给我一个如何调用加密过程的例子吗?提供一个命令示例,可以看到cdh4.6.0已经引入了补丁,但不确定sqoop 1.4.3是否可以使用.

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.

推荐答案

鉴于 https://issues.apache.org/jira/browse/SQOOP-1223.我会升级到 Sqoop 1.4.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.

这是一个快速的 Sqoop 命令示例:

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 - 凭据加载器
  2. org.apache.sqoop.credentials.loader.crypto.alg – 用于解密文件的算法(默认为 AES/ECB/PKCS5Padding).
  3. org.apache.sqoop.credentials.loader.crypto.salt – 用于使用密码派生密钥的盐(默认为 SALT).
  4. org.apache.sqoop.credentials.loader.crypto.iterations – PBKDF2 迭代次数(默认为 10000).
  5. org.apache.sqoop.credentials.loader.crypto.salt.key.len – 派生密钥长度(默认为 128).
  6. org.apache.sqoop.credentials.loader.crypto.passphrase 用于派生密钥的密码.

您还可以使用其他几个选项更多.

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

这篇关于使用密码文件选项的 sqoop 和密码加密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆