Skip to content

Commit 82b8b54

Browse files
authored
Merge pull request #8466 from adellape/enterprise-3.9
[enterprise-3.9] Update APB tool user permission reqs for 3.9
2 parents 5be11b2 + 3048d18 commit 82b8b54

File tree

1 file changed

+38
-10
lines changed

1 file changed

+38
-10
lines changed

apb_devel/cli_tooling.adoc

+38-10
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,52 @@ The `docker` daemon must be correctly installed and running on the system.
3232
[[apb-devel-cli-install-prereqs-access-permissions]]
3333
==== Access Permissions
3434

35-
You must be logged in via `oc` as a user with *cluster-admin* permissions:
35+
The `apb` tool requires you to be logged in as a tokened cluster user; the
36+
default *system:admin* system user is not sufficient because it does not have a
37+
token that can be used for the tool's authentication. In addition, there are a
38+
number of local roles (project-scoped) and cluster roles (cluster-wide) that
39+
must exist to permit the full breadth of the `apb` tool's functions (see
40+
xref:../architecture/additional_concepts/authorization.adoc#cluster-and-local-rbac[Cluster and Local RBAC]).
41+
42+
The easiest option is to ensure the user has the *cluster-admin* cluster role.
43+
To add this role to another user, you can run the following as a user that
44+
already has such permissions (for example, the *system:admin* default system
45+
user):
46+
47+
[WARNING]
48+
====
49+
This is effectively cluster *root* and should only be used in a development
50+
setting.
51+
====
3652

3753
----
54+
$ oc adm policy add-cluster-role-to-user cluster-admin <user>
3855
$ oc login -u <user> <openshift_server>
3956
----
4057

41-
To add this role to another user, you can run the following as a user that
42-
already has such permissions (for example, the *system:admin* default system
43-
user):
58+
If you would like a more strictly permissioned environment, an OpenShift
59+
template is provided that by default will permission a user called *developer*.
60+
The template must be run by a user with sufficient permissions to create the
61+
various roles. The *developer* user does not have such permissions, but the
62+
*system:admin* user is sufficient.
63+
64+
To run the template:
4465

66+
. Download the
67+
link:https://raw.githubusercontent.com/ansibleplaybookbundle/ansible-playbook-bundle/master/templates/openshift-permissions.template.yaml[*_openshift-permissions.template.yaml_*]
68+
file locally.
69+
70+
. Run the following command:
71+
+
4572
----
46-
$ oc adm policy \
47-
add-cluster-role-to-user \
48-
cluster-admin <user>
73+
$ oc process -f openshift-permissions.template.yaml \
74+
-p BROKER_NAMESPACE=openshift-ansible-service-broker \
75+
[-p USER=<your_desired_user>] \//<1>
76+
| oc create -f -
4977
----
50-
51-
This permission requirement is so that the development lifecycle of the `apb`
52-
tool can function.
78+
<1> By default, the template will permission the *developer* user. You can
79+
optionally use the `-p` flag to override this default value with your desired
80+
user.
5381

5482
ifdef::openshift-origin[]
5583
[[apb-devel-cli-install-containerized]]

0 commit comments

Comments
 (0)