Skip to content

Commit

Permalink
Update Altinn.Common.PEP and use await Verify() instead of custom code (
Browse files Browse the repository at this point in the history
#918)

* Use await Verify() instead of custom code

* Update Altinn.Common.PEP and Storage.Interfaces
  • Loading branch information
ivarne authored Nov 21, 2024
1 parent 26182f1 commit 390d3e5
Show file tree
Hide file tree
Showing 13 changed files with 358 additions and 433 deletions.
4 changes: 2 additions & 2 deletions src/Altinn.App.Api/Altinn.App.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Altinn.Common.PEP" Version="4.0.0" />
<PackageReference Include="Altinn.Platform.Storage.Interface" Version="4.0.0" />
<PackageReference Include="Altinn.Common.PEP" Version="4.1.0" />
<PackageReference Include="Altinn.Platform.Storage.Interface" Version="4.0.3" />
<PackageReference Include="Microsoft.FeatureManagement.AspNetCore" Version="3.5.0" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.9.0" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.9.0" />
Expand Down
4 changes: 2 additions & 2 deletions src/Altinn.App.Core/Altinn.App.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<PackageReference Include="Altinn.ApiClients.Maskinporten" Version="8.0.1" />
<PackageReference Include="Altinn.Common.AccessTokenClient" Version="1.1.5" />
<PackageReference Include="Altinn.Common.EFormidlingClient" Version="1.3.3" />
<PackageReference Include="Altinn.Common.PEP" Version="4.0.0" />
<PackageReference Include="Altinn.Common.PEP" Version="4.1.0" />
<PackageReference Include="Altinn.Platform.Models" Version="1.6.1" />
<PackageReference Include="Altinn.Platform.Storage.Interface" Version="4.0.0" />
<PackageReference Include="Altinn.Platform.Storage.Interface" Version="4.0.3" />
<PackageReference Include="JsonPatch.Net" Version="3.1.1" />
<PackageReference Include="JWTCookieAuthentication" Version="3.0.1" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0" />
Expand Down
2 changes: 1 addition & 1 deletion test/Altinn.App.Api.Tests/OpenApi/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -5464,7 +5464,7 @@
"copyInstanceSettings": {
"$ref": "#/components/schemas/CopyInstanceSettings"
},
"storageContainerNumber": {
"storageAccountNumber": {
"type": "integer",
"format": "int32",
"nullable": true
Expand Down
2 changes: 1 addition & 1 deletion test/Altinn.App.Api.Tests/OpenApi/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3361,7 +3361,7 @@ components:
$ref: '#/components/schemas/MessageBoxConfig'
copyInstanceSettings:
$ref: '#/components/schemas/CopyInstanceSettings'
storageContainerNumber:
storageAccountNumber:
type: integer
format: int32
nullable: true
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
{
Request: {
ReturnPolicyIdList: false,
CombinedDecision: false,
Resource: [
{
Id: r1,
Attribute: [
{
AttributeId: urn:altinn:task,
Value: Task_1,
Issuer: Altinn,
DataType: string,
IncludeInResult: false
},
{
AttributeId: urn:altinn:instance-id,
Value: 1337/1dd16477-187b-463c-8adf-592c7fa78459,
Issuer: Altinn,
DataType: string,
IncludeInResult: true
},
{
AttributeId: urn:altinn:partyid,
Value: 1337,
Issuer: Altinn,
DataType: string,
IncludeInResult: false
},
{
AttributeId: urn:altinn:org,
Value: tdd,
Issuer: Altinn,
DataType: string,
IncludeInResult: false
},
{
AttributeId: urn:altinn:app,
Value: test-app,
Issuer: Altinn,
DataType: string,
IncludeInResult: false
}
]
}
],
Action: [
{
Id: a1,
Attribute: [
{
AttributeId: urn:oasis:names:tc:xacml:1.0:action:action-id,
Value: sign,
Issuer: Altinn,
DataType: string,
IncludeInResult: true
}
]
},
{
Id: a2,
Attribute: [
{
AttributeId: urn:oasis:names:tc:xacml:1.0:action:action-id,
Value: reject,
Issuer: Altinn,
DataType: string,
IncludeInResult: true
}
]
}
],
AccessSubject: [
{
Id: s1,
Attribute: [
{
AttributeId: urn:altinn:authlevel,
Value: 3,
Issuer: LOCAL AUTHORITY,
DataType: string,
IncludeInResult: false
},
{
AttributeId: urn:altinn:partyid,
Value: 1337,
Issuer: LOCAL AUTHORITY,
DataType: string,
IncludeInResult: false
}
]
}
],
MultiRequests: {
RequestReference: [
{
ReferenceId: [
s1,
a1,
r1
]
},
{
ReferenceId: [
s1,
a2,
r1
]
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
{
Request: {
ReturnPolicyIdList: false,
CombinedDecision: false,
Resource: [
{
Id: r1,
Attribute: [
{
AttributeId: urn:altinn:end-event,
Value: EndEvent_1,
Issuer: Altinn,
DataType: string,
IncludeInResult: false
},
{
AttributeId: urn:altinn:instance-id,
Value: 1337/1dd16477-187b-463c-8adf-592c7fa78459,
Issuer: Altinn,
DataType: string,
IncludeInResult: true
},
{
AttributeId: urn:altinn:partyid,
Value: 1337,
Issuer: Altinn,
DataType: string,
IncludeInResult: false
},
{
AttributeId: urn:altinn:org,
Value: tdd,
Issuer: Altinn,
DataType: string,
IncludeInResult: false
},
{
AttributeId: urn:altinn:app,
Value: test-app,
Issuer: Altinn,
DataType: string,
IncludeInResult: false
}
]
}
],
Action: [
{
Id: a1,
Attribute: [
{
AttributeId: urn:oasis:names:tc:xacml:1.0:action:action-id,
Value: sign,
Issuer: Altinn,
DataType: string,
IncludeInResult: true
}
]
},
{
Id: a2,
Attribute: [
{
AttributeId: urn:oasis:names:tc:xacml:1.0:action:action-id,
Value: reject,
Issuer: Altinn,
DataType: string,
IncludeInResult: true
}
]
}
],
AccessSubject: [
{
Id: s1,
Attribute: [
{
AttributeId: urn:altinn:authlevel,
Value: 3,
Issuer: LOCAL AUTHORITY,
DataType: string,
IncludeInResult: false
},
{
AttributeId: urn:altinn:partyid,
Value: 1337,
Issuer: LOCAL AUTHORITY,
DataType: string,
IncludeInResult: false
}
]
}
],
MultiRequests: {
RequestReference: [
{
ReferenceId: [
s1,
a1,
r1
]
},
{
ReferenceId: [
s1,
a2,
r1
]
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
{
Request: {
ReturnPolicyIdList: false,
CombinedDecision: false,
Resource: [
{
Id: r1,
Attribute: [
{
AttributeId: urn:altinn:task,
Value: Task_1,
Issuer: Altinn,
DataType: string,
IncludeInResult: false
},
{
AttributeId: urn:altinn:instance-id,
Value: 1337/1dd16477-187b-463c-8adf-592c7fa78459,
Issuer: Altinn,
DataType: string,
IncludeInResult: true
},
{
AttributeId: urn:altinn:partyid,
Value: 1337,
Issuer: Altinn,
DataType: string,
IncludeInResult: false
},
{
AttributeId: urn:altinn:org,
Value: tdd,
Issuer: Altinn,
DataType: string,
IncludeInResult: false
},
{
AttributeId: urn:altinn:app,
Value: test-app,
Issuer: Altinn,
DataType: string,
IncludeInResult: false
}
]
}
],
Action: [
{
Id: a1,
Attribute: [
{
AttributeId: urn:oasis:names:tc:xacml:1.0:action:action-id,
Value: sign,
Issuer: Altinn,
DataType: string,
IncludeInResult: true
}
]
},
{
Id: a2,
Attribute: [
{
AttributeId: urn:oasis:names:tc:xacml:1.0:action:action-id,
Value: reject,
Issuer: Altinn,
DataType: string,
IncludeInResult: true
}
]
}
],
AccessSubject: [
{
Id: s1,
Attribute: [
{
AttributeId: urn:altinn:authlevel,
Value: 3,
Issuer: LOCAL AUTHORITY,
DataType: string,
IncludeInResult: false
},
{
AttributeId: urn:altinn:partyid,
Value: 1337,
Issuer: LOCAL AUTHORITY,
DataType: string,
IncludeInResult: false
}
]
}
],
MultiRequests: {
RequestReference: [
{
ReferenceId: [
s1,
a1,
r1
]
},
{
ReferenceId: [
s1,
a2,
r1
]
}
]
}
}
}
Loading

0 comments on commit 390d3e5

Please sign in to comment.