Sample usage of Step-CA
-
Initialize a new CA. We'll do this in a
ubuntu:bionic
docker image. So first dodocker-compose up ca
. The image will be built and when run will executestep ca init
with default arguments to which will generate a CA. It will be placed in the mountedbuild/ca/
directory when its done.Then the ca service will start serving the CA as
https://ca:10433
within linked containers. -
Then we need to grab the "fingerprint" from
build/ca/config/defaults.json
. Updatefiles/server.docker-entrypoint.sh
with the fingerprint. Then start the container withdocker-compose up server
.The container with run
step ca bootstrap
to setup the local environment to use the remote CA by default.Then
step ca token
will be used to create a JWS authorization token.Finally
step ca certificate
registers the hostnamelocalhost
and has the cert and key generated. These files will be placed under the mountedbuild/server/
directory.NOTE When the process is ansible-ized we can easily just gather the fingerprint as a fact and assign it so a secret in the swarm.