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

RBAC: CLI interface #8744

Closed
4 tasks
leovalais opened this issue Sep 4, 2024 · 2 comments · Fixed by #9211
Closed
4 tasks

RBAC: CLI interface #8744

leovalais opened this issue Sep 4, 2024 · 2 comments · Fixed by #9211
Assignees

Comments

@leovalais
Copy link
Contributor

leovalais commented Sep 4, 2024

Description and goal

Refs #8171

Implement a CLI interface to ease role management.

CLI:

  • editoast roles add SUBJECT ROLE [ROLE+]
  • editoast roles remove SUBJECT ROLE [ROLE+]
  • editoast roles list SUBJECT
  • editoast roles list-roles

where:

  • SUBJECT can be either a subject id (u64) or a user identity as provided by the gateway (String)
  • ROLE is a builtin role identifier
  • list-roles lists the builtin roles tag

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
Copy link
Contributor

  • Why using authz in the cmd?
  • Since we removed the application role only builtin should be listed and use
    • Special case: admin and superuser both grant all builtin roles to the subject
  • We should have a command to list groups
  • We should have a command to add a user to a group

@leovalais
Copy link
Contributor Author

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: #8754

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants