Skip to content

Conversation

@ScharfViktor
Copy link
Contributor

@ScharfViktor ScharfViktor commented Aug 6, 2025

related #1274

Test uses prepared LDAP users where we have users from two tenancy
tenancy1: alice, brian and admin(need for CI)
tenancy2: carol and david

How to run localy:

@ScharfViktor
Copy link
Contributor Author

Test is failed but shouldn't

I tried to reproduce on fresh main and now it doesn't work as expected:

steps:

  • change openCloudTenantId for alan and lynn in the services/idm/ldif/demousers.ldif.tmpl
  • build opencloud and run IDM_CREATE_DEMO_USERS=true OC_LDAP_USER_SCHEMA_TENANT_ID=openCloudTenantId OC_INSECURE=true PROXY_ENABLE_BASIC_AUTH=true opencloud/bin/opencloud server
  • alan tries to find lynn (same tenancy) - works fine 👍️
  • alan tries to find dennis (different tenancy) - can find but shouldn't

@aduffeck @dragonchaser Maybe I forgot something?

@ScharfViktor
Copy link
Contributor Author

ScharfViktor commented Aug 7, 2025

@aduffeck @dragonchaser Maybe I forgot something?

I forgot to bump reva. re-run after rebase

Copy link
Contributor

@aduffeck aduffeck left a comment

Choose a reason for hiding this comment

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

lgtm besides the nitpick



Scenario: users from different companies cannot see each other
When user "David" searches for user "brian" using Graph API
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe search for ali here as well? Otherwise it could happen that the test data gets changed in the future (e.g. Brian gets dropped) and then this test would give false positives.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this test cannot give false positives because when Brian gets dropped then -> we get a problem in the first test where we use When user "Brian" searches for user "ali" using Graph API

@ScharfViktor ScharfViktor merged commit 62a7f79 into main Aug 8, 2025
53 checks passed
@ScharfViktor ScharfViktor deleted the multiTenancyTests branch August 8, 2025 08:16
@openclouders openclouders mentioned this pull request Aug 8, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants