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

feat: add Authorization to the Management API #242

Conversation

paullatzelsperger
Copy link
Member

@paullatzelsperger paullatzelsperger commented Jan 26, 2024

What this PR changes/adds

Adds an AuthorizationService interface, which allows controllers to check whether a user (identified by a Principal) is allowed
to have access to a particular resource (identified by ID and its type).

Controllers can inject a SecurityContext, and from it obtain the Principal.

As a precondition, the respective extension must register a lookup function for any particular resource type.

Why it does that

User authorization

Further notes

  • Endpoints which require elevated access (@RolesAllowed) are not subjected to authorization
  • I did not yet put any major focus on extensibility, that could come in a subsequent improvement pr

Linked Issue(s)

Closes #216
Closes #219

Please be sure to take a look at the contributing guidelines and our etiquette for pull requests.

@paullatzelsperger paullatzelsperger added enhancement New feature or request api breaking-change Will require manual intervention for version update labels Jan 26, 2024
@paullatzelsperger paullatzelsperger merged commit f33e3ba into eclipse-edc:main Jan 27, 2024
12 checks passed
@paullatzelsperger paullatzelsperger deleted the feat/add_authorizationservice_to_managementapi branch January 27, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api breaking-change Will require manual intervention for version update enhancement New feature or request
Projects
None yet
3 participants