<?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 Securing NiFi 1.3.0 in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Securing-NiFi-1-3-0/m-p/198921#M68421</link>
    <description>&lt;P&gt;Hi, im trying to secure my nifi installation with ssl certificates. Initially i used the tls toolkit for testing purposes, things were working fine. However, when i switched to the CA SSL certs provided my infra team, im having issues. &lt;/P&gt;&lt;P&gt;Some of the issues i observed&lt;/P&gt;&lt;P&gt;1. Chrome doesnt prompt to choose certificate that i have installed (CA cert). If i use the SSL cert generated by tls toolkit, it prompts just fine.&lt;/P&gt;&lt;P&gt;2. I see some differences in EKU and KU sections of both the certs, see attached screenshot.&lt;/P&gt;&lt;P&gt;3. Certificate length is 2 for the one i generated via tls toolkit, but length is 1 for the CA one.&lt;/P&gt;&lt;P&gt;I have tried everything, and not able to fix this issue.&lt;/P&gt;&lt;P&gt;Hope someone can point me to the right direction.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="40452-dv.png" style="width: 377px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17729i9FD5D8531364309F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="40452-dv.png" alt="40452-dv.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="40451-it.png" style="width: 443px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17730i212675344C92B685/image-size/medium?v=v2&amp;amp;px=400" role="button" title="40451-it.png" alt="40451-it.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 18 Aug 2019 06:04:36 GMT</pubDate>
    <dc:creator>encikcuci</dc:creator>
    <dc:date>2019-08-18T06:04:36Z</dc:date>
    <item>
      <title>Securing NiFi 1.3.0</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Securing-NiFi-1-3-0/m-p/198921#M68421</link>
      <description>&lt;P&gt;Hi, im trying to secure my nifi installation with ssl certificates. Initially i used the tls toolkit for testing purposes, things were working fine. However, when i switched to the CA SSL certs provided my infra team, im having issues. &lt;/P&gt;&lt;P&gt;Some of the issues i observed&lt;/P&gt;&lt;P&gt;1. Chrome doesnt prompt to choose certificate that i have installed (CA cert). If i use the SSL cert generated by tls toolkit, it prompts just fine.&lt;/P&gt;&lt;P&gt;2. I see some differences in EKU and KU sections of both the certs, see attached screenshot.&lt;/P&gt;&lt;P&gt;3. Certificate length is 2 for the one i generated via tls toolkit, but length is 1 for the CA one.&lt;/P&gt;&lt;P&gt;I have tried everything, and not able to fix this issue.&lt;/P&gt;&lt;P&gt;Hope someone can point me to the right direction.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="40452-dv.png" style="width: 377px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17729i9FD5D8531364309F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="40452-dv.png" alt="40452-dv.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="40451-it.png" style="width: 443px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17730i212675344C92B685/image-size/medium?v=v2&amp;amp;px=400" role="button" title="40451-it.png" alt="40451-it.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 06:04:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Securing-NiFi-1-3-0/m-p/198921#M68421</guid>
      <dc:creator>encikcuci</dc:creator>
      <dc:date>2019-08-18T06:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Securing NiFi 1.3.0</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Securing-NiFi-1-3-0/m-p/198922#M68422</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/45212/encikcuci.html" nodeid="45212"&gt;@James V&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The "Keystore" you are using that you are using that was derived form your CA should contain  only a single "PrivateKeyEntry".   That "PrivateKeyEntry" should have a EKU that authorizes it use for both clientAuth and ServerAuth.  (Based on above, EKU looks correct.)  The Issuer listed of that PrivateKeyEntry should be the DN for your CA.  If the Issuer is the same as the owner, it is a self signed cert.  This typically means you did not install the response you got back from your CA.  You should have provided your CA with a csr (certificate signing request) which you then received a response for.&lt;/P&gt;&lt;P&gt;The "truststore" should not contain any PrivateKeyEntries.  It should contain 1 to many "TrustedCertEntries".  There should be a trustedCertEntry for every CA that signs any certificates being used anywhere to communicate with this NiFi.  TrustedCertEntries are nothing more teh public keys.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2017 00:00:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Securing-NiFi-1-3-0/m-p/198922#M68422</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2017-09-22T00:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: Securing NiFi 1.3.0</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Securing-NiFi-1-3-0/m-p/198923#M68423</link>
      <description>&lt;P&gt;Hi Matt,&lt;/P&gt;&lt;P&gt;Thanks for taking the time to answer. I checked the keystore and trustedstore based on what you provided. I can see exactly what you suggest, 1 privatekeyentry in keystore and 1 trustedcertentries in trustedstore.&lt;/P&gt;&lt;P&gt;I have also turned on the debugging and this is what i see in nifi-bootstrap.log&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="40504-ks.png" style="width: 286px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17726iE4D5C43A81038749/image-size/medium?v=v2&amp;amp;px=400" role="button" title="40504-ks.png" alt="40504-ks.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="40505-ts.png" style="width: 259px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17727i11EA6A833A34ED4D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="40505-ts.png" alt="40505-ts.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;nifi-bootstrap.log&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="40507-chain.png" style="width: 1537px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17728i73568E5890A71535/image-size/medium?v=v2&amp;amp;px=400" role="button" title="40507-chain.png" alt="40507-chain.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Appreciate your help on this matter. Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 06:04:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Securing-NiFi-1-3-0/m-p/198923#M68423</guid>
      <dc:creator>encikcuci</dc:creator>
      <dc:date>2019-08-18T06:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: Securing NiFi 1.3.0</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Securing-NiFi-1-3-0/m-p/198924#M68424</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/45212/encikcuci.html" nodeid="45212"&gt;@James V&lt;/A&gt;&lt;P&gt;Can you post teh entire verbose output of both your Keystore and Truststore?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 18:36:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Securing-NiFi-1-3-0/m-p/198924#M68424</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2017-09-25T18:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Securing NiFi 1.3.0</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Securing-NiFi-1-3-0/m-p/198925#M68425</link>
      <description>&lt;P&gt;Hi
