Skip to content

Commit 9ca3ddd

Browse files
committed
LDAP adoption documentation
1 parent 3e09afd commit 9ca3ddd

File tree

2 files changed

+98
-0
lines changed

2 files changed

+98
-0
lines changed

docs_user/assemblies/assembly_adopting-openstack-control-plane-services.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Adopt your {rhos_prev_long} {rhos_prev_ver} control plane services to deploy the
1010

1111
include::../modules/proc_adopting-the-identity-service.adoc[leveloffset=+1]
1212

13+
include::../modules/proc_configuring-ldap-with-domain-specific-drivers.adoc[leveloffset=+1]
14+
1315
include::../modules/proc_adopting-key-manager-service.adoc[leveloffset=+1]
1416

1517
include::../modules/proc_adopting-the-networking-service.adoc[leveloffset=+1]
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
[id='configuring-ldap-with-domain-specific-drivers_{context}']
3+
4+
= Configuring LDAP with domain-specific drivers
5+
6+
If you need to integrate the {identity_service_first_ref} with one or more LDAP servers using domain-specific configurations, you can enable domain-specific drivers and provide the necessary LDAP settings.
7+
8+
This involves two main steps:
9+
1. Creating the Kubernetes secret that holds the domain-specific LDAP configuration files that {identity_service} uses. Each file within the secret corresponds to an LDAP domain.
10+
2. Patching the `OpenStackControlPlane` custom resource (CR) to enable domain-specific drivers for the {identity_service} and mount a secret that contains the LDAP configurations.
11+
12+
13+
.Procedure
14+
15+
. To create the `keystone-domains` secret that stores the actual LDAP configuration files that {identity_service} uses, create a local file that includes your LDAP configuration, for example, `keystone.conf.ldap.myldapdomain`:
16+
17+
The following example file includes the configuration for a single LDAP domain. If you have multiple LDAP domains, create a configuration file for each, for example, `keystone.DOMAIN_ONE.conf`, `keystone.DOMAIN_TWO.conf`.
18+
+
19+
[source,ini]
20+
----
21+
[ldap]
22+
url = ldap://<ldap_server_host>:<ldap_server_port>
23+
user = <bind_dn_user>
24+
password = <bind_dn_password>
25+
suffix = <user_tree_dn>
26+
query_scope = sub
27+
# User configuration
28+
user_tree_dn = <user_tree_dn>
29+
user_objectclass = <user_object_class>
30+
user_id_attribute = <user_id_attribute>
31+
user_name_attribute = <user_name_attribute>
32+
user_mail_attribute = <user_mail_attribute>
33+
user_enabled_attribute = <user_enabled_attribute>
34+
user_enabled_default = true
35+
# Group configuration
36+
group_tree_dn = <group_tree_dn>
37+
group_objectclass = <group_object_class>
38+
group_id_attribute = <group_id_attribute>
39+
group_name_attribute = <group_name_attribute>
40+
group_member_attribute = <group_member_attribute>
41+
group_members_are_ids = true
42+
----
43+
+
44+
* Replace the values, such as `<ldap_server_host>`, `<bind_dn_user>`, `<user_tree_dn>`, and so on, with your LDAP server details.
45+
46+
. Create the secret from this file:
47+
+
48+
----
49+
$ oc create secret generic keystone-domains \
50+
-n <namespace> \
51+
--from-file=<keystone.DOMAIN_NAME.conf>
52+
----
53+
+
54+
* Replace `<namespace>` with the namespace where your {identity_service} is deployed.
55+
* Replace `<keystone.DOMAIN_NAME.conf>` with the name of your local configuration file. If applicable, include additional configuration files by using the `--from-file` option. After creating the secret, you can remove the local configuration file if it is no longer needed, or store it securely.
56+
+
57+
[IMPORTANT]
58+
The name of the file that you provide to `--from-file`, for example `keystone.DOMAIN_NAME.conf`, is critical. The {identity_service} uses this filename to map incoming authentication requests for a domain to the correct LDAP configuration. Ensure that `DOMAIN_NAME` matches the name of the domain you are configuring in the {identity_service}.
59+
60+
. Patch the `OpenStackControlPlane` CR:
61+
+
62+
----
63+
$ oc patch openstackcontrolplane <cr_name> \
64+
-n <namespace> \
65+
--type=merge \
66+
-p '
67+
spec:
68+
keystone:
69+
template:
70+
customServiceConfig: |
71+
[identity]
72+
domain_specific_drivers_enabled = true
73+
extraMounts:
74+
- name: v1
75+
region: r1
76+
extraVol:
77+
- propagation:
78+
- Keystone
79+
extraVolType: Conf
80+
volumes:
81+
- name: keystone-domains
82+
secret:
83+
secretName: keystone-domains
84+
mounts:
85+
- name: keystone-domains
86+
mountPath: "/etc/keystone/domains"
87+
readOnly: true
88+
----
89+
+
90+
* Replace `<cr_name>` with the name of your `OpenStackControlPlane` CR (for example, `openstack`) and `<namespace>` with the namespace where it is deployed (for example, `openstack`).
91+
* This patch does the following:
92+
** Sets `spec.keystone.template.customServiceConfig`. Ensure that you do not overwrite any previously defined value.
93+
** Defines `spec.keystone.template.extraMounts` to mount a secret named `keystone-domains` into the {identity_service} pods at `/etc/keystone/domains`. This secret contains your LDAP configuration files.
94+
+
95+
[NOTE]
96+
You might need to wait a few minutes for the changes to propagate and for the {identity_service} pods to be updated.

0 commit comments

Comments
 (0)