From 1942f93bf18a4da998189798025b16fc4d112881 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Mon, 20 Feb 2023 13:01:49 +0100 Subject: [PATCH] Auth: Update LDAP test config Signed-off-by: Michael Mayer --- .ldap.cfg | 27 +++++++++++++++++++++++++-- docker-compose.yml | 1 + 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/.ldap.cfg b/.ldap.cfg index 7bcc5614c..b05310819 100644 --- a/.ldap.cfg +++ b/.ldap.cfg @@ -26,7 +26,7 @@ debug = true uidnumber = 5003 primarygroup = 5501 loginShell = "/bin/sh" - otherGroups = [5505,5506,5507] + otherGroups = [5505,5506,5507,5508] userPrincipalName = "jdoe@example.com" mail = "jdoe@example.com" passsha256 = "4314c1fe282face45336b1422a3285c5ff31a39c8e24425615fa53a43b718493" # photoprism @@ -78,6 +78,25 @@ debug = true action = "search" object = "*" +[[users]] + name = "uploader" + givenname = "Uploader" + objectClass = "user" + displayName = "Uploader" + sn = "Uploader" + userPrincipalName = "uploader@example.com" + mail = "uploader@example.com" + uidnumber = 5007 + primarygroup = 5504 + loginShell = "/bin/bash" + otherGroups = [5508] + passsha256 = "4314c1fe282face45336b1422a3285c5ff31a39c8e24425615fa53a43b718493" # photoprism + [[users.customattributes]] + photoprismUploadPath = ["bob"] + [[users.capabilities]] + action = "search" + object = "*" + [[users]] name = "mail" objectClass = "user" @@ -107,7 +126,7 @@ debug = true gidnumber = 5503 [[groups]] - name = "PhotoPrism-visitor" + name = "PhotoPrism-uploader" gidnumber = 5504 [[groups]] @@ -121,3 +140,7 @@ debug = true [[groups]] name = "ssh" gidnumber = 5507 + +[[groups]] + name = "PhotoPrism-webdav" + gidnumber = 5508 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index a01ddf06e..ae3bc3f24 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -54,6 +54,7 @@ services: PHOTOPRISM_LDAP_BASE_DN: "dc=localssl,dc=dev" PHOTOPRISM_LDAP_ROLE: "" PHOTOPRISM_LDAP_ROLE_DN: "ou=photoprism-*,ou=groups,dc=localssl,dc=dev" + PHOTOPRISM_LDAP_WEBDAV_DN: "ou=photoprism-webdav,ou=groups,dc=localssl,dc=dev" ## OpenID Connect (pre-configured for local tests): PHOTOPRISM_OIDC_URI: "https://keycloak.localssl.dev/auth/realms/master" PHOTOPRISM_OIDC_INSECURE: "true"