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

Confusing wording for patch "id" properties #1118

Open
lionello opened this issue Apr 26, 2021 · 2 comments
Open

Confusing wording for patch "id" properties #1118

lionello opened this issue Apr 26, 2021 · 2 comments
Assignees
Labels
Milestone

Comments

@lionello
Copy link
Contributor

lionello commented Apr 26, 2021

According to the spec, the "id" properties for the add-public-keys and add-services patches are "Base64url encoded", but are not actually being encoded at all. Probably what was meant was to restrict the allowed characters to be the ones from the URL-safe "Base64url" character set i.e. lower case, upper case, digits, _ and -.

https://github.com/decentralized-identity/sidetree/blame/master/docs/spec/patches.md#L40

    1. The object ****MUST**** include an `id` property, and its value ****MUST**** be a string with no more than fifty (50) Base64URL encoded characters. If the value is not of the correct type or exceeds the specified maximum length, the entire _Patch Action_ ****MUST**** be discarded, without any of the patch being used to modify the DID's state.

https://github.com/decentralized-identity/sidetree/blame/master/docs/spec/patches.md#L143

    1. The object ****MUST**** include an `id` property, and its value ****MUST**** be a string with a length of no more than fifty (50) Base64URL encoded characters. If the value is not of the correct type or exceeds the specified length, the entire _Patch Action_ ****MUST**** be discarded, without any of it being used to modify the DID's state.

(Additionally, the two specs for the two id properties are very similar, differing only by a length of in the first sentence. This could also be made to match for both occurrences.)

@lionello
Copy link
Contributor Author

lionello commented Apr 27, 2021

The URL Safe Base 64 Alphabet is spec'ed in Table 2 in https://tools.ietf.org/html/rfc4648#section-5

@decentralgabe
Copy link
Member

To be done with #1208

@decentralgabe decentralgabe self-assigned this Feb 7, 2023
@decentralgabe decentralgabe added this to the V1.1 milestone Feb 7, 2023
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

2 participants