-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[tests-only] Make LDAP based test config more flexible for being able to run with libregraph/idm default config #39893
Conversation
@rhafer GitHub claims that you have not signed the CLA yet? Please click the button... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - only 1 suggestion.
https://drone.owncloud.com/owncloud/core/34961/3/6 |
37b0dab
to
60a6e0f
Compare
💥 Acceptance tests pipeline webUICreateDelete-chrome-mariadb10.2-php7.4 failed. The build has been cancelled. |
@rhafer feel free to merge if this is ready from your PoV. |
@phil-davis Thanks. Will do. I still need to re-run this once more against reva, to make sure it doesn't break anything there. |
d64194a
to
238b45a
Compare
The "ou" values for Test Users and Groups and the baseDN are defined via config. Remove the hardcoded references to "dc=owncloud,dc=com" and "ou=TestUsers/Groups" from the code.
This introduces two new env setttings: REVA_LDAP_USESSL and REVA_LDAP_BIND_PASSWORD. Set REVA_LDAP_USESSL to true to be able to force the usage of LDAPS even when not running on the standard port (636). REVA_LDAP_BIND_PASSWORD can be used to override the LDAP bind password. The purpose of this change is to be able to test against exiting LDAP servers and the embeded libregraph-idm that is deployed be the default configuration in ocis.
This is merely a cosmetic change and the attribute is already used as the naming attribute in the users's DN (thus set implicitly). This is just making things explicit and visible.
In order to be a bit more flexible when testing against libregraph-idm introduce the new variable REVA_LDAP_SKIP_LDIF_IMPORT to allow to skip the import of the base LDIF file that creates the ou objects for users and groups (these objects are already present in such a setup). This also means that when removing users and groups after each test we cannot rely on recursivly removing the ou object about explicitly delete every user/group.
The objectclasses "person", "organizationalPerson" and "top" are valid for all setups (alternatively they could be left out as they are implicitly added via inheritance) When testing against oCIS alway add the "owncloud" objectclass and the "owncloudUUID" attribute independent of the parallel deployment setting.
This allows to switch between different types of LDAP Groups. The default behaviour (REVA_LDAP_GROUP_SCHEMA="rfc2307") is to use the "posixGroup" objectclass with "memberUID" attribute. Any other value for REVA_LDAP_GROUP_SCHEMA will switch the behaviour to objectclass "groupOfNames" and the "member" Attribute.
Kudos, SonarCloud Quality Gate passed! |
Description
This adds a couple of new LDAP related settings (via enviroment variables) in order to be able to run the LDAP based testsuite against the default libregraph-idm configuration as created by ocis (see: owncloud/ocis#3331). Those settings can also be useful when testing ocis against different LDAP setups.
Motivation and Context
To provide more flexibility when testing oCIS with and LDAP backend.
How Has This Been Tested?
Types of changes