<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Nifi Secure 3 node cluster with signed Certificate in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Secure-3-node-cluster-with-signed-Certificate/m-p/377315#M243221</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/101202"&gt;@PriyankaMondal&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;1. Not clear on the question here.&amp;nbsp; Why use Toolkit to create three keystores?&amp;nbsp; I thought you were getting three certificated (one for each node) from your IT team.&amp;nbsp; Use those to create the three unique keystores you will use.&lt;BR /&gt;&lt;BR /&gt;2. It appears your DN has a wildcard in it.&amp;nbsp; NiFi does not support the use of wildcards in the DN of node ClientAuth certificates.&amp;nbsp; This is because NiFi utilizes mutualTLS connections and the clientAuth DN is used to identify the unique connecting clients and is used to setup and configure the authorizations.&amp;nbsp; &amp;nbsp; Now you could ask your IT team to create you one keystore with a non wildcard DN like "cn=nifi-cluster, ou=&lt;SPAN&gt;domainlabs, DC=com" and add all three of your Nifi node's hostnames as SAN entries in that one PrivateKeyEntry.&amp;nbsp; This would allow you to use that same PrivateKey keystore on all three NiFi nodes.&amp;nbsp; This has downsides liek security. If keystore on one node gets compromised, all hosts are compromised because it is reused.&amp;nbsp; All nodes will present as same client identity (since all present same DN) during authorization. So nothing will distinguish&amp;nbsp;one node from the other.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;The keystore used by NiFi can ONLY contain one privateKey entry.&amp;nbsp; Merging multiple keystores with privateKey entries will result in one keystore with more than one PrivateKeyEntry which is not supported by NiFi.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "&lt;SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Accept as Solution&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;" on one or more of them that helped.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you,&lt;BR /&gt;Matt&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Oct 2023 16:01:49 GMT</pubDate>
    <dc:creator>MattWho</dc:creator>
    <dc:date>2023-10-06T16:01:49Z</dc:date>
    <item>
      <title>Nifi Secure 3 node cluster with signed Certificate</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Secure-3-node-cluster-with-signed-Certificate/m-p/377272#M243201</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I already created 3 node Nifi secured cluster with self signed certificated , where I used nifi-toolkit to do the task. But now I have signed certificate (shared by IT team), the pem and key file. Can you please help (step by step guide) to create 3 node nifi cluster using that certificate?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 08:32:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Secure-3-node-cluster-with-signed-Certificate/m-p/377272#M243201</guid>
      <dc:creator>PriyankaMondal</dc:creator>
      <dc:date>2023-10-05T08:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi Secure 3 node cluster with signed Certificate</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Secure-3-node-cluster-with-signed-Certificate/m-p/377293#M243207</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/101202"&gt;@PriyankaMondal&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You should have a signed certificate for each of your three NiFi nodes.&amp;nbsp; Make sure those certificates meet the minimum requirements for NiFi.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Certificate DN can not contain wildcards.&lt;/LI&gt;&lt;LI&gt;Certificate Extended Key Usage (EKU) must include "clientAuth" and "serverAuth"&lt;/LI&gt;&lt;LI&gt;Certifcate must contain SAN entry for server hostname and any alternate DNS names that server may use.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;The Certificate (PrivateKey) needs to be placed inside a JKS or PKCS12 keystore.&amp;nbsp; There are plenty of resource in the web for creating keystores.&amp;nbsp; But essentially you want to combine your pem and key files to make a p12 file.&amp;nbsp; You can then import that p12 file in to a JKS keystore. A NiFi keystore must contain ONLY one PrivateKeyEntry.&amp;nbsp; &amp;nbsp;So don't create a singel keystore where you import all 3 private keys.&amp;nbsp; You should have three separate Keystores (one for each NiFi node).&lt;BR /&gt;&lt;BR /&gt;NiFi uses two keystores (keystore and truststore):&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Keystore - contains only one PrivateKeyEntry (unique to each NiFi node)&lt;/LI&gt;&lt;LI&gt;Truststore - contains one too many TrustedCertEntries.&amp;nbsp; The same truststore is used on all NiFi nodes.&amp;nbsp; The truststore needs to contain the compete trust chain for your node's private keys.&amp;nbsp; &amp;nbsp;A certificate is signed by an authority. In order for server to trust a certificate presented in a TLS exchange, the authorities that signed that certificate must be trusted. That is where this truststore comes into play.&amp;nbsp; An authority can be of two types, intermediate CA or Root CA.&amp;nbsp; An intermediate CA is one where the issuer and signer are two different entities (DNs don't match).&amp;nbsp; A Root CA is one where the issue and signer are the same (DNs match).&amp;nbsp; &amp;nbsp;Let's say you Private key with DN = "CN=node1, OU=NiFi" was signed by an Intermediate corp CA with "DN = CN=Intermediate1, 0U=company".&amp;nbsp; &amp;nbsp;And that intermediate CA TrustedCert was signed by a Root CA with DN = "CN=RootCA, Ou=company".&amp;nbsp; In order for your truststore to have the complete trust chain,&amp;nbsp; the NiFi truststore would need to contain both a TrustedCertEntry for Intermediate CA and the root CA.&amp;nbsp; For the Truststore you will need to get the public cert(s) from your IT team (who should also be able to help you with your keystore and truststore creation)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;As far as the setup of NIFi goes, nothing else is different from what you did when using the self-signed certificates when it comes to configuration.&amp;nbsp; &amp;nbsp;Keep in mind that each node's identity is derived from the nodes private certifcate DN.&amp;nbsp; That DN is evaluated against and configured user identity mapping patterns configired in the nifi.properties file.&amp;nbsp; If the java regex pattern matches the certificate DN, the mapping value&amp;nbsp; and mapping transform are applied.&amp;nbsp; That resulting mapped identity is what needs to be authorized in NiFi.&amp;nbsp; So these mapped identities become your node identities when configuring the &lt;A href="https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#authorizer-configuration" target="_self"&gt;NiFi authorizer&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "&lt;SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Accept as Solution&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;" on one or more of them that helped.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you,&lt;BR /&gt;Matt&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 14:41:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Secure-3-node-cluster-with-signed-Certificate/m-p/377293#M243207</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2023-10-05T14:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi Secure 3 node cluster with signed Certificate</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Secure-3-node-cluster-with-signed-Certificate/m-p/377305#M243214</link>
      <description>&lt;P&gt;Thank you For your response &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;&amp;nbsp;.&lt;BR /&gt;Please help me with these basic information:&lt;/P&gt;&lt;P&gt;1. I can get th&lt;SPAN&gt;ree separate Keystores (one for each NiFi node), from Nifi-toolkit&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. I also have Keystore and truststore shared by IT Team(which is signed certificate), where cn=*.domainlabs.com&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now, Should I merge these two keystore and truststore? If yes, please share steps to merge that.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 10:51:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Secure-3-node-cluster-with-signed-Certificate/m-p/377305#M243214</guid>
      <dc:creator>PriyankaMondal</dc:creator>
      <dc:date>2023-10-06T10:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi Secure 3 node cluster with signed Certificate</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Secure-3-node-cluster-with-signed-Certificate/m-p/377315#M243221</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/101202"&gt;@PriyankaMondal&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;1. Not clear on the question here.&amp;nbsp; Why use Toolkit to create three keystores?&amp;nbsp; I thought you were getting three certificated (one for each node) from your IT team.&amp;nbsp; Use those to create the three unique keystores you will use.&lt;BR /&gt;&lt;BR /&gt;2. It appears your DN has a wildcard in it.&amp;nbsp; NiFi does not support the use of wildcards in the DN of node ClientAuth certificates.&amp;nbsp; This is because NiFi utilizes mutualTLS connections and the clientAuth DN is used to identify the unique connecting clients and is used to setup and configure the authorizations.&amp;nbsp; &amp;nbsp; Now you could ask your IT team to create you one keystore with a non wildcard DN like "cn=nifi-cluster, ou=&lt;SPAN&gt;domainlabs, DC=com" and add all three of your Nifi node's hostnames as SAN entries in that one PrivateKeyEntry.&amp;nbsp; This would allow you to use that same PrivateKey keystore on all three NiFi nodes.&amp;nbsp; This has downsides liek security. If keystore on one node gets compromised, all hosts are compromised because it is reused.&amp;nbsp; All nodes will present as same client identity (since all present same DN) during authorization. So nothing will distinguish&amp;nbsp;one node from the other.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;The keystore used by NiFi can ONLY contain one privateKey entry.&amp;nbsp; Merging multiple keystores with privateKey entries will result in one keystore with more than one PrivateKeyEntry which is not supported by NiFi.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "&lt;SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Accept as Solution&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;" on one or more of them that helped.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you,&lt;BR /&gt;Matt&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 16:01:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Secure-3-node-cluster-with-signed-Certificate/m-p/377315#M243221</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2023-10-06T16:01:49Z</dc:date>
    </item>
  </channel>
</rss>

