com.sun.xml.wss.impl.config
Class SecurityConfigurationXmlReader

java.lang.Object
  extended by com.sun.xml.wss.impl.config.SecurityConfigurationXmlReader
All Implemented Interfaces:
ConfigurationConstants

public class SecurityConfigurationXmlReader
extends Object
implements ConfigurationConstants

Represents a Parser for reading an XWS-Security configuration and creating an appropriate XWS-Security configuration object. The parser expects the root element of an XWS-Security configuration to be either a xwss:JAXRPCSecurity or a xwss:SecurityConfiguration.

See Also:
(the XWS-Security configuration schema)

Field Summary
protected static Logger log
           
 
Fields inherited from interface com.sun.xml.wss.impl.config.ConfigurationConstants
ALGORITHM_ATTRIBUTE_NAME, ALGORITHM_PARAMETER_ELEMENT_NAME, ALGORITHM_PARAMETER_ELEMENT_QNAME, BSP_CONFORMANCE, CANONICALIZATION_METHOD_ELEMENT_NAME, CANONICALIZATION_METHOD_ELEMENT_QNAME, CERTIFICATE_ALIAS_ATTRIBUTE_NAME, CONFIGURATION_URL, CONFORMANCE_ATTRIBUTE_NAME, CONTENT_ONLY_ATTRIBUTE_NAME, DATA_ENCRYPTION_METHOD_ELEMENT_NAME, DATA_ENCRYPTION_METHOD_ELEMENT_QNAME, DECLARATIVE_CONFIGURATION_ELEMENT_NAME, DECLARATIVE_CONFIGURATION_ELEMENT_QNAME, DEFAULT_CONFIGURATION_PREFIX, DEFAULT_DATA_ENC_ALGO, DEFAULT_KEY_ENC_ALGO, DIGEST_METHOD_ELEMENT_NAME, DIGEST_METHOD_ELEMENT_QNAME, DIGEST_PASSWORD_ATTRIBUTE_NAME, DIRECT_KEY_REFERENCE_TYPE, DISABLE_INCLUSIVE_PREFIX, DUMP_MESSAGES_ATTRIBUTE_NAME, EMBEDDED_KEY_REFERENCE_TYPE, ENABLE_DYNAMIC_POLICY_ATTRIBUTE_NAME, ENABLE_WSS11_POLICY_ATTRIBUTE_NAME, ENCODING_TYPE_ATTRIBUTE_NAME, ENCRYPT_OPERATION_ELEMENT_NAME, ENCRYPT_OPERATION_ELEMENT_QNAME, ENCRYPTION_REQUIREMENT_ELEMENT_NAME, ENCRYPTION_REQUIREMENT_ELEMENT_QNAME, ENCRYPTION_TARGET_ELEMENT_NAME, ENCRYPTION_TARGET_ELEMENT_QNAME, ENFORCE_ATTRIBUTE_NAME, HOK_SAML_TYPE, ID_ATTRIBUTE_NAME, IDENTIFIER_KEY_REFERENCE_TYPE, INCLUDE_TIMESTAMP_ATTRIBUTE_NAME, JAXRPC_SECURITY_ELEMENT_NAME, JAXRPC_SECURITY_ELEMENT_QNAME, KEY_ENCRYPTION_METHOD_ELEMENT_NAME, KEY_ENCRYPTION_METHOD_ELEMENT_QNAME, KEY_REFERENCE_TYPE_ATTRIBUTE_NAME, MAX_CLOCK_SKEW, MAX_NONCE_AGE, NAME_ATTRIBUTE_NAME, NONCE_REQUIRED_ATTRIBUTE_NAME, OPERATION_ELEMENT_NAME, OPERATION_ELEMENT_QNAME, OPTIMIZE_ATTRIBUTE_NAME, OPTIONAL_TARGETS_ELEMENT_NAME, OPTIONAL_TARGETS_ELEMENT_QNAME, PASSWORD_ATTRIBUTE_NAME, PASSWORD_DIGEST_REQUIRED_ATTRIBUTE_NAME, PORT_ELEMENT_NAME, PORT_ELEMENT_QNAME, QNAME_TARGET, REQUIRE_SAML_ASSERTION_ELEMENT_NAME, RESET_MUST_UNDERSTAND, RETAIN_SEC_HEADER, SAML_ASSERTION_ELEMENT_NAME, SAML_ASSERTION_TYPE_ATTRIBUTE_NAME, SAML_AUTHORITY_ID_ATTRIBUTE_NAME, SAML_ELEMENT_QNAME, SAML_KEYIDENTIFIER_ATTRIBUTE_NAME, SAML_REQUIREMENT_ELEMENT_QNAME, SECURITY_ENVIRONMENT_HANDLER_ELEMENT_NAME, SECURITY_ENVIRONMENT_HANDLER_ELEMENT_QNAME, SERIAL_KEY_REFERENCE_TYPE, SERVICE_ELEMENT_NAME, SERVICE_ELEMENT_QNAME, SIGN_OPERATION_ELEMENT_NAME, SIGN_OPERATION_ELEMENT_QNAME, SIGNATURE_METHOD_ELEMENT_NAME, SIGNATURE_METHOD_ELEMENT_QNAME, SIGNATURE_REQUIREMENT_ELEMENT_NAME, SIGNATURE_REQUIREMENT_ELEMENT_QNAME, SIGNATURE_TARGET_ELEMENT_NAME, SIGNATURE_TARGET_ELEMENT_QNAME, SIGNED_TOKEN_REQUIRED_ATTRIBUTE_NAME, STRID, SV_SAML_TYPE, SYMMETRIC_KEY_ALIAS_ATTRIBUTE_NAME, SYMMETRIC_KEY_ELEMENT_NAME, SYMMETRIC_KEY_ELEMENT_QNAME, TARGET_ELEMENT_NAME, TARGET_QNAME, TARGET_TYPE_ATTRIBUTE_NAME, TARGET_VALUE_SOAP_BODY, TIMEOUT_ATTRIBUTE_NAME, TIMESTAMP_ELEMENT_NAME, TIMESTAMP_ELEMENT_QNAME, TIMESTAMP_FRESHNESS_LIMIT, TIMESTAMP_REQUIRED_ATTRIBUTE_NAME, TIMESTAMP_REQUIREMENT_ELEMENT_NAME, TIMESTAMP_REQUIREMENT_ELEMENT_QNAME, TRANSFORM_ELEMENT_NAME, TRANSFORM_ELEMENT_QNAME, URI_TARGET, USE_NONCE_ATTRIBUTE_NAME, USECACHE_ATTRIBUTE_NAME, USERNAME_ATTRIBUTE_NAME, USERNAME_PASSWORD_AUTHENTICATION_ELEMENT_NAME, USERNAME_PASSWORD_AUTHENTICATION_ELEMENT_QNAME, USERNAMETOKEN_REQUIREMENT_ELEMENT_NAME, USERNAMETOKEN_REQUIREMENT_ELEMENT_QNAME, VALUE_ATTRIBUTE_NAME, VALUE_TYPE_ATTRIBUTE_NAME, X509TOKEN_ELEMENT_NAME, X509TOKEN_ELEMENT_QNAME, XPATH_TARGET
 
