Altinn / Altinn/app-lib-dotnet

Service owner controlled scope per application

Open
#1,288 0 comments 0 reactions 1 assignee Claimed by @martinothamar View on GitHub
kind/user-story
Dominant language
C#
Stars
8
Forks
27
Avg merge
1h 21m
Merged PRs (30d)
7

Description

### Description

Ability to define a custom scopes per application

### Tasks

- [x] App developers can configure scopes for users in `applicationmetadata.json`
- [x] App developers can configure serviceowner scopes in `applicationmetadata.json`
- [x] Users can override the unauthorized error message
- [x] `[org]` and `[app]` placeholders in configured scopes that we automatically populate
- [ ] Configuration is enforce in Storage
- [x] Configuration is enforced in app
- [ ] Configuration is enforced in localtest
- [ ] Docs
- [x] Update JSON schema for applicationmetadata

### Acceptance Criterias

- Given no scope configuration, no scope authorization should be performed
- Given a configured scope, that scope should be enforced in App and Storage APIs for the resources "belonging" to that app
- Given a request using an apps configured scope, that request can not touch resources belonging to a different app (?)
- Given custom app endpoints (controllers or minimal), any scope configuration should be enforced according to the above
- Scope authorization should be logged during startup in the app (which endpoints are protected by which scopes). Logs are not needed if no scopes are configured

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.