-
Notifications
You must be signed in to change notification settings - Fork 147
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
NR-106006 disable userid when high security #1261
Conversation
@@ -26,7 +26,7 @@ public void service(ServletRequest request, ServletResponse response) { | |||
if (request instanceof HttpServletRequest) { | |||
Principal principal = ((HttpServletRequest) request).getUserPrincipal(); | |||
if (principal != null) { | |||
AgentBridge.getAgent().getTransaction().getAgentAttributes().put("user", principal.getName()); | |||
NewRelic.setUserName(principal.getName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does the same thing but adds additional useful logs and a supportability metric, SetUserName
. This also helps me reduce the amount of times I explicitly check if HSM is enabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't this use a different parameter name?
I confused this with another method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok! To clarify, this method adds the "user" attribute. This is the old way of us doing "user" tracking and was meant for the browser agent to use.
Since user tracking is meant to be disabled in HSM, it makes sense it should apply to this method too.
Disabled user tracking when high security mode is enabled