{"id":24552041,"url":"https://github.com/thestaticturtle/caddy-client-tls-ldap-validator","last_synced_at":"2025-03-16T13:41:41.203Z","repository":{"id":273239555,"uuid":"918261240","full_name":"TheStaticTurtle/caddy-client-tls-ldap-validator","owner":"TheStaticTurtle","description":"Caddy plugin to verify client certificates from an LDAP server","archived":false,"fork":false,"pushed_at":"2025-01-17T15:18:38.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-14T18:55:28.932Z","etag":null,"topics":["caddy","caddy-plugin","client-certificate","ldap"],"latest_commit_sha":null,"homepage":"","language":"Go","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/TheStaticTurtle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2025-01-17T15:16:00.000Z","updated_at":"2025-01-17T15:19:32.000Z","dependencies_parsed_at":"2025-01-19T18:14:42.564Z","dependency_job_id":"3937ffe6-95a6-4aa7-978f-32828537cbed","html_url":"https://github.com/TheStaticTurtle/caddy-client-tls-ldap-validator","commit_stats":null,"previous_names":["thestaticturtle/caddy-client-tls-ldap-validator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheStaticTurtle%2Fcaddy-client-tls-ldap-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheStaticTurtle%2Fcaddy-client-tls-ldap-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheStaticTurtle%2Fcaddy-client-tls-ldap-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheStaticTurtle%2Fcaddy-client-tls-ldap-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheStaticTurtle","download_url":"https://codeload.github.com/TheStaticTurtle/caddy-client-tls-ldap-validator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243878408,"owners_count":20362431,"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":["caddy","caddy-plugin","client-certificate","ldap"],"created_at":"2025-01-23T01:20:16.984Z","updated_at":"2025-03-16T13:41:41.177Z","avatar_url":"https://github.com/TheStaticTurtle.png","language":"Go","readme":"# Caddy Client Certificate LDAP Validator Plugin\n\nThis caddy plugin enables client certificate validation based on LDAP queries.\n\n# Features\n\n* Custom search filters\n* Success caching (eg. certificate was found)\n* Failure caching (eg. certificate was not found)\n* Caddyfile compatibility\n\n# Getting started\n## Installation\nYou first need to build a new caddy executable with this plugin.\nThe easiest way is to do this with xcaddy.\n\nInstall xcaddy :\n\n```go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest```\n\nAfter xcaddy installation you can build caddy with this plugin by executing:\n\n```xcaddy build latest --with github.com/thestaticturtle/caddy-client-tls-ldap-validator```\n\n## Configuration examples\n\nThese examples will connect to an Active Directory server at `ad.example.lan` as `cn=example_account` and will search the `userCertificate` attribute of user objects in `ou=People` while making sure they aren't disabled. THe result of the search will be cached for 5m (300sec) for a success or failure\n\n```json\n\"client_authentication\": {\n    \"ca\": {\n        \"pem_files\": [\"/etc/caddy/keys/root.crt\"], \"provider\": \"file\"\n    },\n    \"verifiers\": [\n        {\n            \"verifier\": \"ldap_validator\",\n            \"server\": \"ldap://ad.example.lan:389\",\n            \"bind_user\": \"cn=example_account,cn=Users,dc=example,dc=lan\",\n            \"bind_password\": \"example_password\",\n            \"search_base\": \"ou=People,dc=example,dc=lan\",\n            \"search_filters\": \"(\u0026(objectClass=user)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))\",\n            \"attributes\": {\n                \"user_certificate\": \"userCertificate\"\n            },\n            \"success_cache\": 300,\n            \"failure_cache\": 300\n        }\n    ],\n    \"mode\": \"require_and_verify\"\n}\n```\n\n```\nclient_auth {\n\tmode require_and_verify\n\ttrust_pool file {\n\t\tpem_file /etc/caddy/keys/root.crt\n\t}\n\tverifier ldap_validator {\n\t\tserver \"ldap://ad.example.lan:389\"\n\t\tbind_user \"cn=example_account,cn=Users,dc=example,dc=lan\"\n\t\tbind_password \"example_password\"\n\t\tsearch_base \"ou=People,dc=example,dc=lan\"\n\t\tsearch_filters \"(\u0026(objectClass=user)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))\"\n\t\tattributes {\n\t\t\tuser_certificate \"userCertificate\"\n\t\t}\n\t\tsuccess_cache 300\n\t\tfailure_cache 300\n\t}\n} \n```\n\n## Todos:\n\n* Verify if the ldap library auto-reconnects in case the connection ot the ldap server is lost\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthestaticturtle%2Fcaddy-client-tls-ldap-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthestaticturtle%2Fcaddy-client-tls-ldap-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthestaticturtle%2Fcaddy-client-tls-ldap-validator/lists"}