-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added required unit tests for evnetlog for systemuser
- Loading branch information
Dhanalakshmi Gopalswamy
committed
Jan 13, 2025
1 parent
af95cb9
commit bd29e19
Showing
6 changed files
with
163 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
test/IntegrationTests/Data/Xacml/3.0/AltinnApps/AltinnApps0001SystemUserRequest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Request xsi:schemaLocation="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17 http://docs.oasis-open.org/xacml/3.0/xacml-core-v3-schema-wd-17.xsd" ReturnPolicyIdList="false" CombinedDecision="false" xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<Attributes Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject"> | ||
<Attribute IncludeInResult="false" AttributeId="urn:altinn:systemuser:uuid"> | ||
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">ac58124c-1ea8-48ed-9fe6-1d9eb5d985e5</AttributeValue> | ||
</Attribute> | ||
</Attributes> | ||
<Attributes Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource"> | ||
<Attribute IncludeInResult="false" AttributeId="urn:altinn:instance-id"> | ||
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">1000/26133fb5-a9f2-45d4-90b1-f6d93ad40713</AttributeValue> | ||
</Attribute> | ||
</Attributes> | ||
<Attributes Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action"> | ||
<Attribute IncludeInResult="false" AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id"> | ||
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">read</AttributeValue> | ||
</Attribute> | ||
</Attributes> | ||
<Attributes Category="urn:oasis:names:tc:xacml:3.0:attribute-category:environment" /> | ||
</Request> |
28 changes: 28 additions & 0 deletions
28
test/IntegrationTests/Data/Xacml/3.0/AltinnApps/AltinnApps0001SystemUserResponse.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Response | ||
xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17 | ||
http://docs.oasis-open.org/xacml/3.0/xacml-core-v3-schema-wd-17.xsd"> | ||
<Result> | ||
<Decision>Permit</Decision> | ||
<Status> | ||
<StatusCode | ||
Value="urn:oasis:names:tc:xacml:1.0:status:ok"/> | ||
</Status> | ||
<Obligations> | ||
<Obligation | ||
ObligationId="urn:altinn:obligation:authenticationLevel1" FulfillOn="Permit" > | ||
<AttributeAssignment | ||
AttributeId="urn:altinn:obligation1-assignment1" | ||
DataType="http://www.w3.org/2001/XMLSchema#integer" | ||
Category="urn:altinn:minimum-authenticationlevel">2</AttributeAssignment> | ||
</Obligation> | ||
</Obligations> | ||
<Attributes Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource"> | ||
<Attribute IncludeInResult="true" AttributeId="urn:altinn:partyid"> | ||
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">1000</AttributeValue> | ||
</Attribute> | ||
</Attributes> | ||
</Result> | ||
</Response> |
13 changes: 13 additions & 0 deletions
13
test/IntegrationTests/Data/Xacml/3.0/AltinnApps/eventlog/AltinnApps0001SystemUserEvent.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"resource": "app_skd_taxreport", | ||
"operation": "read", | ||
"created": "2018-05-15T02:05:00+00:00", | ||
"instanceId": "1000/26133fb5-a9f2-45d4-90b1-f6d93ad40713", | ||
"subjectUserId": 1, | ||
"subjectOrgCode": "", | ||
"resourcePartyId": 1000, | ||
"contextRequestJson": "{\"ReturnPolicyIdList\":false,\"CombinedDecision\":false,\"XPathVersion\":null,\"Attributes\":[{\"Id\":null,\"Content\":null,\"Attributes\":[{\"Issuer\":null,\"AttributeId\":\"urn:altinn:userid\",\"IncludeInResult\":false,\"AttributeValues\":[{\"Value\":\"1\",\"DataType\":\"http://www.w3.org/2001/XMLSchema#string\",\"Attributes\":[{\"IsNamespaceDeclaration\":false,\"Name\":{\"LocalName\":\"DataType\",\"Namespace\":{\"NamespaceName\":\"\"},\"NamespaceName\":\"\"},\"NextAttribute\":null,\"NodeType\":2,\"PreviousAttribute\":null,\"Value\":\"http://www.w3.org/2001/XMLSchema#string\",\"BaseUri\":\"\",\"Document\":null,\"Parent\":null}],\"Elements\":[]}]},{\"Issuer\":null,\"AttributeId\":\"urn:altinn:rolecode\",\"IncludeInResult\":false,\"AttributeValues\":[{\"Value\":\"regna\",\"DataType\":\"http://www.w3.org/2001/XMLSchema#string\",\"Attributes\":[],\"Elements\":[]},{\"Value\":\"dagl\",\"DataType\":\"http://www.w3.org/2001/XMLSchema#string\",\"Attributes\":[],\"Elements\":[]},{\"Value\":\"apiadm\",\"DataType\":\"http://www.w3.org/2001/XMLSchema#string\",\"Attributes\":[],\"Elements\":[]}]}],\"Category\":\"urn:oasis:names:tc:xacml:1.0:subject-category:access-subject\"},{\"Id\":null,\"Content\":null,\"Attributes\":[{\"Issuer\":null,\"AttributeId\":\"urn:altinn:instance-id\",\"IncludeInResult\":false,\"AttributeValues\":[{\"Value\":\"1000/26133fb5-a9f2-45d4-90b1-f6d93ad40713\",\"DataType\":\"http://www.w3.org/2001/XMLSchema#string\",\"Attributes\":[{\"IsNamespaceDeclaration\":false,\"Name\":{\"LocalName\":\"DataType\",\"Namespace\":{\"NamespaceName\":\"\"},\"NamespaceName\":\"\"},\"NextAttribute\":null,\"NodeType\":2,\"PreviousAttribute\":null,\"Value\":\"http://www.w3.org/2001/XMLSchema#string\",\"BaseUri\":\"\",\"Document\":null,\"Parent\":null}],\"Elements\":[]}]},{\"Issuer\":null,\"AttributeId\":\"urn:altinn:org\",\"IncludeInResult\":false,\"AttributeValues\":[{\"Value\":\"skd\",\"DataType\":\"http://www.w3.org/2001/XMLSchema#string\",\"Attributes\":[],\"Elements\":[]}]},{\"Issuer\":null,\"AttributeId\":\"urn:altinn:app\",\"IncludeInResult\":false,\"AttributeValues\":[{\"Value\":\"taxreport\",\"DataType\":\"http://www.w3.org/2001/XMLSchema#string\",\"Attributes\":[],\"Elements\":[]}]},{\"Issuer\":null,\"AttributeId\":\"urn:altinn:task\",\"IncludeInResult\":false,\"AttributeValues\":[{\"Value\":\"Task_1\",\"DataType\":\"http://www.w3.org/2001/XMLSchema#string\",\"Attributes\":[],\"Elements\":[]}]},{\"Issuer\":null,\"AttributeId\":\"urn:altinn:partyid\",\"IncludeInResult\":true,\"AttributeValues\":[{\"Value\":\"1000\",\"DataType\":\"http://www.w3.org/2001/XMLSchema#string\",\"Attributes\":[],\"Elements\":[]}]}],\"Category\":\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\"},{\"Id\":null,\"Content\":null,\"Attributes\":[{\"Issuer\":null,\"AttributeId\":\"urn:oasis:names:tc:xacml:1.0:action:action-id\",\"IncludeInResult\":false,\"AttributeValues\":[{\"Value\":\"read\",\"DataType\":\"http://www.w3.org/2001/XMLSchema#string\",\"Attributes\":[{\"IsNamespaceDeclaration\":false,\"Name\":{\"LocalName\":\"DataType\",\"Namespace\":{\"NamespaceName\":\"\"},\"NamespaceName\":\"\"},\"NextAttribute\":null,\"NodeType\":2,\"PreviousAttribute\":null,\"Value\":\"http://www.w3.org/2001/XMLSchema#string\",\"BaseUri\":\"\",\"Document\":null,\"Parent\":null}],\"Elements\":[]}]}],\"Category\":\"urn:oasis:names:tc:xacml:3.0:attribute-category:action\"},{\"Id\":null,\"Content\":null,\"Attributes\":[],\"Category\":\"urn:oasis:names:tc:xacml:3.0:attribute-category:environment\"}],\"RequestReferences\":[]}", | ||
"ipadress": "51.120.0.114", | ||
"Decision": "Permit", | ||
"userIdentifier": "787f6747-2d35-4ea2-9685-0f4123720680s" | ||
} |
11 changes: 11 additions & 0 deletions
11
.../3.0/ResourceRegistry/eventlog/ResourceRegistry_SystemUserWithDelegation_PermitEvent.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"created": "2018-05-15T02:05:00+00:00", | ||
"subjectOrgCode": "", | ||
"resourcePartyId": 50005545, | ||
"resource": "ttd-externalpdp-resource1", | ||
"instanceid": "", | ||
"operation": "read", | ||
"contextRequestJson": "{\"ReturnPolicyIdList\":false,\"CombinedDecision\":false,\"XPathVersion\":null,\"Attributes\":[{\"Id\":null,\"Content\":null,\"Attributes\":[{\"Issuer\":null,\"AttributeId\":\"urn:altinn:systemuser:uuid\",\"IncludeInResult\":false,\"AttributeValues\":[{\"Value\":\"47caea5b-a80b-4343-b1d3-31eb523a4e28\",\"DataType\":\"http:\/\/www.w3.org\/2001\/XMLSchema#string\",\"Attributes\":[],\"Elements\":[]}]}],\"Category\":\"urn:oasis:names:tc:xacml:1.0:subject-category:access-subject\"},{\"Id\":null,\"Content\":null,\"Attributes\":[{\"Issuer\":null,\"AttributeId\":\"urn:oasis:names:tc:xacml:1.0:action:action-id\",\"IncludeInResult\":false,\"AttributeValues\":[{\"Value\":\"read\",\"DataType\":\"http:\/\/www.w3.org\/2001\/XMLSchema#string\",\"Attributes\":[],\"Elements\":[]}]}],\"Category\":\"urn:oasis:names:tc:xacml:3.0:attribute-category:action\"},{\"Id\":null,\"Content\":null,\"Attributes\":[{\"Issuer\":null,\"AttributeId\":\"urn:altinn:resource\",\"IncludeInResult\":false,\"AttributeValues\":[{\"Value\":\"ttd-externalpdp-resource1\",\"DataType\":\"http:\/\/www.w3.org\/2001\/XMLSchema#string\",\"Attributes\":[],\"Elements\":[]}]},{\"Issuer\":null,\"AttributeId\":\"urn:altinn:organization:identifier-no\",\"IncludeInResult\":false,\"AttributeValues\":[{\"Value\":\"910459880\",\"DataType\":\"http:\/\/www.w3.org\/2001\/XMLSchema#string\",\"Attributes\":[],\"Elements\":[]}]},{\"Issuer\":null,\"AttributeId\":\"urn:altinn:partyid\",\"IncludeInResult\":false,\"AttributeValues\":[{\"Value\":\"50005545\",\"DataType\":\"http:\/\/www.w3.org\/2001\/XMLSchema#string\",\"Attributes\":[],\"Elements\":[]}]}],\"Category\":\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\"}],\"RequestReferences\":[]}", | ||
"Decision": "Permit", | ||
"userIdentifier": "47caea5b-a80b-4343-b1d3-31eb523a4e28" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters