Skip to content

Nouveau-Printemps/pds-to-ldap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDS to LDAP

Simple tool syncing users from an ATProto PDS to a LDAP server.

Why?

At Nouveau Printemps, our infrastructure works closely with ATProto. We want our users to use only one account, but not every service are working with ATProto. Syncing users from an ATProto PDS to a classical LDAP server enables us to achieve this goal.

Install

You can build it by yourself with

# reduces binary size and targets modern CPU (x86_64v3 arch)
GOAMD64=v3 go build -ldflags "-s" .

If you have just installed, you can simply run

just build

to get the same result.

If you have a working Go toolchain (i.e. GOBIN is in your path), you can install it automatically with

go install github.com/Nouveau-Printemps/pds-to-ldap@latest

Usage

Arguments:

  • --pds <string> is the address of the PDS, you can use the env PDS_LDAP__TARGET_PDS to set it
  • --user-agent <string> is the User-Agent to use, you can use the env PDS_LDAP__USER_AGENT to set it
  • --timeout <int> is the time (in seconds) before one request fails.

How?

When you run the command, it will fetch every user from the PDS and it will check if the corresponding did:plc has an entry in the LDAP server. If there is no account with this did:plc, it creates a new one with a random password.

If the user decides to change their handle, they will not loose their account on the LDAP server because the did:plc didn't change.

About

Syncing users from an ATProto PDS to a LDAP server

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors