[ https://issues.apache.org/jira/browse/ARTEMIS-4819?focusedWorklogId=923789&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-923789 ]
ASF GitHub Bot logged work on ARTEMIS-4819: ------------------------------------------- Author: ASF GitHub Bot Created on: 17/Jun/24 19:22 Start Date: 17/Jun/24 19:22 Worklog Time Spent: 10m Work Description: jbertram commented on PR #4980: URL: https://github.com/apache/activemq-artemis/pull/4980#issuecomment-2174250407 I'm not in favor of this change. If you want output that's formatted clearly and in a way that can be parsed by scripts then I recommend the [management API](https://activemq.apache.org/components/artemis/documentation/latest/management.html#management). In this can you could invoke the [`listUser` operation on `ActiveMQServerControl`](https://activemq.apache.org/components/artemis/documentation/javadocs/javadoc-latest/org/apache/activemq/artemis/api/core/management/ActiveMQServerControl.html#listUser(java.lang.String)), e.g. this command: ``` curl -s -H "Origin: http://localhost" -u myUser:myPass --header "Content-type: application/json" --request POST --data '{"operation": "listUser", "mbean": "org.apache.activemq.artemis:broker=\"0.0.0.0\"", "type": "exec", "arguments": [""] }' http://localhost:8161/console/jolokia | jq '.value | fromjson' ``` Might provide output like this: ```json [ { "username": "myUser1", "roles": [ "myRole1" ] }, { "username": "myUser2", "roles": [ "myRole2", "myRole3" ] } ] ``` Issue Time Tracking ------------------- Worklog Id: (was: 923789) Time Spent: 20m (was: 10m) > Improve user list output in CLI > ------------------------------- > > Key: ARTEMIS-4819 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4819 > Project: ActiveMQ Artemis > Issue Type: Improvement > Reporter: Vilius Šumskas > Priority: Minor > Time Spent: 20m > Remaining Estimate: 0h > > Currently `artemis user list` command output is not very script friendly. It > prints users like this: > {noformat} > "krttmtr5zh3yx1j"(role_adm_krttmtr5zh3yx1j) > "wge4qbpzykuqety"(role_adm_wge4qbpzykuqety) > "8wezkl4yg0wmmcr"(role_adm_8wezkl4yg0wmmcr) > "atrnohhggvhocqq"(role_adm_atrnohhggvhocqq){noformat} > My proposal is to split users and roles with a space like this, so that the > output can be parsed and used in bash scripts more effectively: > {noformat} > krttmtr5zh3yx1j (role_adm_krttmtr5zh3yx1j) > wge4qbpzykuqety (role_adm_wge4qbpzykuqety) > 8wezkl4yg0wmmcr(role_adm_8wezkl4yg0wmmcr) > atrnohhggvhocqq (role_adm_atrnohhggvhocqq){noformat} > -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@activemq.apache.org For additional commands, e-mail: issues-h...@activemq.apache.org For further information, visit: https://activemq.apache.org/contact