XMLThreatProtection ポリシー ランタイム エラーのトラブルシューティング

現在は、ApigeeApigee ハイブリッドのドキュメントが表示されています。
Apigee Edge のドキュメントを表示する

ExecutionFailed

エラーコード

steps.xmlthreatprotection.ExecutionFailed

エラー レスポンスの本文

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition policy_name:
        Execution failed. Reason: error_description at line line_num
        (possibly around char char_num)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

エラー レスポンスの本文の例

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: Premature end of document while parsing at line 5(possibly  around char 0)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

エラーの種類と考えられる原因

XMLThreatProtection ポリシーでは、さまざまな種類の ExecutionFailed エラーがスローされます。次の表に、さまざまなエラーの種類と考えられる原因を示します。

エラー 原因
ElementNameExceeded XML タグで許容される文字列の最大文字数を超えています。
ChildCountExceeded XML ペイロードで許容される子要素の最大数を超えています。
NodeDepthExceeded XML ペイロードで許容される XML 要素の最大深度を超えています。
AttributeCountExceeded 1 つの要素内の属性の最大数を超えています。
AttributeNameExceeded 属性名で許容される最大文字数を超えています。
AttributeValueExceeded 属性値で許容される最大文字数を超えています。
TextExceeded テキストで許容される最大文字数を超えています。
CommentExceeded コメントで許容される最大文字数を超えています。
PIDataExceeded 処理命令データ長が上限を超えています。
PITargetExceeded プロセス命令名の長さが上限を超えています。
NSURIExceeded 名前空間 URL の長さが上限を超えています。
NSPrefixExceeded 名前空間の接頭辞の長さが上限を超えています。
NSCountExceeded 1 つの要素での名前空間の数が上限を超えています。
Invalid XML Payload 入力 XML ペイロードが無効です。

ElementNameExceeded

エラーコード

steps.xmlthreatprotection.ExecutionFailed

エラー レスポンスの本文

ランタイム トラフィックは、次のエラーとともに 500 レスポンス コードを返します。

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition policy_name:
        Execution failed. reason: XMLThreatProtection stepDefinition policy_name:
        Element name length exceeded num at line line_num(possibly
        around char char_num)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

エラー レスポンスの本文の例

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Element name length exceeded 5 at line 1(possibly around char 9)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

原因

このエラーは、ポリシーの <Source> 要素で指定された入力ペイロードに、<NameLimits> 要素の下の <Element> 要素で指定された最大長を超える XML 要素が含まれている場合に発生します。

たとえば、XMLThreatProtection ポリシーで <Element> 要素が 5 と指定されていて、入力ペイロードに 5 文字を超える要素がある場合、このエラーが発生します。

診断

  1. エラー メッセージを調べて、XMLThreatProtection ポリシー名、行番号、入力ペイロード内で要素の長さが上限を超えた可能性がある文字番号を特定します。

    たとえば、次のエラー メッセージの場合、ポリシー名は XML-Threat-Protection-1,、ペイロードの行番号は 1 で、文字番号の候補は 9. です。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Element name
    length exceeded 5 at line 1(possibly around char 9)
    
  2. 失敗したポリシー(手順 1 で特定)を調べ、<Element> 要素で指定された値をメモします。

    たとえば、次の XMLThreatProtection ポリシーでは、<Element>5 に設定されています。

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>5</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>5</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>10</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. 入力ペイロードの特定の行番号(手順 1 で特定)を調べ、その行内の要素の長さが、<Element> 要素に指定された値(手順 2 で特定)より大きいかどうかを確認します。要素の長さがこの値が超えている場合、これがエラーの原因です。

    入力ペイロードの例を次に示します。

    <company>
      <name>Example</name>
      <country>USA</country>
    </company>
    

    上記の XML ペイロードには、1 行目の company という名前のルート要素があり、これが 7 文字になっています。要素の長さが 5(<Element> 要素に指定された値)より大きいため、次のエラーが表示されます。

    XML-Threat-Protection-1: Execution failed. reason: XMLThreatProtection stepDefinition
    XML-Threat-Protection-1: Element name length exceeded 5 at line 1(possibly around char 9)
    

解決策

XMLThreadProtection ポリシーの目的が、ペイロードの要素名が定義された値を超えないようにすることである場合、エラー メッセージが表示されるのは期待どおりの挙動です。この場合、追加のアクションは必要ありません。

ただし、それ以上長い要素をペイロードに指定しても問題ないと判断した場合は、要件に基づいて <Element> を適切な値に変更します。

たとえば、最大で 10 文字の要素を許可できると判断した場合、XMLThreatProtection ポリシーを次のように変更します。

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>5</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>5</NodeDepth>
        <AttributeCountPerElement>2</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>10</Attribute>
        <NamespaceURI>10</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

ChildCountExceeded

エラーコード

steps.xmlthreatprotection.ExecutionFailed

エラー レスポンスの本文

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition policy_name:
        Execution failed. reason: XMLThreatProtection stepDefinition policy_name:
        Children count exceeded num at line  num(possibly
        around char num)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

エラー レスポンスの本文の例

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Children count exceeded 3 at line 5(possibly around char 89)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

原因

このエラーは、<Source> 要素で指定された入力メッセージ ペイロードに、ポリシーの <ChildCount> 要素で指定された値よりも多くの子要素を含む XML 要素がある場合に発生します。

たとえば、<ChildCount> 要素が 3 となっていて、入力 XML ペイロードに 3 つを超える子要素を含む要素がある場合、このエラーが発生します。

診断

  1. エラー メッセージを調べて、XMLThreatProtection ポリシー名とエントリ数が超過している行番号を特定します。たとえば、次のエラー メッセージでは、ポリシー名は XML-Threat-Protection-1 で、ペイロードの行番号は 5 です。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Children
    count exceeded 3 at line 5(possibly around char 89)"
    
  2. 失敗したポリシー(手順 1 で特定)を調べ、<ChildCount> 要素で指定された値をメモします。

    次のポリシー例では、<ChildCount>3 に設定されています(コメント、include 要素などがこの上限に対してカウントされます)。

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>5</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>10</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. 入力ペイロードの特定の行番号(手順 1 で特定)を調べ、ペイロード内の子要素(すべてのコメントなど)の数が <ChildCount> 要素に指定された値(手順 2 で特定)より多いかどうかを確認します。子要素の数が指定値を超えている場合、これがエラーの原因です。

    入力ペイロードの例を次に示します。

    <movie>
      <title>Jurassic Park</title>
      <language>English</language>
      <country>USA</country>
      <director>Steven Spielberg</director>
    </movie>
    

    上記の XML ペイロードでは、5 行目にルート要素 <movie> の 4 番目の子要素 <director> が含まれています。入力 XML ペイロードの子要素の数が 3(<ChildCount> 要素に指定された値)より大きいので、次のエラーが表示されます。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Children
    count exceeded 3 at line 5(possibly around char 89)
    

解決策

XMLThreatProtection ポリシーの目的が、ペイロードの子要素の数が指定した値を超えないようにすることである場合、エラー メッセージが表示されるのは期待どおりの挙動です。この場合、追加のアクションは必要ありません。

ただし、より多くの子要素(コメントなど)をペイロードに含めることができると判断した場合は、<ChildCount> を要件に基づいて適切な値に変更します。

たとえば、最大で 10 個の子要素を許可できると考える場合は、次のように XMLThreatProtection ポリシーを変更します。

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>5</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>5</NodeDepth>
        <AttributeCountPerElement>2</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">10</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>10</Attribute>
        <NamespaceURI>10</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

NodeDepthExceeded

エラーコード

steps.xmlthreatprotection.ExecutionFailed

