1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-11-01 19:07:38 +01:00
unleash.unleash/src/lib/routes
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
..
admin-api refactor: token permissions, drop admin-like permissions (#4050) 2023-06-22 08:35:54 +01:00
auth docs: prep to add OpenAPI spec to Unleash docs (#1907) 2022-08-12 11:37:57 +02:00
client-api docs: OpenAPI Client tag (#3979) 2023-06-14 12:19:00 +00:00
edge-api docs: Added docs for edge endpoints (#3501) 2023-04-14 15:39:39 +02:00
proxy-api Clean up old errors (#3633) 2023-05-11 11:10:57 +02:00
backstage.test.ts Scheduler abstraction (#2829) 2023-01-11 16:15:53 +01:00
backstage.ts fix: store snapshots in temp folder (#2864) 2023-01-10 13:53:00 +01:00
controller.ts refactor: token permissions, drop admin-like permissions (#4050) 2023-06-22 08:35:54 +01:00
health-check.test.ts Scheduler abstraction (#2829) 2023-01-11 16:15:53 +01:00
health-check.ts docs: Health check endpoint (#3959) 2023-06-12 12:56:45 +00:00
index.ts feat: update rate-limit (#3248) 2023-03-03 12:09:28 +00:00
logout.test.ts feat: authorization middleware (#3464) 2023-04-06 11:46:54 +02:00
logout.ts feat: authorization middleware (#3464) 2023-04-06 11:46:54 +02:00
public-invite.test.ts Maintenance mode middleware (#2707) 2022-12-19 09:01:04 +02:00
public-invite.ts fix: Fix broken OpenAPI (#2379) 2022-11-10 22:55:01 +01:00
unleash-types.ts Add support for req.logout with passport version 0.6.0 and onwards (#2041) 2022-09-13 09:59:34 +02:00
util.ts fix: propagate http-errors as they are (#3922) 2023-06-08 13:14:53 +02:00