-
Notifications
You must be signed in to change notification settings - Fork 95
Open
Description
We are facing a dilemma with the secure preferences as we want:
- To install a default encrypted file with all the passwords for css, alarm server and archive engine (under /opt/…)
- This file need to be read-only, as if the user enters a wrong password, it would be saved and he/she won’t be able to restore the good default one as it was overwritten (restore button from the GUI preferences)
- But for some usage, we need to modify the default CSS settings when we work for example in production (passwords could be different from development) in order to plot data from different location and rdb user/password. So we would like to change them using the GUI and when the exception is raised because the encrypted file id read-only, choose to store the new encrypted file under the workspace instead of the install location.
Proposed solution:
Add a new preference to org.csstudio.security
:
# Define if the location where the encrypted settings are stored defined by
# 'secure_preference_location' preference is read only or can be overwritten
#
# false = default behavior, the encrypted settings can be overwritten
#
# true = the encrypted settings are loaded from the 'secure_preference_location'
# but are written in a secure store located within the workspace.
# The encrypted settings are restored/reloaded from 'secure_preference_location'
secure_read_only=false
Update
core/plugins/org.csstudio.security.ui/src/org/csstudio/security/ui/PasswordFieldEditor.java
and
core/plugins/org.csstudio.security/src/org/csstudio/security/preferences/SecurePreferences.java
to handle this new behavior without impacting the old one (preference will be set to false
by default)
Are you OK with this change ?