Skip to content
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

Merged
merged 7 commits into from
Mar 22, 2022

Commits on Mar 22, 2022

  1. Avoid hardcoded LDAP attributes

    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.
    rhafer committed Mar 22, 2022
    Configuration menu
    Copy the full SHA
    d170df2 View commit details
    Browse the repository at this point in the history
  2. Allow to override LDAP SSL usage and Bind Password via env

    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.
    rhafer committed Mar 22, 2022
    Configuration menu
    Copy the full SHA
    c6777c9 View commit details
    Browse the repository at this point in the history
  3. Explicitly set "uid" Attribute on LDAP users

    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.
    rhafer committed Mar 22, 2022
    Configuration menu
    Copy the full SHA
    5537d8b View commit details
    Browse the repository at this point in the history
  4. Allow to skip base LDIF import

    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.
    rhafer committed Mar 22, 2022
    Configuration menu
    Copy the full SHA
    ad903d0 View commit details
    Browse the repository at this point in the history
  5. LDAP: clean up user creation

    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.
    rhafer committed Mar 22, 2022
    Configuration menu
    Copy the full SHA
    cd03936 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    30f8dbb View commit details
    Browse the repository at this point in the history
  7. Allow to switch Group Schema for LDAP Groups

    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.
    rhafer committed Mar 22, 2022
    Configuration menu
    Copy the full SHA
    369f0d8 View commit details
    Browse the repository at this point in the history