NetScaler® ingress controller

Install, link, and update certificates on a NetScaler using the NetScaler Ingress Controller

On the Ingress NetScaler, you can install, link, and update certificates. Many server certificates are signed by multiple hierarchical certificate authorities (CAs). This means that certificates form a chain.

A certificate chain is an ordered list of certificates containing an SSL certificate and certificate authority (CA) certificates. It enables the receiver to verify that the sender and all CAs are trustworthy. The chain or path begins with the SSL certificate, and each certificate in the chain is signed by the entity identified by the next certificate in the chain.

Any certificate that sits between the SSL certificate and the root certificate is called a chain or intermediate certificate. The intermediate certificate is the signer or issuer of the SSL certificate. The root CA certificate is the signer or issuer of the intermediate certificate.

If the intermediate certificate is not installed on the server (where the SSL certificate is installed) it may prevent some browsers, mobile devices, and applications from trusting the SSL certificate. To make the SSL certificate compatible with all clients, it is necessary that the intermediate certificate is installed.

Certificate Chain

Certificates linking in Kubernetes

The NetScaler Ingress Controller supports automatic provisioning and renewal of TLS certificates using the Kubernetes cert-manager. The cert-manager issues certificates from different sources, such as Let’s Encrypt and HashiCorp Vault and converts them to Kubernetes secrets.

The following diagram explains how the cert-manager performs certificate management. Certificate Management

When you create a Kubernetes secret from a PEM certificate embedded with multiple CA certificates, you need to link the server certificates with the associated CAs. While applying the Kubernetes secret, you can link the server certificates with all the associated CAs using the Ingress NetScaler. Linking the server certificates and CAs enable the receiver to verify if the sender and CAs are trustworthy.

The following is a sample Ingress definition:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: frontendssl
spec:
  rules:
  - host: frontend.com
    http:
      paths:
      - backend:
          service:
            name: frontend
            port:
              number: 443
        path: /web-frontend/frontend.php
        pathType: Prefix
  tls:
  - secretName: certchain1

<!--NeedCopy-->

On the NetScaler, you can verify if certificates are added to the NetScaler. Perform the following:

  1. Log on to the NetScaler command-line interface.

  2. Verify if certificates are added to the NetScaler using the following command:

    >show certkey
    

    For sample outputs, see the NetScaler documentation.

  3. Verify that the server certificate and CAs are linked using the following command:

    >show certlink
    

    Output:

    1)  Cert Name: k8s-3KC24EQYHG6ZKEDAY5Y3SG26MT2   CA Cert Name: k8s-3KC24EQYHG6ZKEDAY5Y3SG2_ic1
     
    2)  Cert Name: k8s-3KC24EQYHG6ZKEDAY5Y3SG2_ic1   CA Cert Name: k8s-3KC24EQYHG6ZKEDAY5Y3SG2_ic2
    

Certificate key bundle in NetScaler® by using the NetScaler Ingress Controller

NetScaler Ingress Controller now supports certificate bundle (certkeybundle) functionality, which is supported on NetScaler starting from release 14.1 build 21.x. With this functionality, the issue with the certificate chain and the additional handling that is required when two certificates share an intermediate CA are resolved. For more information on certificate key bundle support in NetScaler, see Support for SSL certificate key bundle.

NetScaler Ingress Controller creates a certificate bundle for certificates provided in:

  • The TLS section of Ingress
  • service.citrix.com/secret annotation in serviceTypeLB
  • Secret in the Listener

To enable this feature, a new environment variable CERT_BUNDLE is added in the NetScaler Ingress Controller, which can be set by using the certBundle argument from the Helm Charts. For more information on setting the certBundle, see Helm Charts of NetScaler Ingress Controller. NetScaler Ingress Controller adds the certificate bundle to the content switching virtual server of type SSL.

Certificate Bundle creation in NetScaler does not work in the following scenarios:

  • A secure back end (service group of type SSL) is configured.
  • Self-signed certificates are present.
  • preconfigured-certkey annotation is set in the ingress, or servicetypeLB, or Listener.

Points to note

  1. Certificate bundle creation in NetScaler fails if the following order is not met:

    • Server certificate (SC) must be placed at the top of the bundle file.

    • IC[1-9] are intermediate certificates. IC[i] is issued by IC[i+1]. The certificates must be placed in a sequence, and all the intermediate certificates must be present in the bundle.

    • Certificates must be of PEM format only.

    • Server certificate key (SCK) can be placed anywhere in the bundle.

    • A maximum of 9 intermediate certificates are supported

  2. If you upgrade the Controllers with the CERT_BUNDLE feature, the previous certificate key bindings get removed and a new certkeybundle gets created. The new certkeybundle gets bound to the context switching virtual server of type SSL.

Install, link, and update certificates on a NetScaler using the NetScaler Ingress Controller