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

GraphAPI groups are case in-sensitive #4291

Closed
kiranparajuli589 opened this issue Jul 27, 2022 · 5 comments
Closed

GraphAPI groups are case in-sensitive #4291

kiranparajuli589 opened this issue Jul 27, 2022 · 5 comments
Assignees
Labels

Comments

@kiranparajuli589
Copy link
Contributor

kiranparajuli589 commented Jul 27, 2022

(leftover from #3167)

While using the GraphAPI to create groups, we cannot create groups with case-insensitive names like:

In Graph API group names are case in-sensitive. Meaning, we these 3 groups cannot be added at the same time.

  • case-sensitive-group
  • Case-Sensitive-Group
  • CASE-SENSITIVE-GROUP

We can only create one group and then, 500 is returned with the Entry Already Exists message.

Also, groups can be fetched with the displayName value but it is case-insensitive. If I have a group with the name football-lovers. Then, the following request works perfectly fine.

❯ curl -k -uadmin https://host.docker.internal:9200/graph/v1.0/groups/Football%20lovers | jq
 % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                Dload  Upload   Total   Spent    Left  Speed
100    78  100    78    0     0    404      0 --:--:-- --:--:-- --:--:--   402
{
 "displayName": "football lovers",
 "id": "accfd45b-077c-4b69-8f13-f6dd38967436"
}

This feature is not the same as the oc10 server.
Acceptance tests are demonstrated here.

See also this comment for more ref.

@kiranparajuli589 kiranparajuli589 changed the title Group names are case insensitive GraphAPI group are case insensitive Jul 27, 2022
@kiranparajuli589 kiranparajuli589 changed the title GraphAPI group are case insensitive GraphAPI groups are case insensitive Jul 27, 2022
@kiranparajuli589 kiranparajuli589 changed the title GraphAPI groups are case insensitive GraphAPI groups are case in-sensitive Jul 27, 2022
@rhafer
Copy link
Contributor

rhafer commented Aug 2, 2022

Just like usernames the groupnames are case-insensitive in ocis. That means case-sensitive-group, Case-Sensitive-Group and CASE-SENSITIVE-GROUP refer to the same group. The LDAP AttributeType (cn) we use for group names is defined to be case-insensitive, I don't think there is much we can do about that apart from adjusting the test for ocis accordingly.

@micbar is there a requirement to have case-sensitive groups names in ocis somewhere?

@micbar
Copy link
Contributor

micbar commented Aug 10, 2022

@rhafer @kiranparajuli589 IMO we need to follow the LDAP standard here.

Can you adjust the tests that they don't expect a case sensitive group name?

@phil-davis
Copy link
Contributor

@kiranparajuli589 probably we can just skipOnOcis any of the core API tests that check that group names are case-sensitive. And then add a couple of scenarios to the oCIS local API tests that demonstrate that group names like Finance finance and FINANCE are really treated as being the same group.

@phil-davis
Copy link
Contributor

Note: for any "parallel deployment" implementation, this is going to be one "feature" that will be different between the oC10 core side and the oCIS side. If anyone really has existing different groups called finance and Finance that have different sets of members, and have different things shared with the 2 groups, then goodness knows what the oCIS side can do with it.

@kiranparajuli589
Copy link
Contributor Author

core tests adjusted with owncloud/core#40301 & new tests added with #4422

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

No branches or pull requests

5 participants