エラー レスポンスの本文

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]:
        Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:
        Node depth exceeded [num] at line [num](possibly around
        char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

エラー レスポンスの本文の例

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Node depth exceeded 5 at line 6(possibly around char 110)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

原因

<Source> 要素で指定された入力メッセージ ペイロードに、ノード階層が XMLThreatProtection ポリシーの <NodeDepth> 要素で指定された数を超える XML ドキュメントが含まれている場合、このエラーが発生します。

たとえば、ポリシーで <NodeDepth> 要素が 4 と指定されていて、入力ペイロードのノード深度が 4 を超えている場合、このエラーが発生します。

診断

  1. エラー メッセージを調べて、XMLThreatProtection ポリシー名とノード深度が超過している行番号を特定します。たとえば、次のエラー メッセージでは、ポリシー名は XML-Threat-Protection-1 で、ペイロードの行番号は 6 です。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Node depth
    exceeded 5 at line 6(possibly around char 109)
    
  2. 失敗した XMLThreatProtection ポリシー(手順 1 で特定)を調べ、<NodeDepth> 要素で指定された値をメモします。

    次の XMLThreatProtection ポリシーの例では、<NodeDepth>5 に設定されています。

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>5</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>10</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. 入力ペイロードの特定の行番号(手順 1 で特定)を調べ、そこで指定されているノード深度が、<NodeDepth> 要素で指定した数(手順 2 で特定)よりも多いかどうかを確認します。XML 子要素のレベルが指定値を超えている場合、これがエラーの原因です。

    入力ペイロードの例を次に示します。

    <hellos>
       <hello1>
           <wave1>
                <wave2>
                    <wave3>
                        <wave4>
                           <wave5>wave</wave5>
                        </wave4>
                    </wave3>
                </wave2>
           </wave1>
       </hello1>
       <hello2>world2</hello2>
       <hello3>world3</hello3>
       <hello4>world4</hello4>
       <hello5>world5</hello5>
       <hello6>world6</hello6>
    </hellos>
    

    上記 XML ペイロードの 6 行目のノード深度は 6 です。.ノード深度が 5(<NodeDepth> 要素に指定された値)より大きいため、次のエラーが発生します。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Node depth
    exceeded 5 at line 6(possibly around char 109)
    

解決策

XMLThreatProtection ポリシーの目的が、ペイロードのノード深度が特定のしきい値を超えないようにすることである場合、エラー メッセージが表示されるのは期待どおりの挙動です。この場合、追加のアクションは必要ありません。

ただし、それ以上のノード深度を許可できると判断した場合は、要件に基づいて適切な値に <NodeDepth> を変更します。

たとえば、ノードの深度を最大 10 まで許可する場合は、次のようにポリシーを変更します。

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>5</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>2</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>10</Attribute>
        <NamespaceURI>10</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

AttributeCountExceeded

エラーコード

steps.xmlthreatprotection.ExecutionFailed

エラー レスポンスの本文

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]:
        Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:
        Attribute count exceeded [num] at line [num](possibly around
        char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

エラー レスポンスの本文の例

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Attribute count exceeded 2 at line 3(possibly around char 105)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

原因

このエラーは、XMLThreatProtection ポリシーの <Source> 要素で指定された入力メッセージのペイロードに、1 つの要素の属性数が、ポリシーの <AttributeCountPerElement> 要素で指定された数を超えている XML ドキュメントが含まれている場合に発生します。

たとえば、XMLThreatProtection ポリシーで <AttributeCountPerElement> 要素が 2 と指定されていて、入力ペイロードに 3 つ以上の属性を持つ要素が含まれる場合、このエラーが発生します。

診断

  1. エラー メッセージを調べて、XMLThreatProtection ポリシー名と属性数が超過している行番号を特定します。たとえば、次のエラー メッセージでは、ポリシー名は XMLThreat-Protection-1 で、ペイロードの行番号は 3 です。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Attribute
    count exceeded 2 at line 3(possibly around char 105)
    
  2. 失敗したポリシー(手順 1 で特定)を調べ、<AttributeCountPerElement> 要素で指定された値をメモします。

    次のポリシーの例では、<AttributeCountPerElement>2 に設定されています。

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>10</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. 入力ペイロードの特定の行番号(手順 1 で特定)を調べ、指定されている属性数が <AttributeCountPerElementh> 要素で指定された値(手順 2 で特定)を超えているかどうかを確認します。属性の数が指定値を超えている場合、これがエラーの原因です。

    入力ペイロードの例を次に示します。

    <?xml version="1.0" encoding="UTF-8"?>
    <bookstore>
      <book category="cooking" cuisine="Indian" lang="en">
        <title>Easy Indian Cooking</title>
        <author>Suneeta</author>
        <year>2004</year>
        <price>300.00</price>
      </book>
    </bookstore>
    

    上記の XML ペイロードの 3 行目には、3 つの属性を持つ要素があります。属性数が 2(<AttributeCountPerElement> 要素に指定された値)より大きいため、次のエラーが表示されます。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Attribute
    count exceeded 2 at line 3(possibly around char 105)
    

解決策

XMLThreatProtection ポリシーの目的が、ペイロードの属性の数が特定の値を超えないようにすることである場合、エラー メッセージが表示されるのは期待どおりの挙動です。この場合、追加のアクションは必要ありません。

ただし、それ以上の数の属性を許可できると判断した場合は、要件に基づいて適切な値に <AttributeCountPerElement> を変更します。

たとえば、要素ごとに属性を最大 5 個まで許可する場合は、次のようにポリシーを変更します。

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>5</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>5</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>10</Attribute>
        <NamespaceURI>10</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

AttributeNameExceeded

エラーコード

steps.xmlthreatprotection.ExecutionFailed

エラー レスポンスの本文

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]:
        Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:
        Attribute name length exceeded [num] at line [num](possibly around char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

エラー レスポンスの本文の例

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Attribute name length exceeded 5 at line 3(possibly around char 105)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

原因

このエラーは、XMLThreatProtection ポリシーの <Source> 要素で指定された入力メッセージ ペイロードに、ポリシーの <NameLimits> 要素の <Attribute> 子要素で指定された文字数を超える属性名を持つ XML ドキュメントが含まれる場合に発生します。

たとえば、ポリシーで <Attribute> 要素が 5 と指定されていて、入力ペイロードの属性名が 5 文字を超えている場合、このエラーがスローされます。

診断

  1. エラー メッセージを調べて、XMLThreatProtection ポリシー名と属性名の長さが超過している行番号を特定します。たとえば、次のエラー メッセージでは、ポリシー名は XML-Threat-Protection-1 で、ペイロードの行番号は 3 です。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Attribute
    name length exceeded 5 at line 3(possibly around char 105)
    
  2. 失敗したポリシー(手順 1 で特定)を調べ、<Attribute> 要素で指定された値をメモします。

    次の XMLThreatProtection ポリシーの例では、<Attribute>5 に設定されています。

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>10</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. 入力ペイロードの特定の行番号(手順 1 で特定)を調べ、指定された属性名の長さが <Attribute> 要素で指定された数(手順 2 で特定)を超えているかどうかを確認します。文字数が属性値の上限を超えている場合、これがエラーの原因です。

    入力ペイロードの例を次に示します。

    <?xml version="1.0" encoding="UTF-8"?>
    <bookstore>
      <book category="cooking" cuisine="Indian" lang="en">
        <title>Easy Indian Cooking</title>
        <author>Suneeta</author>
        <year>2004</year>
        <price>300.00</price>
      </book>
    </bookstore>
    

    上記 XML ペイロードの 3 行目には categorycuisine の 2 つの属性があり、名前の長さはそれぞれ 8 文字と 7 文字です.。属性名の長さが 5(<Attribute> 要素に指定された値)より大きいため、次のエラーが発生します。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Attribute
    name length exceeded 5 at line 3(possibly around char 105)
    

解決策

XMLThreatProtection ポリシーの目的が、ペイロードの属性名の長さが特定の値を超えないようにすることである場合、エラー メッセージが表示されるのは期待どおりの挙動です。この場合、追加のアクションは必要ありません。

ただし、それ以上長い属性名を使用できると判断した場合は、<Attribute> を要件に基づいて適切な値に変更します。

たとえば、属性名の長さを最大 10 文字までとする場合、次のようにポリシーを変更します。

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>10</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>5</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>10</Attribute>
        <NamespaceURI>10</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

AttributeValueExceeded

エラーコード

steps.xmlthreatprotection.ExecutionFailed

エラー レスポンスの本文

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]: Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:  Attribute value length exceeded [num] at line [num](possibly around char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

エラー レスポンスの本文の例

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Attribute value length exceeded 10 at line 3(possibly around char 111)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

原因

このエラーは、ポリシーの <Source> 要素で指定された入力メッセージのペイロードに、<ValueLimits> 要素の <Attribute> 子要素で指定された文字数を超える属性値を持つ XML ドキュメントが含まれている場合に発生します。

たとえば、XMLThreatProtection ポリシーで <Attribute> 要素が 10 と指定されていて、入力ペイロードに 10 文字を超える属性値がある場合、このエラーが発生します。

診断

  1. エラー メッセージを調べて、XMLThreatProtection ポリシー名と属性数が超過している行番号を特定します。たとえば、次のエラー メッセージでは、ポリシー名は XML-Threat-Protection-1 で、ペイロードの行番号は 3 です。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Attribute
    value length exceeded 10 at line 3(possibly around char 111)
    
  2. 失敗したポリシー(手順 1 で特定)を調べ、<ValueLimits> 要素の <Attribute> 子要素で指定された値をメモします。

    次の XMLThreatProtection ポリシーの例では、<Attribute> が 10 に設定されています。

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>10</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. 入力ペイロードの特定の行番号(手順 1 で特定)を調べ、指定された属性値の長さが <Attribute> 要素で指定された値(手順 2 で特定)を超えているかどうかを確認します。文字数が属性値の上限を超えている場合、これがエラーの原因です。

    入力ペイロードの例を次に示します。

    <?xml version="1.0" encoding="UTF-8"?>
    <bookstore>
      <book category="cooking" cuisine="South Indian" lang="en">
        <title>Easy Indian Cooking</title>
        <author>Suneeta</author>
        <year>2004</year>
        <price>300.00</price>
      </book>
    </bookstore>
    

    上記 XML ペイロードの 3 行目には、値が 12 文字の属性(cuisine)があります。属性値の長さが 10(<Attribute> 要素に指定された値)より大きいため、次のエラーが表示されます。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Attribute
    value length exceeded 10 at line 3(possibly around char 111)
    

解決策

XMLThreatProtection ポリシーの目的が、ペイロードの属性値の長さが特定の値を超えないようにすることである場合、エラー メッセージが表示されるのは期待どおりの挙動です。この場合、追加のアクションは必要ありません。

ただし、それ以上長い属性値を許可できると判断する場合は、要件に基づき、<ValueLimits> 要素の <Attribute> 子要素を適切な値に変更します。

たとえば、最大 15 文字の値を設定する場合は、次のようにポリシーを変更します。

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>10</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>5</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>15</Attribute>
        <NamespaceURI>10</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

TextExceeded

エラーコード

steps.xmlthreatprotection.ExecutionFailed

エラー レスポンスの本文

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]: Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:  Text length exceeded [num] at line [num](possibly around char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

エラー レスポンスの本文の例

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Text length exceeded 15 at line 4(possibly around char 66)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }

