1
votes

I try to use REST API to evaluate XACML requests as in the below documentation

https://docs.wso2.com/display/IS530/Using+REST+APIs+via+XACML+to+Manage+Entitlement

But I get 500 Internal server error and in the XACML logs, I see

"No operation matching request path "/api/identity/entitlement/decision/pdp" is found, Relative Path: /pdp, HTTP Method: POST, ContentType: application/xml,application/xml, Accept: application/xml,."

XACML request

<Request
        xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" CombinedDecision="false" ReturnPolicyIdList="false">
    <Attributes Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject">
        <Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" IncludeInResult="false">
            <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">customer1</AttributeValue>
        </Attribute>
    </Attributes>
    <Attributes Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action">
        <Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" IncludeInResult="false">
            <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">POST</AttributeValue>
        </Attribute>
    </Attributes>
    <Attributes Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
        <Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" IncludeInResult="false">
            <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">private/team</AttributeValue>
        </Attribute>
    </Attributes>
</Request>

Could somebody help to identify the issue ?

Regards, Albie Morken

1
Can you paste your request? It got mangled up - David Brossard
Formatted the request - Albie Morken

1 Answers

0
votes

I validate your XACML request using the Axiomatics Policy Administration Point. It is correct.

enter image description here

Given the error you receive is

"No operation matching request path "/api/identity/entitlement/decision/pdp" is found, Relative Path: /pdp, HTTP Method: POST, ContentType: application/xml,application/xml, Accept: application/xml,."

I am suspecting the issue is the URI / path you are using. You need to check how the REST PDP is exposed. For instance, inside the Axiomatics Policy Server, the PDP is exposed as https://host:port/asm-pdp/authorize. The REST Profile of XACML states how to retrieve the endpoint.