certificates icon indicating copy to clipboard operation
certificates copied to clipboard

Default crv, kty, size (and min size) should be configurable per provisioner

Open dopey opened this issue 6 years ago • 4 comments
trafficstars

Provisioner configuration for default key types, sizes, crvs, etc.

Why this is needed

Support more specialized use cases.

dopey avatar Aug 26 '19 18:08 dopey

I think this could be a very practical improvement, e.g. if you need certificates for backward compatibility or for special products / use cases with RSA keys. As a workaround we use the following constraint in a provisioner template to achive this:

{{- if not (and (typeIs "*rsa.PublicKey" .Insecure.CR.PublicKey) (eq .Insecure.CR.PublicKey.Size 512)) }}
  {{ fail "This provisioner only supports 4096 bit RSA certificates." }}
{{- end }}

It would be better to have these options set globally and the possibility to overwrite the global defaults per provisioner.

DonOtuseGH avatar May 18 '22 21:05 DonOtuseGH

The signature algorithm should of course be covered by such global/provisioner settings as well...

DonOtuseGH avatar May 19 '22 21:05 DonOtuseGH

Added a label to talk about this in our next triage meeting.

maraino avatar May 20 '22 01:05 maraino

Hey @DonOtuseGH, we agree that this could be a useful feature, but it's a bit niche at the moment.

I think the way you've solved this currently (with the template) is the best we can do short term. We would need design discussion around how these attributes might interplay with values passed in from the command line. E.g., if the default on the provisioner is ECDSA, but on the command line I pass --kty rsa - would this cause an error? would my cmd line flag simply override the default? There's some stuff to iron out here and in order for us to prioritize internally, we'd need to see more support and understand the use cases.

dopey avatar Jun 01 '22 02:06 dopey