{"id":19880000,"url":"https://github.com/passbolt/ldaps_cert_util","last_synced_at":"2025-05-02T13:31:53.131Z","repository":{"id":43731681,"uuid":"233030021","full_name":"passbolt/ldaps_cert_util","owner":"passbolt","description":"ldaps certificate retrieval utility","archived":false,"fork":false,"pushed_at":"2022-02-21T09:43:55.000Z","size":488,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-07T02:16:23.878Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/passbolt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-10T11:08:30.000Z","updated_at":"2025-02-27T10:21:12.000Z","dependencies_parsed_at":"2022-08-19T17:51:07.665Z","dependency_job_id":null,"html_url":"https://github.com/passbolt/ldaps_cert_util","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/passbolt%2Fldaps_cert_util","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/passbolt%2Fldaps_cert_util/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/passbolt%2Fldaps_cert_util/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/passbolt%2Fldaps_cert_util/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/passbolt","download_url":"https://codeload.github.com/passbolt/ldaps_cert_util/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252046213,"owners_count":21685973,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T17:09:58.416Z","updated_at":"2025-05-02T13:31:52.584Z","avatar_url":"https://github.com/passbolt.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LDAPS CERT UTIL\nSmall utility to retrieve the different parts of a ldaps certificate and bundle them together, and get passbolt\nto work with ldaps.\n\n## How to use?\nOn your passbolt server (or any other server with a ldaps certificate issue), [get composer](https://getcomposer.org/download/) then install project dependencies:\n\n```shell\n./composer.phar install\n```\n\nEdit the php script configuration with your host name. Replace `host.yourldapdomain.com` in the line `$ldapServerHost = 'host.yourldapdomain.com';`\n\nThen, we run the command.\n\n```shell\nphp ./get_certificate.php\n```\n\nAt this point, the command should display a bundle certificate.\n\nLet's copy the certificate where we need it:\n\n```shell\nphp ./get_certificate.php | sudo tee /etc/ssl/certs/ldaps_bundle.crt\n```\n\nEnsure the certificate has correct rights (any user should be able to read the certificate):\n\n```shell\nsudo chown root:root /etc/ssl/certs/ldaps_bundle.crt\nsudo chmod 644 /etc/ssl/certs/ldaps_bundle.crt\n```\n\nFinally, we edit the ldap.conf config file\n\n```shell\nnano /etc/ldap/ldap.conf\n```\n*(The ldap.conf file can also be found in /etc/openldap/ldap.conf)*\n\nAnd we edit the line starting with `TLS_CACERT` to point to our new certificate:\n\n```\nTLS_CACERT /etc/ssl/certs/ldaps_bundle.crt\n```\n\nThat's it. The LDAPS connection should now work.\n\n## How to debug\nThe ldapsearch command is here to help (from the ldap-utils package on debian)\n\n\u003e As passbolt will connect to your LDAP server as the web user, it is important to execute the ldapsearch command as this user (`www-data` for Debian/Ubuntu, `wwwrun` for openSUSE, `nginx` for RHEL based Linux distributions) and **not as root user**\n\nExample:\n\n```shell\nsudo su -s /bin/bash -c 'ldapsearch -x -D \"username\" -W -H ldaps://your_ldap_host -b \"dc=domain,dc=ext\" -d 9' www-data\n```\n\n## Credits\nThis work is just a ready to use version of the very detailed documentation provided by ldaptools: https://github.com/ldaptools/ldaptools/blob/master/docs/en/cookbook/Getting-Your-LDAP-SSL-Certificate.md\nKudos to them for their great work.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpassbolt%2Fldaps_cert_util","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpassbolt%2Fldaps_cert_util","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpassbolt%2Fldaps_cert_util/lists"}