Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 6. Understanding identity provider configuration
The OpenShift Container Platform master includes a built-in OAuth server. Developers and administrators obtain OAuth access tokens to authenticate themselves to the API.
As an administrator, you can configure OAuth to specify an identity provider after you install your cluster.
6.1. About identity providers in OpenShift Container Platform Link kopierenLink in die Zwischenablage kopiert!
By default, only a
kubeadmin
OpenShift Container Platform user names containing
/
:
%
6.2. Supported identity providers Link kopierenLink in die Zwischenablage kopiert!
You can configure the following types of identity providers:
| Identity provider | Description |
|---|---|
| Configure the
htpasswd.
| |
| Configure the
| |
| Configure the
| |
| Configure a
| |
| Configure a
| |
| Configure a
| |
| Configure a
| |
| Configure a
| |
| Configure an
|
Once an identity provider has been defined, you can use RBAC to define and apply permissions.
6.3. Removing the kubeadmin user Link kopierenLink in die Zwischenablage kopiert!
After you define an identity provider and create a new
cluster-admin
kubeadmin
If you follow this procedure before another user is a
cluster-admin
Prerequisites
- You must have configured at least one identity provider.
-
You must have added the role to a user.
cluster-admin - You must be logged in as an administrator.
Procedure
Remove the
secrets:kubeadmin$ oc delete secrets kubeadmin -n kube-system
6.4. Identity provider parameters Link kopierenLink in die Zwischenablage kopiert!
The following parameters are common to all identity providers:
| Parameter | Description |
|---|---|
|
| The provider name is prefixed to provider user names to form an identity name. |
|
| Defines how new identities are mapped to users when they log in. Enter one of the following values:
|
When adding or changing identity providers, you can map identities from the new provider to existing users by setting the
mappingMethod
add
6.5. Sample identity provider CR Link kopierenLink in die Zwischenablage kopiert!
The following custom resource (CR) shows the parameters and default values that you use to configure an identity provider. This example uses the htpasswd identity provider.
Sample identity provider CR
apiVersion: config.openshift.io/v1
kind: OAuth
metadata:
name: cluster
spec:
identityProviders:
- name: my_identity_provider
mappingMethod: claim
type: HTPasswd
htpasswd:
fileData:
name: htpass-secret
6.6. Manually provisioning a user when using the lookup mapping method Link kopierenLink in die Zwischenablage kopiert!
Typically, identities are automatically mapped to users during login. The
lookup
lookup
Prerequisites
-
You have installed the OpenShift CLI ().
oc
Procedure
Create an OpenShift Container Platform user:
$ oc create user <username>Create an OpenShift Container Platform identity:
$ oc create identity <identity_provider>:<identity_provider_user_id>Where
is a name that uniquely represents the user in the identity provider.<identity_provider_user_id>Create a user identity mapping for the created user and identity:
$ oc create useridentitymapping <identity_provider>:<identity_provider_user_id> <username>