containers icon indicating copy to clipboard operation
containers copied to clipboard

[bitnami/openldap] Load access control files at startup

Open dirkweil opened this issue 1 year ago • 1 comments

Name and Version

bitnami/openldap:2.6.3

What is the problem this feature will solve?

I'm trying to allow self write access. It works, if I run the following command after container start ldapmodify -Y EXTERNAL -H "ldapi:///" -f selfwrite.ldif

selfwrite.ldif contains the following text:

dn: olcDatabase={2}mdb,cn=config
changetype: modify
replace: olcAccess
olcAccess: {0}to * by self write by * read

Unfortunately I find no configuration option to load this file at container start.

What is the feature you are proposing to solve the problem?

It would be nice to have a directory like the one referenced by LDAP_CUSTOM_LDIF_DIR, where LDIFs for ldapmodify could be placed.

What alternatives have you considered?

No response

dirkweil avatar Feb 15 '24 08:02 dirkweil

Thank you for your suggestion @dirkweil!

The bitnami/openldap has support for initScripts mounted at /docker-entrypoint-initdb.d, but only .sh files are supported.

As a workaround, you could use a *.sh that executed the *.ldif files mounted elsewhere, but I think it could be a nice feature for the image to support and run *.ldif files, would you like to contribute by sending a pull request?

migruiz4 avatar Feb 19 '24 15:02 migruiz4

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

github-actions[bot] avatar Mar 06 '24 01:03 github-actions[bot]

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

github-actions[bot] avatar Mar 11 '24 01:03 github-actions[bot]

I can't make above ldapmodify command work in those sh scripts, getting "ldap_sasl_interactive_bind: Can't contact LDAP server (-1)". What is the correct host?

heinebold avatar Jun 07 '24 09:06 heinebold

The host should be localhost AFAIK, maybe there were issues in the startup

javsalgar avatar Jun 10 '24 08:06 javsalgar