-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
170 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
modules/unauthenticated-users-cluster-role-binding-con.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Module included in the following assemblies: | ||
// | ||
// * authentication/using-rbac.adoc | ||
// * post_installation_configuration/preparing-for-users.adoc | ||
|
||
:_mod-docs-content-type: CONCEPT | ||
[id="unauthenticated-users-cluster-role-bindings-concept_{context}"] | ||
= Cluster role bindings for unauthenticated groups | ||
|
||
[NOTE] | ||
==== | ||
Before {product-title} 4.16, unauthenticated groups were allowed access to some cluster roles. Clusters updated from versions before {product-title} 4.16 retain this access for unauthenticated groups. | ||
==== | ||
|
||
For security reasons {product-title} {product-version} does not allow unauthenticated groups to have default access to cluster roles. | ||
|
||
There are use cases where it might be necessary to add `system:unauthenticated` to a cluster role. | ||
|
||
Cluster administrators can add unauthenticated users to the following cluster roles: | ||
|
||
* `system:scope-impersonation` | ||
* `system:webhook` | ||
* `system:oauth-token-deleter` | ||
* `self-access-reviewer` | ||
[IMPORTANT] | ||
==== | ||
Always verify compliance with your organization's security standards when modifying unauthenticated access. | ||
==== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// Module included in the following assemblies: | ||
// | ||
// * authentication/impersonating-system-admin.adoc | ||
// * authentication/tokens-scoping.adoc | ||
// * authentication/managing-oauth-access-tokens.adoc | ||
// * post_installation_configuration/preparing-for-users.adoc | ||
|
||
:_mod-docs-content-type: PROCEDURE | ||
[id="unauthenticated-users-cluster-role-bindings_{context}"] | ||
= Adding unauthenticated groups to cluster roles | ||
|
||
As a cluster administrator, you can add unauthenticated users to the following cluster roles in {product-title} by creating a cluster role binding. Unauthenticated users do not have access to non-public cluster roles. This should only be done in specific use cases when necessary. | ||
|
||
You can add unauthenticated users to the following cluster roles: | ||
|
||
* `system:scope-impersonation` | ||
* `system:webhook` | ||
* `system:oauth-token-deleter` | ||
* `self-access-reviewer` | ||
[IMPORTANT] | ||
==== | ||
Always verify compliance with your organization's security standards when modifying unauthenticated access. | ||
==== | ||
|
||
.Prerequisites | ||
|
||
* You have access to the cluster as a user with the `cluster-admin` role. | ||
* You have installed the OpenShift CLI (`oc`). | ||
.Procedure | ||
|
||
. Create a YAML file named `add-<cluster_role>-unauth.yaml` and add the following content: | ||
+ | ||
[source,yaml] | ||
---- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
annotations: | ||
rbac.authorization.kubernetes.io/autoupdate: "true" | ||
name: <cluster_role>access-unauthenticated | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: <cluster_role> | ||
subjects: | ||
- apiGroup: rbac.authorization.k8s.io | ||
kind: Group | ||
name: system:unauthenticated | ||
---- | ||
. Apply the configuration by running the following command: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ oc apply -f add-<cluster_role>.yaml | ||
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// Module included in the following assemblies: | ||
// | ||
// * cicd/builds/triggering-builds-build-hooks.adoc | ||
|
||
:_mod-docs-content-type: PROCEDURE | ||
[id="unauthenticated-users-system-webhook_{context}"] | ||
= Adding unauthenticated users to the system:webhook role binding | ||
|
||
As a cluster administrator, you can add unauthenticated users to the `system:webhook` role binding in {product-title} for specific namespaces. The `system:webhook` role binding allows users to trigger builds from external systems that do not use an {product-title} authentication mechanism. Unauthenticated users do not have access to non-public role bindings by default. This is a change from {product-title} versions before 4.16. | ||
|
||
Adding unauthenticated users to the `system:webhook` role binding is required to successfully trigger builds from GitHub, GitLab, and Bitbucket. | ||
|
||
If it is necessary to allow unauthenticated users access to a cluster, you can do so by adding unauthenticated users to the `system:webhook` role binding in each required namespace. This method is more secure than adding unauthenticated users to the `system:webhook` cluster role binding. However, if you have a large number of namespaces, it is possible to add unauthenticated users to the `system:webhook` cluster role binding which would apply the change to all namespaces. | ||
|
||
[IMPORTANT] | ||
==== | ||
Always verify compliance with your organization's security standards when modifying unauthenticated access. | ||
==== | ||
|
||
.Prerequisites | ||
|
||
* You have access to the cluster as a user with the `cluster-admin` role. | ||
* You have installed the OpenShift CLI (`oc`). | ||
.Procedure | ||
|
||
. Create a YAML file named `add-webhooks-unauth.yaml` and add the following content: | ||
+ | ||
[source,yaml] | ||
---- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
annotations: | ||
rbac.authorization.kubernetes.io/autoupdate: "true" | ||
name: webhook-access-unauthenticated | ||
namespace: <namespace> <1> | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: "system:webhook" | ||
subjects: | ||
- apiGroup: rbac.authorization.k8s.io | ||
kind: Group | ||
name: "system:unauthenticated" | ||
---- | ||
<1> The namespace of your `BuildConfig`. | ||
|
||
. Apply the configuration by running the following command: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ oc apply -f add-webhooks-unauth.yaml | ||
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters