RANGER-5435: Change the default KMS ZoneKey length from 128 to 256#902
Open
vikaskr22 wants to merge 1 commit intoapache:masterfrom
Open
RANGER-5435: Change the default KMS ZoneKey length from 128 to 256#902vikaskr22 wants to merge 1 commit intoapache:masterfrom
vikaskr22 wants to merge 1 commit intoapache:masterfrom
Conversation
spolavarpau1
approved these changes
Mar 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
For KMS ZoneKey, this PR makes the key length to be 256 by default.
It still respects the user provided keyLength, like 128, 192 . But if user doesn't provide any input, it will default to 256. On KeyAdmin create key UI, 256 will be rendered as default keyLength.
Also, 0 is a valid keyLength. It means, user wants to use the Encryption algorithm's default keySize. And this depends on the underlying SecurityProvider.
Note: If user creates key using
hadoop key createcli command, then by default it gets the keyLength from their core-site.xml file and it is 128 there. Also 128 is defined as the default value there. So in this case, Ranger receives request with keyLength as 128 and it will create the key of 128 length only.To avoid this, users can update the following prop in Hadoop's
core-site.xml:How was this patch tested?
ZoneKey creation from keyAdmin UI with empty keyLength, 0 keyLength, user provided keyLength.
ZoneKey creation using RangerAdmin Rest API
ZoneKey creation using KMS Rest endpoint directly.
Hadoop cli command