Constructor Summary
SecurityConfigurationXmlReader()
           
 
Method Summary
static ApplicationSecurityConfiguration createApplicationSecurityConfiguration(InputStream xmlStream)
          read an XWS-Security configuration representing an xwss:JAXRPCSecurity element and return an ApplicationSecurityConfiguration instance.
static DeclarativeSecurityConfiguration createDeclarativeConfiguration(InputStream xmlStream)
          read an XWS-Security configuration representing a xwss:SecurityConfiguration element and return a DeclarativeSecurityConfiguration instance.
static ApplicationSecurityConfiguration readApplicationSecurityConfigurationString(String sourceXml)
          read an XWS-Security configuration String representing an xwss:JAXRPCSecurity element and return an ApplicationSecurityConfiguration instance.
static void validate(InputStream xmlStream, PrintStream out)
          Parse and validate an XWS-Security configuration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final Logger log
Constructor Detail

SecurityConfigurationXmlReader

public SecurityConfigurationXmlReader()
Method Detail

readApplicationSecurityConfigurationString

public static ApplicationSecurityConfiguration readApplicationSecurityConfigurationString(String sourceXml)
                                                                                   throws Exception
read an XWS-Security configuration String representing an xwss:JAXRPCSecurity element and return an ApplicationSecurityConfiguration instance.

Parameters:
sourceXml - the configuration String
Returns:
an ApplicationSecurityConfiguration corresponding to the configuration
Throws:
Exception - if there was an error in creating the configuration

validate

public static void validate(InputStream xmlStream,
                            PrintStream out)
                     throws Exception
Parse and validate an XWS-Security configuration

Parameters:
xmlStream - the InputStream representing the configuration
out - the PrintStream to which Errors messages should be logged
Throws:
Exception - if there was an error while validating the configuration

createDeclarativeConfiguration

public static DeclarativeSecurityConfiguration createDeclarativeConfiguration(InputStream xmlStream)
                                                                       throws Exception
read an XWS-Security configuration representing a xwss:SecurityConfiguration element and return a DeclarativeSecurityConfiguration instance.

Parameters:
xmlStream - the InputStream for the configuration
Returns:
a DeclarativeSecurityConfiguration corresponding to the configuration
Throws:
Exception - if there was an error in creating the configuration

createApplicationSecurityConfiguration

public static ApplicationSecurityConfiguration createApplicationSecurityConfiguration(InputStream xmlStream)
                                                                               throws Exception
read an XWS-Security configuration representing an xwss:JAXRPCSecurity element and return an ApplicationSecurityConfiguration instance.

Parameters:
xmlStream - the InputStream for the configuration
Returns:
an ApplicationSecurityConfiguration corresponding to the configuration
Throws:
Exception - if there was an error in creating the configuration


Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.