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

Add documentation for disabling self provisioning #275

Merged
merged 1 commit into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
= Disable access to one or more OpenShift 4 clusters

[abstract]
This guide describes how to remove permission for users to self-provision projects on OpenShift 4 clusters.
It's based on https://docs.openshift.com/container-platform/4.13/applications/projects/configuring-project-creation.html#disabling-project-self-provisioning_configuring-project-creation[this OpenShift documentation].

== Prerequisites

* Access to the respective cluster's tenant repository.

== Procedure

To disable self-provisioning, patch the `self-provisioners` CRB with the following `Patch` (for example via adhoc-configurations):

[source,yaml]
----
kind: Patch
metadata:
name: self-provisioning
spec:
patches:
self-provisioning-patch:
patchTemplate: |-
[{"op": "remove", "path": "/subjects/0"}]
patchType: application/json-patch+json
targetObjectRef:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
name: self-provisioners
----

Roll out this patch and verify it applies. This disables self-provisioning for general authenticated users.
1 change: 1 addition & 0 deletions docs/modules/ROOT/partials/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
* Authentication
** xref:oc4:ROOT:how-tos/authentication/sudo.adoc[]
** xref:oc4:ROOT:how-tos/authentication/disable-access.adoc[Disable per cluster access]
** xref:oc4:ROOT:how-tos/authentication/disable-self-provisioning.adoc[Disable project self-provisioning]
** xref:oc4:ROOT:explanations/sudo.adoc[]

// Networking
Expand Down