Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-3625

Update isDebugEnable condition in RangerHiveAuthorizer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 2.2.0
    • 3.0.0, 2.3.0
    • Ranger
    • None

    Description

      Problem Statement
      In RangerHiveAuthorizer, the Logger isDebugEnabled condition needs to be updated

      else if (!result.getIsAllowed()) {
      						if (!LOG.isDebugEnabled()) {
      							String path = resource.getAsString();
      							LOG.debug(String.format("filterListCmdObjects: Permission denied: user [%s] does not have [%s] privilege on [%s]. resource[%s], request[%s], result[%s]",
      									user, request.getHiveAccessType().name(), path, resource, request, result));
      						} 

      here in above code the condition check is "!LOG.isDebugEnabled()" and log is logged at Debug level which will never get log.

      Solution:
      The condition "if (!LOG.isDebugEnabled())" should be replaced by "if (LOG.isDebugEnabled())"

       

      Attachments

        Issue Links

          Activity

            People

              ankita Ankita Sinha
              ankita Ankita Sinha
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: