Giter VIP home page Giter VIP logo

hello-mtls's Introduction

Hello mTLS

This package contains documentation on how to configure a broad array of technologies to perform mutual TLS. It is part of the Hello mTLS project, designed to raise developer awareness about public key infrastructure as a potential solution to common security problems.

If you notice any outdated, missing, or errant docs, pull requests are strongly encouraged!

Contributing

Documentation for each technology lives in its corresponding directory in the docs/ folder.

To get rolling on local development, clone this repository and start the local dev server:

$ yarn install
$ yarn start

You will be able to preview all changes at http://localhost:3000.

Adding new technologies

If you are adding a new technology, your best bet is to refer to existing configurations in this repository, but here is a high-level breakdown of each directory's contents.

config.yaml

This file configures basic information like the technology name and external links to documentation.

logo.png

This is a 256 x 256px transparent PNG of the technology's logo. If missing, a standard placeholder will be used.

topics/

Several optional markdown files provide prose describing how to perform different aspects of mTLS using the technology:

  • server_auth.md — Server TLS authentication
  • client_auth.md — Client TLS authentication
  • client.md — Client requests using TLS
  • renewal.md — TLS cetificate renewal

Properties with corresponding names in the topics object in config.yaml also accept a links array for any relevant external resources.

If your documentation makes use of the name of a certificate's identity, its certificate filename, its private key filename, or the root certificate filename, please use these template tokens. They will be interpolated with the appropriate values at build time in different contexts:

  • {{ server_name }} — Name of the identity like server.internal.net
  • {{ server_cert }} — Filename of the server's certificate like server.crt
  • {{ server_key }} — Filename of the server's private key like server.key
  • {{ server_port }} — Port number that that the server binds in the server auth docs
  • {{ client_name }} — Name of the identity like clientuser
  • {{ client_cert }} — Filename of the client's certificate like client.crt
  • {{ client_key }} — Filename of the client's private key like client.key
  • {{ ca_cert }} — Filename of the root CA certificate like ca.crt

Do not use markdown headlines.

Testing changes

Run yarn test locally to test that your changes are valid before opening a pull request.

License

Code in this repository is licensed under Apache License, Version 2.0.

All documentation content is licensed under Creative Commons Attribution 4.0 International License.

Creative Commons License

Support

Please don't hesitate to reach out on our Discord with any questions.

hello-mtls's People

Contributors

alanchrt avatar dependabot[bot] avatar devadvocado avatar dopey avatar kc657 avatar mikemaxey avatar nop33 avatar quingkhaos avatar shaunfinnerty avatar sourishkrout avatar tashian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hello-mtls's Issues

Standardize port numbers?

@sourishkrout An item for discussion I noticed after reviewing the golang doc.

Should we standardize the server port number across all docs? For example, the nginx doc suggests binding :443, and the curl doc connects over bare domain (:443). But, go binds to :9443 and the client requests from :9443.

So, if in the process of going through a tutorial or onboarding flow, someone selects nginx as the server and go as the client, they'll be told to listen on :443 but make a request to the server at :9443. Or if they do go server and curl client, it's the opposite.

Any ideas? Seems like :9443 could work across the board without needing superuser privileges, but it's pretty awkward to configure nginx or some other thing that's obviously a web server on that port.

Or maybe we somehow provide a way (maybe in config.yaml) for docs that offer servers to also specify the port they bind to, then use a {{ port }} variable in client docs to feed in the port from the configured server?

Ruby on Rails? (server)

I'm not actually sure if Rails can terminate TLS or do client auth? Tutorials often point to authenticating at Nginx or Apache.

PHP (server and client)

This could be split into multiples. Not sure what popular options are... Laravel, Symfony, ??? Or maybe TLS just terminates at the Apache/nginx web server for PHP, not sure whether they encourage running your own pure PHP server and reverse proxying these days.

TiDB

I'd like to see documentation for TiDB.

Mosquitto MQTT

I'd like to see documentation for Mosquitto.

This software can:

  • [X ] Accept TLS connections
  • [X ] Authenticate clients with TLS
  • [ X] Request TLS connections with client certificates

Prometheus

I'd like to see documentation for Prometheus.

Python requests (client)

If I remember correctly, they use a third party lib as their trust store, so it could be a little tricky.

Node.js (server)

This one can make mention of Express too, but options/config should be roughly the same as raw https.

Java (server and client)

I'm clueless here as to what the broadest tech is, so this should be split into other issues for clients and servers (Spring, Struts, ???).

Relatedly, we could probably break out issues for Scala and friends.

Usage documentation

Add README content for importing docs, rendering with the ContentBlock component, and enabling syntax highlighting.

Q: mTLS Between Step-CA And MariaDB?

Hi All,

Is it possible to do mTLS between Step-CA and a MariaDB Database Backend, or only "one-way" TLS from Step-CA to the MariaDB Backend?

If it is possible, did I simply miss the documentation on this (& could someone please point me in the right direction)? 😄

Please note that I am not asking about Step-CA facilitating mTLS between a MariaDB Database and another 3rd-Party application (I know how to do that, and have done so within our existing PKI), but between Step-CA itself and a MariaDB Database.

Thanks in advance

Dulux-Oz

Fastly (client)

You can give Fastly a cert for client auth with your origin. I'm not sure if you can supply your own CA cert to their trust store, though, for auth-ing the origin?

Add renewal documentation for Traefik

We currently don't show content on renewals, but when we do (a large project), we should add an ACME renewal flow for Traefik:


Traefik is a modern reverse-proxy with integrated support for ACME. It's easy to get a certificate from Let's Encrypt andy other ACME compatible CAs like step-ca in Traefik, using the tls-alpn-01 ACME challenge type.

Most importantly, Traefik will need to trust your root CA certificate. Either use the LEGO_CA_CERTIFICATES environment variable to provide the full path to your {{ ca_cert }} when running Traefik, or install your root certificate in your system's trust store.

In your Traefik static configuration, you'll need to add a certificatesResolvers block:

[certificatesResolvers]
  [certificatesResolvers.myresolver]
    [certificatesResolvers.myresolver.acme]
      caServer = "https://step-ca.internal/acme/acme/directory"
      email = "[email protected]"
      storage = "acme.json"
      tlsChallenge = true

Then, when you add routers to your dynamic configuration for HTTPS traffic, you need to set tls and tls.certResolver:

## Dynamic configuration
[http]
  [http.routers]
    [http.routers.router1]
      ...
      [http.routers.router1.tls]
        certResolver = "myresolver"

cc @tashian

MariaDB (server)

It may actually support chained certs (and hopefully even ECDSA???) unlike MySQL.

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.