HDFS透明加密

HDFS透明加密

配置集群key.provider.uri

dfs.encryption.key.provider.uri
#The KeyProvider to use when interacting with encryption keys used when reading and writing to an encryption zone.
#当往加密空间读写时需要使用它来做交互。

配置加密算法和编解码

hadoop.security.crypto.codec.classes.EXAMPLECIPHERSUITE
#The prefix for a given crypto codec, contains a comma-separated list of implementation classes for a given crypto codec (eg EXAMPLECIPHERSUITE). The first implementation will be used if available, others are fallbacks.

hadoop.security.crypto.codec.classes.aes.ctr.nopadding
Default: org.apache.hadoop.crypto.OpensslAesCtrCryptoCodec,org.apache.hadoop.crypto.JceAesCtrCryptoCodec

#Comma-separated list of crypto codec implementations for AES/CTR/NoPadding. The first implementation will be used if available, others are fallbacks.

hadoop.security.crypto.cipher.suite
Default: AES/CTR/NoPadding

#Cipher suite for crypto codec.

hadoop.security.crypto.jce.provider
Default: None

#The JCE provider name used in CryptoCodec.

hadoop.security.crypto.buffer.size
Default: 8192

#The buffer size used by CryptoInputStream and CryptoOutputStream.

配置Namenode

dfs.namenode.list.encryption.zones.num.responses
Default: 100

#When listing encryption zones, the maximum number of zones that will be returned in a batch. Fetching the list incrementally in batches improves namenode performance.

官网使用案例

#查询已经创建的加密空间
hdfs crypto -listZones

# As the normal user, create a new encryption key
hadoop key create mykey

# As the super user, create a new empty directory and make it an encryption zone
hadoop fs -mkdir /zone
hdfs crypto -createZone -keyName mykey -path /zone

# chown it to the normal user
hadoop fs -chown myuser:myuser /zone

# As the normal user, put a file in, read it out
hadoop fs -put helloWorld /zone
hadoop fs -cat /zone/helloWorld
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值