ConfigurationController.getPropertiesConfiguration() (added in #405) returns the controller's live, mutable PropertiesConfiguration. Every consumer today (Mirth, MirthWebServer, WebStartServlet) only reads it, so it's safe, but nothing enforces that. A future consumer that mutates it would corrupt the authoritative config the whole server reads.
Enforcing read-only means returning an ImmutableConfiguration (via ConfigurationUtils.unmodifiableConfiguration). That changes the declared type through Mirth, MirthWebServer, the servlet filters, and WebStartServlet, and runs through the SSL connector construction, so it needs its own boot + TLS test and a check of the tls-manager plugin overrides on that path. The controller keeps writing the backing config during startup (keystore password generation, password re-encryption); consumers see those writes through the view but can't make their own.
Also drop the now-dead self-copy in Mirth.startup() (updatePropertiesConfiguration(mirthProperties)), a no-op once the consumer holds the controller's own object.
Context: #405.
ConfigurationController.getPropertiesConfiguration()(added in #405) returns the controller's live, mutablePropertiesConfiguration. Every consumer today (Mirth,MirthWebServer,WebStartServlet) only reads it, so it's safe, but nothing enforces that. A future consumer that mutates it would corrupt the authoritative config the whole server reads.Enforcing read-only means returning an
ImmutableConfiguration(viaConfigurationUtils.unmodifiableConfiguration). That changes the declared type throughMirth,MirthWebServer, the servlet filters, andWebStartServlet, and runs through the SSL connector construction, so it needs its own boot + TLS test and a check of the tls-manager plugin overrides on that path. The controller keeps writing the backing config during startup (keystore password generation, password re-encryption); consumers see those writes through the view but can't make their own.Also drop the now-dead self-copy in
Mirth.startup()(updatePropertiesConfiguration(mirthProperties)), a no-op once the consumer holds the controller's own object.Context: #405.