Package com.sdl.delivery.security.xml
Enum Class XmlRestriction
- All Implemented Interfaces:
Serializable,Comparable<XmlRestriction>,Constable
Defines a restriction type (such as protocol name) for passing to XML stuff.
list of java protocols may be found here:
https://stackoverflow.com/questions/5742774/testing-with-java-protocol-notations-for-urlconnection
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionenables external DTD for all protocols.enables external DTD only for files.enables external DTD only for files in jars.enables external DTD only for ftp.enables external DTD only for ftps.enables external DTD only for http.enables external DTD only for https.enables external DTD only for jars.disables external DTD.enables external DTD only for sftp.enables external XSD for all protocols.enables external XSD only for files.enables external XSD only for files in jar.enables external XSD only for ftp.enables external XSD only for ftp.enables external XSD only for http.enables external XSD only for https.enables external XSD only for jars.disables external XSD.enables external XSD only for sftp.enables external XSL.enables external XSL only for files.enables external XSL only for files in jar.enables external XSL only for ftp.enables external XSL only for ftps.enables external XSL only for http.enables external XSL only for https.enables external XSL only for jars.disables external XSL.enables external XSL only for sftp. -
Method Summary
Modifier and TypeMethodDescriptionstatic XmlRestriction[]Provides a full list of possible allowance to enable XLST working with local files.static XmlRestriction[]Provides a full list of possible allowance to enable XLST working with remote files.static XmlRestrictionReturns the enum constant of this class with the specified name.static XmlRestriction[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ALLOW_EXTERNAL_DTD_NONE
disables external DTD. -
ALLOW_EXTERNAL_DTD_FILE
enables external DTD only for files. -
ALLOW_EXTERNAL_DTD_JAR
enables external DTD only for jars. -
ALLOW_EXTERNAL_DTD_FILE_IN_JAR
enables external DTD only for files in jars. -
ALLOW_EXTERNAL_DTD_HTTP
enables external DTD only for http. -
ALLOW_EXTERNAL_DTD_HTTPS
enables external DTD only for https. -
ALLOW_EXTERNAL_DTD_FTP
enables external DTD only for ftp. -
ALLOW_EXTERNAL_DTD_FTPS
enables external DTD only for ftps. -
ALLOW_EXTERNAL_DTD_SFTP
enables external DTD only for sftp. -
ALLOW_EXTERNAL_DTD_ALL
enables external DTD for all protocols. -
ALLOW_EXTERNAL_SCHEMA_NONE
disables external XSD. -
ALLOW_EXTERNAL_SCHEMA_FILE
enables external XSD only for files. -
ALLOW_EXTERNAL_SCHEMA_JAR
enables external XSD only for jars. -
ALLOW_EXTERNAL_SCHEMA_FILE_IN_JAR
enables external XSD only for files in jar. -
ALLOW_EXTERNAL_SCHEMA_HTTP
enables external XSD only for http. -
ALLOW_EXTERNAL_SCHEMA_HTTPS
enables external XSD only for https. -
ALLOW_EXTERNAL_SCHEMA_FTP
enables external XSD only for ftp. -
ALLOW_EXTERNAL_SCHEMA_FTPS
enables external XSD only for ftp. -
ALLOW_EXTERNAL_SCHEMA_SFTP
enables external XSD only for sftp. -
ALLOW_EXTERNAL_SCHEMA_ALL
enables external XSD for all protocols. -
ALLOW_EXTERNAL_STYLESHEET_NONE
disables external XSL. -
ALLOW_EXTERNAL_STYLESHEET_FILE
enables external XSL only for files. -
ALLOW_EXTERNAL_STYLESHEET_JAR
enables external XSL only for jars. -
ALLOW_EXTERNAL_STYLESHEET_FILE_IN_JAR
enables external XSL only for files in jar. -
ALLOW_EXTERNAL_STYLESHEET_HTTP
enables external XSL only for http. -
ALLOW_EXTERNAL_STYLESHEET_HTTPS
enables external XSL only for https. -
ALLOW_EXTERNAL_STYLESHEET_FTP
enables external XSL only for ftp. -
ALLOW_EXTERNAL_STYLESHEET_FTPS
enables external XSL only for ftps. -
ALLOW_EXTERNAL_STYLESHEET_SFTP
enables external XSL only for sftp. -
ALLOW_EXTERNAL_STYLESHEET_ALL
enables external XSL.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getProtocol
-
getResourceType
-
makeForLocalFiles
Provides a full list of possible allowance to enable XLST working with local files. To exploit the XXE vulnerability our XML/XSL/XSD have to be replaced with external links. It might be done only if access to file system is not restricted.- Returns:
- array of restrictions which are allowed for XSLT
-
makeForRemoteFiles
Provides a full list of possible allowance to enable XLST working with remote files. These allowed restrictions are dangerous (XXE vulnerability is based on possibility to use not allowed XSL/XSD and external entities in XML) so it needs to be used carefully.- Returns:
- array of restrictions which are allowed for XSLT
-