org.rhq.enterprise.server.configuration.util
Class ConfigurationMaskingUtility
java.lang.Object
org.rhq.enterprise.server.configuration.util.ConfigurationMaskingUtility
public class ConfigurationMaskingUtility
- extends Object
A class that provides static methods for masking and unmasking password properties within Configurations,
The reason for masking a property's value is so that the current values of such properties cannot be viewed by a
user by viewing the HTML source of a Configuration GUI page, e.g.:
<input type="password" value="********" .../>
would be rendered, rather than:
<input type="password" value="ACTUAL_PASSWORD" .../>
- Author:
- Ian Springer
|
Method Summary |
static void |
maskConfiguration(org.rhq.core.domain.configuration.Configuration configuration,
org.rhq.core.domain.configuration.definition.ConfigurationDefinition configurationDefinition)
Mask the values of all simple properties of type PASSWORD in the configuration. |
static void |
unmaskConfiguration(org.rhq.core.domain.configuration.Configuration configuration,
org.rhq.core.domain.configuration.Configuration unmaskedConfiguration)
Unmask the values of all masked simple properties of type PASSWORD in the configuration. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConfigurationMaskingUtility
public ConfigurationMaskingUtility()
maskConfiguration
public static void maskConfiguration(@NotNull
org.rhq.core.domain.configuration.Configuration configuration,
@NotNull
org.rhq.core.domain.configuration.definition.ConfigurationDefinition configurationDefinition)
- Mask the values of all simple properties of type PASSWORD in the configuration. The properties are masked by
calling
PropertySimple.mask(). The configuration does not need to be normalized; that is, properties
defined by the configuration definition do not need to exist in the configuration.
- Parameters:
configuration - the configuration to be maskedconfigurationDefinition - the configuration definition corresponding to the specified configuration; this is
used to determine which properties to mask - all simple properties of type
PASSWORD at any level within the configuration are masked
unmaskConfiguration
public static void unmaskConfiguration(@NotNull
org.rhq.core.domain.configuration.Configuration configuration,
@NotNull
org.rhq.core.domain.configuration.Configuration unmaskedConfiguration)
- Unmask the values of all masked simple properties of type PASSWORD in the configuration. The configuration does not
need to be normalized; that is, properties defined by the configuration definition do not need to exist in the
configuration.
- Parameters:
configuration - the configuration to be unmaskedunmaskedConfiguration - the unmasked configuration that should be used as the reference to unmask the
configuration
Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.