As we Install the OpenShift by Ansible method, identity provider is set to Deny all by default, which will deny access from all users. To allow access for users, you must choose another identity provider and configure the master configuration file. By default, the master configuration file is located at /etc/origin/master/master-config.yaml. OpenShift has several identity providers which can help you to manager user authentication. I will use HTPasswd this time. You can find more information in Configuring Authentication and User Agent
The htpasswd utility is provided in httpd-tools package.
configure the master configuration file
Need to restart
atomic-openshift-master to make the change to take effect.
Setup username and password
HTPasswd use a flat file to manager the username and the password, in which the password is hashed. Run following command to create the file with username, and it will ask you to input the password for username.
You can also include the password by adding the
After add a user, you can use it to access OpenShift Container Platform.
add/update an user
To add or update an username, run following command
delete an user
To delete an username, run following command
Author Wenhan Shi
LastMod 2021-06-30 (f5600d1)