原因

このエラーは、XMLThreatProtection ポリシーの <Source> 要素で指定された入力メッセージのペイロードが、<ValueLimits> 要素の <Text> 子要素で指定された文字数を超えるテキスト長の要素を持つ XML ドキュメントを含んでいる場合に発生します。

たとえば、ポリシーで <Text> 要素が 15 と指定されていて、入力ペイロードに 15 文字を超えるテキストがある場合、このエラーが発生します。

診断

  1. エラー メッセージを調べて、XMLThreatProtection ポリシー名と属性数が超過している行番号を特定します。たとえば、次のエラー メッセージでは、ポリシー名は XML-Threat-Protection-1 で、ペイロードの行番号は 4 です。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Text length
    exceeded 15 at line 4(possibly around char 66)
    
  2. 失敗したポリシー(手順 1 で特定)を調べ、<ValueLimits> 要素の <Text> 子要素で指定された値をメモします。

    次の XMLThreatProtection ポリシーの例では、<Text>15 に設定されています。

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>10</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. 入力ペイロードの特定の行番号(手順 1 で特定)を調べ、指定された属性値の長さが <Text> 要素で指定された値(手順 2 で特定)を超えているかどうかを確認します。文字数が属性値の上限を超えている場合、これがエラーの原因です。

    <food>
      <name>Veg Sandwich</name>
      <price>$5.95</price>
      <description>Vegetarian Sandwich with onions, tomatoes and lettuce</description>
      <calories>650</calories>
    </food>
    

    上記 XML ペイロードの 4 行目には、長さが 53 文字のテキストがあります。属性値の長さが 15(<Text> 要素に指定された値)より大きいため、次のエラーが表示されます。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Text length
    exceeded 15 at line 4(possibly around char 66)
    

解決策

XMLThreatProtection ポリシーの目的が、ペイロードのテキストの長さが特定の値を超えないようにすることである場合、エラー メッセージが表示されるのは期待どおりの挙動です。この場合、追加のアクションは必要ありません。

ただし、それ以上長いテキスト長を許可できると判断する場合は、要件に基づき、<ValueLimits> 要素の <Text> 子要素を適切な値に変更します。

たとえば、属性値の最大文字数を 60 文字に設定する場合は、次のようにポリシーを変更します。

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>10</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>5</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>60</Text>
        <Attribute>15</Attribute>
        <NamespaceURI>10</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

CommentExceeded

エラーコード

steps.xmlthreatprotection.ExecutionFailed

