[jira] [Work logged] (ARTEMIS-4244) Set web config using system properties
[ https://issues.apache.org/jira/browse/ARTEMIS-4244?focusedWorklogId=858154&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-858154 ] ASF GitHub Bot logged work on ARTEMIS-4244: --- Author: ASF GitHub Bot Created on: 20/Apr/23 09:20 Start Date: 20/Apr/23 09:20 Worklog Time Spent: 10m Work Description: gtully commented on code in PR #4440: URL: https://github.com/apache/activemq-artemis/pull/4440#discussion_r1172311729 ## artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java: ## @@ -133,6 +133,8 @@ public void deActivate() { broker.components.add(broker.web); } + server.getServer().getConfiguration().parsePrefixedProperties(broker.web, "web", System.getProperties(), ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix()); Review Comment: think maybe system-web, or even "system-" + ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix() this will only show up in the config.getStatus, to identify checksum and to capture any errors specific to that set of properties. ## tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/web/WebServerDTOConfigTest.java: ## @@ -0,0 +1,93 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.artemis.tests.integration.web; + +import java.util.Properties; + +import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration; +import org.apache.activemq.artemis.core.config.Configuration; +import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl; +import org.apache.activemq.artemis.dto.AppDTO; +import org.apache.activemq.artemis.dto.BindingDTO; +import org.apache.activemq.artemis.dto.WebServerDTO; +import org.junit.Assert; +import org.junit.Test; + +public class WebServerDTOConfigTest { + + @Test + public void testSetWebProperties() throws Throwable { + WebServerDTO webServer = new WebServerDTO(); + Properties properties = new Properties(); + properties.put(ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix() + "customizer", "customizerTest"); + properties.put(ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix() + "rootRedirectLocation", "locationTest"); + properties.put(ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix() + "webContentEnabled", "true"); + Configuration configuration = new ConfigurationImpl(); + configuration.parsePrefixedProperties(webServer, "web", properties, ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix()); + + Assert.assertEquals("customizerTest", webServer.getCustomizer()); + Assert.assertEquals("locationTest", webServer.getRootRedirectLocation()); + Assert.assertEquals(true, webServer.getWebContentEnabled()); + } + + @Test + public void testSetWebBindingProperties() throws Throwable { + WebServerDTO webServer = new WebServerDTO(); + Properties properties = new Properties(); + properties.put(ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix() + "bindings.test-binding.uri", "test-uri"); + properties.put(ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix() + "bindings.test-binding.clientAuth", "true"); + properties.put(ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix() + "bindings.test-binding.passwordCodec", "test-passwordCodec"); + properties.put(ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix() + "bindings.test-binding.keyStorePath", "test-keyStorePath"); + properties.put(ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix() + "bindings.test-binding.trustStorePath", "test-trustStorePath"); + properties.put(ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix() + "bindings.test-binding.includedTLSProtocols", "test-includedTLSProtocols,0"); + properties.put(ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix() + "bindings.test-binding.excludedTLSProtocols", "test-excludedTLSProtocols,1"); + properties.put(ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix() + "bindings.test-bindi
[jira] [Work logged] (ARTEMIS-4244) Set web config using system properties
[ https://issues.apache.org/jira/browse/ARTEMIS-4244?focusedWorklogId=858253&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-858253 ] ASF GitHub Bot logged work on ARTEMIS-4244: --- Author: ASF GitHub Bot Created on: 20/Apr/23 14:01 Start Date: 20/Apr/23 14:01 Worklog Time Spent: 10m Work Description: brusdev commented on code in PR #4440: URL: https://github.com/apache/activemq-artemis/pull/4440#discussion_r1172639065 ## artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java: ## @@ -133,6 +133,8 @@ public void deActivate() { broker.components.add(broker.web); } + server.getServer().getConfiguration().parsePrefixedProperties(broker.web, "web", System.getProperties(), ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix()); Review Comment: @gtully I don't have a strong opinion on propsId `web` and on prefix `webconfig.` but looking at the current values for the broker config (`system`, `brokerconfig.`) I was thinking at `system-web` and `brokerwebconfig.` WDYT? Issue Time Tracking --- Worklog Id: (was: 858253) Time Spent: 20m (was: 10m) > Set web config using system properties > -- > > Key: ARTEMIS-4244 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4244 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Domenico Francesco Bruscino >Assignee: Domenico Francesco Bruscino >Priority: Major > Time Spent: 20m > Remaining Estimate: 0h > > Set web config using system properties as users can set broker config, i.e. > starting the broker JVM with the option `-Dwebconfig.webContentEnabled=true` > enables the web content. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4244) Set web config using system properties
[ https://issues.apache.org/jira/browse/ARTEMIS-4244?focusedWorklogId=858270&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-858270 ] ASF GitHub Bot logged work on ARTEMIS-4244: --- Author: ASF GitHub Bot Created on: 20/Apr/23 15:26 Start Date: 20/Apr/23 15:26 Worklog Time Spent: 10m Work Description: gtully commented on code in PR #4440: URL: https://github.com/apache/activemq-artemis/pull/4440#discussion_r1172760439 ## artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java: ## @@ -133,6 +133,8 @@ public void deActivate() { broker.components.add(broker.web); } + server.getServer().getConfiguration().parsePrefixedProperties(broker.web, "web", System.getProperties(), ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix()); Review Comment: I think those make good sense. Issue Time Tracking --- Worklog Id: (was: 858270) Time Spent: 0.5h (was: 20m) > Set web config using system properties > -- > > Key: ARTEMIS-4244 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4244 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Domenico Francesco Bruscino >Assignee: Domenico Francesco Bruscino >Priority: Major > Time Spent: 0.5h > Remaining Estimate: 0h > > Set web config using system properties as users can set broker config, i.e. > starting the broker JVM with the option `-Dwebconfig.webContentEnabled=true` > enables the web content. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4244) Set web config using system properties
[ https://issues.apache.org/jira/browse/ARTEMIS-4244?focusedWorklogId=858271&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-858271 ] ASF GitHub Bot logged work on ARTEMIS-4244: --- Author: ASF GitHub Bot Created on: 20/Apr/23 15:29 Start Date: 20/Apr/23 15:29 Worklog Time Spent: 10m Work Description: gtully commented on code in PR #4440: URL: https://github.com/apache/activemq-artemis/pull/4440#discussion_r1172763610 ## artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java: ## @@ -133,6 +133,8 @@ public void deActivate() { broker.components.add(broker.web); } + server.getServer().getConfiguration().parsePrefixedProperties(broker.web, "web", System.getProperties(), ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix()); Review Comment: I was sort of combining them for the name that identifies where the properties come from. system- may get us there. It only shows up in the status. Issue Time Tracking --- Worklog Id: (was: 858271) Time Spent: 40m (was: 0.5h) > Set web config using system properties > -- > > Key: ARTEMIS-4244 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4244 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Domenico Francesco Bruscino >Assignee: Domenico Francesco Bruscino >Priority: Major > Time Spent: 40m > Remaining Estimate: 0h > > Set web config using system properties as users can set broker config, i.e. > starting the broker JVM with the option `-Dwebconfig.webContentEnabled=true` > enables the web content. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4244) Set web config using system properties
[ https://issues.apache.org/jira/browse/ARTEMIS-4244?focusedWorklogId=858694&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-858694 ] ASF GitHub Bot logged work on ARTEMIS-4244: --- Author: ASF GitHub Bot Created on: 24/Apr/23 10:06 Start Date: 24/Apr/23 10:06 Worklog Time Spent: 10m Work Description: brusdev commented on code in PR #4440: URL: https://github.com/apache/activemq-artemis/pull/4440#discussion_r1175067712 ## artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java: ## @@ -133,6 +133,8 @@ public void deActivate() { broker.components.add(broker.web); } + server.getServer().getConfiguration().parsePrefixedProperties(broker.web, "web", System.getProperties(), ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix()); Review Comment: @gtully thanks for your suggestion, I applied it. Issue Time Tracking --- Worklog Id: (was: 858694) Time Spent: 50m (was: 40m) > Set web config using system properties > -- > > Key: ARTEMIS-4244 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4244 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Domenico Francesco Bruscino >Assignee: Domenico Francesco Bruscino >Priority: Major > Time Spent: 50m > Remaining Estimate: 0h > > Set web config using system properties as users can set broker config, i.e. > starting the broker JVM with the option `-Dwebconfig.webContentEnabled=true` > enables the web content. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4244) Set web config using system properties
[ https://issues.apache.org/jira/browse/ARTEMIS-4244?focusedWorklogId=858695&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-858695 ] ASF GitHub Bot logged work on ARTEMIS-4244: --- Author: ASF GitHub Bot Created on: 24/Apr/23 10:06 Start Date: 24/Apr/23 10:06 Worklog Time Spent: 10m Work Description: brusdev commented on code in PR #4440: URL: https://github.com/apache/activemq-artemis/pull/4440#discussion_r1175068377 ## tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/web/WebServerDTOConfigTest.java: ## @@ -0,0 +1,93 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.artemis.tests.integration.web; + +import java.util.Properties; + +import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration; +import org.apache.activemq.artemis.core.config.Configuration; +import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl; +import org.apache.activemq.artemis.dto.AppDTO; +import org.apache.activemq.artemis.dto.BindingDTO; +import org.apache.activemq.artemis.dto.WebServerDTO; +import org.junit.Assert; +import org.junit.Test; + +public class WebServerDTOConfigTest { + + @Test + public void testSetWebProperties() throws Throwable { + WebServerDTO webServer = new WebServerDTO(); + Properties properties = new Properties(); + properties.put(ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix() + "customizer", "customizerTest"); + properties.put(ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix() + "rootRedirectLocation", "locationTest"); + properties.put(ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix() + "webContentEnabled", "true"); + Configuration configuration = new ConfigurationImpl(); + configuration.parsePrefixedProperties(webServer, "web", properties, ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix()); + + Assert.assertEquals("customizerTest", webServer.getCustomizer()); + Assert.assertEquals("locationTest", webServer.getRootRedirectLocation()); + Assert.assertEquals(true, webServer.getWebContentEnabled()); + } + + @Test + public void testSetWebBindingProperties() throws Throwable { + WebServerDTO webServer = new WebServerDTO(); + Properties properties = new Properties(); + properties.put(ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix() + "bindings.test-binding.uri", "test-uri"); + properties.put(ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix() + "bindings.test-binding.clientAuth", "true"); + properties.put(ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix() + "bindings.test-binding.passwordCodec", "test-passwordCodec"); + properties.put(ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix() + "bindings.test-binding.keyStorePath", "test-keyStorePath"); + properties.put(ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix() + "bindings.test-binding.trustStorePath", "test-trustStorePath"); + properties.put(ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix() + "bindings.test-binding.includedTLSProtocols", "test-includedTLSProtocols,0"); + properties.put(ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix() + "bindings.test-binding.excludedTLSProtocols", "test-excludedTLSProtocols,1"); + properties.put(ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix() + "bindings.test-binding.includedCipherSuites", "test-includedCipherSuites,2"); + properties.put(ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix() + "bindings.test-binding.excludedCipherSuites", "test-excludedCipherSuites,3"); + properties.put(ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix() + "bindings.test-binding.keyStorePassword", "test-keyStorePassword"); + properties.put(ActiveMQDefaultConfiguration.getDefaultWebPropertyPrefix() + "bindings.test-binding.trustStorePassword", "test-trustStorePassword"); + Configuration configuration = new ConfigurationImpl(); + configuration.parsePrefixedProperties(webServer, "web
[jira] [Work logged] (ARTEMIS-4244) Set web config using system properties
[ https://issues.apache.org/jira/browse/ARTEMIS-4244?focusedWorklogId=858696&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-858696 ] ASF GitHub Bot logged work on ARTEMIS-4244: --- Author: ASF GitHub Bot Created on: 24/Apr/23 10:09 Start Date: 24/Apr/23 10:09 Worklog Time Spent: 10m Work Description: brusdev commented on PR #4440: URL: https://github.com/apache/activemq-artemis/pull/4440#issuecomment-1519837665 I added the support for binding and apps without names and a section in the `Embedded Web Server` doc. Issue Time Tracking --- Worklog Id: (was: 858696) Time Spent: 1h 10m (was: 1h) > Set web config using system properties > -- > > Key: ARTEMIS-4244 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4244 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Domenico Francesco Bruscino >Assignee: Domenico Francesco Bruscino >Priority: Major > Time Spent: 1h 10m > Remaining Estimate: 0h > > Set web config using system properties as users can set broker config, i.e. > starting the broker JVM with the option `-Dwebconfig.webContentEnabled=true` > enables the web content. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4244) Set web config using system properties
[ https://issues.apache.org/jira/browse/ARTEMIS-4244?focusedWorklogId=859270&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-859270 ] ASF GitHub Bot logged work on ARTEMIS-4244: --- Author: ASF GitHub Bot Created on: 26/Apr/23 22:07 Start Date: 26/Apr/23 22:07 Worklog Time Spent: 10m Work Description: jbertram merged PR #4440: URL: https://github.com/apache/activemq-artemis/pull/4440 Issue Time Tracking --- Worklog Id: (was: 859270) Time Spent: 1h 20m (was: 1h 10m) > Set web config using system properties > -- > > Key: ARTEMIS-4244 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4244 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Domenico Francesco Bruscino >Assignee: Domenico Francesco Bruscino >Priority: Major > Time Spent: 1h 20m > Remaining Estimate: 0h > > Set web config using system properties as users can set broker config, i.e. > starting the broker JVM with the option `-Dwebconfig.webContentEnabled=true` > enables the web content. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4244) Set web config using system properties
[ https://issues.apache.org/jira/browse/ARTEMIS-4244?focusedWorklogId=860295&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-860295 ] ASF GitHub Bot logged work on ARTEMIS-4244: --- Author: ASF GitHub Bot Created on: 03/May/23 11:27 Start Date: 03/May/23 11:27 Worklog Time Spent: 10m Work Description: brusdev merged PR #4465: URL: https://github.com/apache/activemq-artemis/pull/4465 Issue Time Tracking --- Worklog Id: (was: 860295) Time Spent: 1.5h (was: 1h 20m) > Set web config using system properties > -- > > Key: ARTEMIS-4244 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4244 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Domenico Francesco Bruscino >Assignee: Domenico Francesco Bruscino >Priority: Major > Time Spent: 1.5h > Remaining Estimate: 0h > > Set web config using system properties as users can set broker config, i.e. > starting the broker JVM with the option `-Dwebconfig.webContentEnabled=true` > enables the web content. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (ARTEMIS-4244) Set web config using system properties
[ https://issues.apache.org/jira/browse/ARTEMIS-4244?focusedWorklogId=860325&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-860325 ] ASF GitHub Bot logged work on ARTEMIS-4244: --- Author: ASF GitHub Bot Created on: 03/May/23 12:35 Start Date: 03/May/23 12:35 Worklog Time Spent: 10m Work Description: gemmellr commented on PR #4465: URL: https://github.com/apache/activemq-artemis/pull/4465#issuecomment-1532955514 Fixup for #4441 where I missed that during the updates, oopsie :) Issue Time Tracking --- Worklog Id: (was: 860325) Time Spent: 1h 40m (was: 1.5h) > Set web config using system properties > -- > > Key: ARTEMIS-4244 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4244 > Project: ActiveMQ Artemis > Issue Type: New Feature >Reporter: Domenico Francesco Bruscino >Assignee: Domenico Francesco Bruscino >Priority: Major > Time Spent: 1h 40m > Remaining Estimate: 0h > > Set web config using system properties as users can set broker config, i.e. > starting the broker JVM with the option `-Dwebconfig.webContentEnabled=true` > enables the web content. -- This message was sent by Atlassian Jira (v8.20.10#820010)