This is a REST API tool to mimic a Certificate Authority that runs on TCP port 25050, to generate (Root Certificates, Intermediate Certificates, End-Entity Certificates, Certificate Signing Request).
Every end-point will return a JSON-object
-
Clone project
$ git clone [email protected]:pjn2work/capy.git
-
If image already exists, and you want to delete it
$ docker rm capy $ docker rmi -f capy:1.0
-
Goto project folder
$ cd capy
-
Build docker image
$ docker build --tag capy:1.0 .
-
Run container
$ docker run -p 25050:25050 --name capy capy:1.0
method | end-point | parameters | body | action | output (json) |
---|---|---|---|---|---|
GET | http://localhost:25050/ca/gen-csr | CN, O, OU, C, ST, L | Generate a CSR | type, data, private_key, public_key | |
GET | http://localhost:25050/ca/gen-cert-root | CN, O, OU, C, ST, L, days, path_length |
Generate a root certificate | type, data, private_key, public_key | |
POST | http://localhost:25050/ca/gen-cert-interm | CN, O, OU, C, ST, L, days, path_length, issuer_private_key, issuer_cert |
Generate an intermediate certificate | type, data, private_key, public_key | |
POST | http://localhost:25050/ca/gen-cert-end | issuer_private_key, issuer_cert, csr_data | Generate an end-entity certificate | type, data |