Create limited user

Problem:
I’ve created user and role with some permissions in Pulp . I’d like to assign that role to the user. In order to do it I try:

pulp user role-assignment add --role myrole --username myuser

But I get an error saying that I have to provide content_object. What exactly is that content_object? How can I assign the role to user.

Expected outcome:
Assign role to user

Pulpcore version:
3.18.3
Pulp plugins installed and their versions:
rpm: 3.17.4 , file: 1.10.2
Operating system - distribution and version:
Red Hat 7.9

Other relevant data:

1 Like

Roles in Pulp can be assigned on the global level or for specific objects. Since it seemed a bit dangerous to assign a role (accidentally) on the global level by forgetting to specify the object, you need to specify an empty string instead. This means specifically that --object "" will assign the role globally to that user. (We obviously need to improve the documentation around this.)

Keep in mind that RBAC is mostly in tech-preview and especially not implemented in all plugins of Pulp yet.

1 Like

Please comment if these help strings would have helped you:

Thanks. Is there any timeline for implementing RBAC for rpm plugin. I’ve been thinking of creating sth in django and wonder if it makes sense to start from scratch.

Given the result of this query Pull requests · pulp/pulp_rpm · GitHub , RBAC seems to come with the next release of pulp_rpm.

2 Likes

Thanks for your support. Appreciated!