[
https://issues.apache.org/jira/browse/RANGER-5337?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vikas Kumar resolved RANGER-5337.
---------------------------------
Fix Version/s: 3.0.0
Resolution: Fixed
Corresponding PR has been reviewed and merged . Hence marking this Jira
resolved. Thanks.
> Exception handling improvement in RangerMasterKey flow for FIPS env
> -------------------------------------------------------------------
>
> Key: RANGER-5337
> URL: https://issues.apache.org/jira/browse/RANGER-5337
> Project: Ranger
> Issue Type: New Feature
> Components: kms
> Reporter: Vikas Kumar
> Assignee: Vikas Kumar
> Priority: Major
> Fix For: 3.0.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> In RangerKeyStoreProvider class, if MasterKey creation fails due to any
> runtime error, it only logs the exception message, not the stack trace.
> Logging proper stack trace will help in identifying the root cause.
> Example:
> Tried to create MK with wrong salt size and got following in the log:
>
> {code:java}
> 2025-09-23 10:16:35,822 ERROR
> org.apache.hadoop.crypto.key.RangerKeyStoreProvider: [main]: createProvider()
> error
> java.lang.RuntimeException: Error while generating Ranger Master key, Error -
> null
> at
> org.apache.hadoop.crypto.key.RangerKeyStoreProvider.generateAndGetMasterKey(RangerKeyStoreProvider.java:542)
> ~[ranger-kms-*.jar:?]
> {code}
>
> Root Cause:
> {code:java}
> throw new RuntimeException("Error while getting Ranger Master key, Error - "
> + e.getMessage());{code}
>
> Instead it should be :
> {code:java}
> throw new RuntimeException("Error while getting Ranger Master key.", e);{code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)