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

Web X509 compatible identity provider #199

Open
nicdard opened this issue Oct 19, 2024 · 1 comment
Open

Web X509 compatible identity provider #199

nicdard opened this issue Oct 19, 2024 · 1 comment

Comments

@nicdard
Copy link

nicdard commented Oct 19, 2024

Description of feature:

To allow real usage of the WASM builds, the library should support X509 certificates support.

Use case:

Running an MLS/CGKA client in a browser, and the application is using X.509 certificates to manage the user identities through an internal PKI. The certificate is accessed for example through the file system web api, or loaded through another mechanism.

Implementation discussion (Optional)

I saw there are traits for the identity provider. My initial plan is to implement a new crate, where I add support similarly to what is done in mls-rs-identity-x509, and use some rust crates compatible with WASM builds to perform the parsing of the certificates.
During my thesis work I have used x509_parser crate. I was thinking around certificates from an internal CA server, and the use case covered would be that the application has locally a copy of the CA certificate for verification of the other client identities. Any thoughts? :)

@mulmarta
Copy link
Contributor

Is there a reason you don't want to use the X509 identity provider from mls-rs-crypto-rustcrypto? Both the X509 identity provider and the crypto provider from that crate compile to WASM.

The API used below could be improved, but it creates an X509 identity provider that can be compiled to WASM with wasm-bindgen.

use mls_rs_identity_x509::{SubjectIdentityExtractor, X509IdentityProvider};
use mls_rs_crypto_rustcrypto::x509::{X509Reader, X509Validator};

let provider = X509IdentityProvider::new(
    SubjectIdentityExtractor::new(0, X509Reader::new()),
    X509Validator::new(vec![]).unwrap(),
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants