Skip to content

Hand config consumers a read-only view of mirth.properties #412

Description

@pacmano1

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions