GithubHelp home page GithubHelp logo

lawndoc / capy Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 1.0 54 KB

A Certificate Authority microservice that can generate server/client certificates through an API interface

License: MIT License

Python 73.62% Dockerfile 23.64% Shell 2.74%
certificate-authority certificate signed client-certificate authentication encryption ssl ssl-certificates tls tls-certificate

capy's Introduction

CAPy

A Certificate Authority microservice that can generate server/client certificates through an API interface

Build/Tests Codecov

It currently does not provide any kind of authentication mechanism, so NAC and container network configuration are extremely important in deploying this service.

Functionality

Basic API calls provided:

  • GET /ca/root-trust -> get root CA certificate for establishing trust
  • GET /ca/host-certificate -> get new host certificate signed by CA

TODO / Not yet implemented:

  • POST /ca/csr -> generic certificate signing request (optionally supply own public key)
  • POST /ca/revoke-certificate -> revoke certificate
  • GET /ca/revoke-certificate -> check if cert has been revoked
  • OCSP server for clients to check if cert has been revoked via OCSP

Deployment

CAPy requires the following environment variables to run properly:

Variable Name Description Required Default Value
CA_NAME Name of the certificate authority No CAPy Root CA
CA_CERT_DIR Directory within the container to save certificates No /opt/CAPy/CA
PROXY_DOMAIN Domain that the CA is creating certificates for Yes
PGID Container user GID; used for volume file permissions Yes
PUID Container user UID; used for volume file permissions Yes
SECRET_KEY Secret key for encryption; make sure this value is complex and protected Yes

CAPy also requires a volume mounted at the CA_CERT_DIR location to be able to persist certificates across runs.

The following docker-compose file provides example deployment code:

version: "3.9"
services:
  capy:
    container_name: "capy"
    image: ghcr.io/lawndoc/capy:main
    volumes:
      - ./volumes/capy:/opt/CAPy/CA     # make sure this matches CA_CERT_DIR
    networks:
      - backend
    restart: always
    environment:
      CA_NAME: "MyOrg CA"               # optional
      CA_CERT_DIR: "/opt/CAPy/CA"       # optional
      PGID: 1001
      PROXY_DOMAIN: example.com
      PUID: 1000
      SECRET_KEY: ${SECRET_KEY}
networks:
  backend:

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.