github-advanced-security[bot] commented on code in PR #13884:
URL: https://github.com/apache/cloudstack/pull/13884#discussion_r3790460092


##########
server/src/main/java/com/cloud/server/ManagementServer.java:
##########
@@ -31,6 +36,166 @@
  */
 public interface ManagementServer extends ManagementService, PluggableService {
 
+    ConfigKey<String> customCsIdentifier = new ConfigKey<>("Advanced", 
String.class, "custom.cs.identifier",
+            UUID.randomUUID().toString().split("-")[0].substring(4), "Custom 
identifier for the cloudstack installation", true, ConfigKey.Scope.Global);
+
+    ConfigKey<Boolean> exposeCloudStackVersionInApiXmlResponse = new 
ConfigKey<>("Advanced", Boolean.class, 
"expose.cloudstack.version.api.xml.response", "true",
+            "Indicates whether ACS version should appear in the root element 
of an API XML response.", true, ConfigKey.Scope.Global);
+
+    ConfigKey<String> ElasticLoadBalancerEnabled = new ConfigKey<>("Advanced", 
String.class, "network.loadbalancer.basiczone.elb.enabled", "false",
+            "Whether the load balancing service is enabled for basic zones", 
true);
+
+    ConfigKey<String> ElasticLoadBalancerNetwork = new ConfigKey<>("Advanced", 
String.class, "network.loadbalancer.basiczone.elb.network", "guest",
+            "Whether the elastic load balancing service public ips are taken 
from the public or guest network", true);
+
+    ConfigKey<Boolean> ApiLimitEnabled = new ConfigKey<>("Advanced", 
Boolean.class, "api.throttling.enabled", "false", "Enable/disable Api rate 
limit", true);
+
+    ConfigKey<Integer> ApiLimitInterval = new ConfigKey<>("Advanced", 
Integer.class, "api.throttling.interval", "1", "Time interval (in seconds) to 
reset API count", true);
+
+    ConfigKey<Integer> ApiLimitMax = new ConfigKey<>("Advanced", 
Integer.class, "api.throttling.max", "25", "Max allowed number of APIs within 
fixed interval", true);
+
+    ConfigKey<String> OvmPublicNetwork = new ConfigKey<>("Hidden", 
String.class,
+            "ovm.public.network.device", null,
+            "Specify the public bridge on host for public network", true);
+
+    ConfigKey<String> OvmPrivateNetwork = new ConfigKey<>("Hidden", 
String.class,
+            "ovm.private.network.device", null,
+            "Specify the private bridge on host for private network", true);
+
+    ConfigKey<String> OvmGuestNetwork = new ConfigKey<>("Hidden", String.class,
+            "ovm.guest.network.device", null,
+            "Specify the private bridge on host for private network", true);
+
+    ConfigKey<String> Ovm3PublicNetwork = new ConfigKey<>("Hidden", 
String.class,
+            "ovm3.public.network.device", null,
+            "Specify the public bridge on host for public network", true);
+
+    ConfigKey<String> Ovm3PrivateNetwork = new ConfigKey<>("Hidden", 
String.class,
+            "ovm3.private.network.device", null,
+            "Specify the private bridge on host for private network", true);
+
+    ConfigKey<String> Ovm3GuestNetwork = new ConfigKey<>("Hidden", 
String.class,
+            "ovm3.guest.network.device", null,
+            "Specify the guest bridge on host for guest network", true);
+
+    ConfigKey<String> Ovm3StorageNetwork = new ConfigKey<>("Hidden", 
String.class,
+            "ovm3.storage.network.device", null,
+            "Specify the storage bridge on host for storage network", true);
+
+    ConfigKey<String> KvmPublicNetwork = new ConfigKey<>("Hidden", 
String.class,
+            "kvm.public.network.device", null,
+            "Specify the public bridge on host for public network", true);
+
+    ConfigKey<String> KvmPrivateNetwork = new ConfigKey<>("Hidden", 
String.class,
+            "kvm.private.network.device", null,
+            "Specify the private bridge on host for private network", true);
+
+    ConfigKey<String> KvmGuestNetwork = new ConfigKey<>("Hidden", String.class,
+            "kvm.guest.network.device", null,
+            "Specify the private bridge on host for private network", true);
+
+    ConfigKey<Boolean> PublishActionEvent = new ConfigKey<>("Advanced", 
Boolean.class, "publish.action.events", "true",
+            "enable or disable publishing of action events on the event bus", 
true);
+
+    ConfigKey<Boolean> PublishAlertEvent = new ConfigKey<>("Advanced", 
Boolean.class, "publish.alert.events", "true",
+            "enable or disable publishing of alert events on the event bus", 
true);
+
+    ConfigKey<Boolean> PublishResourceStateEvent = new ConfigKey<>("Advanced", 
Boolean.class, "publish.resource.state.events", "true",
+            "enable or disable publishing of alert events on the event bus", 
true);
+
+    ConfigKey<Boolean> PublishUsageEvent = new ConfigKey<>("Advanced", 
Boolean.class, "publish.usage.events", "true",
+            "enable or disable publishing of usage events on the event bus", 
true);
+
+    ConfigKey<Integer> EventPurgeInterval = new ConfigKey<>("Advanced", 
Integer.class, "event.purge.interval", "86400",
+            "The interval (in seconds) to wait before running the event purge 
thread", true);
+
+    ConfigKey<Integer> LinkLocalIpNums = new ConfigKey<>("Advanced", 
Integer.class, "linkLocalIp.nums", "10",
+            "The number of link local ip that needed by domR(in power of 2)", 
true);
+
+    ConfigKey<String> HypervisorList = new ConfigKey<>("Advanced", 
String.class, "hypervisor.list",
+            HypervisorType.KVM + "," + HypervisorType.VMware + "," + 
HypervisorType.XenServer + "," + HypervisorType.Hyperv + "," +
+                    HypervisorType.BareMetal + "," + HypervisorType.Ovm + "," 
+ HypervisorType.LXC + "," + HypervisorType.Ovm3 + "," + 
HypervisorType.External,
+            "The list of hypervisors that this deployment will use.", true, 
ConfigKey.Kind.CSV, null);
+
+    ConfigKey<String> ManagementNetwork = new ConfigKey<>("Advanced", 
String.class, "management.network.cidr", null,
+            "The cidr of management server network", true);
+
+    ConfigKey<Integer> EventPurgeDelay = new ConfigKey<>("Advanced", 
Integer.class, "event.purge.delay", "15",
+            "Events older than specified number days will be purged. Set this 
value to 0 to never delete events", true);
+
+    ConfigKey<Integer> AlertPurgeInterval = new ConfigKey<>("Advanced", 
Integer.class, "alert.purge.interval", "86400",
+            "The interval (in seconds) to wait before running the alert purge 
thread", true);
+
+    ConfigKey<Integer> AlertPurgeDelay = new ConfigKey<>("Advanced", 
Integer.class, "alert.purge.delay", "0",
+            "Alerts older than specified number days will be purged. Set this 
value to 0 to never delete alerts", true);
+
+    ConfigKey<String> ControlCidr = new ConfigKey<>("Advanced", String.class, 
"control.cidr", "169.254.0.0/16",

Review Comment:
   ## SonarCloud / IP addresses should not be hardcoded
   
   <!--SONAR_ISSUE_KEY:AaAHquINRdE24u2TNGQM-->Make sure using this hardcoded IP 
address is safe here. <p>See more on <a 
href="https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AaAHquINRdE24u2TNGQM&open=AaAHquINRdE24u2TNGQM&pullRequest=13884";>SonarQube
 Cloud</a></p>
   
   [Show more 
details](https://github.com/apache/cloudstack/security/code-scanning/201)



##########
server/src/main/java/com/cloud/server/ManagementServer.java:
##########
@@ -31,6 +36,166 @@
  */
 public interface ManagementServer extends ManagementService, PluggableService {
 
+    ConfigKey<String> customCsIdentifier = new ConfigKey<>("Advanced", 
String.class, "custom.cs.identifier",
+            UUID.randomUUID().toString().split("-")[0].substring(4), "Custom 
identifier for the cloudstack installation", true, ConfigKey.Scope.Global);
+
+    ConfigKey<Boolean> exposeCloudStackVersionInApiXmlResponse = new 
ConfigKey<>("Advanced", Boolean.class, 
"expose.cloudstack.version.api.xml.response", "true",
+            "Indicates whether ACS version should appear in the root element 
of an API XML response.", true, ConfigKey.Scope.Global);
+
+    ConfigKey<String> ElasticLoadBalancerEnabled = new ConfigKey<>("Advanced", 
String.class, "network.loadbalancer.basiczone.elb.enabled", "false",
+            "Whether the load balancing service is enabled for basic zones", 
true);
+
+    ConfigKey<String> ElasticLoadBalancerNetwork = new ConfigKey<>("Advanced", 
String.class, "network.loadbalancer.basiczone.elb.network", "guest",
+            "Whether the elastic load balancing service public ips are taken 
from the public or guest network", true);
+
+    ConfigKey<Boolean> ApiLimitEnabled = new ConfigKey<>("Advanced", 
Boolean.class, "api.throttling.enabled", "false", "Enable/disable Api rate 
limit", true);
+
+    ConfigKey<Integer> ApiLimitInterval = new ConfigKey<>("Advanced", 
Integer.class, "api.throttling.interval", "1", "Time interval (in seconds) to 
reset API count", true);
+
+    ConfigKey<Integer> ApiLimitMax = new ConfigKey<>("Advanced", 
Integer.class, "api.throttling.max", "25", "Max allowed number of APIs within 
fixed interval", true);
+
+    ConfigKey<String> OvmPublicNetwork = new ConfigKey<>("Hidden", 
String.class,
+            "ovm.public.network.device", null,
+            "Specify the public bridge on host for public network", true);
+
+    ConfigKey<String> OvmPrivateNetwork = new ConfigKey<>("Hidden", 
String.class,
+            "ovm.private.network.device", null,
+            "Specify the private bridge on host for private network", true);
+
+    ConfigKey<String> OvmGuestNetwork = new ConfigKey<>("Hidden", String.class,
+            "ovm.guest.network.device", null,
+            "Specify the private bridge on host for private network", true);
+
+    ConfigKey<String> Ovm3PublicNetwork = new ConfigKey<>("Hidden", 
String.class,
+            "ovm3.public.network.device", null,
+            "Specify the public bridge on host for public network", true);
+
+    ConfigKey<String> Ovm3PrivateNetwork = new ConfigKey<>("Hidden", 
String.class,
+            "ovm3.private.network.device", null,
+            "Specify the private bridge on host for private network", true);
+
+    ConfigKey<String> Ovm3GuestNetwork = new ConfigKey<>("Hidden", 
String.class,
+            "ovm3.guest.network.device", null,
+            "Specify the guest bridge on host for guest network", true);
+
+    ConfigKey<String> Ovm3StorageNetwork = new ConfigKey<>("Hidden", 
String.class,
+            "ovm3.storage.network.device", null,
+            "Specify the storage bridge on host for storage network", true);
+
+    ConfigKey<String> KvmPublicNetwork = new ConfigKey<>("Hidden", 
String.class,
+            "kvm.public.network.device", null,
+            "Specify the public bridge on host for public network", true);
+
+    ConfigKey<String> KvmPrivateNetwork = new ConfigKey<>("Hidden", 
String.class,
+            "kvm.private.network.device", null,
+            "Specify the private bridge on host for private network", true);
+
+    ConfigKey<String> KvmGuestNetwork = new ConfigKey<>("Hidden", String.class,
+            "kvm.guest.network.device", null,
+            "Specify the private bridge on host for private network", true);
+
+    ConfigKey<Boolean> PublishActionEvent = new ConfigKey<>("Advanced", 
Boolean.class, "publish.action.events", "true",
+            "enable or disable publishing of action events on the event bus", 
true);
+
+    ConfigKey<Boolean> PublishAlertEvent = new ConfigKey<>("Advanced", 
Boolean.class, "publish.alert.events", "true",
+            "enable or disable publishing of alert events on the event bus", 
true);
+
+    ConfigKey<Boolean> PublishResourceStateEvent = new ConfigKey<>("Advanced", 
Boolean.class, "publish.resource.state.events", "true",
+            "enable or disable publishing of alert events on the event bus", 
true);
+
+    ConfigKey<Boolean> PublishUsageEvent = new ConfigKey<>("Advanced", 
Boolean.class, "publish.usage.events", "true",
+            "enable or disable publishing of usage events on the event bus", 
true);
+
+    ConfigKey<Integer> EventPurgeInterval = new ConfigKey<>("Advanced", 
Integer.class, "event.purge.interval", "86400",
+            "The interval (in seconds) to wait before running the event purge 
thread", true);
+
+    ConfigKey<Integer> LinkLocalIpNums = new ConfigKey<>("Advanced", 
Integer.class, "linkLocalIp.nums", "10",
+            "The number of link local ip that needed by domR(in power of 2)", 
true);
+
+    ConfigKey<String> HypervisorList = new ConfigKey<>("Advanced", 
String.class, "hypervisor.list",
+            HypervisorType.KVM + "," + HypervisorType.VMware + "," + 
HypervisorType.XenServer + "," + HypervisorType.Hyperv + "," +
+                    HypervisorType.BareMetal + "," + HypervisorType.Ovm + "," 
+ HypervisorType.LXC + "," + HypervisorType.Ovm3 + "," + 
HypervisorType.External,
+            "The list of hypervisors that this deployment will use.", true, 
ConfigKey.Kind.CSV, null);
+
+    ConfigKey<String> ManagementNetwork = new ConfigKey<>("Advanced", 
String.class, "management.network.cidr", null,
+            "The cidr of management server network", true);
+
+    ConfigKey<Integer> EventPurgeDelay = new ConfigKey<>("Advanced", 
Integer.class, "event.purge.delay", "15",
+            "Events older than specified number days will be purged. Set this 
value to 0 to never delete events", true);
+
+    ConfigKey<Integer> AlertPurgeInterval = new ConfigKey<>("Advanced", 
Integer.class, "alert.purge.interval", "86400",
+            "The interval (in seconds) to wait before running the alert purge 
thread", true);
+
+    ConfigKey<Integer> AlertPurgeDelay = new ConfigKey<>("Advanced", 
Integer.class, "alert.purge.delay", "0",
+            "Alerts older than specified number days will be purged. Set this 
value to 0 to never delete alerts", true);
+
+    ConfigKey<String> ControlCidr = new ConfigKey<>("Advanced", String.class, 
"control.cidr", "169.254.0.0/16",
+            "Changes the cidr for the control network traffic.  Defaults to 
using link local.  Must be unique within pods", true);
+
+    ConfigKey<String> ControlGateway = new ConfigKey<>("Advanced", 
String.class, "control.gateway", "169.254.0.1",

Review Comment:
   ## SonarCloud / IP addresses should not be hardcoded
   
   <!--SONAR_ISSUE_KEY:AaAHquINRdE24u2TNGQN-->Make sure using this hardcoded IP 
address is safe here. <p>See more on <a 
href="https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AaAHquINRdE24u2TNGQN&open=AaAHquINRdE24u2TNGQN&pullRequest=13884";>SonarQube
 Cloud</a></p>
   
   [Show more 
details](https://github.com/apache/cloudstack/security/code-scanning/202)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to