Exam EX280 Topic 4 Question 27 Discussion

Actual exam question for RedHat's EX280 exam
Question #: 27
Topic #: 4
Configure an identity provider
Configure your OpenShift cluster to use an HTPasswd identity provider with the following requirements:
The name of the identity provider is: ex280-htpasswd The name of the secret is: ex280-idp-secret The user account armstrong=indionce The user account collins=veraster The user account aldrin=roonkere The user account jobs=sestiver The user account wozniak=glegunge

Suggested Answer:

See the solution below in Explanation.
Explanation:
Solution:
$ sudo yum install httpd-tools -y
$ htpasswd -c -B -b htpasswd-file-upload armstrong indionce
$ htpasswd -B -b htpasswd-file collins veraster
$ htpasswd -B -b htpasswd-file aldrin roonkere
$ htpasswd -B -b htpasswd-file jobs sestiver
$ htpasswd -B -b htpasswd-file wozniak glegunge
$ oc create secret generic ex280-idp-secret --from-file
htpasswd=htpasswd-file -n openshift-config
$ oc get oauth/cluster -o yaml > oauth.yaml
$ vim oauth.yaml
$
esc-- > type :set paste -- > enter -- > insert -- > then paste the content for correct indent pasting spec:
identityProviders:
- name: ex280-htpasswd mappingMethod: claim type: HTPasswd htpasswd:
fileData:
name: ex280-idp-secret
$ oc replace -f oauth.yaml
$ oc login -u armstrong -p indionce
$ oc login -u collins -p veraster
$ oc login -u aldrin roonkere
$ oc login -u jobs sestiver
$ oc login -u wozniak -p glegunge
#This below part of operation is completely optional and done just for handy login purpose
$ alias _kube="oc login -u kubeadmin -p ${kube_pass} ${api_url}"
$ alias _armstrong="oc login -u armstrong -p ${armstrong}
${api_url}"
$ alias _collins="oc login -u collins -p ${collins} ${api_url}"
$ alias _aldrin="oc login -u aldrin -p ${aldrin} ${api_url}"
$ alias _jobs="oc login -u jobs -p ${jobs} ${api_url}"
$ alias _wozniak="oc login -u wozniak -p ${wozniak} ${api_url}"
$ _armstrong;_armstrong;_collins;_aldrin;_jobs;_wozniak;

by Frederic at Jul 22, 2026, 05:26 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

0
0
0
10