1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-11-01 19:07:38 +01:00
unleash.unleash/src/lib/error
Nuno Góis 7e9069e390
refactor: token permissions, drop admin-like permissions (#4050)
https://linear.app/unleash/issue/2-1155/refactor-permissions

- Our `rbac-middleware` now supports multiple OR permissions;
- Drops non-specific permissions (e.g. CRUD API token permissions
without specifying the token type);
- Makes our permission descriptions consistent;
- Drops our higher-level permissions that basically mean ADMIN (e.g.
ADMIN token permissions) in favor of `ADMIN` permission in order to
avoid privilege escalations;

This PR may help with
https://linear.app/unleash/issue/2-1144/discover-potential-privilege-escalations
as it may prevent privilege escalations altogether.

There's some UI permission logic around this, but in the future
https://linear.app/unleash/issue/2-1156/adapt-api-tokens-creation-ui-to-new-permissions
could take it a bit further by adapting the creation of tokens as well.

---------

Co-authored-by: Gastón Fournier <gaston@getunleash.io>
2023-06-22 08:35:54 +01:00
..
bad-data-error.ts chore: improve joi errors (#3836) 2023-06-07 08:29:36 +00:00
content-type-error.ts Clean up old errors (#3633) 2023-05-11 11:10:57 +02:00
db-error.ts Wip/environments (#880) 2021-07-07 10:46:50 +02:00
disabled-error.ts Clean up old errors (#3633) 2023-05-11 11:10:57 +02:00
feature-has-tag-error.ts Clean up old errors (#3633) 2023-05-11 11:10:57 +02:00
from-legacy-error.ts chore: improve joi errors (#3836) 2023-06-07 08:29:36 +00:00
incompatible-project-error.ts Clean up old errors (#3633) 2023-05-11 11:10:57 +02:00
index.ts Clean up old errors (#3633) 2023-05-11 11:10:57 +02:00
invalid-operation-error.ts Clean up old errors (#3633) 2023-05-11 11:10:57 +02:00
invalid-token-error.ts Clean up old errors (#3633) 2023-05-11 11:10:57 +02:00
minimum-one-environment-error.ts Clean up old errors (#3633) 2023-05-11 11:10:57 +02:00
name-exists-error.ts Clean up old errors (#3633) 2023-05-11 11:10:57 +02:00
no-access-error.ts refactor: token permissions, drop admin-like permissions (#4050) 2023-06-22 08:35:54 +01:00
not-implemented-error.ts Clean up old errors (#3633) 2023-05-11 11:10:57 +02:00
notfound-error.ts Clean up old errors (#3633) 2023-05-11 11:10:57 +02:00
operation-denied-error.ts Clean up old errors (#3633) 2023-05-11 11:10:57 +02:00
owasp-validation-error.ts Clean up old errors (#3633) 2023-05-11 11:10:57 +02:00
password-mismatch.ts Clean up old errors (#3633) 2023-05-11 11:10:57 +02:00
password-undefined.ts Clean up old errors (#3633) 2023-05-11 11:10:57 +02:00
project-without-owner-error.ts Clean up old errors (#3633) 2023-05-11 11:10:57 +02:00
role-in-use-error.ts Clean up old errors (#3633) 2023-05-11 11:10:57 +02:00
unauthorized-error.ts Clean up old errors (#3633) 2023-05-11 11:10:57 +02:00
unleash-error.test.ts refactor: token permissions, drop admin-like permissions (#4050) 2023-06-22 08:35:54 +01:00
unleash-error.ts fix: propagate http-errors as they are (#3922) 2023-06-08 13:14:53 +02:00
used-token-error.ts Clean up old errors (#3633) 2023-05-11 11:10:57 +02:00