hyperledger-archives / aries-protocol-test-suite

Test Suite for testing protocol compliance of Aries Agents
https://wiki.hyperledger.org/display/aries
Apache License 2.0
25 stars 19 forks source link

Base64URL encoding/decoding with and without padding #26

Closed dbluhm closed 4 years ago

dbluhm commented 4 years ago

There are differences between Python's urlsafe_b64encode/decode and what is generally rendered by other language libraries. It appears standard for padding to be omitted in most cases; however, Python includes padding and expects padding on decoding values, even though omitting padding is "loseless" and even appears to be the correct behavior for Base64URL encoding. This is subtle yet significant enough to cause agents that are otherwise well behaved to fail tests and cause issues in interoperability between agents written in python and agents written in other languages.

We can either select with or without padding and fail agents who do not support the selection or accept both as the test suite and implement tests to show that the agent under test will accept both as well.

dbluhm commented 4 years ago

Just noticed this issue already open on aries-rfcs: https://github.com/hyperledger/aries-rfcs/issues/290

dbluhm commented 4 years ago

See PR #29