Commit Graph

85 Commits

Author SHA1 Message Date
Justin Bertram 0ecbae6108 ARTEMIS-4939 allow config of header sizes for embedded web server 2024-08-13 10:38:06 -05:00
Justin Bertram 80ec64c3d9 ARTEMIS-4827 remove unreachable or redundant code 2024-06-19 20:22:46 -04:00
Robbie Gemmell 362dbd11ac ARTEMIS-4790: use JUnit 5 for the tests 2024-06-03 10:06:37 -05:00
Justin Bertram e13d65b16d ARTEMIS-4420 user auth leaks into non-Artemis servlets 2024-05-22 14:10:25 -05:00
Gary Tully f5973d53e6 ARTEMIS-4766 - validate type before newInstance calls 2024-05-17 16:33:08 +01:00
Domenico Francesco Bruscino 3598177734 ARTEMIS-4697 Auto reload SSL PEM config sources on change 2024-03-25 14:26:42 +01:00
Domenico Francesco Bruscino 29781bd5da ARTEMIS-4586 Auto reload web binding SSL stores on change 2024-02-09 17:20:56 +00:00
Gary Tully 5269b1a89d ARTEMIS-4561 expose store type on web component tls binding config 2024-01-10 15:21:53 -06:00
Stephen Higgs 15dd24754a
ARTEMIS-4525 determinstic webapp directory names
This commit uses the war file name as the webapp directory name instead
of the default directory name that includes random charcters.
2023-12-05 10:52:56 -06:00
Domenico Francesco Bruscino 6597f028a3 ARTEMIS-4515 Fix setting web request log using system properties 2023-11-28 16:45:55 -05:00
Justin Bertram bba832139c ARTEMIS-4514 make Jetty thread pool configurable 2023-11-28 16:45:17 -05:00
Justin Bertram 36056a5bdd ARTEMIS-4513 HTTP request logging not working 2023-11-27 13:53:58 -05:00
Robbie Gemmell df410da7ae ARTEMIS-4402: add some unit tests exercising the semi-generated log/message bundles to make generation problems more quickly noticable 2023-08-25 15:02:24 +01:00
Domenico Francesco Bruscino d2a4837b69 ARTEMIS-4245 Expose web SNI settings 2023-05-02 17:18:10 +01:00
Domenico Francesco Bruscino cc9db6b2f7 ARTEMIS-4244 Set web config using system properties 2023-04-26 17:07:32 -05:00
Domenico Francesco Bruscino 8bdffe872c ARTEMIS-4176 Fix console custom root redirect 2023-02-23 12:56:06 +00:00
Domenico Francesco Bruscino 58978ad94a ARTEMIS-4124 Set the SameSite flag on all cookies 2023-01-07 22:55:02 -06:00
Robbie Gemmell f790911c44 ARTEMIS-4110: insert standard ASF licence header comment in various cases, such as to replace a javadoc header 2022-12-07 10:21:25 +00:00
Domenico Francesco Bruscino d3e0ca3e11 ARTEMIS-4071 Fix erroneus audit log messages due to console logouts
The HTTP Informational responses (100 – 199) and redirection messages
(300 – 399) must be ignored they don't mean an authentication failure.
2022-11-04 14:44:21 +01:00
Clebert Suconic 12cc70c5bf ARTEMIS-4020 Using a little trick to create the Loggers
Trick provided by Tim Bish
2022-09-29 17:46:51 -04:00
Robbie Gemmell 9873fccf74 ARTEMIS-4020: switch to using SLF4J API for logging, use Log4J 2 as impl for broker distribution and tests
PR includes work from myself and Clebert Suconic, squashed from the new-logging branch.
2022-09-28 14:01:54 -04:00
Domenico Francesco Bruscino e7ff8fd427 ARTEMIS-3980 Remove web content from distribution 2022-09-16 11:02:25 -04:00
Justin Bertram 695bc5a648 ARTEMIS-3888 make web console detection more robust
Currently the broker detects the presence of the web console by looking
for the name of a file (i.e. console.war). This is fragile because if
the file is renamed for any reason then the broker won't print the
status of the web console when it starts.

This commit improves web console detection by inspecting the
<display-name> tag in the war file's WEB-INF/web.xml. By default it
looks for "hawtio", but this can be customized using the system property
"org.apache.activemq.artemis.webConsoleDisplayName".
2022-07-19 13:42:56 -04:00
Robbie Gemmell 2ab0e85db4 ARTEMIS-3874: move/update various bits to allow removing many test-jar creations and dependencies 2022-06-27 09:52:54 -04:00
Justin Bertram 974bd5f6e1
ARTEMIS-3808 support start/stop embedded web server via mngmnt
It would be useful to be able to cycle the embedded web server if, for
example, one needed to renew the SSL certificates. To support
functionality I made a handful of changes, e.g.:

 - Refactoring WebServerComponent so that all the necessary
   configuration would happen in the start() method.
 - Refactoring WebServerComponentTest to re-use code.
