Github user karuturi commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/536#discussion_r33651106
  
    --- 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 --
    
    @bhaisaab, @jburwell, returning password from other apis like reconnectHost 
etc. isnt required either (api doc response is no different)
    I think it should be removed from the lower layer in HostJoinDaoImpl so 
that no api returns them


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

Reply via email to