Using an intermediate image for building. Could possibly slim further by making the `RUN_TAG` a slim variant
|2 days ago|
|.github/workflows||1 week ago|
|itest||1 month ago|
|scripts||12 months ago|
|src||1 week ago|
|.dockerignore||12 months ago|
|.gitignore||2 years ago|
|.pre-commit-config.yaml||6 months ago|
|Cargo.lock||1 week ago|
|Cargo.toml||1 week ago|
|Dockerfile||2 days ago|
|Dockerfile.alpine||1 week ago|
|LICENSE||2 years ago|
|Makefile||1 week ago|
|README.md||1 month ago|
|docker-compose.yml||2 days ago|
|example.config.toml||2 months ago|
An LDAP connector for vaultwarden
After configuring, run
vaultwarden_ldap and it will invite any users it finds in LDAP to your
This is easiest done using Docker. See the
docker-compose.yml file in this repo for an example. If you would like to use Docker Hub rather than building, change
build: . to
Make sure to populate and mount your
Configuration is read from a TOML file. The default location is
config.toml, but this can be configured by setting the
CONFIG_PATH env variable to whatever path you would like.
Configuration values are as follows:
||String||The root URL for accessing
||String||The value passed as
||String||Optional||Path to an additional der-encoded root certificate to trust. Eg.
||String||The hostname or IP address for your ldap server|
||String||Optional||The that should be used to connect.
||Boolean||Optional||Indicates if SSL should be used and if we should connect with
||Boolean||Optional||Indicates if the connection should be done using StartTLS|
||Boolean||Optional||Indicates if certificate should be verified when using SSL. Defaults to
||Integer||Optional||Port used to connect to the LDAP server. This will default to 389 or 636, depending on your SSL settings|
||String||The dn for the bind user that will connect to LDAP. Eg.
||String||The password for the provided bind user.|
||String||Base dn that will be used when searching LDAP for users. Eg.
||String||Filter used when searching LDAP for users. Eg.
||String||Optional||Field for each user record that contains the email address to use. Defaults to
||Integer||Optional||Number of seconds to wait between each LDAP request. Defaults to
||Boolean||Optional||Indicates whether or not syncing should be polled in a loop or done once. Defaults to
This repo has a predefined set of pre-commit rules. You can install pre-commit via any means you'd like. Once your system has
pre-commit installed, you can run
make install-hooks to ensure the hooks will run with every commit. You can also force running all hooks with
For those less familiar with
cargo, you can use the
make targets that have been included for common tasks like running a debug version.
make run-debug or building a release version
All testing is manual right now. First step is to set up Bitwarden and the LDAP server.
docker-compose up -d vaultwarden ldap ldap_admin
After that, open the admin portal on http://localhost:8001 and log in using the default account info:
Username: cn=admin,dc=example,dc=org Password: admin
From there you can set up your test group and users.
dc=example,dc=orgnav tree and select "Create new entry here"
Select "Generic: Posix Group"
Give it a name, eg. "Users" and then save and commit
Select "Create child object"
Select "Generic: User Account"
Give the user a name and select a group ID number and save and commit
Select "Add new attribute" and select "Email" and then add a test email address
Run the ldap sync
docker-compose up ldap_sync
Alternately, you can bootstrap some of this by running:
docker-compose -f docker-compose.yml -f itest/docker-compose.itest.yml up --build
- Any kind of proper logging