[ https://issues.apache.org/jira/browse/ARTEMIS-3765?focusedWorklogId=753650&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-753650 ]
ASF GitHub Bot logged work on ARTEMIS-3765: ------------------------------------------- Author: ASF GitHub Bot Created on: 06/Apr/22 20:09 Start Date: 06/Apr/22 20:09 Worklog Time Spent: 10m Work Description: ahoffer commented on code in PR #4019: URL: https://github.com/apache/activemq-artemis/pull/4019#discussion_r844360464 ########## artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/predicate/ConnectionFilterPredicate.java: ########## @@ -71,6 +66,17 @@ public boolean test(RemotingConnection connection) { return true; } + Set<String> collectFromSessions(String connectionId, Function<ServerSession, String> getter) { + List<ServerSession> sessions = server.getSessions(connectionId); + Set<String> sessionAttributes = new HashSet<>(); + for (ServerSession session : sessions) { + String value = getter.apply(session); + String string = value == null ? "" : value; + sessionAttributes.add(string); + } + return sessionAttributes; + } + Review Comment: i thought I reverted this change. At one point, I was pulling validated users from the sessions associated with the connections and displaying them. I created this method so that I didn't have to copy and paste code for getUsername() and getValidatedUser However, I backed those changes out. I thought I backed this one out too. If you want, I can roll the code back to how it was. ########## artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/predicate/ConnectionFilterPredicate.java: ########## @@ -71,6 +66,17 @@ public boolean test(RemotingConnection connection) { return true; } + Set<String> collectFromSessions(String connectionId, Function<ServerSession, String> getter) { + List<ServerSession> sessions = server.getSessions(connectionId); + Set<String> sessionAttributes = new HashSet<>(); + for (ServerSession session : sessions) { + String value = getter.apply(session); + String string = value == null ? "" : value; + sessionAttributes.add(string); + } + return sessionAttributes; + } + Review Comment: I thought I reverted this change. At one point, I was pulling validated users from the sessions associated with the connections and displaying them. I created this method so that I didn't have to copy and paste code for getUsername() and getValidatedUser However, I backed those changes out. I thought I backed this one out too. If you want, I can roll the code back to how it was. Issue Time Tracking ------------------- Worklog Id: (was: 753650) Time Spent: 20m (was: 10m) > Display validated user in Hawtio > -------------------------------- > > Key: ARTEMIS-3765 > URL: https://issues.apache.org/jira/browse/ARTEMIS-3765 > Project: ActiveMQ Artemis > Issue Type: New Feature > Reporter: Aaron Hoffer > Priority: Major > Time Spent: 20m > Remaining Estimate: 0h > > As a troubleshooter in the field, I would like to see the validated username > of a client in Hawtio, so that I can understand which client is producing or > consuming certain messages. > > Our project use Hawtio to view the state of Artemis, and to troubleshoot > problems in the field. We recently switched to 2-way TLS for authentication. > A side effect of the change was that the "User" field in Hawtio became blank > for some clients, probably because they stopped sending username to > authenticate. > > I have forked the Artemis GitHub repos, and I am ready to push a PR. I will > use this ticket number in the branch and PR names. > > > -- This message was sent by Atlassian Jira (v8.20.1#820001)