-
Notifications
You must be signed in to change notification settings - Fork 3
Feature/remilovoll/26/03/bug fixing instance delegation from app #2624
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
Merged
lovoll
merged 9 commits into
main
from
feature/remilovoll/26/03/BugFixingInstanceDelegationFromApp
Mar 23, 2026
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
721cd8c
UnitTest for Conection Instance Delegation
4f24196
Fix sequence Bruno test
4f0430f
Guardrail preventing same instanceid to belonging to more than one re…
b2cce14
Fix responce to not include urn prefix for instanceid
e3823f0
Changed the counting of fromParties to be done before fetching and pa…
43610f8
Update src/apps/Altinn.AccessManagement/test/Bruno/AccessMgmt/test/En…
lovoll e6394f1
Missed new ProblemDetailCode
459bf91
Merge branch 'feature/remilovoll/26/03/BugFixingInstanceDelegationFro…
d1154ac
Merge main
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
71 changes: 71 additions & 0 deletions
71
...uno/AccessMgmt/test/EnduserAPI/Connections/Instances/Post_Enduser_Conn_Instances_Dagl.bru
This file contains hidden or 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,71 @@ | ||
| meta { | ||
| name: Post_Enduser_Conn_Instances_Dagl | ||
| type: http | ||
| seq: 1 | ||
| } | ||
|
|
||
| post { | ||
| url: {{baseUrl}}/accessmanagement/api/v1/enduser/connections/resources/rights?party={{party}}&from={{from}}&to={{to}}&resource={{resource}}&instance={{instance}} | ||
| body: json | ||
| auth: inherit | ||
| } | ||
|
|
||
| params:query { | ||
| party: {{party}} | ||
| from: {{from}} | ||
| to: {{to}} | ||
| resource: {{resource}} | ||
| instance: {{instance}} | ||
| } | ||
|
|
||
| headers { | ||
| Accept: application/json | ||
| } | ||
|
|
||
| body:json { | ||
| { | ||
| "DirectRightKeys": [ | ||
| "0144e74457db71df2ba504e6fc5b081d2e72b7396f501de222767cbf838c0a56f3", | ||
| "0166c5e067d84985ad6974588ad0b76d7e12c1502c65cbb551e16521696088c742", | ||
| "01f223492db1318fea6edad70bed2c2462e9b431e42596a1a6382f5630dfd9486b", | ||
| "0159c58c191e76b3e6bbf8e74c81f0b1c1ec2ed6158e51843afb3f7bd9c37fb210" | ||
| ] | ||
| } | ||
| } | ||
|
|
||
| script:pre-request { | ||
| const sharedtestdata = require(`./testdata/sharedtestdata.js`); | ||
| const testdata = require(`./testdata/resource-delegationcheck/${bru.getEnvVar("tokenEnv")}.js`); | ||
|
|
||
| bru.setVar("requestName", "Post_Enduser_Conn_Instances_Dagl"); | ||
|
|
||
| bru.setVar("party", testdata.VOKSENDE_FRYKTLØS_TIGER.partyUuid); | ||
| bru.setVar("from", testdata.VOKSENDE_FRYKTLØS_TIGER.partyUuid); | ||
| bru.setVar("to", testdata.KOMPLEKS_LOJAL_TIGER.dagligleder.partyUuid); | ||
| bru.setVar("resource", testdata.resources.instanceResourceId); | ||
| bru.setVar("instance", testdata.instances.testInstance1); | ||
|
|
||
| var getTokenParameters = { | ||
| auth_userId: testdata.VOKSENDE_FRYKTLØS_TIGER.dagligleder.userId, | ||
| auth_partyId: testdata.VOKSENDE_FRYKTLØS_TIGER.dagligleder.partyId, | ||
| auth_partyUuid: testdata.VOKSENDE_FRYKTLØS_TIGER.dagligleder.partyUuid, | ||
| auth_ssn: testdata.VOKSENDE_FRYKTLØS_TIGER.dagligleder.pid, | ||
| auth_tokenType: sharedtestdata.authTokenType.personal, | ||
| auth_scopes: sharedtestdata.auth_scopes.enduserSystemToOthersWrite | ||
| } | ||
|
|
||
|
|
||
| const testTokenGenerator = require(`./TestToolsTokenGenerator.js`); | ||
| const token = await testTokenGenerator.getToken(getTokenParameters); | ||
| bru.setVar("bearerToken", token); | ||
| } | ||
|
|
||
| tests { | ||
|
|
||
| test(bru.getVar("requestName"), function() { | ||
| const body = res.getBody(); | ||
| const actions = body.actions; | ||
|
|
||
| expect(res.status).to.equal(201); | ||
| }); | ||
| } |
8 changes: 8 additions & 0 deletions
8
...n.AccessManagement/test/Bruno/AccessMgmt/test/EnduserAPI/Connections/Instances/folder.bru
This file contains hidden or 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,8 @@ | ||
| meta { | ||
| name: Instances | ||
| seq: 10 | ||
| } | ||
|
|
||
| auth { | ||
| mode: inherit | ||
| } |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.