mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-9983: Hide credentials in listClusters response
This removes username and passwords details from the listClusters response. The details are usually seen in VMware environments only. With dynamic roles features, the listClusters API may be provided to a read-only root-admin user role/type which should not be able to get the credentials. Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
5342cc8aea
commit
07fda3b395
|
|
@ -208,6 +208,12 @@ public class ClusterResponse extends BaseResponse {
|
|||
if (details == null) {
|
||||
return;
|
||||
}
|
||||
this.resourceDetails = new HashMap<>(details);
|
||||
resourceDetails = new HashMap<>(details);
|
||||
if (resourceDetails.containsKey("username")) {
|
||||
resourceDetails.remove("username");
|
||||
}
|
||||
if (resourceDetails.containsKey("password")) {
|
||||
resourceDetails.remove("password");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue