This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new c8fdd552ec6e CAMEL-27775: camel-xmlsecurity - Enforce configured GCM
cipher on unmarshal (#31126)
c8fdd552ec6e is described below
commit c8fdd552ec6e0b43b8417d12d356998e45f0932d
Author: Andrea Cosentino <[email protected]>
AuthorDate: Mon Nov 30 16:58:51 2026 +0100
CAMEL-27775: camel-xmlsecurity - Enforce configured GCM cipher on unmarshal
(#31126)
Signed-off-by: Andrea Cosentino <[email protected]>
AI-generated by Antigravity on behalf of oscerd.
---
.../camel/catalog/docs/xmlSecurity-dataformat.adoc | 3 +
.../src/main/docs/xmlSecurity-dataformat.adoc | 3 +
.../xmlsecurity/XMLSecurityDataFormat.java | 69 ++++-----
.../xmlsecurity/EncryptionAlgorithmTest.java | 168 +++++++++++++++++++++
.../xmlsecurity/XmlSecurityConstantNameTest.java | 2 +
.../ROOT/pages/camel-4x-upgrade-guide-4_25.adoc | 10 ++
6 files changed, 221 insertions(+), 34 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/xmlSecurity-dataformat.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/xmlSecurity-dataformat.adoc
index e7b53ee5d873..21f2146865b0 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/xmlSecurity-dataformat.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/xmlSecurity-dataformat.adoc
@@ -62,6 +62,9 @@ has been explicitly configured as the key cipher algorithm.
The default data (payload) Cipher Algorithm is `XMLCipher.AES_256_GCM`.
Usage of `XMLCipher.TRIPLEDES` (3DES) is discouraged as it is a legacy cipher;
prefer an
AES-GCM algorithm such as `XMLCipher.AES_256_GCM` (the default) or
`XMLCipher.AES_128_GCM`.
+When an AES-GCM algorithm is configured (including the default
`XMLCipher.AES_256_GCM`),
+unmarshalling rejects payloads encrypted with non-GCM algorithms unless a
non-GCM
+`xmlCipherAlgorithm` is explicitly configured.
== Marshal
diff --git
a/components/camel-xmlsecurity/src/main/docs/xmlSecurity-dataformat.adoc
b/components/camel-xmlsecurity/src/main/docs/xmlSecurity-dataformat.adoc
index e7b53ee5d873..21f2146865b0 100644
--- a/components/camel-xmlsecurity/src/main/docs/xmlSecurity-dataformat.adoc
+++ b/components/camel-xmlsecurity/src/main/docs/xmlSecurity-dataformat.adoc
@@ -62,6 +62,9 @@ has been explicitly configured as the key cipher algorithm.
The default data (payload) Cipher Algorithm is `XMLCipher.AES_256_GCM`.
Usage of `XMLCipher.TRIPLEDES` (3DES) is discouraged as it is a legacy cipher;
prefer an
AES-GCM algorithm such as `XMLCipher.AES_256_GCM` (the default) or
`XMLCipher.AES_128_GCM`.
+When an AES-GCM algorithm is configured (including the default
`XMLCipher.AES_256_GCM`),
+unmarshalling rejects payloads encrypted with non-GCM algorithms unless a
non-GCM
+`xmlCipherAlgorithm` is explicitly configured.
== Marshal
diff --git
a/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java
b/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java
index cdcf8094711d..f7c31cb21440 100644
---
a/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java
+++
b/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java
@@ -636,8 +636,9 @@ public class XMLSecurityDataFormat extends ServiceSupport
implements DataFormat,
}
if (secureTag.equalsIgnoreCase("")) {
- checkEncryptionAlgorithm(keyEncryptionKey,
encodedDocument.getDocumentElement());
- encodedDocument = xmlCipher.doFinal(encodedDocument,
encodedDocument.getDocumentElement());
+ Element target = encodedDocument.getDocumentElement();
+ checkEncryptionAlgorithm(xmlCipher, encodedDocument, target,
keyEncryptionKey);
+ encodedDocument = xmlCipher.doFinal(encodedDocument, target);
} else {
try (XPathBuilder xpathBuilder = new XPathBuilder(secureTag)) {
@@ -650,7 +651,11 @@ public class XMLSecurityDataFormat extends ServiceSupport
implements DataFormat,
Node node = nodeList.item(i);
encodedDocument = node.getOwnerDocument();
if (getSecureTagContents()) {
- checkEncryptionAlgorithm(keyEncryptionKey, (Element)
node);
+ Element target = (Element) ((Element) node)
+
.getElementsByTagNameNS(EncryptionConstants.EncryptionSpecNS,
+ EncryptionConstants._TAG_ENCRYPTEDDATA)
+ .item(0);
+ checkEncryptionAlgorithm(xmlCipher, encodedDocument,
target, keyEncryptionKey);
Document temp = xmlCipher.doFinal(encodedDocument,
(Element) node, true);
encodedDocument.importNode(temp.getDocumentElement().cloneNode(true), true);
} else {
@@ -658,7 +663,7 @@ public class XMLSecurityDataFormat extends ServiceSupport
implements DataFormat,
for (int j = 0; j < childNodes.getLength(); j++) {
Node childNode = childNodes.item(j);
if
(childNode.getLocalName().equals("EncryptedData")) {
- checkEncryptionAlgorithm(keyEncryptionKey,
(Element) childNode);
+ checkEncryptionAlgorithm(xmlCipher,
encodedDocument, (Element) childNode, keyEncryptionKey);
Document temp =
xmlCipher.doFinal(encodedDocument, (Element) childNode, false);
encodedDocument.importNode(temp.getDocumentElement().cloneNode(true), true);
}
@@ -783,18 +788,37 @@ public class XMLSecurityDataFormat extends ServiceSupport
implements DataFormat,
return algorithmKeyWrap;
}
- // Check to see if the asymmetric key transport algorithm is allowed
- private void checkEncryptionAlgorithm(Key keyEncryptionKey, Element
parentElement) throws Exception {
- if (XMLCipher.RSA_v1dot5.equals(resolvedKeyCipherAlgorithm())
+ private static boolean isGcmAlgorithm(String algorithm) {
+ return XMLCipher.AES_128_GCM.equals(algorithm)
+ || XMLCipher.AES_192_GCM.equals(algorithm)
+ || XMLCipher.AES_256_GCM.equals(algorithm);
+ }
+
+ // Check to see if the data cipher and asymmetric key transport algorithms
are allowed
+ private void checkEncryptionAlgorithm(
+ XMLCipher xmlCipher, Document encodedDocument, Element
encryptedElement, Key keyEncryptionKey)
+ throws Exception {
+ String configuredXmlCipher = resolvedXmlCipherAlgorithm();
+ if (isGcmAlgorithm(configuredXmlCipher)) {
+ if (encryptedElement == null) {
+ throw new XMLEncryptionException("empty", new Object[] { "The
found data encryption method is not allowed" });
+ }
+ EncryptedData encryptedData =
xmlCipher.loadEncryptedData(encodedDocument, encryptedElement);
+ String foundDataMethod = encryptedData != null &&
encryptedData.getEncryptionMethod() != null
+ ? encryptedData.getEncryptionMethod().getAlgorithm()
+ : null;
+ if (foundDataMethod == null || !isGcmAlgorithm(foundDataMethod)) {
+ throw new XMLEncryptionException("empty", new Object[] { "The
found data encryption method is not allowed" });
+ }
+ }
+
+ if (encryptedElement == null
+ || XMLCipher.RSA_v1dot5.equals(resolvedKeyCipherAlgorithm())
|| keyCipherAlgorithm == null
|| !(keyEncryptionKey instanceof PrivateKey)) {
// This only applies for Asymmetric Encryption
return;
}
- Element encryptedElement = findEncryptedDataElement(parentElement);
- if (encryptedElement == null) {
- return;
- }
// The EncryptedKey EncryptionMethod algorithm
String foundEncryptedKeyMethod =
findEncryptedKeyMethod(encryptedElement);
@@ -804,29 +828,6 @@ public class XMLSecurityDataFormat extends ServiceSupport
implements DataFormat,
}
}
- private Element findEncryptedDataElement(Element element) {
- // First check the Element itself
- if
(EncryptionConstants._TAG_ENCRYPTEDDATA.equals(element.getLocalName())
- &&
EncryptionConstants.EncryptionSpecNS.equals(element.getNamespaceURI())) {
- return element;
- }
-
- // Now check the child nodes
- Node child = element.getFirstChild();
- while (child != null) {
- if (child.getNodeType() == Node.ELEMENT_NODE) {
- Element childElement = (Element) child;
- if
(EncryptionConstants._TAG_ENCRYPTEDDATA.equals(childElement.getLocalName())
- &&
EncryptionConstants.EncryptionSpecNS.equals(childElement.getNamespaceURI())) {
- return childElement;
- }
- }
- child = child.getNextSibling();
- }
-
- return null;
- }
-
private String findEncryptionMethod(Element element) {
Node child = element.getFirstChild();
while (child != null) {
diff --git
a/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/EncryptionAlgorithmTest.java
b/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/EncryptionAlgorithmTest.java
index 159618622bd7..67ebeeb516c8 100644
---
a/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/EncryptionAlgorithmTest.java
+++
b/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/EncryptionAlgorithmTest.java
@@ -24,13 +24,23 @@ import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
import javax.xml.transform.OutputKeys;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import org.apache.camel.CamelExecutionException;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.converter.jaxp.XmlConverter;
import org.apache.camel.support.jsse.KeyStoreParameters;
import org.apache.camel.test.junit6.CamelTestSupport;
import org.apache.xml.security.encryption.XMLCipher;
+import org.apache.xml.security.encryption.XMLEncryptionException;
+import org.apache.xml.security.utils.EncryptionConstants;
import org.junit.jupiter.api.Test;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
+import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assumptions.assumeTrue;
/**
@@ -359,6 +369,7 @@ public class EncryptionAlgorithmTest extends
CamelTestSupport {
sendingDataFormat.setKeyOrTrustStoreParameters(tsParameters);
final XMLSecurityDataFormat receivingDataFormat = new
XMLSecurityDataFormat();
+ receivingDataFormat.setXmlCipherAlgorithm(XMLCipher.AES_128);
receivingDataFormat.setKeyCipherAlgorithm(XMLCipher.RSA_OAEP);
receivingDataFormat.setRecipientKeyAlias("recipient");
receivingDataFormat.setSecureTag("//cheesesites/italy/cheese");
@@ -394,6 +405,7 @@ public class EncryptionAlgorithmTest extends
CamelTestSupport {
sendingDataFormat.setKeyOrTrustStoreParameters(tsParameters);
final XMLSecurityDataFormat receivingDataFormat = new
XMLSecurityDataFormat();
+ receivingDataFormat.setXmlCipherAlgorithm(XMLCipher.AES_128);
receivingDataFormat.setKeyCipherAlgorithm(XMLCipher.RSA_v1dot5);
receivingDataFormat.setRecipientKeyAlias("recipient");
receivingDataFormat.setSecureTag("//cheesesites/italy/cheese");
@@ -429,6 +441,7 @@ public class EncryptionAlgorithmTest extends
CamelTestSupport {
sendingDataFormat.setKeyOrTrustStoreParameters(tsParameters);
final XMLSecurityDataFormat receivingDataFormat = new
XMLSecurityDataFormat();
+ receivingDataFormat.setXmlCipherAlgorithm(XMLCipher.AES_128);
receivingDataFormat.setKeyCipherAlgorithm(XMLCipher.RSA_OAEP_11);
receivingDataFormat.setRecipientKeyAlias("recipient");
receivingDataFormat.setSecureTag("//cheesesites/italy/cheese");
@@ -448,4 +461,159 @@ public class EncryptionAlgorithmTest extends
CamelTestSupport {
});
xmlsecTestHelper.testDecryption(context);
}
+
+ @Test
+ void testRejectNonGcmDataCipherAsymmetricWhenGcmConfigured() throws
Exception {
+ final XMLSecurityDataFormat sendingDataFormat = new
XMLSecurityDataFormat();
+ sendingDataFormat.setSecureTagContents(true);
+ sendingDataFormat.setSecureTag("//cheesesites/italy/cheese");
+ sendingDataFormat.setXmlCipherAlgorithm(XMLCipher.AES_128);
+ sendingDataFormat.setKeyCipherAlgorithm(XMLCipher.RSA_OAEP);
+ sendingDataFormat.setRecipientKeyAlias("recipient");
+
+ KeyStoreParameters tsParameters = new KeyStoreParameters();
+ tsParameters.setPassword("password");
+ tsParameters.setResource("sender.truststore");
+ sendingDataFormat.setKeyOrTrustStoreParameters(tsParameters);
+
+ final XMLSecurityDataFormat receivingDataFormat = new
XMLSecurityDataFormat();
+ receivingDataFormat.setXmlCipherAlgorithm(XMLCipher.AES_256_GCM);
+ receivingDataFormat.setKeyCipherAlgorithm(XMLCipher.RSA_OAEP);
+ receivingDataFormat.setRecipientKeyAlias("recipient");
+ receivingDataFormat.setSecureTag("//cheesesites/italy/cheese");
+
+ KeyStoreParameters ksParameters = new KeyStoreParameters();
+ ksParameters.setPassword("password");
+ ksParameters.setResource("recipient.keystore");
+ receivingDataFormat.setKeyOrTrustStoreParameters(ksParameters);
+
+ context.addRoutes(new RouteBuilder() {
+ public void configure() {
+ from("direct:start")
+ .marshal(sendingDataFormat)
+ .unmarshal(receivingDataFormat);
+ }
+ });
+ context.start();
+
+ CamelExecutionException ex =
assertThrows(CamelExecutionException.class,
+ () -> template.sendBody("direct:start",
TestHelper.XML_FRAGMENT));
+ assertInstanceOf(XMLEncryptionException.class, ex.getCause());
+ assertEquals("The found data encryption method is not allowed",
ex.getCause().getMessage());
+ }
+
+ @Test
+ void testRejectNonGcmDataCipherSymmetricWhenGcmConfigured() throws
Exception {
+ KeyGenerator keyGenerator = KeyGenerator.getInstance("AES");
+ keyGenerator.init(256);
+ SecretKey key = keyGenerator.generateKey();
+
+ final XMLSecurityDataFormat sendingDataFormat = new
XMLSecurityDataFormat();
+ sendingDataFormat.setSecureTagContents(true);
+ sendingDataFormat.setSecureTag("//cheesesites/italy/cheese");
+ sendingDataFormat.setPassPhrase(key.getEncoded());
+ sendingDataFormat.setXmlCipherAlgorithm(XMLCipher.AES_256);
+
+ final XMLSecurityDataFormat receivingDataFormat = new
XMLSecurityDataFormat();
+ receivingDataFormat.setSecureTagContents(true);
+ receivingDataFormat.setSecureTag("//cheesesites/italy/cheese");
+ receivingDataFormat.setPassPhrase(key.getEncoded());
+ receivingDataFormat.setXmlCipherAlgorithm(XMLCipher.AES_256_GCM);
+
+ context.addRoutes(new RouteBuilder() {
+ public void configure() {
+ from("direct:start")
+ .marshal(sendingDataFormat)
+ .unmarshal(receivingDataFormat);
+ }
+ });
+ context.start();
+
+ CamelExecutionException ex =
assertThrows(CamelExecutionException.class,
+ () -> template.sendBody("direct:start",
TestHelper.XML_FRAGMENT));
+ assertInstanceOf(XMLEncryptionException.class, ex.getCause());
+ assertEquals("The found data encryption method is not allowed",
ex.getCause().getMessage());
+ }
+
+ @Test
+ void testRejectNestedNonGcmEncryptionMethodWithGcmSibling() throws
Exception {
+ KeyGenerator keyGenerator = KeyGenerator.getInstance("AES");
+ keyGenerator.init(256);
+ SecretKey key = keyGenerator.generateKey();
+
+ final XMLSecurityDataFormat sendingDataFormat = new
XMLSecurityDataFormat();
+ sendingDataFormat.setPassPhrase(key.getEncoded());
+ sendingDataFormat.setXmlCipherAlgorithm(XMLCipher.AES_256);
+
+ final XMLSecurityDataFormat receivingDataFormat = new
XMLSecurityDataFormat();
+ receivingDataFormat.setPassPhrase(key.getEncoded());
+ receivingDataFormat.setXmlCipherAlgorithm(XMLCipher.AES_256_GCM);
+
+ context.addRoutes(new RouteBuilder() {
+ public void configure() {
+ from("direct:marshal").marshal(sendingDataFormat);
+ from("direct:unmarshal").unmarshal(receivingDataFormat);
+ }
+ });
+ context.start();
+
+ Document doc = template.requestBody("direct:marshal",
TestHelper.XML_FRAGMENT, Document.class);
+ Element encData = doc.getDocumentElement();
+ Element origMethod = (Element) encData
+ .getElementsByTagNameNS(EncryptionConstants.EncryptionSpecNS,
EncryptionConstants._TAG_ENCRYPTIONMETHOD)
+ .item(0);
+ Element wrapper = doc.createElement("wrapper");
+ encData.insertBefore(wrapper, origMethod);
+ wrapper.appendChild(origMethod);
+
+ Element gcmSibling =
doc.createElementNS(EncryptionConstants.EncryptionSpecNS,
"xenc:EncryptionMethod");
+ gcmSibling.setAttributeNS(null, EncryptionConstants._ATT_ALGORITHM,
XMLCipher.AES_256_GCM);
+ encData.appendChild(gcmSibling);
+
+ CamelExecutionException ex =
assertThrows(CamelExecutionException.class,
+ () -> template.sendBody("direct:unmarshal", doc));
+ assertInstanceOf(XMLEncryptionException.class, ex.getCause());
+ assertEquals("The found data encryption method is not allowed",
ex.getCause().getMessage());
+ }
+
+ @Test
+ void testRejectNestedEncryptedDataUnderSecureTagContents() throws
Exception {
+ KeyGenerator keyGenerator = KeyGenerator.getInstance("AES");
+ keyGenerator.init(256);
+ SecretKey key = keyGenerator.generateKey();
+
+ final XMLSecurityDataFormat sendingDataFormat = new
XMLSecurityDataFormat();
+ sendingDataFormat.setSecureTagContents(true);
+ sendingDataFormat.setSecureTag("//cheesesites/italy/cheese");
+ sendingDataFormat.setPassPhrase(key.getEncoded());
+ sendingDataFormat.setXmlCipherAlgorithm(XMLCipher.AES_256);
+
+ final XMLSecurityDataFormat receivingDataFormat = new
XMLSecurityDataFormat();
+ receivingDataFormat.setSecureTagContents(true);
+ receivingDataFormat.setSecureTag("//cheesesites/italy/cheese");
+ receivingDataFormat.setPassPhrase(key.getEncoded());
+ receivingDataFormat.setXmlCipherAlgorithm(XMLCipher.AES_256_GCM);
+
+ context.addRoutes(new RouteBuilder() {
+ public void configure() {
+ from("direct:marshal").marshal(sendingDataFormat);
+ from("direct:unmarshal").unmarshal(receivingDataFormat);
+ }
+ });
+ context.start();
+
+ Document doc = template.requestBody("direct:marshal",
TestHelper.XML_FRAGMENT, Document.class);
+ Element encData = (Element) doc
+ .getElementsByTagNameNS(EncryptionConstants.EncryptionSpecNS,
EncryptionConstants._TAG_ENCRYPTEDDATA)
+ .item(0);
+ Node cheese = encData.getParentNode();
+ Element wrapper = doc.createElement("wrapper");
+ cheese.replaceChild(wrapper, encData);
+ wrapper.appendChild(encData);
+
+ CamelExecutionException ex =
assertThrows(CamelExecutionException.class,
+ () -> template.sendBody("direct:unmarshal", doc));
+ assertInstanceOf(XMLEncryptionException.class, ex.getCause());
+ assertEquals("The found data encryption method is not allowed",
ex.getCause().getMessage());
+ }
}
diff --git
a/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XmlSecurityConstantNameTest.java
b/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XmlSecurityConstantNameTest.java
index c5164a3d1c9b..34f58ff43483 100644
---
a/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XmlSecurityConstantNameTest.java
+++
b/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XmlSecurityConstantNameTest.java
@@ -167,6 +167,7 @@ class XmlSecurityConstantNameTest extends CamelTestSupport {
sendingDataFormat.setKeyOrTrustStoreParameters(tsParameters);
XMLSecurityDataFormat receivingDataFormat = new
XMLSecurityDataFormat();
+ receivingDataFormat.setXmlCipherAlgorithm("AES_128");
receivingDataFormat.setKeyCipherAlgorithm("RSA_OAEP"); // constant
name
receivingDataFormat.setRecipientKeyAlias("recipient");
receivingDataFormat.setSecureTag("//cheesesites/italy/cheese");
@@ -209,6 +210,7 @@ class XmlSecurityConstantNameTest extends CamelTestSupport {
sendingDataFormat.setKeyOrTrustStoreParameters(tsParameters);
XMLSecurityDataFormat receivingDataFormat = new
XMLSecurityDataFormat();
+ receivingDataFormat.setXmlCipherAlgorithm("AES_128");
receivingDataFormat.setKeyCipherAlgorithm("RSA_OAEP_11");
receivingDataFormat.setDigestAlgorithm("SHA256");
receivingDataFormat.setMgfAlgorithm("MGF1_SHA256");
diff --git
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_25.adoc
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_25.adoc
index 5580189c2121..e7878d0b623a 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_25.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_25.adoc
@@ -65,3 +65,13 @@ its default of 100 objects. With `maxKeys`, each request
asks for at most 999 ob
objects or the listing ends. Before, it sent `maxKeys` as the page size of
every request, and the service rejected a
value above 1000. Returning 1000 objects now takes two requests. When more
objects match, `listObjects` now also sets
the new `CamelAlibabaOssNextContinuationToken` header.
+
+=== camel-xmlsecurity - non-GCM data ciphers rejected when GCM is configured
+
+When `XMLSecurityDataFormat` is configured with an AES-GCM
`xmlCipherAlgorithm` (including the default
+`AES_256_GCM`), `unmarshal()` now rejects incoming XML payloads encrypted with
non-GCM data ciphers
+(such as AES-CBC or 3DES). Previously, `unmarshal()` accepted any data cipher
declared in the incoming
+`EncryptedData` element regardless of the configured `xmlCipherAlgorithm`.
+
+Routes that intentionally decrypt non-GCM payloads must explicitly configure a
non-GCM `xmlCipherAlgorithm`
+(for example `AES_128` or `AES_256`) on the receiving `XMLSecurityDataFormat`.