cfssl icon indicating copy to clipboard operation
cfssl copied to clipboard

cfssl doesn't use authsign endpoint

Open horakmar opened this issue 9 years ago • 3 comments

Hello. I am trying to make test internal CA following this guide: https://blog.cloudflare.com/how-to-build-your-own-public-key-infrastructure/ Unfortunately it doesn't work in point of requesting client certificate. The command cfssl gencert -config config_client.json csr_client.json tries to use the "sign" endpoint, even if the config_client.json defines the auth key. But running cfssl server doesn't expose "sign" endpoint, only "authsign", which is correct. How can I make cfssl gencert to use "authsign" instead of "sign" remote endpoint?

horakmar avatar Jul 24 '17 12:07 horakmar

Solved. cfssl gencert uses authsign endpoint with this configuration:

{
  "signing": {
    "default": {
      "auth_remote": {
        "auth_key": "key1",
        "remote": "caserver"
      }
    }
  },
...

Now i wonder how to disable newcert endpoint when I need only authenticated acces to signing. Even if sign endpoint is disabled, newcert still happily gives signed certs to everyone.

horakmar avatar Jul 25 '17 06:07 horakmar

this is a good point. At the moment, it seems the easiest path forward for you is to fork and disable the newcert api.

lziest avatar Aug 14 '17 23:08 lziest

Finally I solved it using multirootca running as a daemon on signing server and cfssl in the client role - consuming JSON configuration and handling requests to signing server. Nothing too pretty, but it works. It would be nice, if all functions were supported as a service via REST API, configured with or without authentication. Then I wouldn't need to install cfssl on every client, I'd be happy with a JSON client definition.

horakmar avatar Aug 15 '17 19:08 horakmar