XMLThreatProtection 정책 런타임 오류 문제 해결

현재 Apigee Edge 문서가 표시되고 있습니다.
Apigee X 문서로 이동
정보

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 단일 요소의 최대 속성 수를 초과했습니다.
AttributeNameExceeded 속성 이름에 허용되는 최대 길이를 초과했습니다.
AttributeValueExceeded 속성 값에 허용되는 최대 길이를 초과했습니다.
TextExceeded 텍스트에 허용되는 최대 길이를 초과했습니다.
CommentExceeded 주석에 허용된 최대 길이를 초과했습니다.
PIDataExceeded 허용되는 처리 안내 데이터 길이를 초과했습니다.
PITargetExceeded 프로세스 안내 이름 길이를 초과되었습니다.
NSURIExceeded 네임스페이스 URL 길이를 초과했습니다.
NSPrefixExceeded 네임스페이스 프리픽스 길이를 초과했습니다.
NSCountExceeded 단일 요소에 사용되는 네임스페이스 수가 초과되었습니다.
잘못된 XML 페이로드 입력 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 요소가 포함된 경우에 발생합니다.

예를 들어 XML ThreatProtection 정책에서 <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>Google</name>
      <country>USA</country>
    </company>
    

    위에 표시된 XML 페이로드의 1행에 7자로 된 company라는 루트 요소가 있습니다. 요소의 길이가 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으로 설정됩니다(주석, 요소 포함, 기타 항목이 이 제한에 포함됨).

    <?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>의 네 번째 하위 요소 <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. 1단계에서 확인된 실패한 XMLThreatProtection 정책을 검토하고 <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>
    

    위의 6행에 표시된 XML 페이로드의 노드 깊이는 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> 요소에서 지정한 입력 메시지 페이로드에 단일 요소의 속성 수가 정책의 <AttributeCountPerElement> 요소에 지정된 수를 초과하는 XML 문서를 포함할 때 발생합니다.

예를 들어 XMLThreatProtection 정책에서 <AttributeCountPerElement> 요소가 2로 지정되었지만 입력 페이로드에 속성이 2개를 초과하는 요소가 있는 경우 이 오류가 발생합니다.

진단

  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단계에서 확인됨)를 검토하고 지정된 속성 수가 2단계에서 확인된 <AttributeCountPerElementh> 요소에 지정된 수를 초과하는지 확인합니다. 속성 수가 개수를 초과하면 오류의 원인입니다.

    다음은 입력 페이로드의 예입니다.

    <?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>
    

    위의 3행에 표시된 XML 페이로드에는 속성이 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"
        }
    }
}

원인

이 오류는 XML ThreatProtection 정책의 <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>
    

    위의 3행에 표시된 XML 페이로드에는 각각 이름 길이가 8자 및 7자인 두 개의 속성 categorycuisine이 있습니다. 속성 이름 길이가 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>
    

    위의 3행에 표시된 XML 페이로드에는 속성 길이가 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>
    

    위의 4행에 표시된 XML 페이로드에는 길이가 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"
        }
    }
}

원인

이 오류는 XML ThreatProtection 정책의 <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>
    

    위의 2행에 표시된 XML 페이로드의 주석 값은 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"
        }
    }
}

원인

이 오류는 XML ThreatProtection 정책의 <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>
    

    위의 1행에 표시된 XML 페이로드에는 길이가 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"
        }
    }
}

원인

이 오류는 XML ThreatProtection 정책의 <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>
    

    위의 2행에 표시된 XML 페이로드에는 길이가 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"
        }
    }
}

원인

이 오류는 XML ThreatProtection 정책의 <Source> 요소에서 지정된 입력 메시지 페이로드에 네임스페이스 URI가 정책의 <ValueLimits> 요소의 <NamespaceURI> 하위 요소에 지정된 문자 수를 초과하는 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.google.com/profile">
      <profile:name>Rama Krishna</profile:name>
      <profile:company>Google</profile:company>
      <profile:phone>(91) 9876543210</profile:phone>
    </profile:user>
    

    위의 2행에 표시된 XML 페이로드에는 길이가 22자인 네임스페이스 URI www.google.com/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.googlecom/profile">
      <userprofile:name>Rama Krishna</userprofile:name>
      <userprofile:company>Google</userprofile:company>
      <userprofile:phone>(011) 123-4567</userprofile:phone>
    </userprofile:user>
    

    위의 2행에 표시된 XML 페이로드에는 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> 요소에 지정된 입력 메시지 페이로드에 단일 요소에 사용된 네임스페이스의 수가 정책의 <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단계에서 확인됨)를 검토하고 단일 요소에 지정된 네임스페이스 수가 2단계에서 확인된 <NamespaceCountPerElement> 요소보다 큰지 확인합니다. 네임스페이스 수가 요소 한도당 네임스페이스 수를 초과하는 경우 오류의 원인이 됩니다.

    다음은 입력 페이로드의 예입니다.

    <?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>
    

    위의 2행에 표시된 XML 페이로드에는 네임스페이스가 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 정책이 단일 요소의 특정 네임스페이스 수를 초과하는 페이로드로부터 보호하기 위한 것이라면 오류 메시지가 발생할 수 있습니다. 이 경우에는 추가 작업이 필요하지 않습니다.

하지만 더 많은 네임스페이스를 허용할 수 있다고 판단되면 요구사항에 따라 <StructureLimits> 요소의 <NamespaceCountPerElement> 하위 요소를 요구사항에 따라 적절한 값으로 수정합니다.

예를 들어 단일 요소에 최대 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"
        }
    }
}

원인

이 오류는 XMLProtectionPolicy 정책의 <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
    

해상도

유효한 입력 XML 페이로드가 XMLThreatProtection 정책이 포함된 API 프록시로 전달되는지 확인합니다.

위에 설명된 오류 예시를 수정하려면 다음과 같이 입력 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 변수가 다음 중 하나일 때 발생합니다.

  • 범위를 벗어난 경우(정책이 실행 중인 특정 흐름에서 사용할 수 없음)
  • 유효한 값 request, response 또는 message 중 하나가 아님

예를 들어 정책의 <Source> 요소가 정책이 실행되는 흐름에 존재하지 않는 변수로 설정된 경우 이 오류가 발생합니다.

진단

  1. XMLThreatProtection 정책 이름 및 오류 메시지에서 소스 변수 이름을 식별합니다. 예를 들어 다음 오류 메시지에서 XMLThreatProtection 정책 이름은 XML-Threat-Protection-1이고 소스 변수는 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> 요소의 유효한 값은 request, response 또는 message.입니다. requests는 유효한 값이 아니며 정책이 실행 중인 흐름에서 존재하지 않기 때문에 다음 오류가 발생합니다.

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

해상도

실패한 XMLThreatProtection 정책의 <Source> 요소에 설정된 변수가 request, response 또는 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 유형이 아닌 변수로 설정된 경우 발생합니다.

메시지 유형 변수는 전체 HTTP 요청 및 응답을 나타냅니다. 기본 제공되는 Apigee Edge 흐름 변수 request, response, message는 메시지 유형입니다. message 변수에 대한 자세한 내용은 변수 참조를 확인하세요.

진단

  1. 오류 메시지에서 변수 메시지 유형으로 확인되는 변수의 이름을 식별합니다. 예를 들어 다음 오류 메시지에서 변수 이름은 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가 메시지 유형이 아니므로 오류가 발생합니다.

    Variable message.content does not resolve to a Message
    

해결 방법

실패한 XMLThreatProtection 정책의 <Source> 요소가 정책이 실행되는 흐름에 있는 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>