Class SamlUtils
java.lang.Object
org.elasticsearch.xpack.security.authc.saml.SamlUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends org.opensaml.core.xml.XMLObject>
TbuildObject(Class<T> type, QName elementName) static StringgenerateSecureNCName(int numberBytes) static DocumentBuildergetHardenedBuilder(String[] schemaFiles) Constructs a DocumentBuilder with all the necessary features for it to be securestatic Transformerstatic booleanisSamlException(org.elasticsearch.ElasticsearchSecurityException exception) static org.elasticsearch.ElasticsearchSecurityExceptionsamlException(String msg, Exception cause, Object... args) static org.elasticsearch.ElasticsearchSecurityExceptionsamlException(String msg, Object... args) Constructs an exception that can be distinguished (viaisSamlException(org.elasticsearch.ElasticsearchSecurityException)as a SAML specific exception Used to distinguish "expected" exceptions (such as SAML signature failures, or missing attributes) that should be treated as a simple authentication failure (with a clear cause)
-
Constructor Details
-
SamlUtils
public SamlUtils()
-
-
Method Details
-
samlException
public static org.elasticsearch.ElasticsearchSecurityException samlException(String msg, Object... args) Constructs an exception that can be distinguished (viaisSamlException(org.elasticsearch.ElasticsearchSecurityException)as a SAML specific exception Used to distinguish "expected" exceptions (such as SAML signature failures, or missing attributes) that should be treated as a simple authentication failure (with a clear cause) -
samlException
public static org.elasticsearch.ElasticsearchSecurityException samlException(String msg, Exception cause, Object... args) - See Also:
-
isSamlException
public static boolean isSamlException(org.elasticsearch.ElasticsearchSecurityException exception) - See Also:
-
buildObject
-
generateSecureNCName
-
getHardenedXMLTransformer
-
getHardenedBuilder
public static DocumentBuilder getHardenedBuilder(String[] schemaFiles) throws ParserConfigurationException Constructs a DocumentBuilder with all the necessary features for it to be secure- Throws:
ParserConfigurationException- if one of the features can't be set on the DocumentBuilderFactory
-