Skip to content

Conversation

rogin
Copy link
Contributor

@rogin rogin commented Jul 4, 2025

Allow for using the keystore on a readonly filesystem. Currently, a write to the keystore will always occur. This change limits writes to only when necessary.

I welcome others to test by mounting the keystore as readonly. The keystore should not have the default storepass and keypass that that will trigger a write.

I'm considering a test in DefaultConfigurationControllerTest where the modification time of a keystore is checked before and after the call, but that's a lot of investigation to get it written correctly.

Minor other code cleanup was also included.

Related
Original ticket - nextgenhealthcare/connect#5467
Previous PR by @jonbartels - nextgenhealthcare/connect@development...jonbartels:connect:5467-keytore-avoid-writes
Summary table in #121

Signed-off-by: Richard Ogin <rogin@users.noreply.github.com>
@rogin rogin force-pushed the avoid-keystore-write branch from 7ad8178 to 8b1a164 Compare July 4, 2025 05:06
Copy link
Member

@tonygermano tonygermano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested it yet, but I'm fine with this approach.

I would like to see the deprecation of ResourceUtil.closeResourceQuietly broken out to a different PR. It's not related to this keystore change, and the current state of the PR leaves a lot of references calling the deprecated method. I wonder if in some situations we would do better to change the calls to a try-with-resource block rather than using IOUtils.

Could you also please update the javadoc for the two private methods you changed to indicate the purpose of the return value?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants