oauth-wg / oauth-selective-disclosure-jwt

https://datatracker.ietf.org/doc/draft-ietf-oauth-selective-disclosure-jwt/
Other
57 stars 31 forks source link

Small (and optional) editorial SD-JWT+KB's spec suggestion: remove whitespace from examples of JSON serialization #531

Open samuelgoto opened 5 days ago

samuelgoto commented 5 days ago

I couldn't find where to file issues for the SD-JWT+KB, so sending this here -- feel free to ignore this or ask me to move it to a more appropriate please

I initially filed this here https://github.com/openid/OpenID4VP/issues/325 and moved it here.

Just a small note, as I was reading along the SD-JWT+KB and ran into a problem implementing this section:

https://www.ietf.org/archive/id/draft-ietf-oauth-selective-disclosure-jwt-13.html#section-4.2.1-2.2

The problem is that in this section, my JSON serializer (and I think, most people's web-based JSON.stringy()-based serializer) removes white space between array elements. 

So, I was getting ["_26bc4LT-ac6q2KI6cBW5es","family_name","Möbius"] rather than ["_26bc4LT-ac6q2KI6cBW5es", "family_name", "Möbius"], which base64url encodes to WyJfMjZiYzRMVC1hYzZxMktJNmNCVzVlcyIsImZhbWlseV9uYW1lIiwiTcO2Yml1cyJd rather than WyJfMjZiYzRMVC1hYzZxMktJNmNCVzVlcyIsICJmYW1pbHlfbmFtZSIsICJNw7ZiaXVzIl0 as is in the example.

Since it wasn't matching what was in the spec, I had to debug for a while before I convinced myself that my implementation was valid, so figured other people would too.