Skip to content

Commit 8db23bf

Browse files
cleanup
1 parent 0653c90 commit 8db23bf

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

x-pack/plugin/identity-provider/src/main/java/org/elasticsearch/xpack/idp/saml/authn/SamlAuthnRequestValidator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ private static void validateNameIdPolicy(AuthnRequest request, SamlServiceProvid
250250
}
251251

252252
private boolean validateSignature(ParsedQueryString queryString, Collection<X509Credential> credentials) {
253-
final String javaSigAlgorithm = SamlFactory.getJavaAlorithmNameFromUri(queryString.sigAlg);
253+
final String javaSigAlgorithm = SamlFactory.getJavaAlgorithmNameFromUri(queryString.sigAlg);
254254
final byte[] contentBytes = queryString.reconstructQueryParameters().getBytes(StandardCharsets.UTF_8);
255255
final byte[] signatureBytes = Base64.getDecoder().decode(queryString.signature);
256256
return credentials.stream().anyMatch(credential -> {

x-pack/plugin/identity-provider/src/main/java/org/elasticsearch/xpack/idp/saml/support/SamlFactory.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import org.elasticsearch.ElasticsearchSecurityException;
1212
import org.elasticsearch.common.Strings;
1313
import org.elasticsearch.common.hash.MessageDigests;
14-
import org.elasticsearch.core.SuppressForbidden;
1514
import org.elasticsearch.core.XmlUtils;
1615
import org.opensaml.core.xml.XMLObject;
1716
import org.opensaml.core.xml.XMLObjectBuilderFactory;
@@ -217,12 +216,11 @@ public static Element toDomElement(XMLObject object) {
217216
*
218217
* @throws ParserConfigurationException if one of the features can't be set on the DocumentBuilderFactory
219218
*/
220-
@SuppressForbidden(reason = "This is the only allowed way to construct a DocumentBuilder")
221219
public static DocumentBuilder getHardenedBuilder(String[] schemaFiles) throws ParserConfigurationException {
222220
return XmlUtils.getHardenedBuilder(resolveSchemaFilePaths(schemaFiles));
223221
}
224222

225-
public static String getJavaAlorithmNameFromUri(String sigAlg) {
223+
public static String getJavaAlgorithmNameFromUri(String sigAlg) {
226224
return switch (sigAlg) {
227225
case "http://www.w3.org/2000/09/xmldsig#dsa-sha1" -> "SHA1withDSA";
228226
case "http://www.w3.org/2000/09/xmldsig#dsa-sha256" -> "SHA256withDSA";

0 commit comments

Comments
 (0)