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

Restrictions on defining a data resolver URL #1111

Closed
4 tasks
Tracked by #818
ryanchristo opened this issue May 18, 2022 · 5 comments · Fixed by #1128
Closed
4 tasks
Tracked by #818

Restrictions on defining a data resolver URL #1111

ryanchristo opened this issue May 18, 2022 · 5 comments · Fixed by #1128
Assignees
Labels
Scope: x/data Issues that update the x/data module

Comments

@ryanchristo
Copy link
Member

Summary

When defining a resolver in the data module, there are currently no restrictions on the provided URL. Anyone can define a resolver with any URL and essentially domain squat a URL that they do not administer.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@ryanchristo ryanchristo added the Scope: x/data Issues that update the x/data module label May 18, 2022
@ryanchristo
Copy link
Member Author

cc @clevinson @aaronc

I think the simplest solution would be remove unique constraints on URL. We currently look up a resolver based on resolver id and we could allow multiple resolvers with the same URL.

It would be nice to verify a TXT record but not sure how we could do that deterministically. Other options would include a fee (does not solve the problem completely) or governance (adds a lot of overhead and additional work).

@aaronc
Copy link
Member

aaronc commented May 24, 2022

This came up in a call with Cambium as well. I think removing the unique constraint is the right solution

@clevinson
Copy link
Member

Makes sense to me. Also in favor of removing uniqueness constraint.

@ryanchristo
Copy link
Member Author

We currently look up a resolver based on resolver id and we could allow multiple resolvers with the same URL.

We actually look up a resolver by url in the current implementation but we can switch to id. I was thinking of registering data to a resolver, which currently takes the resolver id and not the url and which doesn't need to change.

The id is returned when defining a resolver, so the manager will need to store it for use when registering data and for any future operations we add related to the resolver (e.g. updating a resolver manager).

When querying for resolvers by IRI or content hash, we return the resolver urls rather than the resolver ids. This still makes sense although we may want to consider adding a query for resolvers by url (multiple resolvers returned if multiple resolvers with the same url exist), which would allow a user to look up a resolver without the id. Might be nice to have.

Opened #1128 to remove the unique constraint and to update the query by resolver url.

@clevinson
Copy link
Member

I agree that allowing for users to query for resolvers by URL (and therefore find the data that is registered in that resolver) would be valuable. In support of adding this as a nice to have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: x/data Issues that update the x/data module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants