-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doc: Mention possibility of \" for inline PHPLDAPADMIN_LDAP_HOSTS #28
Comments
Faced same problem with |
The documentation seems wrong, I tried setting PHPLDAPADMIN_LDAP_HOSTS with your Python code and it worked, it overrides the default config with my server's config! |
Possibly worth adding some documentation/comments about setting this in a docker-compose.yml as a multiline string (I found this much easier to read and ultimately helped me find what was wrong with the syntax in my entries), e.g. version: '3.7'
services:
phpldapadmin:
image: osixia/phpldapadmin:0.7.2
environment:
PHPLDAPADMIN_LDAP_HOSTS: "#PYTHON2BASH:[
{'ldap.example.com':[
{'server': [
{'tls': True},
{'port': 389},
{'force_may': \"array('uidNumber','gidNumber','sambaSID')\"},
{'base': \"array('dc=example,dc=com')\"}
]
},
{'login': [
{'bind_id': 'cn=admin,dc=example,dc=com'},
{'bind_pass': '${LDAP_ADMIN_PASSWORD:-default_password}'}
]
},
{'auto_number': [
{'min': \"array('uidNumber'=>1000,'gidNumber'=>1000)\"}
]
}
]
}
]"
... (N.B. I didn't specify force_may, base, login or auto_number entries in the end to get my initial START_TLS connections working to the osixia/openldap service also running on my Swarm, but thought I'd include them here as working out the syntax to get them working with PYTHON2BASH was tricky and time consuming). |
The docs (main README) could mention how to customize the phpLDAPAdmin-Config using arrays.
Current state
The YAML-example uses an array for
force_may
:However the inline example does not use any array:
Proposed solution
For example, the complete YAML-example could be translated into inline. (This might be too verbose, though). The need for escaping might be spelled out explicitely.
Motivation
I spent a few hours trying to define multiple
base
DNs for my server to be able to access thecn=config
. I finally realized that it is possible to escape the inner"
that are put around the array.If there is an alternative way of customizing the phpLDAPAdmin-Config, then maybe it could be clarified. The docs suggest there is, but I do not understand what it is (apart from maybe mounting a volume to
image/environment/default.yaml
thus overriding the default.yml?).The text was updated successfully, but these errors were encountered: