INF-162 - Enable the LDAP configuration from REST API
- Create LDAP configuration
- Create LDAP mappers
- Enable Audit logging
- Verify the LDAP Authentication in Molecule environment
- Verify the user operation, create from Keycloak and search from LDAP
Change-Id: Ie6ea7f40cfe403ee3747a30b0bfb3acc9c72057f
diff --git a/molecule/default/templates/ldap.testconnection.j2 b/molecule/default/templates/ldap.testconnection.j2
new file mode 100644
index 0000000..7b2950f
--- /dev/null
+++ b/molecule/default/templates/ldap.testconnection.j2
@@ -0,0 +1,15 @@
+{#
+SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
+SPDX-License-Identifier: Apache-2.0
+#}
+{
+ "action":"testAuthentication",
+ "connectionUrl":"{{ keycloak_ldap_server }}",
+ "authType":"simple",
+ "bindDn":"{{ keycloak_ldap_admin_dn }}",
+ "bindCredential":"{{ keycloak_ldap_admin_password }}",
+ "useTruststoreSpi":"ldapsOnly",
+ "connectionTimeout":"",
+ "startTls":"",
+ "componentId":"{{ ldap_id }}"
+}
diff --git a/molecule/default/templates/ldap.testuser.j2 b/molecule/default/templates/ldap.testuser.j2
new file mode 100644
index 0000000..faa527e
--- /dev/null
+++ b/molecule/default/templates/ldap.testuser.j2
@@ -0,0 +1,16 @@
+{#
+SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
+SPDX-License-Identifier: Apache-2.0
+#}
+{
+ "enabled":true,
+ "attributes":{
+ },
+ "groups":[
+ ],
+ "emailVerified":"",
+ "username":"{{ keycloak_ldap_testing_user }}",
+ "email":"test@test.com",
+ "firstName":"first",
+ "lastName":"last"
+}