The Simplest Way to Make Bitbucket and LDAP Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Integrating bitbucket and ldap lets teams manage code permissions from one central user directory. When a developer joins a group, the directory grants them access to the right repos. This link stops admins from making manual user profiles in two separate places. It also shuts off repo access fast when a staff member leaves the company. How bitbucket and ldap share user and group data The code server talks to the central user directory over a secure network link. When a developer tries to lo

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.

Integrating bitbucket and ldap lets teams manage code permissions from one central user directory. When a developer joins a group, the directory grants them access to the right repos.

This link stops admins from making manual user profiles in two separate places. It also shuts off repo access fast when a staff member leaves the company.

How bitbucket and ldap share user and group data

The code server talks to the central user directory over a secure network link. When a developer tries to log in, the code app checks the directory first.

The directory checks the user password and sends back a simple yes or no. It also sends a list of groups that belong to that person.

Admins can choose a read-only setup or a read-and-write setup for their user store. In a read-only setup, all user changes must happen inside the main directory.

Some teams use delegated login instead of a full background sync. With delegated login, the code app copies user details over during their first sign-in.

Background sync runs on a timer to pull fresh group lists from the directory. If an admin removes someone from a directory group, the next sync drops their rights.

Common failure modes and how to scope directory roles

Many teams use a shared admin account to bind the code app to the directory. If an attacker steals that key, they can change every user inside the directory.

Give the code app a dedicated service account with strict read-only rights instead. Scope that account so it only reads the specific user tree that holds developers.

LDAP Directory Services + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Large directories can also slow down sync jobs if you pull every single group. Use search filters to pull only the groups that map to code projects.

Nested groups often cause confusion when permissions do not show up as planned. Check whether your directory setup flattens nested groups before the code app reads them.

Never send directory traffic over plain text on your internal network. Always use encrypted transport so no one can sniff passwords or user lists on the wire.

Keeping local admin fallback and audit logs clean

Directory servers can go offline during network outages or routine maintenance windows. Keep one local admin account stored inside the code app for emergency recovery.

Lock that local admin password in a safe place and alert on any login. Do not let developers use local accounts for their daily code pushes.

Shared automation tokens also hide who actually pushed code or changed a repo setting. Map build bots to their own directory profiles so every action leaves a clear log.

Review your directory sync logs each week to spot failed binds or broken group maps. Catching sync errors early keeps stale accounts from keeping access to private code.

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

Should we use read-only sync or delegated login for our team?

Use read-only sync if your directory already holds all developer groups and roles. Pick delegated login if you want to check passwords via the directory but manage groups locally.

Why do removed users still show up in our code repos?

The code app waits for the next scheduled sync job to update group lists. Check your sync timer and make sure your directory filter includes deactivated user states.

How do we stop a large directory from slowing down login checks?

Narrow your base search path to the exact folder that holds engineering staff. Add search filters so the code app ignores non-technical groups and service accounts.

The query runs. The emails stay hidden.