Skip to content

Bug 1557423: Update APB tool user permission reqs for 3.9 #8287

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

Merged
merged 1 commit into from
Mar 27, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 38 additions & 10 deletions apb_devel/cli_tooling.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,52 @@ The `docker` daemon must be correctly installed and running on the system.
[[apb-devel-cli-install-prereqs-access-permissions]]
==== Access Permissions

You must be logged in via `oc` as a user with *cluster-admin* permissions:
The `apb` tool requires you to be logged in as a tokened cluster user; the
default *system:admin* system user is not sufficient because it does not have a
token that can be used for the tool's authentication. In addition, there are a
number of local roles (project-scoped) and cluster roles (cluster-wide) that
must exist to permit the full breadth of the `apb` tool's functions (see
xref:../architecture/additional_concepts/authorization.adoc#cluster-and-local-rbac[Cluster and Local RBAC]).

The easiest option is to ensure the user has the *cluster-admin* cluster role.
To add this role to another user, you can run the following as a user that
already has such permissions (for example, the *system:admin* default system
user):

[WARNING]
====
This is effectively cluster *root* and should only be used in a development
setting.
====

----
$ oc adm policy add-cluster-role-to-user cluster-admin <user>
$ oc login -u <user> <openshift_server>
----

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

To run the template:

. Download the
link:https://raw.githubusercontent.com/ansibleplaybookbundle/ansible-playbook-bundle/master/templates/openshift-permissions.template.yaml[*_openshift-permissions.template.yaml_*]
file locally.

. Run the following command:
+
----
$ oc adm policy \
add-cluster-role-to-user \
cluster-admin <user>
$ oc process -f openshift-permissions.template.yaml \
-p BROKER_NAMESPACE=openshift-ansible-service-broker \
[-p USER=<your_desired_user>] \//<1>
| oc create -f -
----

This permission requirement is so that the development lifecycle of the `apb`
tool can function.
<1> By default, the template will permission the *developer* user. You can
optionally use the `-p` flag to override this default value with your desired
user.

ifdef::openshift-origin[]
[[apb-devel-cli-install-containerized]]
Expand Down