Skip to content

Commit

Permalink
update pep,abac,platform.models package version
Browse files Browse the repository at this point in the history
  • Loading branch information
acn-dgopa committed Feb 26, 2024
1 parent 6ce4fe2 commit 2dbc5ff
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Controllers/Storage/InstancesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ public async Task<ActionResult<Instance>> 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)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Helpers/Storage/AuthorizationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@ public async Task<bool> 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);
Expand Down
6 changes: 3 additions & 3 deletions src/LocalTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Altinn.Authorization.ABAC" Version="0.0.5" />
<PackageReference Include="Altinn.Common.PEP" Version="1.3.0" />
<PackageReference Include="Altinn.Platform.Models" Version="1.2.0" />
<PackageReference Include="Altinn.Authorization.ABAC" Version="0.0.8" />
<PackageReference Include="Altinn.Common.PEP" Version="3.0.0" />
<PackageReference Include="Altinn.Platform.Models" Version="1.4.0" />
<PackageReference Include="Altinn.Platform.Storage.Interface" Version="3.22.0" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.0" />
<PackageReference Include="FluentValidation" Version="11.8.0" />
Expand Down
4 changes: 2 additions & 2 deletions src/Services/Storage/Implementation/AuthorizationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@ public async Task<bool> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public StorageAccessHandler(
/// <returns>A Task</returns>
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));

Expand Down

0 comments on commit 2dbc5ff

Please sign in to comment.