エラー レスポンスの本文

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]:
        Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:
        Comment length exceeded [num] at line [num](possibly around char
        [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

エラー レスポンスの本文の例

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Comment length exceeded 10 at line 2(possibly around char 48)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

原因

このエラーは、XMLThreatProtection ポリシーの <Source> 要素で指定された入力メッセージ ペイロードに、ポリシーの <ValueLimits> 要素の <Comment> 子要素で指定された文字数を超える長さのコメントを持つ XML ドキュメントが含まれる場合に発生します。

たとえば、<Comment> 要素がポリシーで 10 と指定されていて、入力ペイロードに 10 文字を超えるコメントが含まれている場合、このエラーが発生します。

診断

  1. エラー メッセージを調べて、XMLThreatProtection ポリシー名とコメントの長さが超過している行番号を特定します。たとえば、次のエラー メッセージでは、ポリシー名は XML-Threat-Protection-1 で、ペイロードの行番号は 2 です。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Comment length exceeded 10 at line 2(possibly around char 48)
    
  2. 失敗したポリシー(手順 1 で特定)を調べ、<ValueLimits> 要素の <Comment> 子要素で指定された値をメモします。

    次の XMLThreatProtection ポリシーの例では、<Comment>10 に設定されています。

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>10</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. 入力ペイロードの特定の行番号(手順 1 で特定)を調べ、指定されたコメントの長さが、<Comment> 要素で指定された文字数(手順 2 で特定)を超えているかどうかを確認します。文字数が属性値の上限を超えている場合、これがエラーの原因です。

    入力ペイロードの例を次に示します。

    <food>
      <!--This is somewhat a long comment-->
      <name>Veg Sandwich</name>
      <price>$5.95</price>
      <description>Vegetarian Sandwich with onions, tomatoes and lettuce</description>
      <calories>650</calories>
    </food>
    

    上記 XML ペイロードの 2 行目にあるコメントの長さは 31 文字です.。コメントの長さが 10(<Comment> 要素に指定された値)より大きいため、次のエラーが発生します。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Comment length
    exceeded 10 at line 2(possibly around char 48)
    

解決策

XMLThreatProtection ポリシーの目的が、ペイロードのコメントの長さが特定の値を超えないようにすることである場合、エラー メッセージが表示されるのは期待どおりの挙動です。この場合、追加のアクションは必要ありません。

ただし、それ以上長いコメントを許可できると判断した場合は、<ValueLimits> 要素の <Comment> 子要素を、要件に基づいて適切な値に変更します。

たとえば、最大 40 文字の値を設定する場合は、次のようにポリシーを変更します。

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>10</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>5</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>15</Attribute>
        <NamespaceURI>10</NamespaceURI>
        <Comment>40</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

PIDataExceeded

エラーコード

steps.xmlthreatprotection.ExecutionFailed

エラー レスポンスの本文

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]:
        Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:
        Processing Instruction data length exceeded [num] at line
        [num](possibly around char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

エラー レスポンスの本文の例

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Processing Instruction data length exceeded 30 at line 2(possibly around char 109)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

原因

このエラーは、XMLThreatProtection ポリシーの <Source> 要素で指定された入力メッセージ ペイロードに、ポリシーの <ValueLimits> 要素の <ProcessingInstructionData> 子要素で指定された文字数を超える処理命令データを持つ XML ドキュメントが含まれる場合に発生します。

たとえば、XMLThreatProtection ポリシーで <ProcessingInstructionData> 要素が 10 と指定されていて、入力ペイロードに 10 文字を超える処理命令がある場合、このエラーが発生します。

診断

  1. エラー メッセージを調べて、XMLThreatProtection ポリシー名と処理命令の長さが超過している行番号を特定します。たとえば、次のエラー メッセージでは、ポリシー名は XML-Threat-Protection-1 で、ペイロードの行番号は 2 です。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Processing
    Instruction data length exceeded 30 at line 2(possibly around char 109)
    
  2. 失敗したポリシー(手順 1 で特定)を調べ、<ValueLimits> 要素の <ProcessingInstructionData> 子要素で指定された値をメモします。

    次の XMLThreatProtection ポリシーの例では、<ProcessingInstructionData>30 に設定されています。

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>30</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. 入力ペイロードの特定の行番号(手順 1 で特定)を調べ、指定された処理命令データの長さが、<ProcessingInstructionData> 要素で指定されている数(手順 2 で特定)を超えているかどうかを確認します。文字数が処理命令データの上限を超えている場合、これがエラーの原因です。

    入力ペイロードの例を次に示します。

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <?xml-stylesheet type="text/xsl" href="mobilephones.xsl"?>
    <mobilephones>
      <mobilephone>
          <name>iPhone</name>
          <price>$600</price>
      </mobilephone>
      <mobilephone>
          <name>Samsung</name>
          <price>$500</price>
      </mobilephone>
    </mobilephones>
    

    上記 XML ペイロードの 1 行目には、長さが 40 文字の処理命令データ要素(type="text/xsl" href="mobilephones.xsl"?))があります。.この長さは 30(<ProcessingInstructionData> 要素に指定された値)より大きいため、次のエラーが表示されます。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Processing
    Instruction data length exceeded 30 at line 2(possibly around char 109)
    

解決策

XMLThreatProtection ポリシーの目的が、ペイロードの処理命令データの長さが特定の値を超えないようにすることである場合、エラー メッセージが表示されるのは期待どおりの挙動です。この場合、追加のアクションは必要ありません。

ただし、それ以上長い処理命令データ要素を許可できると判断した場合は、<ValueLimits> 要素の <ProcessingInstructionData> 子要素を、要件に基づいて適切な値に変更します。

たとえば、最大 50 文字のデータ処理命令の長さが可能だと思われる場合は、次のようにポリシーを変更します。

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>10</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>5</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>15</Attribute>
        <NamespaceURI>10</NamespaceURI>
        <Comment>40</Comment>
        <ProcessingInstructionData>50</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

PITargetExceeded

エラーコード

steps.xmlthreatprotection.ExecutionFailed

エラー レスポンスの本文

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]:
        Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:
        Processing Instruction target length exceeded [num] at line [num](possibly around
        char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

エラー レスポンスの本文の例

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Processing Instruction target length exceeded 10 at line 2(possibly around char 114)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

原因

このエラーは、XMLThreatProtection ポリシーの <Source> 要素で指定された入力メッセージ ペイロードに、ポリシーの <NameLimits> 要素の <ProcessingInstructionTarget> 子要素で指定された文字数を超える処理命令ターゲットを持つ XML ドキュメントが含まれる場合に発生します。

たとえば、XMLThreatProtection ポリシーで <ProcessingInstructionTarget> 要素が 10 として指定されていて、入力ペイロードに 10 文字を超える処理命令ターゲットがある場合、このエラーがスローされます。

診断

  1. エラー メッセージを調べて、XMLThreatProtection ポリシー名と処理命令ターゲットの数が超過している行番号を特定します。たとえば、次のエラー メッセージでは、ポリシー名は XML-Threat-Protection-1 で、ペイロードの行番号は 1 です。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Processing
    Instruction target length exceeded 10 at line 2(possibly around char 114)
    
  2. 失敗した XMLThreatProtection ポリシー(手順 #1 で特定)を調べ、<NameLimits> 要素の <ProcessingInstructionTarget> 子要素で指定された値をメモします。

    次の XMLThreatProtection ポリシーの例では、<ProcessingInstructionTarget>10 に設定されています。

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>10</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>5</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>20</Text>
            <Attribute>15</Attribute>
            <NamespaceURI>40</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>30</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. 入力ペイロードの特定の行番号(手順 1 で特定)を調べ、指定された処理命令ターゲットの長さが、<ProcessingInstructionTarget> 要素で指定されている数(手順 2 で特定)を超えているかどうかを確認します。文字数がターゲット サイズの上限を超えている場合、これがエラーの原因です。

    入力ペイロードの例を次に示します。

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <?xml-stylesheet type="text/xsl" href="mobilephones.xsl"?>
    <mobilephones>
      <mobilephone>
          <name>iPhone</name>
          <price>$600</price>
      </mobilephone>
      <mobilephone>
          <name>Samsung</name>
          <price>$500</price>
      </mobilephone>
    </mobilephones>
    

    上記 XML ペイロードの 2 行目には、14 文字の長さの処理命令ターゲット名「xml-stylesheet"」があります。処理命令のターゲット名が 10 (<ProcessingInstructionTarget> 要素に指定された値)を超えているため、次のエラーが表示されます。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Processing
    Instruction target length exceeded 10 at line 2(possibly around char 114)
    

解決策

XMLThreatProtection ポリシーの目的が、ペイロードの処理命令ターゲットの長さが特定の値を超えないようにすることである場合、エラー メッセージが表示されるのは期待どおりの挙動です。この場合、追加のアクションは必要ありません。

処理命令ターゲットをもっと長くしてもよいと判断した場合は、<NameLimits> 要素の <ProcessingInstructionTarget> 子要素を要件に基づいて適切な値に変更します。

たとえば、処理命令ターゲットの長さを最大 25 文字にする場合は、次のようにポリシーを変更します。

  <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>5</Attribute>
        <NamespacePrefix>15</NamespacePrefix>
    <ProcessingInstructionTarget>25</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>2</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>10</Attribute>
        <NamespaceURI>40</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
  </XMLThreatProtection>

NSURIExceeded

エラーコード

steps.xmlthreatprotection.ExecutionFailed

エラー レスポンスの本文

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]: Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:  Namespace uri length length exceeded [num] at line [num](possibly around char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

エラー レスポンスの本文の例

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Namespace uri length exceeded 10 at line 2(possibly around char 97)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

原因

このエラーは、XMLThreatProtection ポリシーの <Source> 要素で指定された入力メッセージ ペイロードに、ポリシーの <ValueLimits> 要素の <NamespaceURI> 子要素で指定された文字数を超える名前空間 URI を持つ XML ドキュメントが含まれる場合に発生します。

たとえば、ポリシーで <NamespaceURI> 要素が 10 と指定されていて、入力ペイロードの名前空間 URI が 10 文字を超えている場合、このエラーがスローされます。

診断

  1. エラー メッセージを調べて、XMLThreatProtection ポリシー名と名前空間 URI の長さが超過している行番号を特定します。たとえば、次のエラー メッセージでは、ポリシー名は XML-Threat-Protection-1 で、ペイロードの行番号は 2 です。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Namespace
    uri length exceeded 10 at line 2(possibly around char 97)
    
  2. 失敗したポリシー(手順 1 で特定)を調べ、<ValueLimits> 要素の <NamespaceURI> 子要素で指定された値をメモします。

    次の XMLThreatProtection ポリシーの例では、<NamespaceURI>10 に設定されています。

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>10</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. 入力ペイロードの特定の行番号(手順 1 で特定)を調べ、指定された名前空間 URI の文字数が、<NamespaceURI> 要素で指定されている数(手順 2 で特定)を超えているかどうかを確認します。文字数が名前空間 URI の長さの上限を超えている場合、これがエラーの原因です。

    入力ペイロードの例を次に示します。

    <?xml version = "1.0" encoding = "UTF-8"?>
      <profile:user xmlns:profile = "www.example.com/profile">
      <profile:name>Rama Krishna</profile:name>
      <profile:company>Example</profile:company>
      <profile:phone>(91) 9876543210</profile:phone>
    </profile:user>
    

    上記 XML ペイロードの 2 行目には、長さ 22 文字の名前空間 URI http://www.example/profile があります。名前空間 URI の長さが 10(<NamespaceURI> 要素に指定された値)より大きいため、次のエラーが表示されます。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Namespace
    uri length exceeded 10 at line 2(possibly around char 99)
    

解決策

XMLThreatProtection ポリシーの目的が、ペイロードの名前空間 URI が特定の値を超えないようにすることである場合、エラー メッセージが表示されるのは期待どおりの挙動です。この場合、追加のアクションは必要ありません。

より長い名前空間 URI を許容できると判断した場合は、<ValueLimits> 要素の <NamespaceURI> 子要素を、要件に基づいて適切な値に変更します。

たとえば、名前空間 URI の長さを最大 30 文字までとする場合は、次のようにポリシーを変更します。

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>5</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>2</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>10</Attribute>
        <NamespaceURI>30</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

NSPrefixExceeded

エラーコード

steps.xmlthreatprotection.ExecutionFailed

エラー レスポンスの本文

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]:
        Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:
        Namespace prefix length exceeded [num] at line [num](possibly
        around char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

エラー レスポンスの本文の例

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Namespace prefix length exceeded 10 at line 2(possibly around char 105)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

原因

<Source> 要素で指定された入力メッセージ ペイロードに、ポリシーの <NameLimits> 要素の <NamespacePrefix> 子要素で指定された文字数を超える名前空間接頭辞を持つ XML ドキュメントが含まれる場合、このエラーは発生します。

たとえば、XMLThreatProtection ポリシーで <NamespacePrefix> 要素が 10 として指定されていて、入力ペイロードの名前空間接頭辞が 10 文字を超えている場合、このエラーがスローされます。

診断

  1. エラー メッセージを調べて、XMLThreatProtection ポリシー名と名前空間 URI 接頭辞の長さが超過している行番号を特定します。たとえば、次のエラー メッセージでは、ポリシー名は XML-Threat-Protection-1 で、ペイロードの行番号は 2 です。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Namespace
    prefix length exceeded 10 at line 2(possibly around char 105)
    
  2. 失敗したポリシー(手順 1 で特定)を調べ、<NameLimits> 要素の <NamespacePrefix> 子要素で指定された値をメモします。

    次の XMLThreatProtection ポリシーの例では、<NamespacePrefix>10 に設定されています。

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>10</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>5</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>20</Text>
            <Attribute>15</Attribute>
            <NamespaceURI>40</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>30</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. 入力ペイロードの特定の行番号(手順 1 で特定)を調べ、指定された名前空間接頭辞の長さが、<NamespacePrefix> 要素で指定された文字数(手順 2 で特定)よりも長いかどうか確認します。文字数が名前空間接頭辞の制限を超えている場合、これがエラーの原因です。

    入力ペイロードの例を次に示します。

    <?xml version = "1.0" encoding = "UTF-8"?>
    <userprofile:user xmlns:userprofile = "www.example/profile">
      <userprofile:name>Rama Krishna</userprofile:name>
      <userprofile:company>Example</userprofile:company>
      <userprofile:phone>(011) 123-4567</userprofile:phone>
    </userprofile:user>
    

    上記の XML ペイロードの 2 行目には、長さが 11 文字ある名前空間接頭辞 userprofile があります。名前空間 URI の長さが 10(<NamespacePrefix> 要素に指定された値)より大きいため、次のエラーが表示されます。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Namespace
    prefix length exceeded 10 at line 2(possibly around char 105)
    

解決策

XMLThreatProtection ポリシーの目的が、ペイロードの名前空間 URI 接頭辞の長さが特定の値を超えないようにすることである場合、エラー メッセージが表示されるのは期待どおりの挙動です。この場合、追加のアクションは必要ありません。

より長い名前空間 URI 接頭辞を許容できると判断した場合は、<NameLimits> 要素の <NamespacePrefix> 子要素を、要件に基づいて適切な値に変更します。

たとえば、名前空間 URI 接頭辞の長さを最大 15 文字に制限する場合は、次のようにポリシーを変更します。

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>5</Attribute>
        <NamespacePrefix>15</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>2</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>10</Attribute>
        <NamespaceURI>40</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

NSCountExceeded

エラーコード

steps.xmlthreatprotection.ExecutionFailed

エラー レスポンスの本文

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]:
        Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:
        Namespace count exceeded [num] at line [num](possibly around char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

エラー レスポンスの本文の例

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Namespace count exceeded 3 at line 2(possibly around char 234)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

原因

XMLThreatProtection ポリシーの <Source> 要素で指定された入力メッセージのペイロードに、1 つの要素で使用される名前空間の数が、ポリシーの <StructureLimits> 要素の <NamespaceCountPerElement> の子要素で指定された数を超える XML ドキュメントが含まれている場合、このエラーが起こります。

たとえば、ポリシーで <NamespaceCountPerElement> 要素が 3 と指定されていて、入力ペイロードに 3 つを超える名前空間を含む要素がある場合、このエラーが発生します。

診断

  1. エラー メッセージを調べて、XMLThreatProtection ポリシー名と名前空間数が超過している行番号を特定します。たとえば、次のエラー メッセージでは、ポリシー名は XMLThreat-Protection-1 で、ペイロードの行番号は 2 です。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Namespace count
    exceeded 3 at line 2(possibly around char 234)
    
  2. 失敗したポリシー(手順 1 で特定)を調べ、<StructureLimits> 要素の <NamespaceCountPerElement> 子要素で指定された値をメモします。

    次の XMLThreatProtection ポリシーの例では、<NamespaceCountPerElement>3 に設定されています。

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>10</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>5</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>20</Text>
            <Attribute>15</Attribute>
            <NamespaceURI>40</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>30</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. 入力ペイロードの特定の行番号(手順 1 で特定)を調べ、ある特定の要素の指定された名前空間の数が <NamespaceCountPerElement> 要素で指定された数(手順 2 で特定)を超えているかどうかを確認します。名前空間の数が要素ごとの名前空間の数の上限を超えている場合、これがエラーの原因です。

    入力ペイロードの例を次に示します。

    <?xml version = "1.0" encoding = "UTF-8"?>
    <hellos xmlns:h="https://www.w3schools.com/greeting1" xmlns:a="https://www.w3schools.com/greeting2" xmlns:b="https://www.w3schols.com/greeting3" xmlns:c="https://www.w3schools.com/greeting4">
        <a:hello1>world1</a:hello1>
        <b:hello2>world2</b:hello2>
        <c:hello2>world2</c:hello2>
        <h:hello2>world2</h:hello2>
    </hellos>
    

    上記 XML ペイロードの 2 行目には、3 つを超える名前空間があります。名前空間数が 3(<NamespaceCountPerElement> 要素に指定された値)より大きいため、次のエラーが発生します。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Namespace
    count exceeded 3 at line 2(possibly around char 234)
    

解決策

XMLThreatProtection ポリシーの目的が、ペイロードの 1 つの要素の名前空間の数が特定の値を超えないようにすることである場合、エラー メッセージが表示されるのは期待どおりの挙動です。この場合、追加のアクションは必要ありません。

より多くの名前空間を許可する場合は、要件に基づいて、<StructureLimits> 要素の <NamespaceCountPerElement> 子要素を適切な値に変更します。

たとえば、1 つの要素に最大 5 つの名前空間を許可する場合、次のようにポリシーを変更します。

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>10</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>5</AttributeCountPerElement>
        <NamespaceCountPerElement>5</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>20</Text>
        <Attribute>15</Attribute>
        <NamespaceURI>40</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>30</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

InvalidXMLPayload

エラーコード

steps.xmlthreatprotection.ExecutionFailed

エラー レスポンスの本文

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]:
        Execution failed. Reason: [error_description]",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

エラー レスポンスの本文の例

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: Syntax error while parsing XML prologue",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

原因

このエラーは、XMLThreatProtection ポリシーの <Source> 要素で指定された入力メッセージ ペイロードが、有効な XML ドキュメントでない場合に発生します。

診断

  1. エラー メッセージを調べて、失敗したポリシー名を特定します。次の例では、ポリシー名は XML-Threat-Protection-1 です。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: Syntax error while parsing XML prologue
    
  2. 入力ペイロードを調べ、ペイロードに渡された XML ドキュメントが本当に正しい形式の XML ドキュメントであるかどうかを確認します。

    入力ペイロードの例を次に示します。

    <?xml version="1.0" encoding="UTF-8"?>
    <bookstore>
      <book category="cooking">
        <title lang="en">Easy Indian Cooking</title>
        <author>Suneeta</author>
        <year>2004</year>
        <price>300.00</price>
      </book>
    <bookstore>
    

    上記の XML ペイロードの 9 行目では、/ が欠落しているため、ルート要素が正しく閉じられていません。これは正しい形式の XML でないため、次のエラーが発生します。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: Syntax error while parsing XML prologue
    

解決策

XMLThreatProtection ポリシーを含む API プロキシに、有効な入力 XML ペイロードを確実に渡します。

上記のエラーの例を修正するには、入力 XML ペイロードを次のように変更します。

<?xml version="1.0" encoding="UTF-8"?>
<bookstore>
  <book category="cooking">
    <title lang="en">Easy Indian Cooking
    <author>Suneeta</author>
    <year>2004</year>
    <price>300.00</price>
  </book>
</bookstore>

SourceUnavailable

エラーコード

steps.xmlthreatprotection.SourceUnavailable

エラー レスポンスの本文

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition[policy_name]: Source[var_name] is not available"
        "detail": {
            "errorcode": "steps.xmlthreatprotection.SourceUnavailable"
        }
    }
}

