Table of Contents

Vibemosphere Certificate Authority

Certificate authorities (root and intermediate): server, client and code signing certificates, CSR signing, CRL and certificates for the HTTPS ports of Vibecat.

Id ca
Role deployment - needed for the page and the REST API (administrators always may)
Page Plugins > Open (overlay with an X at the top right) or /plugins/ca/
REST /api/plugins/ca/… and, for callers with the role, /plugins/ca/…

Open the configuration

In the administration open Plugins, select the row of this plug-in and press Open. The page opens in an overlay dialog: close it with the X at the top right, with Esc or by clicking outside; Open in a new tab next to the title shows it full size.

Vibemosphere Certificate Authority: the plug-in page in its overlay dialog

Step by step

  1. Open the plug-in and press New CA: name, subject (CN, O, C), key (RSA 2048/3072/4096 or EC), validity in years. Leave Signed by empty for a root CA.
  2. Press Issue certificate: choose the CA and the type (server, client, code), the common name, alternative names and the validity in days. The PKCS#12 file and the private key are shown once.
  3. To secure the HTTPS ports of Vibecat choose CA for the ports, add extra host names and tick keep the HTTPS ports certified automatically. The port form of Vibecat then offers Certificate source: CA.
  4. Install the CA certificate in your browsers and clients once.

The page in detail

ca: first tab, Authorities

Tabs

The page is divided into the tabs Authorities, Issue, Issued certificates, HTTPS ports.

Issue

ca: tab Issue

Issued certificates

ca: tab Issued certificates

HTTPS ports

ca: tab HTTPS ports

Fields and columns

Label Meaning
Name
Common name (CN)
Organization (O)
Unit (OU)
Country (C)
City (L)
State (ST)
Key
Valid for (years)
Signed by (empty = a root CA)
CRL address (optional, in the certificates)
CA
Certificate for
E-mail (client)
Valid for (days)
Password of the PKCS#12 file (empty = generated)
Alternative names (DNS names, IP addresses, e-mail addresses, URLs: one per line or comma separated; a server certificate gets its CN when empty)
Or sign a certificate request (PEM, BEGIN CERTIFICATE REQUEST) - then no key is made here
CA for the ports
Extra names of the server (DNS, IP; comma separated)
Renew when fewer days are left
Subject Column of a table
Valid until Column of a table
Issued Column of a table
On Column of a table
Serial Column of a table
Type Column of a table
Names Column of a table
Port Column of a table
Kind Column of a table
PFX Column of a table
Certificate Column of a table

Actions

Notes from the page

Reference

Any number of certificate authorities (CAs) in Vibecat, made with BouncyCastle: root and intermediate CAs, server, client and code signing certificates (a key made here, or a certificate request signed), revocation with a CRL, and server certificates for the HTTPS ports of Vibecat. Access needs the role deployment (or admin).

CAs

A root CA signs itself; an intermediate CA is signed by another CA of the plug-in (chain of certificates inside). Each has a key type (RSA 2048 / 3072 / 4096, EC P-256 / P-384), a subject (CN, O, OU, C, L, ST), a validity in years and an optional CRL address that is put into every certificate it signs. A CA can be switched off (it signs nothing then). The key of each CA is a PKCS#12 file ca.p12 in plugin-data\ca\cas\<id>\; the random password is in ca.json next to it. Both files are readable for the account of Vibecat only - keep that folder in your backup and protect it like any CA key.

Certificates

Type Key usage Extended key usage
server digital signature (key encipherment for RSA) server authentication (optional also client authentication); alternative names DNS / IP
client digital signature (key encipherment for RSA) client authentication, and e-mail protection when an e-mail address is given
code digital signature code signing

The alternative names are one list: names with @ become e-mail addresses, IP addresses become IP names, scheme:// becomes a URI, the rest DNS names. A server certificate without names gets its CN. A generated certificate returns the private key and a PKCS#12 file (the password is generated when you give none; it is shown once and not stored). A request (csr, PEM) is signed without a key being made here; its signature is checked and its requested names are taken. No certificate is ever valid longer than its CA.

Revocation

A certificate can be revoked on the page; the CA's CRL (PEM) lists the revoked certificates and is signed again (next update in 30 days) on every call of GET /cas/{id}/crl.

HTTPS ports

Choose a CA for the ports and Vibecat gets a server certificate for every HTTPS port of the web applications: with the host names, the IP addresses of the machine, localhost and the extra names you give. The PFX file (plugin-data\ca\certs\<port>.pfx) becomes the PFX of the port and the port is opened again. With keep the HTTPS ports certified automatically this is repeated at the start and every 12 hours for ports that have no certificate of this CA or one that runs out within the days you set. Install the certificate of the CA once in your browsers and clients.

REST

Call Purpose
GET|POST /plugins/ca/cas List the CAs; create one (name, cn, o, ou, c, l, st, keyType, years, parent, pathLen, crlUrl)
GET|PUT|DELETE /plugins/ca/cas/{id} One CA (PUT: name, enabled, crlUrl)
GET /plugins/ca/cas/{id}/certificate The certificate (PEM), the chain and the DER (base64) of the CA
POST /plugins/ca/cas/{id}/issue Issues a certificate (below); /sign is the same call
GET /plugins/ca/cas/{id}/issued[/{serial}] The issued certificates; one of them as PEM
POST /plugins/ca/cas/{id}/revoke/{serial} Revokes a certificate
GET /plugins/ca/cas/{id}/crl The CRL (PEM)
GET|PUT /plugins/ca/settings portCa, autoPorts, hosts, keyType, days, renewDays, legacyPfx
GET /plugins/ca/ports, POST /plugins/ca/ports/issue The ports with their certificates; issue for all https ports (or {“ports”: [“https-8443”]})

Fields of issue: type (server, client, code), cn, san (list or text), email, o, ou, c, l, st, keyType, days, password, legacyPfx, clientAuth (server certificates), or csr (PEM) instead of a key. The answer has serial, subject, notAfter, certificate, chain, caCertificate and, for a generated key, privateKey (PEM), pfx (base64) and pfxPassword.

# a server certificate with PKCS#12 file
curl -u deployer:secret -X POST http://host:9090/plugins/ca/cas/root/issue -H "Content-Type: application/json" \
  -d '{"type":"server","cn":"elo.example.com","san":["elo","10.0.0.5"],"days":365}' > cert.json

# a client certificate for a user
curl -u deployer:secret -X POST http://host:9090/plugins/ca/cas/root/issue -H "Content-Type: application/json" \
  -d '{"type":"client","cn":"Anna Beispiel","email":"anna@example.com","password":"changeit"}'

# sign a request made elsewhere (openssl req -new ...)
curl -u deployer:secret -X POST http://host:9090/plugins/ca/cas/root/sign -H "Content-Type: application/json" \
  -d "{\"type\":\"server\",\"csr\":\"$(awk '{printf "%s\\n", $0}' server.csr)\"}"

PowerShell: Invoke-RestMethod -Uri http://host:9090/plugins/ca/cas/root/issue -Method Post -Credential $c -ContentType application/json -Body (@{type='code'; cn='Sysworx'} | ConvertTo-Json), then [IO.File]::WriteAllBytes('code.pfx', [Convert]::FromBase64String($r.pfx)).

All plug-ins