Reputation: 11
I want confirm whether the file that I upload to encryption zone has been really encrypted.
The encryption zone's path is /A,encrypted file's name is B,so I runhdfs dfs -cat /A/B
,the result is unencrypted.
But when I runhdfs dfs -cat /.reserved/raw/A/B
,the result is encrypted.
What is "/.reserved/raw"?If I don't add “/.reserved/raw”,I can view the clear text.What's the significance of transparent encryption?
Upvotes: 1
Views: 644
Reputation: 1
Hdfs transparent encryption is an end to end solution which takes care of data encryption for both
- data at rest : File is stored in encrypted fashion on the disk.
- data in transit : Content of file is exchanged in encrypted fashion amongst
datanodes.
When you want to view the file content by doing a 'cat', its the hdfs client who reads encrypted content, decrypts and gives the clear text back to you. If you do 'hdfs dfs -cat /A/B', then the client gets KMS details from namenode, gets the encryption key from KMS for the encryption zone and the file, decrypts the file and then returns it back to the user.
But if you do 'hdfs dfs -cat /.reserved/raw/A/B', then the client does not attempt to decrypt the file and gives raw encrypted content.
Upvotes: 0
Reputation: 452
Hi you could use this cat command with hadoop.
$hadoop fs -cat -Z /hdfs/path/of/encrypted/file/location
NOTE:
Dumps the contents of encrypted files in encrypted format. Access keys to the encrypted file are not required to do cat -Z on the file.
Upvotes: 0