You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "Vikas Kumar (Jira)" <ji...@apache.org> on 2025/09/27 17:09:00 UTC
[jira] [Updated] (RANGER-5337) Exception handling improvement in RangerMasterKey flow for FIPS env
[ https://issues.apache.org/jira/browse/RANGER-5337?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vikas Kumar updated RANGER-5337:
--------------------------------
Summary: Exception handling improvement in RangerMasterKey flow for FIPS env (was: Exception handling improvement in RangerMasterKey)
> 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
>
> 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)