OpenRailAssociation / osrd

An open source web application for railway infrastructure design, capacity analysis, timetabling and simulation
https://osrd.fr
443 stars 40 forks source link

RBAC: CLI interface #8744

Open leovalais opened 3 weeks ago

leovalais commented 3 weeks ago

Description and goal

Refs #8171

Implement a CLI interface to ease role management.

CLI:

where:

Acceptance criteria

The commands are implemented.

[!NOTE] There will be a CLI to manage users and groups as well. Subject IDs will be obtainable from there.

flomonster commented 16 hours ago
leovalais commented 16 hours ago

Why using authz in the cmd?

Just to scope things. I'll remove it.

Special case: admin and superuser both grant all builtin roles to the subject

The more I think about it, the more fitting a builtin role Superuser or Admin that short-circuits all checks looks to me. This way we won't have to deal with migrations or the mutual-exclusiveness of builtin roles.

We should have a command to list groups We should have a command to add a user to a group

The other half is there: https://github.com/OpenRailAssociation/osrd/issues/8754