origin icon indicating copy to clipboard operation
origin copied to clipboard

oadm policy option names are misleading

Open jeffvance opened this issue 10 years ago • 7 comments

# oadm policy -h
...
  add-role-to-user                Add users to a role in the current project
  remove-role-from-user           Remove user from role in the current project
  remove-user                     Remove user from the current project
  add-role-to-group               Add groups to a role in the current project
  remove-role-from-group          Remove group from role in the current project
...

The descriptions seem to be accurate but the option names are backwards. Eg. --add-user-to-role Add users to a role in the current project would be more accurate and easier for the user to remember.

If there's agreement on the above then I propose changing the oadm policy option names to reflect what each option actually does. For some period of time the current option names would also need to be supported and then, eventually, deprecated.

jeffvance avatar Feb 10 '16 18:02 jeffvance

Roles do not contain users. Users are granted roles. I'd vote to keep the current names.

liggitt avatar Feb 10 '16 18:02 liggitt

In this same policy descriptions the commands seem backwards: add-scc-to-user Add users to a security context constraint add-scc-to-group Add groups to a security context constraint remove-scc-from-user Remove user from scc remove-scc-from-group Remove group from scc

You don't add an scc to a user..you add a user to an scc. @liggitt @jeffvance @screeley44

In Jeff's above it seems like the description is in accurate to the command.

erinboyd avatar Feb 10 '16 18:02 erinboyd

SCCs containing users/groups is not the long-term direction. We'd like to keep terminology aligned with roles.

liggitt avatar Feb 10 '16 18:02 liggitt

@liggitt is there a PR open for how this is changing?

erinboyd avatar Feb 10 '16 18:02 erinboyd

SCC is known as PodSecurityPolicy upstream, which is the long term direction. The upstream objects do not contain users/groups. Users would likely be allowed to use a SCC/PSP by being granted a role which permitted that use.

liggitt avatar Feb 10 '16 19:02 liggitt

I could be convinced of "grant-role-to-user", but the improvement is not significant enough to warrant the change and compatibility cost

liggitt avatar Feb 10 '16 19:02 liggitt

the improvement is not significant enough to warrant the change and compatibility cost

pweil- avatar Jun 26 '17 10:06 pweil-