Giter Club home page Giter Club logo

ff-carl's Introduction

FF-CARL

A utility library for automating Firefox' mTLS host:certificate preference assignment file (ClientAuthRememberList.bin).

Overview

This should be paired with policies.json certificate configuration management as per Firefox policy-templates, particularly a Certificates -> Install stanza for filesystem resident certs and/or a SecurityDevices stanza for PKCS#11 resident certs.

For its configuration, FF-CARL currently requires x509 client certificates to be in DER format. The library will panic if the certificate bytes are not that of DER encoding, or if the DER certificate is otherwise unable to be parsed. Please be aware that the DER certificate being used for configuration doesn't need to be the very same certificate known to Firefox, just a DER encoded version of it!

Example

Pull in the lib using your Cargo.toml file:

[dependencies]
ff-carl = "0.1.1"

And run an example (being sure to appropriately substitute filesystem paths):

use ff_carl::write_entry;
use ff_carl::EntryArgs;
use std::path::PathBuf;

fn main() -> Result<(), std::io::Error> {
     let der_cert = std::fs::read("/path/to/cert.der").unwrap();
     let entry_args = EntryArgs::new(
         "https", // scheme
         "mtls.cert-demo.com", // ascii_host
         443, // port
         "cert-demo.com", // base_domain
         der_cert.as_ref(), // DER cert byte array
     );

     let backing_path = PathBuf::from("/path/to/firefox/profile/ClientAuthRememberList.bin");

     write_entry(entry_args, backing_path)
}

To write multiple host:certificate ClientAuthRememberList Entry values, use the ff_carl::write_entries function.

ff-carl's People

Contributors

aoswald avatar

Stargazers

Dmytro Dyvulskyi avatar

Watchers

Andrew Oswald avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.