LDAP Flashcards

1
Q

Steps to configure LDAP as IdP

A

1) Create a secret with the IdM admin user password
2) Create a cm containing the IdM CA’s root certificate
3) Extract oauth cluster and add identity provider

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Create a secret with LDAP admin user password

A

oc create secret generic ldap-secret \
–from-literal=bindPassword=${LDAP_ADMIN_PASSWORD} \
-n openshift-config

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Create a cm containing the IdM CA’s root certificate

A

oc create configmap ca-config-map –from-file=
ca.crt=<(curl http://idm.ocp-${GUID}.example.com/ipa/config/ca.crt)
-n openshift-config

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Oauth cluster CR for LDAP

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Add cluster admin role to admin user

A

oc adm policy add-cluster-role-to-user cluster-admin admin

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Steps to check when troubleshooting LDAP

A

1) Authentication Operator Logs.
2) Oauth Pods status.
3) LDAP server logs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

OCP CA crt URL

A

http://idm.ocp4.example.com/ipa/config/ca.crt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you sync LDAP groups with OCP

A

1) Create LDAPSyncConfig CR and run it manually or using a CronJob.
2) Assign cluster admin role to admin group

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Example LDAPSyncConfig

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do you validate LDAPSyncConfig

A

oc adm groups sync –sync-config tmp/ldap-sync.yml

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

steps to create a CronJob to perform a periodic LDAP group sync

A

1) Store LDAP bind password in an OCP Secret so the CronJob can access the password in a secure way.

2) Store LDAPSyncConfig and the IdM cert in a ConfigMap so the CronJob can use them.
3) Create cron job

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Store LDAP bind password in an OCP Secret so the CronJob can access the password in a secure way

A

oc create secret generic ldap-secret \
–from-literal bindPassword=r3dh4t

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Store LDAPSyncConfig and the IdM cert in a ConfigMap so the CronJob can use them.

A

oc create configmap ldap-config –from-file \
ldap-group-sync.yaml=tmp/ldap-sync-config-cronjob.yml,ca.crt=tmp/ca.crt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Cron job for LDAP Sync

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Inspect the CronJob execution

A

watch oc get cronjobs,jobs,pods

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Verify a group definition and membership

A

oc get group admins -o yaml

17
Q

Grand admin permission to admin group

A

oc adm policy add-cluster-role-to-group cluster-admin admins

18
Q

Review that the user openshift-admin is in the openshift-admins group

A

oc get group openshift-admins

19
Q

Create an ldap-group-syncer cluster role with permissions to get, list, create, and update groups

A

oc create clusterrole ldap-group-syncer \
–resource=groups –verb=get,list,create,update