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

Character limitations for object-type-identifier #59

Closed
c2bo opened this issue Mar 4, 2022 · 1 comment · Fixed by #61
Closed

Character limitations for object-type-identifier #59

c2bo opened this issue Mar 4, 2022 · 1 comment · Fixed by #61

Comments

@c2bo
Copy link
Member

c2bo commented Mar 4, 2022

The spec and the indy implementation allow for the unique names of the different objects (schema, creddef, revreg..) to basically use everything that a string would allow. Every npdb in the spec could contain characters that would be breaking for DID URLs like spaces.

If I understand the indy-node implementation correctly, then right now there are no limitations regarding the name apart from the size - see types.py:

class SchemaField(MessageValidator):
    schema = (
        (SCHEMA_NAME, LimitedLengthStringField(max_length=NAME_FIELD_LIMIT)),
        [...]

To solve this, we could

Enforcing limitations would be a breaking change with the current implementation, this probably would need to be done in a way to only enforce this for the creation of new objects and still allow "old" names to be resolved.

My opinion would be to at least strongly encourage not using special characters for names or completely limit to something like
`0-9, a-z, "-", "_", "." for fields like npdb in the spec.

@c2bo
Copy link
Member Author

c2bo commented Mar 15, 2022

After some discussion in the did:indy call on 8th of March, we decided to go with option 2:
Use URL encoding without breaking changes to the indy implementation. I will create a PR with some clarifications for the relevant text parts in the spec.

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 a pull request may close this issue.

1 participant