This is a simple Go application that acts as a Certificate Signer server. It provides an HTTP endpoint for signing Certificate Signing Requests (CSRs).
Server won't start without cert key and cert file in PEM format. (check the Configuration section)
To run the server, you can use Docker or build and run it locally. Server need to have specified Here are the steps:
- Build the Docker image:
docker build -t my-ca-server .
- Run the Docker container:
docker run -p 80:80 my-certificate-signer
- Clone the repository:
git clone https://github.com/Nebojsa92/certificate-signer.git cd certificate-signer
- Download dependencies and build the Go application:
go mod download go build
- Run the binary:
./certificateSigner
You can configure the CA server using environment variables:
Environment variable | Description |
---|---|
CA_CERT_FILE |
Path to the CA certificate file (default: ca-cert.pem ). |
CA_KEY_FILE |
Path to the CA private key file (default: ca-key.pem ). |
PORT |
Port on which the server listens (default: 80). |
Endpoint | Description |
---|---|
/csr |
HTTP endpoint for submitting Certificate Signing Requests (CSRs). |
/metrics |
Prometheus metrics endpoint for monitoring. |
The server exports the following Prometheus metrics:
Metric | Description |
---|---|
http_requests_total |
Total number of HTTP requests with labels for HTTP method and response code. |