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

Make dataset names and aliases comparisons case-insensitive #469

Closed
sergiimk opened this issue Jan 27, 2024 · 2 comments · Fixed by #537
Closed

Make dataset names and aliases comparisons case-insensitive #469

sergiimk opened this issue Jan 27, 2024 · 2 comments · Fixed by #537
Assignees
Labels
good first issue Good for newcomers

Comments

@sergiimk
Copy link
Member

sergiimk commented Jan 27, 2024

Problem

  • ODF restricts dataset name format to the grammar of domain names for compatibility with mechanisms like HTTP gateways and IPNS when dataset name appears in a subdomain. Subdomains are matched as case-insensitive.
  • We likely don't want to allow datasets fooBar and FooBar and users alice and alIce to exist in our system due to risk of impersonation
  • Finally the newly-introduced DatasetRefPattern also matches aliases as case-insensitive

Proposal

  • Spell out how case (in)sensitivity works in ODF spec
  • Equality checks of DatasetName and AccountName should be made case-insensitive
  • DatasetRepository implementations should be updated to case-insensitive comparisons when detecting name collisions
  • Along the way we should revisit how equality is implemented for composite types like DatasetRef, e.g. cases like DatasetRef::Alias("alice/foo") == DatasetRef::Handle("did:odf:abc", "alice/fool")
@sergiimk sergiimk added the good first issue Good for newcomers label Jan 27, 2024
@sergiimk sergiimk mentioned this issue Jan 27, 2024
5 tasks
@khh7
Copy link

khh7 commented Jan 29, 2024

Hi! I'm looking for a good first issue to work on and thought this would be an interesting one. Can I work on this if possible?

@sergiimk
Copy link
Member Author

Hi @khh7, thanks for considering to contribute!

This issue should be a good one to start with and we'll be happy to guide you through the process.

You can start with DEVELOPER.md to set up your development environment and get the tests running locally.

Once you've done that and ready to start on the issue - please assign it to yourself, so that no one else picks it up simultaneously.

Feel free to reach out on Discord if you need help.

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

Successfully merging a pull request may close this issue.

3 participants