2022-05-23 10:57:49 -05:00
Justin Bertram d377a5a638 ARTEMIS-3658 remove refs to Jetty's deprecated NCSARequestLog 2022-02-04 13:48:49 -05:00
Clebert Suconic 4e52758a62 NO-JIRA Updating activemq.org links 2021-12-20 14:46:01 -05:00
Marlon Müller d56d299456 ARTEMIS-3574 multiple bindings for embedded webserver
* Add BindingDTO to allow configuring multiple addresses to listen on
* Start a new ServerConnector for each binding and deploy the corresponding web-applications
* Update documentation and tests
* Add tests to verify old and new configuration style produce equal results
2021-12-14 19:16:34 -05:00
Clebert Suconic 1857017abe Revert "ARTEMIS-3574 multiple bindings for embedded webserver"
This reverts commit 182334359c.
2021-12-14 15:18:16 -05:00
Marlon Müller 182334359c ARTEMIS-3574 multiple bindings for embedded webserver
* Add BindingDTO to allow configuring multiple addresses to listen on
* Start a new ServerConnector for each binding and deploy the corresponding web-applications
* Update documentation and tests
* Add tests to verify old and new configuration style produce equal results
2021-12-14 09:38:59 -05:00
Domenico Francesco Bruscino c502e94ade ARTEMIS-3605 Upgrade jetty version to 9.4.44.v20210927 2021-12-13 13:37:06 -05:00
Domenico Francesco Bruscino 8635eb65eb ARTEMIS-3567 Fix IllegalStateException on web console logout 2021-11-12 16:28:06 +01:00
Justin Bertram 4569263c04 ARTEMIS-3454 prevent directory listing for deployed web apps 2021-09-03 15:19:51 +01:00
Justin Bertram 2954829e3e ARTEMIS-3399 fix audit logging for AMQP
Due to the multi-threaded AMQP implementation the ThreadLocal variables
used by the AuditLogger to track the username and remote address don't
work properly. Changes include:

 - Passing the audit Subject (set during authentication) and the remote
   address explicitly for audit logging on the relevant ServerSession
   methods rather than relying on the AuditLogger's ThreadLocal
   variables
 - Audit logging core session creation *after* successful authentication
   so that we have the proper Subject; this is especially important for
   the SSL certificate authentication use-case
 - Renaming some methods and variables in AuditLogger to more accurately
   reflect their intended use
 - Adding JavaDoc and refactoring the getCaller methods on AuditLogger
 - Refactor audit log testing and add a new test
2021-07-26 23:27:35 -04:00
brusdev 819f1834f5 ARTEMIS-2596 Move tmp web dir for a safe clean up 2020-06-16 15:31:06 -04:00
Howard Gao d0a2186e9c ARTEMIS-2596 (kill -9) AMQ causes tmp web dir space usage to increase
If you kill the server without invoking a normal shutdown, tmp
web files are not cleaned out.  This leaves old webapp folders
lingering until a normal shutdown.

In a failover test environment that repeatedly kills the server,
this causes disk space usage issues.

The fix is to add a cleanup method before the web server starts.
It searches the tmp web dir if there is any leftover files/dirs
and delete them if any.
2020-05-18 16:25:48 -04:00
Andy Taylor 8a04ee07de ARTEMIS-2648 - audit logging improvements
https://issues.apache.org/jira/browse/ARTEMIS-2648
2020-05-04 15:19:08 +01:00
Justin Bertram 99d9948e50 ARTEMIS-2663 add test for customizer 2020-03-18 14:43:19 -04:00
brusdev af72c008ff ARTEMIS-2663 Add customizer support for the embedded web server 2020-03-18 10:01:41 -05:00
brusdev 1e9be7ddc9 ARTEMIS-2627 simpleSecureServer failing on IBM Java 8 JVM
Remove excluded cipher suites matching the prefix `SSL` because the names of the
IBM Java 8 JVM cipher suites have the prefix `SSL` while the
`DEFAULT_EXCLUDED_CIPHER_SUITES` of org.eclipse.jetty.util.ssl.SslContextFactory
includes "^SSL_.*$". So all IBM JVM cipher suites are excluded by
SslContextFactory using the `DEFAULT_EXCLUDED_CIPHER_SUITES`.
2020-02-25 12:02:51 -06:00
brusdev 52e3a0a347 ARTEMIS-2601 Update jetty version to 9.4.26.v20200117 2020-01-21 12:55:16 -05:00
Clebert Suconic b0497ed724 ARTEMIS-2517 JMX will be shutdown after failback 2019-10-10 14:44:55 -04:00
Clebert Suconic 27b151bb0e NO-JIRA moving Wait and removing some duplicate code on artemis-junit module 2019-07-16 22:30:59 -04:00
Justin Bertram 5768f6e2f3 ARTEMIS-2308 Support exporting metrics 2019-05-29 15:07:45 -04:00
Clebert Suconic 061fb2787e ARTEMIS-1977 Stripping activemq-artemis as a separated proejct 2019-03-07 11:34:15 -05:00
Jiri Danek b8df8dead3 NO-JIRA Fix a "Dereference null return value" Coverity Scan warning
The value checked for null was not the one that was subsequently used.
2019-02-19 17:34:59 -05:00
Clebert Suconic 9c06d4b8b6 ARTEMIS-1058 Fixing checkstyle 2019-02-06 18:29:53 -05:00
Clebert Suconic 59ada66033 ARTEMIS-1058 Improving web temporary cleanup
* Using SpawnedVMSupport (used to be on testsuite, moving it to Utils)
* Building the classpath for ./lib, similar to what happens on Bootstrap
* Using Path as much as possible to avoid issues encoding files
2019-02-06 09:36:04 -05:00
Howard Gao ae00423034 ARTEMIS-1058 Jars in web tmp dir locked on Windows
Because Sun's URLClassLoader never closes it's jar file handles
Jetty doesn't cleanup is temp web dir after Artemis broker shut
down normally on Windows.

To work around this a new process is forked before broker VM
exits to clean up the tmp dir if they are not deleted. The
new process out lives the main VM so that those jar's handles
are released and the temp dir can be cleaned up.
2019-01-22 17:37:12 -05:00
Justin Bertram 647998c4e1 ARTEMIS-2126 web server can leak 2018-12-06 16:00:53 +01:00