startcodex/ldap-sync-google

By startcodex

Updated 3 months ago

Sync users, groups and OUs from OpenLDAP to Google Workspace

Image
Networking
Security
0

1.8K

startcodex/ldap-sync-google repository overview

LDAP to Google Workspace Sync

Sync users, groups and OUs from OpenLDAP to Google Workspace.

Quick Start

docker run -d \
  --name ldap-google-sync \
  --restart unless-stopped \
  -v /path/to/credentials.json:/secrets/credentials.json:ro \
  -e SYNC_INTERVAL=1h \
  -e LDAP_HOST=ldap.example.com \
  -e LDAP_BASE_DN=dc=example,dc=com \
  -e LDAP_BIND_DN=cn=admin,dc=example,dc=com \
  -e LDAP_BIND_PASSWORD=secret \
  -e GOOGLE_CREDENTIALS_FILE=/secrets/credentials.json \
  -e [email protected] \
  -e GOOGLE_DOMAIN=example.com \
  -e SYNC_DRY_RUN=false \
  -e SYNC_GROUPS=true \
 startcodex/ldap-sync-google:latest

Features

FeatureDescription
UsersCreate, update, suspend, delete
GroupsCreate, update, delete, manage members
OUsAutomatic creation from LDAP structure
Daemon modeRun continuously (SYNC_INTERVAL=1h)
Dry-runTest without applying changes
Rate limitingExponential backoff for Google API
SecureScratch base, ~10MB, 0 CVEs

Supported LDAP Groups

TypeAttribute
posixGroupmemberUid (default)
groupOfNamesmember

Environment Variables

Required
VariableDescription
LDAP_HOSTLDAP server
LDAP_BASE_DNBase DN
GOOGLE_CREDENTIALS_FILEService account JSON path
GOOGLE_ADMIN_EMAILAdmin email for impersonation
GOOGLE_DOMAINGoogle Workspace domain
Optional
VariableDefaultDescription
SYNC_INTERVAL0Run interval (1h, 30m, 0=once)
SYNC_DRY_RUNtrueSimulate without changes
SYNC_USERStrueSync users
SYNC_GROUPSfalseSync groups
SYNC_ORG_UNITSfalseSync organizational units
LDAP_BIND_DN-LDAP bind DN
LDAP_BIND_PASSWORD-LDAP bind password

Google Workspace Setup

  1. Create a Service Account in Google Cloud
  2. Enable Domain-Wide Delegation
  3. In Google Admin Console, add scopes:

Tag summary

Content type

Image

Digest

sha256:89cac936c

Size

6.1 MB

Last updated

3 months ago

docker pull startcodex/ldap-sync-google:0.3.0