smolnar82 opened a new pull request #219: KNOX-2123 - Setting requestURI using 
the given servletRequest in case the service is unavailable and logging it with 
the appropriate action outcome
URL: https://github.com/apache/knox/pull/219
 
 
   ## What changes were proposed in this pull request?
   
   If the service was unavailable at the time of the service was being served 
then there was no `SOURCE_REQUEST_CONTEXT_URL_ATTRIBUTE_NAME` attribute set in 
the given `servletRequest`. This led to a NPE when logging into audit log. 
Another mistake was that we did not consider the action-outcome in this case 
and we tried to log everything as `SUCCESS`. I changed this too.
   
   ## How was this patch tested?
   
   Running JUnit tests:
   ```
   mvn clean -Dshellcheck=true -T1C verify -Prelease,package
   ...
   [INFO] 
------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] 
------------------------------------------------------------------------
   [INFO] Total time: 19:31 min (Wall Clock)
   [INFO] Finished at: 2019-12-16T15:58:38+01:00
   [INFO] Final Memory: 412M/1951M
   [INFO] 
------------------------------------------------------------------------
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to