项目作者: OpenSource-THG

项目描述 :
A Certificate Issuer for cert-manager using CFSSL
高级语言: Go
项目地址: git://github.com/OpenSource-THG/cfssl-issuer.git
创建时间: 2019-11-13T15:31:04Z
项目社区:https://github.com/OpenSource-THG/cfssl-issuer

开源协议:Apache License 2.0

下载


CFSSL Issuer

Build Status
codecov
Go Report Card
Docker Pulls

CFSSL Issuer is a controller that extends Jetstack’s cert-manager to add an issuer that uses a
CFSSL server to sign certificate requests.

Installation

This controller requires a cert-manager version of > v0.11.0 and a running CFSSL server

Helm

TBD

Manually

  1. git clone git@github.com:OpenSource-THG/cfssl-issuer.git
  2. cd cfssl-issuer
  3. kubectl apply -f deploy

Configuration

Once installed we need to configure either a CfsslIssuer or CfsslClusterIssuer resource.

Deployment

All CFSSL issuers share common configuraton for requesting certificates, namely the URL, Profile and CA Bundle

  • URL is the url of a CFSSL server
  • Profile is an optional field, denoting which profile cfssl should use when signing a Certificate
  • CA Bundle is a base64 encoded string of the Certificate Authority to trust the CFSSL connection. The controller will
    also asusme that this is the CA used when signing the Certificate Request

Below is an example of a namespaced and cluster scoped configuration

  1. kind: CfsslIssuer
  2. apiVersion: certmanager.thg.io/v1beta1
  3. metadata:
  4. name: cfsslissuer-server
  5. spec:
  6. url: https://cfsslapi.local
  7. caBundle: <base64-encoded-ca>
  1. kind: CfsslClusterIssuer
  2. apiVersion: certmanager.thg.io/v1beta1
  3. metadata:
  4. name: cfsslissuer-server
  5. spec:
  6. url: https://cfsslapi.local
  7. caBundle: <base64-encoded-ca>

The controller assumes that the cfssl api is secured via TLS using the provided CA Bundle and that the certs are signed by the same CA.

Certificates are then created via normal cert-manager flow referencing the issuer. As opposed to builtin issuers the group and kind
must be explicitly defined.

  1. apiVersion: cert-manager.io/v1alpha2
  2. kind: Certificate
  3. metadata:
  4. name: example-com
  5. spec:
  6. secretName: example-com-tls
  7. duration: 2160h # 90d
  8. renewBefore: 360h # 15d
  9. commonName: example.com
  10. dnsNames:
  11. - example.com
  12. - www.example.com
  13. issuerRef:
  14. name: cfsslissuer-server
  15. group: certmanager.thg.io
  16. kind: CfsslIssuer