Caucase provides several commands to work with certificates.
caucase
Reference caucase “one-shot” client.
This command is intended to be used for isolated actions:
It is also able to submit certificate signing requests, retrieve signed
certificates, requesting certificate renewals and updating both
CA certificates and revocation lists, but you may be interested in using
caucase-updater for this instead.
caucase-updater
Reference caucase certificate renewal daemon.
Monitors a key pair, corresponding CA certificate and CRL, and renew them
before expiration.
When the key-pair lacks a signed certificate, issues a pre-existing CSR to
caucase server and waits for the certificate to be issued.
caucase-probe
Caucase server availability tester.
Performs minimal checks to verify a caucase server is available at given URL.
caucase-rerequest
Utility allowing to re-issue a CSR using a locally-generated private key.
Intended to be used in conjunction with caucase-updater when user cannot
generate the CSR on the system where the certificate is desired (ex: automated
HTTPS server deployment), where user is not the intended audience for
caucase-produced certificate:
User generates a CSR on their own system, and signs it with any key (it will
not be needed later
User sends the CSR to the system where the certificate is desired
User gets caucase-rerequest to run on this CSR, producing a new private key
and a CSR similar to issued one, but signed with this new private key
From then on, caucase-updater can take over
This way, no private key left their original system, and user could still
freely customise certificate extensions.
caucase-key-id
Utility displaying the identifier of given key, or the identifier of keys
involved in given backup file.
Allows identifying users which hold a private key candidate for restoring a
caucased backup (see Restoration procedure).
caucased
Reference caucase server daemon.
This daemon provides access to both CAU and CAS services over both HTTP and
HTTPS.
It handles its own certificate issuance and renewal, so there is no need to use
caucase-updater for this service.
CORS
caucased implements CORS protection: when receiving a cross-origin request,
it will respond with 401 Unauthorized, with the WWW-Authenticate header set to
a custom scheme (“cors”) with an “url” parameter containing an URI template
with one variable field: “return” (more on it later).
Upon receiving this response, the application is expected to render the URL
template and redirect the user to resulting URL. There, the user will be
informed of the cross-origin access attempt, and offered the choice to grant or
deny access to given origin.
Once their decision is made, their browser will receive a cookie remembering
this decision, and they will be redirected to the URL received in the “return”
field received upon above-described redirection.
Then, the application should retry the original request, which will be
accompanied by that cookie.
Backups
Loosing the CA private key prevents issuing any new certificate trusted by
services which trusted the CA. Also, it prevents issuing any new CRL.
Recovering from such total loss requires starting a new CA and rolling it out
to all services which used the previous one. This is very time-costly.
So backups are required.
On the other hand, if someone gets their hand on the CA private key, they can
issue certificates for themselves, allowing them to authenticate with services
trusting the CA managed by caucase - including caucased itself if they issue a
user certificate: they can then revoke existing certificates and cause a lot of
damage.
So backups cannot happen in clear text, they must be encrypted.
But the danger of encrypted backups is that by definition they become worthless
if they cannot be decrypted. So as many (trusted) entities as possible should
be granted the ability to decrypt the backups.
The solution proposed by caucased is to encrypt produced backups in a way which
allows any of the caucase users to decrypt the archive.
As these users are already entrusted with issuing certificates, this puts
only a little more power in their hands than they already have. The little
extra power they get is that by having unrestricted access to the CA private
key they can issue certificates bypassing all caucase restrictions. The
proposed parade is to only make the backups available to a limited subset of
caucase users when there is an actual disaster, and otherwise keep it out of
their reach. This mechanism is not handled by caucase.
As there are few trusted users, caucase can keep their still-valid certificates
in its database for the duration of their validity with minimal size cost.
Backup procedure
Backups happen periodically as long as caucased is running. See
–backup-period and –backup-directory.
As discussed above, produced files should be kept out of reach of caucase
users until a disaster happens.
Restoration procedure
See caucased-manage –restore-backup.
To restore, one of the trusted users must voluntarily compromise their own
private key, providing it to the administrator in charge of the restoration
procedure. Restoration procedure will hence immediately revoke their
certificate. They must also provide a CSR generated with a different private
key, so that caucase can provide them with a new certificate, so they keep
their access only via different credentials.
admin identifies the list of keys which can decipher a backup, and broadcasts
that list to key holders
key holders manifest themselves
admin picks a key holder, requests them to provide their existing private key
and to generate a new key and accompanying CSR
key holder provide requested items
admin initiates restoration with –restore-backup and provides key holder
with replacement certificate
admin starts caucased, service is back online.
Backup file format
64bits: ‘caucase0’ magic string
32bits LE: header length
header: json-encoded header (see below)
encrypted byte stream (aka payload)
Header schema (inspired from s/mime, but s/mime tools available do not
support at least iterative production or iterative generation):
{
"description": "Caucase backup header",
"required": ["algorithm", "key_list"],
"properties": {
"cipher": {
"description": "Symetric ciher used for payload",
"required": ["name"],
"properties": {
"name":
"enum": ["aes256_cbc_pkcs7_hmac_10M_sha256"],
"type": "string"
},
"parameter": {
"description": "Name-dependend clear cipher parameter (ex: IV)",
"type": "string"
}
}
"type": "object"
},
"key_list": {
"description": "Content key, encrypted with public keys",
"minItems": 1,
"items": {
"required": ["id", "cipher", "key"],
"properties": {
"id": {
"description": "Hex-encoded sha1 hash of the public key",
"type": "string"
},
"cipher": {
"description": "Asymetric cipher used for symetric key",
"required": ["name"],
"properties": {
"name": {
"enum": ["rsa_oaep_sha1_mgf1_sha1"],
"type": "string"
}
},
"type": "object"
}
"key": {
"description": "Hex-encoded encrypted concatenation of signing and symetric encryption keys",
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}