From 2dbc5ff44636aa02ee8bbf9dcafb9ef01f1f4306 Mon Sep 17 00:00:00 2001 From: acn-dgopa Date: Mon, 26 Feb 2024 10:59:23 +0100 Subject: [PATCH] update pep,abac,platform.models package version --- src/Controllers/Storage/InstancesController.cs | 2 +- src/Helpers/Storage/AuthorizationHelper.cs | 4 ++-- src/LocalTest.csproj | 6 +++--- src/Services/Storage/Implementation/AuthorizationService.cs | 4 ++-- src/Services/Storage/Implementation/StorageAccessHandler.cs | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Controllers/Storage/InstancesController.cs b/src/Controllers/Storage/InstancesController.cs index 4896f65e..208514cf 100644 --- a/src/Controllers/Storage/InstancesController.cs +++ b/src/Controllers/Storage/InstancesController.cs @@ -328,7 +328,7 @@ public async Task> Post(string appId, [FromBody] Instance XacmlJsonRequestRoot request; try { - request = DecisionHelper.CreateDecisionRequest(appInfo.Org, appInfo.Id.Split('/')[1], HttpContext.User, "instantiate", instanceOwnerPartyId, null); + request = DecisionHelper.CreateDecisionRequest(appInfo.Org, appInfo.Id.Split('/')[1], HttpContext.User, "instantiate", instanceOwnerPartyId, null, null, null); } catch (Exception ex) { diff --git a/src/Helpers/Storage/AuthorizationHelper.cs b/src/Helpers/Storage/AuthorizationHelper.cs index 9a4a93f6..668c7ff5 100644 --- a/src/Helpers/Storage/AuthorizationHelper.cs +++ b/src/Helpers/Storage/AuthorizationHelper.cs @@ -143,12 +143,12 @@ public async Task AuthorizeInstanceAction(ClaimsPrincipal user, Instance i if (instance.Id == null) { - request = DecisionHelper.CreateDecisionRequest(org, app, user, action, instanceOwnerPartyId, null); + request = DecisionHelper.CreateDecisionRequest(org, app, user, action, instanceOwnerPartyId, null, null, null); } else { Guid instanceGuid = Guid.Parse(instance.Id.Split('/')[1]); - request = DecisionHelper.CreateDecisionRequest(org, app, user, action, instanceOwnerPartyId, instanceGuid); + request = DecisionHelper.CreateDecisionRequest(org, app, user, action, instanceOwnerPartyId, instanceGuid, null, null); } XacmlJsonResponse response = await _pdp.GetDecisionForRequest(request); diff --git a/src/LocalTest.csproj b/src/LocalTest.csproj index 0932a0e4..366617d4 100644 --- a/src/LocalTest.csproj +++ b/src/LocalTest.csproj @@ -10,9 +10,9 @@ - - - + + + diff --git a/src/Services/Storage/Implementation/AuthorizationService.cs b/src/Services/Storage/Implementation/AuthorizationService.cs index d672d4bc..526abb26 100644 --- a/src/Services/Storage/Implementation/AuthorizationService.cs +++ b/src/Services/Storage/Implementation/AuthorizationService.cs @@ -137,12 +137,12 @@ public async Task AuthorizeInstanceAction(Instance instance, string action ClaimsPrincipal user = _claimsPrincipalProvider.GetUser(); if (instance.Id == null) { - request = DecisionHelper.CreateDecisionRequest(org, app, user, action, instanceOwnerPartyId, null); + request = DecisionHelper.CreateDecisionRequest(org, app, user, action, instanceOwnerPartyId, null, null, null); } else { Guid instanceGuid = Guid.Parse(instance.Id.Split('/')[1]); - request = DecisionHelper.CreateDecisionRequest(org, app, user, action, instanceOwnerPartyId, instanceGuid, task); + request = DecisionHelper.CreateDecisionRequest(org, app, user, action, instanceOwnerPartyId, instanceGuid, null, task); } XacmlJsonResponse response = await _pdp.GetDecisionForRequest(request); diff --git a/src/Services/Storage/Implementation/StorageAccessHandler.cs b/src/Services/Storage/Implementation/StorageAccessHandler.cs index b3b47cdd..212d073f 100644 --- a/src/Services/Storage/Implementation/StorageAccessHandler.cs +++ b/src/Services/Storage/Implementation/StorageAccessHandler.cs @@ -71,7 +71,7 @@ public StorageAccessHandler( /// A Task protected override async Task HandleRequirementAsync(AuthorizationHandlerContext context, AppAccessRequirement requirement) { - XacmlJsonRequestRoot request = DecisionHelper.CreateDecisionRequest(context, requirement, _httpContextAccessor.HttpContext.GetRouteData()); + XacmlJsonRequestRoot request = DecisionHelper.CreateDecisionRequest(context, requirement, _httpContextAccessor.HttpContext.GetRouteData(), _httpContextAccessor.HttpContext.Request.Headers); _logger.LogInformation("// Storage PEP // AppAccessHandler // Request sent: {request}", JsonConvert.SerializeObject(request));