Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KNOX-2123 - Setting requestURI using the given servletRequest in case the service is unavailable and logging it with the appropriate action outcome #219

Merged
merged 1 commit into from Dec 17, 2019

Conversation

smolnar82
Copy link
Contributor

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

@smolnar82 smolnar82 self-assigned this Dec 16, 2019
@smolnar82 smolnar82 added the bug label Dec 16, 2019
… the service is unavailable and logging it with the appropriate action outcome
@smolnar82 smolnar82 merged commit 13d3866 into apache:master Dec 17, 2019
@smolnar82 smolnar82 deleted the KNOX-2123 branch December 17, 2019 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants