Skip to content

Commit 8acdd7f

Browse files
committed
CLOUDSTACK-7798: requestHasSensitiveInfo and responseHasSensitiveInfo annotation are missing from some separate Admin API commands.
1 parent 055901a commit 8acdd7f

46 files changed

Lines changed: 119 additions & 48 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎api/src/org/apache/cloudstack/api/command/admin/account/ListAccountsCmdByAdmin.java‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
import org.apache.cloudstack.api.command.user.account.ListAccountsCmd;
2222
import org.apache.cloudstack.api.response.AccountResponse;
2323

24-
@APICommand(name = "listAccounts", description = "Lists accounts and provides detailed account information for listed accounts", responseObject = AccountResponse.class, responseView = ResponseView.Full)
24+
import com.cloud.user.Account;
25+
26+
@APICommand(name = "listAccounts", description = "Lists accounts and provides detailed account information for listed accounts", responseObject = AccountResponse.class, responseView = ResponseView.Full, entityType = {Account.class},
27+
requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
2528
public class ListAccountsCmdByAdmin extends ListAccountsCmd {
2629
}

‎api/src/org/apache/cloudstack/api/command/admin/address/AssociateIPAddrCmdByAdmin.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
import com.cloud.exception.ResourceUnavailableException;
3333
import com.cloud.network.IpAddress;
3434

35-
@APICommand(name = "associateIpAddress", description = "Acquires and associates a public IP to an account.", responseObject = IPAddressResponse.class, responseView = ResponseView.Full)
35+
@APICommand(name = "associateIpAddress", description = "Acquires and associates a public IP to an account.", responseObject = IPAddressResponse.class, responseView = ResponseView.Full,
36+
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
3637
public class AssociateIPAddrCmdByAdmin extends AssociateIPAddrCmd {
3738
public static final Logger s_logger = Logger.getLogger(AssociateIPAddrCmdByAdmin.class.getName());
3839

‎api/src/org/apache/cloudstack/api/command/admin/address/ListPublicIpAddressesCmdByAdmin.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
import com.cloud.network.IpAddress;
3131
import com.cloud.utils.Pair;
3232

33-
@APICommand(name = "listPublicIpAddresses", description = "Lists all public ip addresses", responseObject = IPAddressResponse.class, responseView = ResponseView.Full)
33+
@APICommand(name = "listPublicIpAddresses", description = "Lists all public ip addresses", responseObject = IPAddressResponse.class, responseView = ResponseView.Full,
34+
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, entityType = {IpAddress.class})
3435
public class ListPublicIpAddressesCmdByAdmin extends ListPublicIpAddressesCmd {
3536
public static final Logger s_logger = Logger.getLogger(ListPublicIpAddressesCmdByAdmin.class.getName());
3637

‎api/src/org/apache/cloudstack/api/command/admin/affinitygroup/UpdateVMAffinityGroupCmdByAdmin.java‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,14 @@
3333
import com.cloud.exception.InsufficientCapacityException;
3434
import com.cloud.exception.ResourceUnavailableException;
3535
import com.cloud.uservm.UserVm;
36+
import com.cloud.vm.VirtualMachine;
3637

3738

3839
@APICommand(name = "updateVMAffinityGroup", description = "Updates the affinity/anti-affinity group associations of a virtual machine. The VM has to be stopped and restarted for the "
39-
+ "new properties to take effect.", responseObject = UserVmResponse.class, responseView = ResponseView.Full)
40+
+ "new properties to take effect.", responseObject = UserVmResponse.class, responseView = ResponseView.Full,
41+
entityType = {VirtualMachine.class},
42+
requestHasSensitiveInfo = false,
43+
responseHasSensitiveInfo = true)
4044
public class UpdateVMAffinityGroupCmdByAdmin extends UpdateVMAffinityGroupCmd {
4145
public static final Logger s_logger = Logger.getLogger(UpdateVMAffinityGroupCmdByAdmin.class.getName());
4246

‎api/src/org/apache/cloudstack/api/command/admin/iso/AttachIsoCmdByAdmin.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929

3030
import com.cloud.uservm.UserVm;
3131

32-
@APICommand(name = "attachIso", description = "Attaches an ISO to a virtual machine.", responseObject = UserVmResponse.class, responseView = ResponseView.Full)
32+
@APICommand(name = "attachIso", description = "Attaches an ISO to a virtual machine.", responseObject = UserVmResponse.class, responseView = ResponseView.Full,
33+
requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
3334
public class AttachIsoCmdByAdmin extends AttachIsoCmd {
3435
public static final Logger s_logger = Logger.getLogger(AttachIsoCmdByAdmin.class.getName());
3536

‎api/src/org/apache/cloudstack/api/command/admin/iso/DetachIsoCmdByAdmin.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828

2929
import com.cloud.uservm.UserVm;
3030

31-
@APICommand(name = "detachIso", description = "Detaches any ISO file (if any) currently attached to a virtual machine.", responseObject = UserVmResponse.class, responseView = ResponseView.Full)
31+
@APICommand(name = "detachIso", description = "Detaches any ISO file (if any) currently attached to a virtual machine.", responseObject = UserVmResponse.class, responseView = ResponseView.Full,
32+
requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
3233
public class DetachIsoCmdByAdmin extends DetachIsoCmd {
3334
public static final Logger s_logger = Logger.getLogger(DetachIsoCmdByAdmin.class.getName());
3435

‎api/src/org/apache/cloudstack/api/command/admin/iso/ListIsoPermissionsCmdByAdmin.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
import org.apache.cloudstack.api.command.user.iso.ListIsoPermissionsCmd;
2222
import org.apache.cloudstack.api.response.TemplatePermissionsResponse;
2323

24-
@APICommand(name = "listIsoPermissions", description = "List iso visibility and all accounts that have permissions to view this iso.", responseObject = TemplatePermissionsResponse.class, responseView = ResponseView.Full)
24+
@APICommand(name = "listIsoPermissions", description = "List iso visibility and all accounts that have permissions to view this iso.", responseObject = TemplatePermissionsResponse.class, responseView = ResponseView.Full,
25+
requestHasSensitiveInfo = false,
26+
responseHasSensitiveInfo = false)
2527
public class ListIsoPermissionsCmdByAdmin extends ListIsoPermissionsCmd {
2628

2729
@Override

‎api/src/org/apache/cloudstack/api/command/admin/iso/ListIsosCmdByAdmin.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import org.apache.cloudstack.api.command.user.iso.ListIsosCmd;
2222
import org.apache.cloudstack.api.response.TemplateResponse;
2323

24-
@APICommand(name = "listIsos", description = "Lists all available ISO files.", responseObject = TemplateResponse.class, responseView = ResponseView.Full)
24+
@APICommand(name = "listIsos", description = "Lists all available ISO files.", responseObject = TemplateResponse.class, responseView = ResponseView.Full,
25+
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
2526
public class ListIsosCmdByAdmin extends ListIsosCmd {
2627
}

‎api/src/org/apache/cloudstack/api/command/admin/iso/RegisterIsoCmdByAdmin.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
import com.cloud.exception.ResourceAllocationException;
3232
import com.cloud.template.VirtualMachineTemplate;
3333

34-
@APICommand(name = "registerIso", responseObject = TemplateResponse.class, description = "Registers an existing ISO into the CloudStack Cloud.", responseView = ResponseView.Full)
34+
@APICommand(name = "registerIso", responseObject = TemplateResponse.class, description = "Registers an existing ISO into the CloudStack Cloud.", responseView = ResponseView.Full,
35+
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
3536
public class RegisterIsoCmdByAdmin extends RegisterIsoCmd {
3637
public static final Logger s_logger = Logger.getLogger(RegisterIsoCmdByAdmin.class.getName());
3738

‎api/src/org/apache/cloudstack/api/command/admin/iso/UpdateIsoCmdByAdmin.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727

2828
import com.cloud.template.VirtualMachineTemplate;
2929

30-
@APICommand(name = "updateIso", description = "Updates an ISO file.", responseObject = TemplateResponse.class, responseView = ResponseView.Full)
30+
@APICommand(name = "updateIso", description = "Updates an ISO file.", responseObject = TemplateResponse.class, responseView = ResponseView.Full,
31+
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
3132
public class UpdateIsoCmdByAdmin extends UpdateIsoCmd {
3233
public static final Logger s_logger = Logger.getLogger(UpdateIsoCmdByAdmin.class.getName());
3334

0 commit comments

Comments
 (0)