エラー レスポンスの本文の例

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Source requests is not available",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.SourceUnavailable"
        }
    }
}

原因

このエラーは、XMLThreatProtection ポリシーの <Source> 要素で指定された message 変数が、次のいずれかである場合に発生します。

  • 範囲外(ポリシーが実行されている特定のフローで使用できない)
  • 有効な値(requestresponsemessage)のいずれでもない

たとえば、ポリシーの <Source> 要素が、ポリシーが実行されるフローに存在しない変数に設定されている場合に、このエラーが発生します。

診断

  1. エラー メッセージから、XML ThreatProtection ポリシーの名前と Source 変数名を確認します。たとえば、次のエラー メッセージでは、XMLThreatProtection ポリシーの名前は XML-Threat-Protection-1、Source 変数は requests: です。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Source requests
    is not available
    
  2. 失敗した XMLThreatProtection ポリシーを調べて、手順 1 で特定した <Source> 要素に指定された値を確認します。

    次の XMLThreatProtection ポリシーの例では、<Source> 要素が requests に設定されています。

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>10</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>requests</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>5</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>20</Text>
            <Attribute>15</Attribute>
            <NamespaceURI>40</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>30</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    

    <Source> 要素の有効な値は、requestresponsemessage. です。requests は有効な値ではなく、ポリシーが実行されるフローには存在しないため、次のエラーが表示されます。

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Source requests
    is not available
    

