{"id":17005878,"url":"https://github.com/devatherock/ldap-search-api","last_synced_at":"2025-06-11T01:37:26.044Z","repository":{"id":52940505,"uuid":"322968898","full_name":"devatherock/ldap-search-api","owner":"devatherock","description":"Simple REST API to query a LDAP server","archived":false,"fork":false,"pushed_at":"2025-05-17T01:50:08.000Z","size":497,"stargazers_count":12,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-17T02:42:50.524Z","etag":null,"topics":["ldap","ldap-client","ldapsearch","searches-ldap"],"latest_commit_sha":null,"homepage":"https://openapi-viewer.onrender.com?urls.primaryName=ldap-search-api","language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devatherock.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-12-20T01:09:02.000Z","updated_at":"2025-04-27T02:38:13.000Z","dependencies_parsed_at":"2024-03-30T03:21:13.987Z","dependency_job_id":"eb53af72-2c49-4e79-93b5-6cae88c712bc","html_url":"https://github.com/devatherock/ldap-search-api","commit_stats":{"total_commits":238,"total_committers":3,"mean_commits":79.33333333333333,"dds":"0.19747899159663862","last_synced_commit":"604fa61266fdb2873f5271259037711c83e0275e"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devatherock%2Fldap-search-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devatherock%2Fldap-search-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devatherock%2Fldap-search-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devatherock%2Fldap-search-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devatherock","download_url":"https://codeload.github.com/devatherock/ldap-search-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devatherock%2Fldap-search-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259182217,"owners_count":22818076,"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":["ldap","ldap-client","ldapsearch","searches-ldap"],"created_at":"2024-10-14T05:04:23.619Z","updated_at":"2025-06-11T01:37:26.023Z","avatar_url":"https://github.com/devatherock.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CircleCI](https://circleci.com/gh/devatherock/ldap-search-api.svg?style=svg)](https://circleci.com/gh/devatherock/ldap-search-api)\n[![Version](https://img.shields.io/docker/v/devatherock/ldap-search-api?sort=semver)](https://hub.docker.com/r/devatherock/ldap-search-api/)\n[![Coverage Status](https://coveralls.io/repos/github/devatherock/ldap-search-api/badge.svg?branch=master)](https://coveralls.io/github/devatherock/ldap-search-api?branch=master)\n[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=ldap-search-api\u0026metric=alert_status)](https://sonarcloud.io/component_measures?id=ldap-search-api\u0026metric=alert_status\u0026view=list)\n[![Docker Pulls](https://img.shields.io/docker/pulls/devatherock/ldap-search-api.svg)](https://hub.docker.com/r/devatherock/ldap-search-api/)\n[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=ldap-search-api\u0026metric=ncloc)](https://sonarcloud.io/component_measures?id=ldap-search-api\u0026metric=ncloc)\n[![Docker Image Size](https://img.shields.io/docker/image-size/devatherock/ldap-search-api.svg?sort=date)](https://hub.docker.com/r/devatherock/ldap-search-api/)\n# ldap-search-api\nSimple REST API to query a LDAP server\n\n## Usage\n### Sample command\n```\ndocker run --rm \\\n  -p 8080:8080 \\\n  -e LDAP_HOST=ldaps://ldap.jumpcloud.com:636 \\\n  -e LDAP_USERNAME=devatherock \\\n  -e LDAP_PASSWORD=dummy \\\n  devatherock/ldap-search-api:latest\n```\n\n### Configurable properties\n\n| Environment Variable Name                | YAML Variable Name                    | Required | Default   | Description                                                                                                                                                                      |\n|------------------------------------------|---------------------------------------|----------|-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| LDAP_HOST                                | ldap.host                             | true     | (None)    | The full host name of the LDAP server. Example: `ldaps://ldap.jumpcloud.com:636`                                                                                                 |\n| LDAP_USERNAME                            | ldap.username                         | false    | (None)    | The LDAP bind username. Could be a simple username like `devatherock` or a DN like `uid=devatherock,ou=Users,dc=jumpcloud,dc=com` depending on how the LDAP server is configured |\n| LDAP_PASSWORD                            | ldap.password                         | false    | (None)    | The LDAP bind password                                                                                                                                                           |\n| LDAP_AUTH_TYPE                           | ldap.auth-type                        | false    | simple    | Value for the `java.naming.security.authentication` property. Supported values are `none`, `simple`. Defaults to `simple`                                                        |\n| LDAP_BASE_DN                             | ldap.base-dn                          | false    | (None)    | The default base DN to search against                                                                                                                                            |\n| LDAP_BINARY_ATTRIBUTES                   | ldap.binary-attributes                | false    | (None)    | Attributes in the search result that have binary values                                                                                                                          |\n| LDAP_READ_TIMEOUT_MILLIS                 | ldap.read-timeout-millis              | false    | 10000     | Read timeout for the search, in milliseconds. Defaults to 10 seconds                                                                                                             |\n| LDAP_CONNECTION_POOL_ENABLED             | ldap.connection-pool.enabled          | false    | true      | Indicates if a connection pool should be used                                                                                                                                    |\n| LDAP_CONNECTION_POOL_CORE_SIZE           | ldap.connection-pool.core-size        | false    | 8         | Initial size of the connection pool                                                                                                                                              |\n| LDAP_CONNECTION_POOL_MAX_SIZE            | ldap.connection-pool.max-size         | false    | 8         | Maximum size of the connection pool                                                                                                                                              |\n| LDAP_CONNECTION_POOL_TIME_TO_LIVE_MILLIS | ldap.connection-pool.timeToLiveMillis | false    | 1,800,000 | The total time a connection in the pool will be kept open, in milliseconds. Defaults to 30 minutes                                                                               |\n| LOGGER_LEVELS_ROOT                       | (None)                                | false    | INFO      | [SLF4J](http://www.slf4j.org/api/org/apache/commons/logging/Log.html) log level, for all(framework and custom) code                                                              |\n| LOGGER_LEVELS_IO_GITHUB_DEVATHEROCK      | (None)                                | false    | INFO      | [SLF4J](http://www.slf4j.org/api/org/apache/commons/logging/Log.html) log level, for custom code                                                                                 |\n| MICRONAUT_SERVER_PORT                    | micronaut.server.port                 | false    | 8080      | Port in which the app listens on                                                                                                                                                 |\n| MICRONAUT_CONFIG_FILES                   | (None)                                | false    | (None)    | Path to YAML config files. The YAML files can be used to specify complex, object and array properties                                                                            |\n| JACKSON_SERIALIZATION_INDENT_OUTPUT      | jackson.serialization.indent-output   | false    | (None)    | Set to `true` to enable JSON pretty-print of response                                                                                                                            |\n| LOGBACK_CONFIGURATION_FILE               | (None)                                | false    | (None)    | Path to logback configuration file                                                                                                                                               |\n\n### API spec\nWhen the app is running, detailed API documentation can be accessed at `{host}/swagger-ui` or `{host}/swagger/ldap-search-api-{version}.yml`. The available endpoints are listed below for reference:\n\n- `/search?filter=\u003can ldap query\u003e\u0026limit=\u003cnumber of results\u003e` - Searches LDAP under the given base DN with the supplied filter criteria\n\n### Sample response\n```json\n[\n    {\n        \"loginShell\": \"/bin/bash\",\n        \"uid\": \"testdummy\",\n        \"homeDirectory\": \"/home/test\",\n        \"mail\": \"test.dummy@dummy.com\",\n        \"uidNumber\": \"1234\",\n        \"givenName\": \"Test\",\n        \"objectClass\": [\n            \"top\",\n            \"person\",\n            \"organizationalPerson\",\n            \"inetOrgPerson\",\n            \"shadowAccount\",\n            \"posixAccount\",\n            \"jumpcloudUser\"\n        ],\n        \"sn\": \"User\",\n        \"gidNumber\": \"1234\",\n        \"cn\": \"Test User\"\n    }\n]\n```\n\n## Troubleshooting\n### Enabling debug logs\n- Set the environment variable `LOGGER_LEVELS_ROOT` to `DEBUG` to enable all debug logs - custom and framework\n- Set the environment variable `LOGGER_LEVELS_IO_GITHUB_DEVATHEROCK` to `DEBUG` to enable debug logs only in custom code\n- For fine-grained logging control, supply a custom [logback.xml](http://logback.qos.ch/manual/configuration.html) file\nand set the environment variable `LOGBACK_CONFIGURATION_FILE` to `/path/to/custom/logback.xml`\n\n### JSON logs\n\nRefer [logstash-logback-encoder](https://github.com/logstash/logstash-logback-encoder) documentation to customize the field names and formats in the log. To output logs as JSON, set the environment variable `LOGBACK_CONFIGURATION_FILE` to `logback-json.xml`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevatherock%2Fldap-search-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevatherock%2Fldap-search-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevatherock%2Fldap-search-api/lists"}