Github user serverchief commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/536#discussion_r33648388 --- Diff: api/src/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java --- @@ -203,9 +201,22 @@ public void execute() { hostResponse.setObjectName("host"); hostResponses.add(hostResponse); } - response.setResponses(hostResponses, result.second()); } + // Remove sensitive details from host response + List<HostResponse> hostResponsesList = response.getResponses(); + for (HostResponse hostResponse: hostResponsesList) { + Map<String, String> hostDetails = hostResponse.getDetails(); + if (hostDetails == null) continue; + if (hostDetails.containsKey("username")) { + hostDetails.remove("username"); + } + if (hostDetails.containsKey("password")) { + hostDetails.remove("password"); + } + hostResponse.setDetails(hostDetails); --- End diff -- hey guys, its upto you how you want to handle it, our end goal is not to expose entire access details when listHosts api call is made. As mentioned earlier, it would be ideal to leave few characters for username and password VS doing hostDetails.remove. Thanks -ilya
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---