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

Allow to run user_provider integration test with LDAP driver #2584

Merged
merged 3 commits into from
Feb 28, 2022

Conversation

rhafer
Copy link
Contributor

@rhafer rhafer commented Feb 23, 2022

The test are skipped by default for now, as they require an LDAP Server
to be setup. To run you can e.g. use OpenLDAP in docker use e.g.:

docker run --name openldap \
                --volume ./tests/integration/grpc/fixtures/ldap/:/container/service/slapd/assets/config/bootstrap/ldif/custom \
                -e LDAP_DOMAIN="owncloud.com" \
                -e LDAP_TLS_VERIFY_CLIENT=never \
                -e LDAP_ORGANISATION=ownCloud \
                -e LDAP_ADMIN_PASSWORD=admin \
                -e LDAP_REMOVE_CONFIG_AFTER_SETUP=false \
                osixia/openldap

run the test suite with:

    cd tests/integration/
    RUN_LDAP_TESTS=1 ~/go/bin/ginkgo [--focus "ldap"] ./...

@rhafer rhafer self-assigned this Feb 23, 2022
@rhafer rhafer requested a review from a team as a code owner February 23, 2022 13:57
@update-docs
Copy link

update-docs bot commented Feb 23, 2022

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@rhafer rhafer force-pushed the ldap-integrationtest branch from 7274432 to 6f0f490 Compare February 23, 2022 14:03
The test are skipped by default for now, as they require an LDAP Server
to be setup. To run you can e.g. use OpenLDAP in docker use e.g.:

```
docker run --name openldap \
            --volume ./tests/integration/grpc/fixtures/ldap/:/container/service/slapd/assets/config/bootstrap/ldif/custom \
            -e LDAP_DOMAIN="owncloud.com" \
            -e LDAP_TLS_VERIFY_CLIENT=never \
            -e LDAP_ORGANISATION=ownCloud \
            -e LDAP_ADMIN_PASSWORD=admin \
            -e LDAP_REMOVE_CONFIG_AFTER_SETUP=false \
            osixia/openldap
```

run the test suite with:

```
cd tests/integration/
RUN_LDAP_TESTS=1 ~/go/bin/ginkgo [--focus "ldap"] ./...
```
If GetUser/GetGroup is called with the IDP attribute set to a non-empty
string we only return results if the IDP setting configured for the
user/groupprovider matches the IDP from the request. This aligns the LDAP
providers' behaviour with what the demo and json providers implement.
CurrentGinkgoTestDescription() is deprecated in V2 and should be
replaced with CurrentSpecReport().
@rhafer rhafer force-pushed the ldap-integrationtest branch from 6f0f490 to 169bcdb Compare February 23, 2022 14:54
Copy link
Member

@micbar micbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome. Nice LDAP schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants