Using An Existing Intermediate Certificate Authority (CA)

In some enterprise scenarios, a security/IT team may provide a signing certificate that has already been signed by the organization's certificate authority (CA). This intermediate CA can be used to sign the node (sometimes referred to as leaf) certificates that will be installed on each NiFi node, or the client certificates used to identify users. In order to inject the existing signing certificate into the toolkit process, follow these steps:

  1. Generate or obtain the signed intermediate CA keys in the following format (see additional commands below):

    • Public certificate in PEM format: nifi-cert.pem

    • Private key in PEM format: nifi-key.key

  2. Place the files in the toolkit working directory. This is the directory where the tool is configured to output the signed certificates. This is not necessarily the directory where the binary is located or invoked.

    • For example, given the following scenario, the toolkit command can be run from its location as long as the output directory -o is ../hardcoded/, and the existing nifi-cert.pem and nifi-key.key will be used.

      • e.g. $ ./toolkit/bin/ standalone -o ./hardcoded/ -n '' -P thisIsABadPassword -S thisIsABadPassword -O will result in a new directory at ./hardcoded/ with a keystore and truststore containing a certificate signed by ./hardcoded/nifi-key.key

    • If the -o argument is not provided, the default working directory (.) must contain nifi-cert.pem and nifi-key.key

      • e.g. $ cd ./hardcoded/ && ../toolkit/bin/ standalone -n '' -P thisIsABadPassword -S thisIsABadPassword -O

         # Example directory structure *before* commands above are run

🔓 0s @ 18:07:58 $ tree -L 2
├── hardcoded
│   ├── CN=myusername.hardcoded_OU=NiFi.p12
│   ├── CN=myusername.hardcoded_OU=NiFi.password
│   ├── nifi-cert.pem
│   ├── nifi-key.key
│   ├──
│   ├──
│   └──
└── toolkit
    ├── LICENSE
    ├── NOTICE
    ├── README
    ├── bin
    ├── conf
    ├── docs
    └── lib

The nifi-cert.pem and nifi-key.key files should be ASCII-armored (Base64-encoded ASCII) files containing the CA public certificate and private key respectively. Here are sample files of each to show the expected format: