The Simplest Way to Make Drone and LDAP Work Like They Should
Drone and LDAP work together by linking central user lists to build servers. This pairing lets engineers log in, trigger builds, and read logs with existing accounts. Drone relies on git hosts like GitHub or Gitea for basic user login. An enterprise git host checks an LDAP directory to confirm who a user is. Once the git host confirms the user, Drone creates a local session for them. This setup stops teams from making separate passwords for every build tool. How logins and roles flow between
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
Drone and LDAP work together by linking central user lists to build servers. This pairing lets engineers log in, trigger builds, and read logs with existing accounts.
Drone relies on git hosts like GitHub or Gitea for basic user login. An enterprise git host checks an LDAP directory to confirm who a user is. Once the git host confirms the user, Drone creates a local session for them. This setup stops teams from making separate passwords for every build tool.
How logins and roles flow between drone and ldap
First, an engineer tries to log in to the Drone web dashboard. Drone sends the engineer over to the connected git server for login. The git server then checks the central LDAP directory to verify the password. It also reads the group lists linked to that specific user profile.
After a good check, the git server sends an identity token back to Drone. Drone reads this token to see which git repos the person can view. If a user can write to a repo, they can start a build. Admins can also map directory groups to admin roles inside the build tool. When an engineer leaves the company, admins disable one central directory record. That single change blocks the person from git and the build server at once.
Common failure modes and how to scope roles
Many teams make the mistake of using one shared account for directory lookups. If that shared bind password leaks, attackers can read the whole company user list. Teams also grant broad admin rights to large directory groups by mistake. This lets too many people view build secrets or change runner rules.
Unlogged directory queries cause another big issue for security teams during an audit. When builds run under a shared bot user, logs hide who started the job. You should create a read-only bind account just for the git and build stack. Limit that account so it only searches the specific user and group trees.
LDAP Directory Services + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Place your directory server and build server on private network segments. Allow traffic only over encrypted ports between the git host and the directory. Check your group mappings every month to remove old teams and unused service accounts. Keep build secrets scoped to single repos rather than whole groups.
Managing build runners and secret access
Build runners often need to talk to databases and cloud servers during a job. Teams often store long-lived database passwords inside the build server secret store. Any user with repo write rights can print those secrets in a build log. This breaks the clean user rules you set up in your directory.
Instead of static keys, give each runner a narrow role for its own tasks. Make sure build steps only get access to the exact data they need. Mask sensitive fields like emails, phone numbers, card numbers, or national IDs in outputs. Masking rewrites matched fields in results so build logs stay safe to read. Keep human login paths separate from automated runner paths at all times.
Check database and API queries on the wire
Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.
Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.
Frequently asked questions
Does Drone connect to an LDAP server on its own?
No, Drone uses your git host to handle user logins through OAuth. You link your git server to the directory, and Drone trusts that login result.
How do we sync directory groups with build permissions?
Your git host maps directory groups to repo teams and permission levels. Drone reads those repo permissions each time a user logs in or syncs.
What happens to running builds when we disable an LDAP user?
Current builds will finish, but the user cannot start new jobs or read logs. Their next click in the web app will fail the session check.
Related guides
In this post