Class SecureConfigurationViewService
java.lang.Object
de.hybris.platform.servicelayer.config.impl.SecureConfigurationViewService
- All Implemented Interfaces:
ConfigurationViewService
SecureConfigurationViewService allows to obtain system properties, environment variables and Hybris configuration
properties with sensitive properties (such as passwords) removed or hidden.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor used by Spring.SecureConfigurationViewService(Supplier<Map<String, String>> envSupplier, Supplier<Properties> propertiesSupplier, Supplier<ConfigIntf> configSupplier) Mainly for testing purposes. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisPropertySensitive(String propertyName) Method checks if property contains sensitive data (such as password)Reads and filters Hybris configuration - equivalent to Registry.getCurrentTenant().getConfig()Reads and filters system environment variables - equivalent to System.getenv()Reads and filters system properties - equivalent to System.getProperties()
-
Field Details
-
CONFIGURATION_VIEW_STRATEGY
- See Also:
-
BLACKLIST_EXACT_MATCH
- See Also:
-
BLACKLIST_REGEX_RULE
- See Also:
-
REMOVE_STRATEGY
- See Also:
-
-
Constructor Details
-
SecureConfigurationViewService
public SecureConfigurationViewService()Default constructor used by Spring. Uses System and Registry classes to get properties -
SecureConfigurationViewService
public SecureConfigurationViewService(Supplier<Map<String, String>> envSupplier, Supplier<Properties> propertiesSupplier, Supplier<ConfigIntf> configSupplier) Mainly for testing purposes.- Parameters:
envSupplier- system environment variables supplierpropertiesSupplier- system properties supplierconfigSupplier- Hybris configuration supplier
-
-
Method Details
-
readSystemProperties
Description copied from interface:ConfigurationViewServiceReads and filters system properties - equivalent to System.getProperties()- Specified by:
readSystemPropertiesin interfaceConfigurationViewService- Returns:
- filtered subset of system properties
-
readEnvVariables
Description copied from interface:ConfigurationViewServiceReads and filters system environment variables - equivalent to System.getenv()- Specified by:
readEnvVariablesin interfaceConfigurationViewService- Returns:
- filtered subset of system environment variables
-
readConfigParameters
Description copied from interface:ConfigurationViewServiceReads and filters Hybris configuration - equivalent to Registry.getCurrentTenant().getConfig()- Specified by:
readConfigParametersin interfaceConfigurationViewService- Returns:
- filtered subset Hybris configuration
-
isPropertySensitive
Description copied from interface:ConfigurationViewServiceMethod checks if property contains sensitive data (such as password)- Specified by:
isPropertySensitivein interfaceConfigurationViewService- Parameters:
propertyName- property name to be checked- Returns:
trueif property contains sensitive data, otherwisefalse</
-