Package org.opencms.security
Class CmsRfsSecretStore
java.lang.Object
org.opencms.security.CmsRfsSecretStore
- All Implemented Interfaces:
I_CmsConfigurationParameterHandler,I_CmsSecretStore
RFS secret store which just loads secrets from a .properties file, whose path is configured via the 'path' parameter.
This class already initializes itself in the initConfiguration() method, which means it can return secrets before the initialize() method (which does nothing) is even called.
When OpenCms is running, this class will also track modifications in the configured secrets file and reload it.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe parameter for the encryption password (use no encryption if not set) .static final StringThe parameter used to configure the path of the properties file.Fields inherited from interface org.opencms.configuration.I_CmsConfigurationParameterHandler
ADD_PARAMETER_METHOD, INIT_CONFIGURATION_METHOD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConfigurationParameter(String key, String value) Adds a configuration parameter to this parameter configurable class instance.Returns the parameters of this configurable class instance, ornullif the class does not need any parameters.Gets the secret for the given key.voidInitializes a configuration after all parameters have been added.voidinitialize(CmsObject cmsObject) The Admin CmsObject to use for Vfs operations, etc.
-
Field Details
-
PARAM_PATH
The parameter used to configure the path of the properties file.- See Also:
-
PARAM_PASSWORD
The parameter for the encryption password (use no encryption if not set) .- See Also:
-
-
Constructor Details
-
CmsRfsSecretStore
public CmsRfsSecretStore()
-
-
Method Details
-
addConfigurationParameter
Description copied from interface:I_CmsConfigurationParameterHandlerAdds a configuration parameter to this parameter configurable class instance.- Specified by:
addConfigurationParameterin interfaceI_CmsConfigurationParameterHandler- Parameters:
key- the name of the parametervalue- the value for the parameter- See Also:
-
getConfiguration
Description copied from interface:I_CmsConfigurationParameterHandlerReturns the parameters of this configurable class instance, ornullif the class does not need any parameters.- Specified by:
getConfigurationin interfaceI_CmsConfigurationParameterHandler- Returns:
- the parameters of this configurable class instance,
or
nullif the class does not need any parameters - See Also:
-
getSecret
Description copied from interface:I_CmsSecretStoreGets the secret for the given key.If no secret is found, null will be returned.
Note: this may be called before the initialize() method, and in that case, it should not throw any exceptions (whether it can actually return something meaningful depends on the implementation).
- Specified by:
getSecretin interfaceI_CmsSecretStore- Parameters:
key- the key for a secret- Returns:
- the secret
- See Also:
-
initConfiguration
Description copied from interface:I_CmsConfigurationParameterHandlerInitializes a configuration after all parameters have been added.- Specified by:
initConfigurationin interfaceI_CmsConfigurationParameterHandler- Throws:
CmsConfigurationException- if something goes wrong- See Also:
-
initialize
Description copied from interface:I_CmsSecretStoreThe Admin CmsObject to use for Vfs operations, etc.- Specified by:
initializein interfaceI_CmsSecretStore- Parameters:
cmsObject- the admin CmsObject- See Also:
-