You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "Dhaval Shah (Jira)" <ji...@apache.org> on 2025/10/08 14:16:00 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=18028379#comment-18028379 ] 

Dhaval Shah commented on RANGER-5337:
-------------------------------------

Merged into apache master : https://github.com/apache/ranger/commit/e16ce56edeab37e4306dfdc38e185d63fffbfd0a

> 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
>          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)