-
Notifications
You must be signed in to change notification settings - Fork 8
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
Pass available permissions to getPermissionsForUser #2829
base: main
Are you sure you want to change the base?
Conversation
Allows to use a Denylist (e.g. everything except User-Permissions) instead of an Allowlist.
Can you implement such a Denylist in demo that you think we would use in such applications? |
|
@dkarnutsch @max-debug022 what do you think? |
I would not recommend allowing a denylist in this matter. I fear it could increase the risk of security vulnerabilities, particularly those related to broken access controls. From a security point of view, it is preferable to wait for users to request additional permissions. As I see it, users are very unlikely to complain if they have more permissions than necessary. If there is no way around it, I strongly recommend implementing additional safeguards. For example, permissions could be automatically revoked after a certain timeframe (Month, Year, 6 Months, ...) unless explicitly disabled. |
Description
Applications sometimes (in our case most of the time) have two types of users:
userPermissions
The problem with the current implementation is that if a permission is added, it also has to be allowlisted in
access-control.service.ts
. This is often forgotten, leading to unexpected behaviour.This PR allows to use a Denylist instead of an Allowlist.
Discussion
This might violate the least privilege principle. If we decide against this approach, I think we will need another solution to handle permissions in code (e.g. we start to define them statically again).