i am researching how to secure Gitlab CI deployment pipelines by authenticating users against LDAP. I could not find a formal way to implement this. Is there any?
The only way i can think of is to manually search in LDAP using a script and determine if a user exists in pre-created groups with names matching CI environments.
something like:
#!/bin/python
memberOf = get_ldap_groups(user)
if group not in memberOf:
print(f"User is not allowed to deploy on {group}")
sys.exit(1)