The XACML generated by SunXACML library doesn't have the name space element. Is there any way we can populate the name space.
Actual : **
<Requ**est> <Subject SubjectCategory="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject"> <Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" DataType="http://www.w3.org/2001/XMLSchema#string" Issuer="localhost"><AttributeValue>testuserId</AttributeValue></Attribute> <Attribute AttributeId="http://xyz.com/xacml/names/subject/application" DataType="http://www.w3.org/2001/XMLSchema#string" Issuer="localhost"><AttributeValue>app123</AttributeValue></Attribute> <Attribute AttributeId="http://xyz.com/xacml/names/subject/group" DataType="http://www.w3.org/2001/XMLSchema#string" Issuer="localhost"><AttributeValue>TestUsers</AttributeValue></Attribute> </Subject> <Resource> <Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" Issuer="localhost"><AttributeValue>http://xyz.com/xacml/resources/TestResource</AttributeValue></Attribute> </Resource> <Action> <Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" Issuer="localhost"><AttributeValue>EXECUTE</AttributeValue></Attribute> </Action> <Environment> </Environment> </Request>
Expected :**
<Request xmlns="urn:oasis:names:tc:xacml:2.0:context:schema:os" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instan**ce"> <Subject SubjectCategory="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject"> <Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" DataType="http://www.w3.org/2001/XMLSchema#string" Issuer="localhost"><AttributeValue>testuserId</AttributeValue></Attribute> <Attribute AttributeId="http://xyz.com/xacml/names/subject/application" DataType="http://www.w3.org/2001/XMLSchema#string" Issuer="localhost"><AttributeValue>app123</AttributeValue></Attribute> <Attribute AttributeId="http://xyz.com/xacml/names/subject/group" DataType="http://www.w3.org/2001/XMLSchema#string" Issuer="localhost"><AttributeValue>TestUsers</AttributeValue></Attribute> </Subject> <Resource> <Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" Issuer="localhost"><AttributeValue>http://xyz.com/xacml/resources/TestResource</AttributeValue></Attribute> </Resource> <Action> <Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" Issuer="localhost"><AttributeValue>EXECUTE</AttributeValue></Attribute> </Action> <Environment> </Environment> </Request>
Log in to post a comment.
The XACML generated by SunXACML library doesn't have the name space element. Is there any way we can populate the name space.
Actual : **
<Requ**est>
<Subject SubjectCategory="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject">
<Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" DataType="http://www.w3.org/2001/XMLSchema#string" Issuer="localhost"><AttributeValue>testuserId</AttributeValue></Attribute>
<Attribute AttributeId="http://xyz.com/xacml/names/subject/application" DataType="http://www.w3.org/2001/XMLSchema#string" Issuer="localhost"><AttributeValue>app123</AttributeValue></Attribute>
<Attribute AttributeId="http://xyz.com/xacml/names/subject/group" DataType="http://www.w3.org/2001/XMLSchema#string" Issuer="localhost"><AttributeValue>TestUsers</AttributeValue></Attribute>
</Subject>
<Resource>
<Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" Issuer="localhost"><AttributeValue>http://xyz.com/xacml/resources/TestResource</AttributeValue></Attribute>
</Resource>
<Action>
<Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" Issuer="localhost"><AttributeValue>EXECUTE</AttributeValue></Attribute>
</Action>
<Environment>
</Environment>
</Request>
Expected :**
<Request xmlns="urn:oasis:names:tc:xacml:2.0:context:schema:os" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instan**ce">
<Subject SubjectCategory="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject">
<Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" DataType="http://www.w3.org/2001/XMLSchema#string" Issuer="localhost"><AttributeValue>testuserId</AttributeValue></Attribute>
<Attribute AttributeId="http://xyz.com/xacml/names/subject/application" DataType="http://www.w3.org/2001/XMLSchema#string" Issuer="localhost"><AttributeValue>app123</AttributeValue></Attribute>
<Attribute AttributeId="http://xyz.com/xacml/names/subject/group" DataType="http://www.w3.org/2001/XMLSchema#string" Issuer="localhost"><AttributeValue>TestUsers</AttributeValue></Attribute>
</Subject>
<Resource>
<Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" Issuer="localhost"><AttributeValue>http://xyz.com/xacml/resources/TestResource</AttributeValue></Attribute>
</Resource>
<Action>
<Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" Issuer="localhost"><AttributeValue>EXECUTE</AttributeValue></Attribute>
</Action>
<Environment>
</Environment>
</Request>