GithubHelp home page GithubHelp logo

mf3129 / mz-certificate-transparency Goto Github PK

View Code? Open in Web Editor NEW

This project forked from antifuchs/mz-certificate-transparency

0.0 0.0 0.0 16 KB

Listen to certificate transparently logs and fire them into a streaming database

Go 100.00%

mz-certificate-transparency's Introduction

Fun times with certificate transparency logs and materialize!

This repo contains a little demo of what you can do to analyze my favorite distributed, incrementally-updating database that uses merkle trees: TLS certificate transparency logs.

What are certificate transparency logs (ct logs, for short), you may ask? Those are a cryptographically sealed and versioned set of databases that are kept by various certificate authorities and browser / crawler vendors in order to detect maliciously or erroneously issued certificates (the things that make HTTPS work). You can find more info about them at https://certificate.transparency.dev/.

So what do we do here?

This repo contains two things: A producer that reads the pre-processed logs from https://certstream.calidog.io/ (a convenient way to access the firehose that lets you get by without having to parse x509 data), and feeds the resulting data into a kafka queue.

The other part is a set of materialized views, defined in SCHEMA.md that sets a materialize instance up to use that data.

Running this yourself

You need two things: A materialize instance (I, cough, recommend https://cloud.materialize.com) and a kafka topic (you can get one at https://redpanda.com).

Then you configure the producer to feed data into the kafka topic, and you connect to the materialize instance to setup the schema (see SCHEMA.md).

Setting up the kafka queue

Ideally, use a broker configured for SASL PLAINTEXT auth over SSL. Set up one kafka topic, two accounts with application-specific passwords (or "service accounts").

One service account should have write access to your topic (in the example, that's the mz-hackday-demo-producer account), and the other should have read access (use that account for the CREATE SOURCE credentials in SCHEMA.md).

Running the producer

The producer takes several environment variables. Here's a shell snippet you can adjust for your values:

export KAFKA_USER="mz-hackday-demo"
export KAFKA_PASSWORD="your_secure_password"
export KAFKA_BROKER="broker1:30423"
export KAFKA_CLIENTID="mz-hackday-demo-producer"
export KAFKA_TOPIC="mz-hackday-demo"

Export those environment variables and run go run ./. It should start up and feed data into your kafka queue!

mz-certificate-transparency's People

Contributors

antifuchs 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.