/kingsly

Your SSL certs manager

Primary LanguageRubyApache License 2.0Apache-2.0

Kingsly

Build Status

An attempt to automate SSL certs management. This Cert manager helps generate SSL certs, renews them automatically (WIP: #4) and tracks if the client has the updated certs (WIP: #5)

Assumptions

  • The FQDN points to a public IP address
  • An FQDN points to only one IP address

Dev Setup

  • Install all dependencies: bundle install
  • Copy config: cp config/application.yml.sample config/application.yml
  • Edit file config/application.yml with relevant config
  • Run migrations: rake db:create db:migrate
  • Start server: rails server

Example APIs

  • Creating SSL certs for a domain:
    • Request:
curl -X POST http://kingsly.host/v1/cert_bundles \
  -u admin:password \
  -H 'Content-Type: application/json' \
  -d '{
        "top_level_domain":"your-domain.com",
        "sub_domain": "your-sub-domain"
    }'
  • Response:
'{
  "private_key":"-----BEGIN RSA PRIVATE KEY-----\nFOO...\n-----END RSA PRIVATE KEY-----\n",
  "full_chain":"-----BEGIN CERTIFICATE-----\nBAR...\n-----END CERTIFICATE-----\n"
}'

TODO

  • check for ACME account creation without email id (maybe initialize account only once?)