kanidm / webauthn-rs

An implementation of webauthn components for Rustlang servers
Mozilla Public License 2.0
483 stars 80 forks source link

WIP: base64urlsafedata internals cleanup #356

Closed micolous closed 4 months ago

micolous commented 11 months ago

Goal is to remove all functionality from Base64UrlSafeData which is not about serialisation, and stop dependants from using internal-only interfaces. HumanBinaryData won't provide these interfaces, so it needs to make do.

TODO:

micolous commented 11 months ago

The difficulty is going to be migration. The serialisable Credential struct includes a CredentialID (which is currently Base64UrlSafeData); so if you serialise to/from a binary format, you'll need to get everything updated to something that can deserialise both (which #354 added).

We could remove it from parts of our API which do not get serialised – that could happen after this.

The goal of this PR is to get this into a state that we could swap it out with a Vec<u8> or a HumanBinaryData type, and making sure that everything which actually needs Base64-related functionality (depending on it via FromStr or Display) instead explicitly encodes it as Base64. This is one of the sources of confusion about the Base64UrlSafeData type.

micolous commented 11 months ago

Main thing left to check is the WASM/browser stuff

Firstyear commented 5 months ago

We should wrap this up probably :) Do you want me to help?

micolous commented 4 months ago

Closing in favour of #433