pberkel / caddy-storage-redis

Apache License 2.0
30 stars 3 forks source link

What is the type of data that is being stored in redis? Where can I see the certificate? #11

Open renodesper opened 2 weeks ago

renodesper commented 2 weeks ago

Hi, I have a simple question. What is the type of data that will be stored in redis? I only find rows that look like this:

caddy/certificates/acme.zerossl.com-v2-dv90/a-key-here/a-key-here.key
caddy/ocsp/a-key-here

I cannot find the certificate that should be stored. Did I miss something?

P.S. I use export/import feature from caddy storage

pberkel commented 5 days ago

The basic file layout for the Caddy / CertMagic storage where you've configured LetsEncrypt (staging) CA with email address cert-admin@example.com would be:

caddy/acme/acme-staging-v02.api.letsencrypt.org-directory/users/cert-admin@example.com/cert-admin.json
caddy/acme/acme-staging-v02.api.letsencrypt.org-directory/users/cert-admin@example.com/cert-admin.key
caddy/certificates/acme-staging-v02.api.letsencrypt.org-directory/example.com/example.com.crt
caddy/certificates/acme-staging-v02.api.letsencrypt.org-directory/example.com/example.com.json
caddy/certificates/acme-staging-v02.api.letsencrypt.org-directory/example.com/example.com.key
caddy/ocsp/example.com-e96cbf82

When specifically looking at certificates, Caddy / CertMagic stores three objects:

1) TLS certificate in a object with extension ".crt" 2) Certificate meta data in a object with extension ".json" 3) Certificate private key in a object with extension ".key"

So in your storage export example, you should expect to find your certificate in the following location: caddy/certificates/acme.zerossl.com-v2-dv90/a-key-here/a-key-here.crt