diff --git a/Makefile b/Makefile index a9073f5..cd73c00 100644 --- a/Makefile +++ b/Makefile @@ -64,7 +64,7 @@ itest-up-anon: build docker compose -f docker-compose.yml \ -f itest/docker-compose.itest-anon.yml \ - up -d vaultwarden ldap + up -d vaultwarden ldap ldap_admin .PHONY: itest-run-anon itest-run-anon: diff --git a/itest/config-anon.toml b/itest/config-anon.toml deleted file mode 100644 index b17f459..0000000 --- a/itest/config-anon.toml +++ /dev/null @@ -1,8 +0,0 @@ -vaultwarden_url = "http://vaultwarden:80" -vaultwarden_admin_token = "admin" -ldap_host = "ldap" -# ldap_bind_dn = "cn=readonly,dc=example,dc=org" -# ldap_bind_password = "readonly" -ldap_search_base_dn = "dc=example,dc=org" -ldap_search_filter = "(&(objectClass=*)(uid=*))" -ldap_sync_loop = false diff --git a/itest/docker-compose.itest-anon-env.yml b/itest/docker-compose.itest-anon-env.yml deleted file mode 100644 index 25cb8fa..0000000 --- a/itest/docker-compose.itest-anon-env.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -services: - ldap_sync: - environment: - CONFIG_PATH: "" - APP_VAULTWARDEN_URL: "http://vaultwarden:80" - APP_VAULTWARDEN_ADMIN_TOKEN: "admin" - APP_LDAP_HOST: "ldap" - # APP_LDAP_BIND_DN: "cn=admin,dc=example,dc=org" - # APP_LDAP_BIND_PASSWORD: "admin" - APP_LDAP_SEARCH_BASE_DN: "dc=example,dc=org" - APP_LDAP_SEARCH_FILTER: "(&(objectClass=*)(uid=*))" - APP_LDAP_SYNC_LOOP: "false" - - vaultwarden: {} - - ldap: - command: ["--copy-service"] - volumes: - - ./itest/ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom - - ./itest/schema/anon.ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom/anon.ldif diff --git a/itest/docker-compose.itest-anon.yml b/itest/docker-compose.itest-anon.yml index a3e0cd9..e3fd9ab 100644 --- a/itest/docker-compose.itest-anon.yml +++ b/itest/docker-compose.itest-anon.yml @@ -1,13 +1,18 @@ --- services: ldap_sync: - volumes: - - ./itest/config-anon.toml:/config.toml:ro + environment: + CONFIG_PATH: "" + APP_VAULTWARDEN_URL: "http://vaultwarden:80" + APP_VAULTWARDEN_ADMIN_TOKEN: "admin" + APP_LDAP_HOST: "ldap" + APP_LDAP_SEARCH_BASE_DN: "dc=example,dc=org" + APP_LDAP_SEARCH_FILTER: "(&(objectClass=*)(uid=*))" + APP_LDAP_SYNC_LOOP: "false" vaultwarden: {} ldap: - command: ["--copy-service"] - volumes: - - ./itest/ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom - - ./itest/schema/anon.ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom/anon.ldif + environment: + # Just to make sure there is no accidental auth using merged configs + LDAP_ADMIN_PASSWORD: NONE diff --git a/itest/ldif/anon.ldif b/itest/ldif/anon.ldif deleted file mode 100644 index e69de29..0000000 diff --git a/itest/schema/anon.ldif b/itest/schema/anon.ldif deleted file mode 100644 index fb01829..0000000 --- a/itest/schema/anon.ldif +++ /dev/null @@ -1,15 +0,0 @@ -dn: olcDatabase={1}mdb,cn=config -changetype: modify -replace: olcAccess -olcAccess: to * - by dn.exact=gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth manage - by * break -olcAccess: to attrs=userPassword,shadowLastChange - by self write - by dn="cn=admin,dc=example,dc=org" write - by anonymous auth - by * none -olcAccess: to * - by anonymous read - by dn="cn=admin,dc=example,dc=org" write - by * none