James,&lt;/P&gt;&lt;P&gt;
I
recently configured our NiFi 1.3 installation using certificates from
our internal CA and found I had to do a little bit of certificate and
keystore manipulation to get things working.  I too had things
working nicely using the nifi-toolkit and then found myself
scratching my head and doing a lot of SSL handshake debugging
wondering what had changed with my configuration.  The NiFi
toolkit is so great it’s hard to believe how much it actually does
for you using a single line of code …client AND server certificate
creation, strong passwords on all of your stores, keystore and
truststore creation with the appropriate private, public, and trusted
cert entries ….pretty impressive stuff!&lt;/P&gt;&lt;P&gt;
Anyway
here’s some to the configuration I had to do to get my internal
certificates playing nicely with NiFi. Firstly, I had our pki team
issue two certificates for us which were conveniently issued in two
formats .p12 and .cer&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;
1. Client
cert&lt;/STRONG&gt; (myClientCert.pem.p12 and myClientCert.pem.cer). This
certificate only requires a EKU of clientAuth. This certificate is
imported into your browser.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;
2. Server
cert&lt;/STRONG&gt; (myServerCert.pem.p12 and myServerCert.pem.cer). This
certificate requires an EKU of both clentAuth and serverAuth. These
are used on the server and not in your browser.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;
Client
cert&lt;/STRONG&gt; – This certificate needs to have a DN with credentials exactly
matching those you have configured in your authorizers.xml file
“Initial Admin Identity” property.  Exactly matching means
spaces, punctuation etc. need to match in your cert and your
authroizers.xml file.  This is the certificate you need to
upload to your browser so you can log into the UI and configure
access for other users (i.e. if in windows double click on the .p12
certificate and import it with the appropriate password). Your client
configuration should be good to go.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;
Server
cert&lt;/STRONG&gt; – Matt’s configuration details above are spot on.  As
he mentions your server certificates KU and EKU look good (…which
was more than I can say about ours!).  One thing I did
find in our CA issued certificates is that they did not contain the
complete certificate chain for our environment so I needed to add
this information in to get things working smoothly.  To do this
in windows complete the following:&lt;/P&gt;&lt;OL&gt;
	
