hyperledger-archives/aries-protocol-test-suite

Base64URL encoding/decoding with and without padding

Closed this issue · 2 comments

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.

Just noticed this issue already open on aries-rfcs: hyperledger/aries-rfcs#290

See PR #29