Ranger KMS Encryption
Range KMS is used to encrypt the HDFS (data at rest). This is very
important for your cluster and customer to encrypt your data. It gives more
security to your data.
Ranger
provides centralized administration of the key management server through the
Ranger admin portal.
There
are 3 main functions provided by Ranger KMS.
1.
Key
Management: It provided you facility to create/update/delete keys using UI
interface. Using keyadmin username and password.
2. Access Control
Policies: through this you can manage the permission of your keys.
3.
Audit:
this helps you to track the activities on your Ranger KMS.
Ranger
KMS with hdfs encryption is recommended to use in all env. To secure the key
storage using database.
KMS
is also scalable and you can use multiple versions of KMS behind the load
balancer.
This blog page
depicts the Process of Creating the Encryption Zone.
Process:
Step 1: Create
the directory structure on your hdfs which you want to encrypt.
Note: you cannot encrypt
the existing hdfs path which already consisting data.
[techzone@node01
~]$ hdfs dfs –mkdir <hdfs path>
Step 2: Assign 000 Permission on directory
[techzone@node01
~]$ hdfs dfs –chmod 000 <hdfs path>
Step 3: Create the KMS key. Login to the ranger
using kmsadmin as user.
Step 4: Select Encryption →
Key manager → Select Service → service
name → Add New key
Step 5: Enter the Key name of the directory using (-)
as separator ,Length: set the key length 256 and Save the
Step 6: Once the key is created,
verify if the key is listed in dashboard.
Step 7: Select Access Manger → service name → Add New Policy
1. Policy Creation Details2. Policy name: name
of the directory.3.
Key name: name of
the created KMS Key4.
Select group:
select the appropriate group to provide access5. Permission: provide the
Decrypt EEK and Encrypt EEK Permission
Provide the
delegate admin access to privileged user group.
Step 8: Logout from keyadmin user and
Login with you EID to create the ranger policy for hdfs directory. Under
the HDFS select the file → Add New Policy
Policy Creation
Info
1. Policy Name: name of the
directory-Encryption-Zone
2. source Path:
path of the directory
3. select Group:
Provide the group name to access the path
4. Permission: select All
(Execute,Read,Write)
Save the Policy.
Step 9: Login to the Command line.
Destroy the currect user creds and kinit with user
Step 10: Use the below command to
create the encryption zone.
[techzone@node-01
~]$ hdfs crypto -createZone -keyName <keynameyoucreated> -path
<pathonwhichEncryptiontoapply>
Step 11: After creating the key successfully
you will receive the output as key created. Verify the newly created key using
below command.
[techzone@node01
~]$ hdfs crypto –listZones (it will list the all created keys)
Please let me know if comment section
if you face any issue while performing above steps. I will try my best to help
you.
Thank you !!!
Thank you !!
Example HTML page
Pleaes provide your valuable feedback.
Comments
Post a Comment