解決策

失敗した XMLThreatProtection ポリシーの <Source> 要素の変数の設定が requestresponse、または message になっていて、そのポリシーが実行されるフローに存在することを確認します。

上記のポリシーの例を修正するには、リクエスト フローに存在する request 変数を使用するように <Source> 要素を修正します。

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>10</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>5</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>20</Text>
        <Attribute>15</Attribute>
        <NamespaceURI>40</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>30</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

NonMessageVariable

エラーコード

steps.xmlthreatprotection.NonMessageVariable

エラー レスポンスの本文

{
    "fault": {
        "faultstring": "Variable var_name does not resolve to a Message"
        "detail": {
            "errorcode": "steps.xmlthreatprotection.NonMessageVariable"
        }
    }
}

エラー レスポンスの本文の例

{
    "fault": {
        "faultstring": "Variable message.content does not resolve to a Message",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.NonMessageVariable"
        }
    }
}

原因

このエラーは、XMLThreatProtection ポリシーの <Source> 要素が message 型以外の変数に設定されている場合に発生します。

Message 型の変数は HTTP リクエストとレスポンス全体を表します。組み込みの Apigee フロー変数 requestresponsemessage は Message 型です。メッセージ変数の詳細については、フロー変数リファレンスをご覧ください。

診断

  1. エラー メッセージから、Message 型の変数に解決される変数の名前を特定します。たとえば、次のエラー メッセージでは、変数の名前は message.content になります。

    Variable message.content does not resolve to a Message
    
  2. エラーが発生した API プロキシ内のすべての XMLThreadProtection ポリシーを調べ、手順 1 で特定した変数名で <Source> 要素が指定されている XMLThreadProtection ポリシーを特定します。

    次の XMLThreatProtection ポリシーの例では、<Source>message.content に設定されています。

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>10</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>message.content</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>5</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>20</Text>
            <Attribute>15</Attribute>
            <NamespaceURI>40</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>30</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    

    変数 message.content は Message 型ではないため、次のエラーが発生します。

    Variable message.content does not resolve to a Message
    

解決策

失敗した XMLThreatProtection ポリシーの <Source> 要素が、ポリシーが実行されるフローに存在する message フロー変数に設定されていることを確認します。

ポリシーを修正するには、Message 型の変数を指定するように <Source> 要素を変更します。たとえば、失敗した XMLThreatProtection では、<Source> 要素を message と指定できます。

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>10</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>message</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>5</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>20</Text>
        <Attribute>15</Attribute>
        <NamespaceURI>40</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>30</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>