Skip to content

Commit

Permalink
Switch LDAP test to use entryUUID as the user's unique id
Browse files Browse the repository at this point in the history
The entryUUID attribute is generated by the LDAP server. By using this
me can make sure that the the users get different IDs with every
test that runs so we can avoid setting DELETE_USER_DATA_CMD to delete
the USER data after each test.

Also this seems to uncover some issue in the WebDAV code which still
assumes that the userid always match the username.
  • Loading branch information
rhafer committed Oct 5, 2021
1 parent 12304e4 commit 7763348
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,6 @@ def ocisIntegrationTests(parallelRuns, skipExceptParts = []):
"environment": {
"TEST_SERVER_URL": "http://revad-services:20080",
"OCIS_REVA_DATA_ROOT": "/drone/src/tmp/reva/data/",
"DELETE_USER_DATA_CMD": "rm -rf /drone/src/tmp/reva/data/nodes/root/* /drone/src/tmp/reva/data/nodes/*-*-*-*",
"STORAGE_DRIVER": "OCIS",
"SKELETON_DIR": "/drone/src/tmp/testing/data/apiSkeleton",
"TEST_WITH_LDAP": "true",
Expand Down Expand Up @@ -776,7 +775,6 @@ def s3ngIntegrationTests(parallelRuns, skipExceptParts = []):
"environment": {
"TEST_SERVER_URL": "http://revad-services:20080",
"OCIS_REVA_DATA_ROOT": "/drone/src/tmp/reva/data/",
"DELETE_USER_DATA_CMD": "rm -rf /drone/src/tmp/reva/data/nodes/root/* /drone/src/tmp/reva/data/nodes/*-*-*-*",
"STORAGE_DRIVER": "S3NG",
"SKELETON_DIR": "/drone/src/tmp/testing/data/apiSkeleton",
"TEST_WITH_LDAP": "true",
Expand Down
6 changes: 3 additions & 3 deletions tests/oc-integration-tests/drone/ldap-users.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ bind_username="cn=admin,dc=owncloud,dc=com"
bind_password="admin"
idp="http://localhost:18000"
[grpc.services.authprovider.auth_managers.ldap.schema]
uid="uid"
uid="entryuuid"
displayName="displayName"
dn="dn"
cn="cn"
Expand All @@ -33,7 +33,7 @@ hostname="ldap"
port=636
insecure=true
base_dn="dc=owncloud,dc=com"
userfilter="(&(objectclass=posixAccount)(|(uid={{.OpaqueId}})(cn={{.OpaqueId}})))"
userfilter="(&(objectclass=posixAccount)(|(entryuuid={{.OpaqueId}})(cn={{.OpaqueId}})))"
findfilter="(&(objectclass=posixAccount)(|(cn={{query}}*)(displayname={{query}}*)(mail={{query}}*)))"
attributefilter="(&(objectclass=posixAccount)({{attr}}={{value}}))"
groupfilter="(&(objectclass=posixGroup)(cn=*)(memberuid={{.OpaqueId}}))"
Expand All @@ -42,7 +42,7 @@ bind_password="admin"
idp="http://localhost:18000"

[grpc.services.userprovider.drivers.ldap.schema]
uid="uid"
uid="entryuuid"
displayName="displayName"
dn="dn"
cn="cn"
Expand Down
6 changes: 3 additions & 3 deletions tests/oc-integration-tests/local/ldap-users.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ bind_username="cn=admin,dc=owncloud,dc=com"
bind_password="admin"
idp="http://localhost:18000"
[grpc.services.authprovider.auth_managers.ldap.schema]
uid="uid"
uid="entryuuid"
displayName="displayName"
dn="dn"
cn="cn"
Expand All @@ -33,7 +33,7 @@ hostname="localhost"
port=636
insecure=true
base_dn="dc=owncloud,dc=com"
userfilter="(&(objectclass=posixAccount)(|(uid={{.OpaqueId}})(cn={{.OpaqueId}})))"
userfilter="(&(objectclass=posixAccount)(|(entryuuid={{.OpaqueId}})(cn={{.OpaqueId}})))"
findfilter="(&(objectclass=posixAccount)(|(cn={{query}}*)(displayname={{query}}*)(mail={{query}}*)))"
attributefilter="(&(objectclass=posixAccount)({{attr}}={{value}}))"
groupfilter="(&(objectclass=posixGroup)(cn=*)(memberuid={{.}}))"
Expand All @@ -42,7 +42,7 @@ bind_password="admin"
idp="http://localhost:18000"

[grpc.services.userprovider.drivers.ldap.schema]
uid="uid"
uid="entryuuid"
displayName="displayName"
dn="dn"
cn="cn"
Expand Down

0 comments on commit 7763348

Please sign in to comment.