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

Add sync adapter scope for administrative access #586

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

elsand
Copy link
Member

@elsand elsand commented Dec 12, 2024

Description

This adds a administrative scope akin to Altinn/altinn-events#375 which allows the Dialogporten adapter to read and delete single instances. Delete access is required as this is proxied through the adapter, which will authorize the request from the end-user in Arbeidsflate/SBS.

The implementation adds a check for a partcular scope in StorageAccessHandler, and that the action requested (as defined in the authorization policy is either "read" or "delete").

This will allow for reading (and deletion) of single instances with known ids, even in deleted state, as well as their dataelements, instanceevents, texts etc. Searching for instances is not allowed, as InstancesController.GetInstances implements its own PDP check. This is a deliberate constraint, as the adapter will not need to search for instances (as far as we know). Any PUT or POST request is denied.

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)
  • All tests run green

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

Copy link

sonarcloud bot commented Dec 12, 2024

@elsand
Copy link
Member Author

elsand commented Dec 13, 2024

This introduces a new GeneralSetting, InstanceSyncAdapterScope. Unclear to me whether this requires updates to any IAC, or if just having the value in appsettings.json is sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant