Coder Social home page Coder Social logo

apache-mutual-tls's Introduction

Apache Mutual TLS

https://hub.docker.com/r/mviveros/apache-mutual-tls

This image contains an Apache server configured with Mutual TLS which will allow your server to do client authentication in addition to server authentication.

Docker Pulls

Setup

  1. Put your certs in ./certs/:
  • server.crt and server.key - server certificate and key used for server authentication
  • ca.crt - trusted root CA your server will allow client certificates signed by
  1. Set the environment variables:
  • ALLOWED_CLIENT_S_DN - allowed client certificate subject domain name, client certificates from other domains will result in a 403
  • VERIFY_DEPTH (optional) - maximum client certificate chain length, defaults to 2 which will allow client certificates signed by one intermediate CA, set to 1 to only allow client certificates signed by the trusted root CA
  1. Run it:
docker run -p 443:443 --env ALLOWED_CLIENT_S_DN=example.com -v `pwd`/certs/:/usr/local/apache2/conf/certs mviveros/apache-mutual-tls

Test

Assuming you have client certs in client.crt/client.key and ca_server.crt contains the CA your server certificate is signed by, you can test it with:

curl -v --cert client.crt --key client.key --cacert ca_server.crt https://localhost:443

Links

Coming Soon

  • support for adding a proxy header for client subject domain name

apache-mutual-tls's People

Contributors

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