Package com.sun.xml.wss.impl.config
Class SecurityConfigurationXmlReader
- java.lang.Object
-
- 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 axwss:JAXRPCSecurityor axwss:SecurityConfiguration. xwssconfig.xsd (the XWS-Security configuration schema)
-
-
Field Summary
Fields Modifier and Type Field Description protected static Loggerlog-
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
Constructors Constructor Description SecurityConfigurationXmlReader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ApplicationSecurityConfigurationcreateApplicationSecurityConfiguration(InputStream xmlStream)read an XWS-Security configuration representing anxwss:JAXRPCSecurityelement and return an ApplicationSecurityConfiguration instance.static DeclarativeSecurityConfigurationcreateDeclarativeConfiguration(InputStream xmlStream)read an XWS-Security configuration representing axwss:SecurityConfigurationelement and return a DeclarativeSecurityConfiguration instance.static ApplicationSecurityConfigurationreadApplicationSecurityConfigurationString(String sourceXml)read an XWS-Security configuration String representing anxwss:JAXRPCSecurityelement and return an ApplicationSecurityConfiguration instance.static voidvalidate(InputStream xmlStream, PrintStream out)Parse and validate an XWS-Security configuration
-
-
-
Field Detail
-
log
protected static final Logger log
-
-
Method Detail
-
readApplicationSecurityConfigurationString
public static ApplicationSecurityConfiguration readApplicationSecurityConfigurationString(String sourceXml) throws Exception
read an XWS-Security configuration String representing anxwss:JAXRPCSecurityelement and return an ApplicationSecurityConfiguration instance.- Parameters:
sourceXml- the configuration String- Returns:
- an
ApplicationSecurityConfigurationcorresponding 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 configurationout- 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 axwss:SecurityConfigurationelement and return a DeclarativeSecurityConfiguration instance.- Parameters:
xmlStream- the InputStream for the configuration- Returns:
- a
DeclarativeSecurityConfigurationcorresponding 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 anxwss:JAXRPCSecurityelement and return an ApplicationSecurityConfiguration instance.- Parameters:
xmlStream- the InputStream for the configuration- Returns:
- an
ApplicationSecurityConfigurationcorresponding to the configuration - Throws:
Exception- if there was an error in creating the configuration
-
-