&lt;LI&gt;
	Import
	the certificate into the windows certificate manager by double
	clicking on the .p12 file and follow the import wizard.&lt;/LI&gt;&lt;LI&gt;
	Tick
	the "Mark this key as exportable. This will allow you to back
	up or transport your keys at a later time" check box.&lt;/LI&gt;&lt;LI&gt;
	Follow
	the remaining wizard prompts to import the certificate.&lt;/LI&gt;&lt;LI&gt;
	Open
	a Windows command prompt and run "certmgr.msc" (Capi).&lt;/LI&gt;&lt;LI&gt;
	Browse
	to "Personal" and select the certificate that was imported
	in step 1.  Right click the certificate and choose "All
	Tasks" -&amp;gt; "Export".&lt;/LI&gt;&lt;LI&gt;
	Select
	"Yes, export the private key" radio button when prompted.&lt;/LI&gt;&lt;LI&gt;
	Select
	"Include all certificates in the certification path if
	possible" and "Export all extended properties" check
	boxes.&lt;/LI&gt;&lt;LI&gt;
	Follow
	the remaining wizard prompts to export the certificate which now
	includes the entire certificate chain.&lt;/LI&gt;&lt;LI&gt;
	Upload
	the exported certificate with the complete certificate chain to the
	server environment that is being configured.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;
&lt;EM&gt;Keystore
creation&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;
The
keystore exported from Capi will not be in jks format so you need to
convert it into a format that NiFi can use &lt;/P&gt;&lt;PRE&gt;keytool -importkeystore -srckeystore &amp;lt;certificateLocation&amp;gt; -destkeystore &amp;lt;destinationKeystore&amp;gt; -srcstoretype pkcs12&lt;/PRE&gt;&lt;P&gt;
You
now have a jks keystore with a single private key entry (with a chain
length of three) containing the complete certificate chain.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;
Truststore
creation&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;
You
need to add your root and intermediate certificate as trusted entries
in your truststore.  To extract the root and intermediate
certificates once again use certmgr.msc and browse the directories for
your root and intermediate ca entries.  Export both of these
certificates and upload them to your server.&lt;/P&gt;&lt;P&gt;
We
can now create a truststore file using the JDK's Keytool utility.&lt;/P&gt;&lt;PRE&gt;keytool -importcert -v -trustcacerts –alias &amp;lt;certificateAliasName&amp;gt; -file &amp;lt;locationToCertificate&amp;gt; -keystore &amp;lt;TrustStoreName&amp;gt; –storepass &amp;lt;TrustStorePassword&amp;gt; –noprompt&lt;/PRE&gt;&lt;P&gt;
Repeat
this process for both the root and intermediate certificates.&lt;/P&gt;&lt;P&gt;
Be
careful with the passwords that you use for importing and exporting
the certificates as it is easy to change them and lose track of what
the final password of your keystore and trustsores are. Be sure to do
a verbose list of both the keystore and truststore so you know they
are correct and match the entries defined in your nifi.properties
file.&lt;/P&gt;&lt;P&gt;That’s
pretty much it …if you’ve done everything correctly you should be
prompted for you admin user cert by your browser when you hit the
NiFi url and be greeted by the NiFi user interface. Good
luck.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 20:50:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Securing-NiFi-1-3-0/m-p/198925#M68425</guid>
      <dc:creator>dwanehall</dc:creator>
      <dc:date>2017-09-25T20:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: Securing NiFi 1.3.0</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Securing-NiFi-1-3-0/m-p/198926#M68426</link>
      <description>&lt;P&gt;@D H&lt;/P&gt;&lt;P&gt;Thank you very much for your help. It works now! Followed all your steps. &lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2017 15:23:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Securing-NiFi-1-3-0/m-p/198926#M68426</guid>
      <dc:creator>encikcuci</dc:creator>
      <dc:date>2017-09-27T15:23:45Z</dc:date>
    </item>
    <item>
      <title>Re: Securing NiFi 1.3.0</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Securing-NiFi-1-3-0/m-p/198927#M68427</link>
      <description>&lt;P&gt;Glad to hear it :). Enjoy your secure NiFi instance.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2017 19:53:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Securing-NiFi-1-3-0/m-p/198927#M68427</guid>
      <dc:creator>dwanehall</dc:creator>
      <dc:date>2017-09-27T19:53:12Z</dc:date>
    </item>
  </channel>
</rss>

