Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated created datetime to utc #784

Merged
merged 6 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/Authorization/Helpers/EventLogHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
/// <param name="contextRespsonse">the http context response</param>
/// <param name="currentDateTime">the current date time</param>
/// <returns></returns>
public static AuthorizationEvent MapAuthorizationEventFromContextRequest(XacmlContextRequest contextRequest, HttpContext context, XacmlContextResponse contextRespsonse, DateTime currentDateTime)
public static AuthorizationEvent MapAuthorizationEventFromContextRequest(XacmlContextRequest contextRequest, HttpContext context, XacmlContextResponse contextRespsonse, DateTimeOffset currentDateTime)
{
AuthorizationEvent authorizationEvent = null;
if (contextRequest != null)
{
authorizationEvent = new AuthorizationEvent();
(string resource, string instanceId, int? resourcePartyId) = GetResourceAttributes(contextRequest);
(int? userId, int? partyId, string org, int? orgNumber, string? sessionId) = GetSubjectInformation(contextRequest);

Check warning on line 43 in src/Authorization/Helpers/EventLogHelper.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 43 in src/Authorization/Helpers/EventLogHelper.cs

View workflow job for this annotation

GitHub Actions / Analyze

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 43 in src/Authorization/Helpers/EventLogHelper.cs

View workflow job for this annotation

GitHub Actions / Build and Test

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
authorizationEvent.SessionId = sessionId;
authorizationEvent.Created = currentDateTime;
authorizationEvent.Resource = resource;
Expand All @@ -51,7 +51,6 @@
authorizationEvent.SubjectParty = partyId;
authorizationEvent.ResourcePartyId = resourcePartyId;
authorizationEvent.Operation = GetActionInformation(contextRequest);
authorizationEvent.TimeToDelete = authorizationEvent.Created.AddYears(3);
authorizationEvent.IpAdress = GetClientIpAddress(context);
authorizationEvent.ContextRequestJson = JsonSerializer.Serialize(contextRequest);
authorizationEvent.Decision = contextRespsonse.Results?.FirstOrDefault()?.Decision;
Expand Down Expand Up @@ -113,13 +112,13 @@
/// </summary>
/// <param name="request">The requestId</param>
/// <returns></returns>
public static (int? UserId, int? PartyId, string Org, int? OrgNumber, string? sessionId) GetSubjectInformation(XacmlContextRequest request)

Check warning on line 115 in src/Authorization/Helpers/EventLogHelper.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 115 in src/Authorization/Helpers/EventLogHelper.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Check warning on line 115 in src/Authorization/Helpers/EventLogHelper.cs

View workflow job for this annotation

GitHub Actions / Analyze

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 115 in src/Authorization/Helpers/EventLogHelper.cs

View workflow job for this annotation

GitHub Actions / Build and Test

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 115 in src/Authorization/Helpers/EventLogHelper.cs

View workflow job for this annotation

GitHub Actions / Build and Test

{
int? userId = null;
int? partyId = null;
string org = string.Empty;
int? orgNumber = null;
string? sessionId = null;

Check warning on line 121 in src/Authorization/Helpers/EventLogHelper.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 121 in src/Authorization/Helpers/EventLogHelper.cs

View workflow job for this annotation

GitHub Actions / Analyze

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 121 in src/Authorization/Helpers/EventLogHelper.cs

View workflow job for this annotation

GitHub Actions / Build and Test

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

foreach (XacmlContextAttributes attr in request.Attributes.Where(attr => attr.Category.OriginalString.Equals(XacmlConstants.MatchAttributeCategory.Subject)))
{
Expand Down
7 changes: 1 addition & 6 deletions src/Authorization/Models/EventLog/AuthorizationEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
/// <summary>
/// Session Id of the request
/// </summary>
public string? SessionId { get; set; }

Check warning on line 14 in src/Authorization/Models/EventLog/AuthorizationEvent.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 14 in src/Authorization/Models/EventLog/AuthorizationEvent.cs

View workflow job for this annotation

GitHub Actions / Analyze

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 14 in src/Authorization/Models/EventLog/AuthorizationEvent.cs

View workflow job for this annotation

GitHub Actions / Build and Test

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

/// <summary>
/// Date, time of the authorization event. Set by producer of logevents
acn-dgopa marked this conversation as resolved.
Show resolved Hide resolved
/// </summary>
public DateTime Created { get; set; }
public DateTimeOffset Created { get; set; }
acn-dgopa marked this conversation as resolved.
Show resolved Hide resolved

/// <summary>
/// The userid for the user that requested authorization
Expand Down Expand Up @@ -58,15 +58,10 @@
/// </summary>
public string Operation { get; set; }
acn-dgopa marked this conversation as resolved.
Show resolved Hide resolved

/// <summary>
/// Duration of log retention
/// </summary>
public DateTime TimeToDelete { get; set; }

/// <summary>
/// The Ip adress of the calling party
/// </summary>
public string? IpAdress { get; set; }

Check warning on line 64 in src/Authorization/Models/EventLog/AuthorizationEvent.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 64 in src/Authorization/Models/EventLog/AuthorizationEvent.cs

View workflow job for this annotation

GitHub Actions / Analyze

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 64 in src/Authorization/Models/EventLog/AuthorizationEvent.cs

View workflow job for this annotation

GitHub Actions / Build and Test

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

/// <summary>
/// The enriched context request
Expand Down
2 changes: 1 addition & 1 deletion src/Authorization/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ void ConfigureServices(IServiceCollection services, IConfiguration config)
services.AddTransient<ISigningCredentialsResolver, SigningCredentialsResolver>();
services.AddSingleton<IEventsQueueClient, EventsQueueClient>();
services.AddSingleton<IEventLog, EventLogService>();
services.AddSingleton<ISystemClock, SystemClock>();
services.TryAddSingleton(TimeProvider.System);
GeneralSettings generalSettings = config.GetSection("GeneralSettings").Get<GeneralSettings>();
services.AddAuthentication(JwtCookieDefaults.AuthenticationScheme)
.AddJwtCookie(JwtCookieDefaults.AuthenticationScheme, options =>
Expand Down
11 changes: 6 additions & 5 deletions src/Authorization/Services/Implementation/EventLogService.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Text.Json;
using System;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Threading;
using System.Threading.Tasks;
Expand All @@ -20,17 +21,17 @@
public class EventLogService : IEventLog
{
private readonly IEventsQueueClient _queueClient;
private readonly ISystemClock _systemClock;
private readonly TimeProvider _timeProvider;

/// <summary>
/// Instantiation for event log servcie
/// </summary>
/// <param name="queueClient">queue client to store event in event log</param>
/// <param name="systemClock">handler for datetime service</param>

Check warning on line 30 in src/Authorization/Services/Implementation/EventLogService.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

XML comment has a param tag for 'systemClock', but there is no parameter by that name

Check warning on line 30 in src/Authorization/Services/Implementation/EventLogService.cs

View workflow job for this annotation

GitHub Actions / Analyze

XML comment has a param tag for 'systemClock', but there is no parameter by that name

Check warning on line 30 in src/Authorization/Services/Implementation/EventLogService.cs

View workflow job for this annotation

GitHub Actions / Build and Test

XML comment has a param tag for 'systemClock', but there is no parameter by that name
public EventLogService(IEventsQueueClient queueClient, ISystemClock systemClock)
public EventLogService(IEventsQueueClient queueClient, TimeProvider timeProvider)

Check warning on line 31 in src/Authorization/Services/Implementation/EventLogService.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Parameter 'timeProvider' has no matching param tag in the XML comment for 'EventLogService.EventLogService(IEventsQueueClient, TimeProvider)' (but other parameters do)

Check warning on line 31 in src/Authorization/Services/Implementation/EventLogService.cs

View workflow job for this annotation

GitHub Actions / Analyze

Parameter 'timeProvider' has no matching param tag in the XML comment for 'EventLogService.EventLogService(IEventsQueueClient, TimeProvider)' (but other parameters do)

Check warning on line 31 in src/Authorization/Services/Implementation/EventLogService.cs

View workflow job for this annotation

GitHub Actions / Build and Test

Parameter 'timeProvider' has no matching param tag in the XML comment for 'EventLogService.EventLogService(IEventsQueueClient, TimeProvider)' (but other parameters do)
{
_queueClient = queueClient;
_systemClock = systemClock;
_timeProvider = timeProvider;
}

/// <summary>
Expand All @@ -53,7 +54,7 @@
options.Converters.Add(new JsonStringEnumConverter());
if (await featureManager.IsEnabledAsync(FeatureFlags.AuditLog))
{
AuthorizationEvent authorizationEvent = EventLogHelper.MapAuthorizationEventFromContextRequest(contextRequest, context, contextResponse, _systemClock.UtcNow.DateTime);
AuthorizationEvent authorizationEvent = EventLogHelper.MapAuthorizationEventFromContextRequest(contextRequest, context, contextResponse, _timeProvider.GetUtcNow().ToOffset(TimeSpan.Zero));
acn-dgopa marked this conversation as resolved.
Show resolved Hide resolved

if (authorizationEvent != null)
{
Expand Down
18 changes: 8 additions & 10 deletions test/IntegrationTests/AltinnApps_DecisionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class AltinnApps_DecisionTests :IClassFixture<CustomWebApplicationFactory
{
private readonly CustomWebApplicationFactory<DecisionController> _factory;
private readonly Mock<IFeatureManager> featureManageMock = new Mock<IFeatureManager>();
private readonly Mock<ISystemClock> systemClock = new Mock<ISystemClock>();
private readonly Mock<TimeProvider> timeProviderMock = new Mock<TimeProvider>();

public AltinnApps_DecisionTests(CustomWebApplicationFactory<DecisionController> fixture)
{
Expand All @@ -51,7 +51,7 @@ public async Task PDP_Decision_AltinnApps0001()
eventQueue.Setup(q => q.EnqueueAuthorizationEvent(It.IsAny<string>(), It.IsAny<CancellationToken>()));
AuthorizationEvent expectedAuthorizationEvent = TestSetupUtil.GetAuthorizationEvent(testCase);

HttpClient client = GetTestClient(eventQueue.Object, featureManageMock.Object, systemClock.Object);
HttpClient client = GetTestClient(eventQueue.Object, featureManageMock.Object, timeProviderMock.Object);
client.DefaultRequestHeaders.Add("x-forwarded-for", "51.120.0.114, 10.122.16.225");
HttpRequestMessage httpRequestMessage = TestSetupUtil.CreateXacmlRequest(testCase);
XacmlContextResponse expected = TestSetupUtil.ReadExpectedResponse(testCase);
Expand Down Expand Up @@ -103,7 +103,7 @@ public async Task PDP_Decision_AltinnApps0007()
eventQueue.Setup(q => q.EnqueueAuthorizationEvent(It.IsAny<string>(), It.IsAny<CancellationToken>()));
AuthorizationEvent expectedAuthorizationEvent = TestSetupUtil.GetAuthorizationEvent(testCase);

HttpClient client = GetTestClient(eventQueue.Object, featureManageMock.Object, systemClock.Object);
HttpClient client = GetTestClient(eventQueue.Object, featureManageMock.Object, timeProviderMock.Object);
HttpRequestMessage httpRequestMessage = TestSetupUtil.CreateJsonProfileXacmlRequest(testCase);
XacmlJsonResponse expected = TestSetupUtil.ReadExpectedJsonProfileResponse(testCase);

Expand Down Expand Up @@ -158,7 +158,7 @@ public async Task PDP_Decision_AltinnApps0004()
eventQueue.Setup(q => q.EnqueueAuthorizationEvent(It.IsAny<string>(), It.IsAny<CancellationToken>()));
AuthorizationEvent expectedAuthorizationEvent = TestSetupUtil.GetAuthorizationEvent(testCase);

HttpClient client = GetTestClient(eventQueue.Object, featureManageMock.Object, systemClock.Object);
HttpClient client = GetTestClient(eventQueue.Object, featureManageMock.Object, timeProviderMock.Object);
client.DefaultRequestHeaders.Add("x-forwarded-for", "51.120.0.114,20.251.13.24, 10.122.16.225");
HttpRequestMessage httpRequestMessage = TestSetupUtil.CreateXacmlRequest(testCase);
XacmlContextResponse expected = TestSetupUtil.ReadExpectedResponse(testCase);
Expand Down Expand Up @@ -421,7 +421,7 @@ public async Task PDP_Decision_AltinnApps_OedFormuesfullmakt_Json_Permit()
AssertionUtil.AssertEqual(expected, contextResponse);
}

private HttpClient GetTestClient(IEventsQueueClient eventLog = null, IFeatureManager featureManager = null, ISystemClock systemClockMock = null)
private HttpClient GetTestClient(IEventsQueueClient eventLog = null, IFeatureManager featureManager = null, TimeProvider timeProviderMock = null)
{
HttpClient client = _factory.WithWebHostBuilder(builder =>
{
Expand All @@ -448,9 +448,9 @@ private HttpClient GetTestClient(IEventsQueueClient eventLog = null, IFeatureMan
services.AddSingleton(eventLog);
}

if (systemClockMock != null)
if (timeProviderMock != null)
{
services.AddSingleton(systemClockMock);
services.AddSingleton(timeProviderMock);
}
});
}).CreateClient(new WebApplicationFactoryClientOptions { AllowAutoRedirect = false });
Expand All @@ -467,9 +467,7 @@ private void SetupFeatureMock(bool featureFlag)

private void SetupDateTimeMock()
{
systemClock
.Setup(m => m.UtcNow)
.Returns(new DateTimeOffset(2018, 05, 15, 02, 05, 00, new TimeSpan(1, 0, 0)));
timeProviderMock.Setup(x => x.GetUtcNow()).Returns(new DateTimeOffset(2018, 05, 15, 02, 05, 00, TimeSpan.Zero));
}
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"resource": "app_skd_taxreport",
"operation": "read",
"created": "2018-05-15T02:05:00",
"created": "2018-05-15T02:05:00+00:00",
"instanceId": "1000/26133fb5-a9f2-45d4-90b1-f6d93ad40713",
"subjectUserId": 1,
"subjectOrgCode": "",
"resourcePartyId": 1000,
"timetodelete": "2021-05-15T02:05:00",
"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"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
{
"resource": "app_skd_taxreport",
"operation": "read",
"created": "2018-05-15T02:05:00",
"created": "2018-05-15T02:05:00+00:00",
"instanceId": "1000/26133fb5-a9f2-45d4-90b1-f6d93ad40713",
"subjectParty": "",
"subjectOrgCode": "skd",
"subjectOrgNumber": "",
"subjectUserId": "",
"resourcePartyId": "1000",
"timetodelete": "2021-05-15T02:05:00",
"contextRequestJson": "{\"ReturnPolicyIdList\":false,\"CombinedDecision\":false,\"XPathVersion\":null,\"Attributes\":[{\"Id\":null,\"Content\":null,\"Attributes\":[{\"Issuer\":null,\"AttributeId\":\"urn:altinn:org\",\"IncludeInResult\":false,\"AttributeValues\":[{\"Value\":\"skd\",\"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: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"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
{
"resource": "app_skd_taxreport",
"operation": "read",
"created": "2018-05-15T02:05:00",
"created": "2018-05-15T02:05:00+00:00",
"instanceId": "1000/26133fb5-a9f2-45d4-90b1-f6d93ad40713",
"subjectParty": "",
"subjectOrgCode": "",
"subjectOrgNumber": "",
"subjectUserId": 1,
"resourcePartyId": 1000,
"timetodelete": "2021-05-15T02:05:00",
"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\":[],\"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: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:instance-id\",\"IncludeInResult\":false,\"AttributeValues\":[{\"Value\":\"1000/26133fb5-a9f2-45d4-90b1-f6d93ad40713\",\"DataType\":\"http://www.w3.org/2001/XMLSchema#string\",\"Attributes\":[],\"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\"}],\"RequestReferences\":[]}",
"Decision": "Permit"
}
Loading
Loading