mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-10-31 18:29:21 +00:00 
			
		
		
		
	- Converted group_vars/all/13_ldap.yml from lower-case to ALL-CAPS nested keys. - Updated all roles, tasks, templates, and filter_plugins to reference LDAP.* instead of ldap.*. - Fixed Keycloak JSON templates to properly quote Jinja variables. - Adjusted svc-db-openldap filter plugins and unit tests to handle new LDAP structure. - Updated integration test to only check uniqueness of TOP-LEVEL ALL-CAPS constants, ignoring nested keys. See: https://chatgpt.com/share/68b01017-efe0-800f-a508-7d7e2f1c8c8d
		
			
				
	
	
		
			61 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Django/Jinja
		
	
	
	
	
	
			
		
		
	
	
			61 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Django/Jinja
		
	
	
	
	
	
| {% set user_profile = {
 | |
|   "attributes": [
 | |
|     {
 | |
|       "name": "username",
 | |
|       "displayName": "${username}",
 | |
|       "validations": {"length": {"min": 3, "max": 255}, "pattern": {"pattern": "^[a-z0-9]+$", "error-message": ""}},
 | |
|       "annotations": {},
 | |
|       "permissions": {"view": ["admin","user"], "edit": ["admin","user"]},
 | |
|       "multivalued": false
 | |
|     },
 | |
|     {
 | |
|       "name": "email",
 | |
|       "displayName": "${email}",
 | |
|       "validations": {"email": {}, "length": {"max": 255}},
 | |
|       "required": {"roles": ["user"]},
 | |
|       "permissions": {"view": ["admin","user"], "edit": ["admin","user"]},
 | |
|       "multivalued": false
 | |
|     },
 | |
|     {
 | |
|       "name": "firstName",
 | |
|       "displayName": "${firstName}",
 | |
|       "validations": {"length": {"max": 255}, "person-name-prohibited-characters": {}},
 | |
|       "required": {"roles": ["user"]},
 | |
|       "permissions": {"view": ["admin","user"], "edit": ["admin","user"]},
 | |
|       "multivalued": false
 | |
|     },
 | |
|     {
 | |
|       "name": "lastName",
 | |
|       "displayName": "${lastName}",
 | |
|       "validations": {"length": {"max": 255}, "person-name-prohibited-characters": {}},
 | |
|       "required": {"roles": ["user"]},
 | |
|       "permissions": {"view": ["admin","user"], "edit": ["admin","user"]},
 | |
|       "multivalued": false
 | |
|     },
 | |
|     {
 | |
|       "name": "{{ LDAP.USER.ATTRIBUTES.SSH_PUBLIC_KEY }}",
 | |
|       "displayName": "SSH Public Key",
 | |
|       "validations": {},
 | |
|       "annotations": {},
 | |
|       "permissions": {"view": ["admin","user"], "edit": ["admin","user"]},
 | |
|       "group": "user-metadata",
 | |
|       "multivalued": true
 | |
|     }
 | |
|   ],
 | |
|   "groups": [
 | |
|     {
 | |
|       "name": "user-metadata",
 | |
|       "displayHeader": "User metadata",
 | |
|       "displayDescription": "Attributes, which refer to user metadata"
 | |
|     }
 | |
|   ]
 | |
| } %}
 | |
| "org.keycloak.userprofile.UserProfileProvider": [
 | |
|   {
 | |
|     "providerId": "declarative-user-profile",
 | |
|     "subComponents": {},
 | |
|     "config": {
 | |
|       "kc.user.profile.config": [{{ (user_profile | tojson) | tojson }}]
 | |
|     }
 | |
|   }
 | |
| ] |