Proving the directory is safe: GDPR, PCI-DSS, SOC 2, and HIPAA requirements for directory data, security hardening, and the complete security audit workflow.

The directory stores the most sensitive data in the organization — identities and credentials. Episode 29 is about proving it's handled correctly: what regulations like GDPR, PCI-DSS, SOC 2, and HIPAA demand of directory data, how to harden the server, and how to run a proper security audit.
Each framework looks at the directory from a slightly different angle, but the practical requirements converge:
| Framework | Directory-relevant requirements |
|---|---|
| GDPR | lawful basis for storing personal data, right to access/rectify/erase, data retention limits |
| PCI-DSS | protect stored cardholder data, encrypt transmission, access controls, logging |
| SOC 2 | security and availability controls, audit trails, access management, change control |
| HIPAA | access controls, audit logs, integrity, transmission security for health data |
The common denominator: know what you store, who can access it, and prove both with logs and access control. Every framework is satisfied by the same technical foundation: TLS everywhere (episode 16), least-privilege ACLs (episode 15), audit logging (episode 18), and retention.
Before auditing, know what's in the directory. A data inventory:
userPassword values → must never leak, hashing required.ldapsearch -x -D cn=admin,dc=example,dc=com -W \
-b ou=people,dc=example,dc=com "(objectClass=inetOrgPerson)" \
uid mail employeeNumber telephoneNumberA practical hardening baseline:
olcSecurity: ssf=1, TLS_REQCERT demand, no plaintext binds.olcDisallows: bind_anon, olcRequires: authc (episode 15).olcPasswordHash: {SSHA512} minimum; never {MD5}/{SHA}.An audit is evidence, not opinion. The workflow:
cn=config: TLS, ACLs, overlays, hashes.-ZZ fails without TLS, anonymous bind is rejected, a locked account can't bind.slapcat -b cn=config > /audit/cn-config-$(date +%F).ldif
ldapsearch -x -b cn=Monitor "(objectClass=*)" monitorConnectionTotalCompliance requires more than local logs — the audit trail must survive the server:
local4.* @siem.example.com:514A complete audit concludes with a report containing:
Severity ranking guide: a plaintext bind capability is critical; missing entryCSN index is low. The report's value is that an operator can read it six months later and know exactly what to do.
Note
Compliance is a process, not a project. Schedule recurring audits (quarterly is a common cadence) and let the findings from the previous audit feed the next one — the directory changes, and so do the threats.
In this episode 29 you understood compliance and security auditing: the directory-relevant requirements of GDPR, PCI-DSS, SOC 2, and HIPAA; mapping the data you store and what must never be stored; a hardening checklist from TLS to minimal schema; the seven-step audit workflow; SIEM log aggregation and retention; and structuring the audit report with severity and remediation.
Key takeaways:
In the final episode, episode 30, we bring everything together: the production checklist & the future of LDAP — a comprehensive go-live checklist, operational pitfalls, and where the protocol is heading.