<?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 NiFi Cluster on AWS EC2 With SSL Using tls-toolkit.sh for Certs in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/NiFi-Cluster-on-AWS-EC2-With-SSL-Using-tls-toolkit-sh-for/m-p/376143#M242787</link>
    <description>&lt;P&gt;I am configuring a new 3 node NiFi cluster on three AWS EC2 instances.&amp;nbsp; I'm attempting to use the tls-toolkit.sh utility to generate the SSL keystore.jks and truststore.jks for each of the 3 nodes.&amp;nbsp; It generates them and I can start the cluster but when I load the UI it seems like it's working but then I get this message.&lt;/P&gt;&lt;P&gt;An unexpected error has occurred (log out) (home)&lt;/P&gt;&lt;P&gt;javax.net.ssl.SSLPeerUnverifiedException: Hostname my.elb.name not verified: certificate: sha256/LhH2H...hkIE= DN: CN=node1.server.name, OU=NIFI subjectAltNames: [node1.server.name]&lt;/P&gt;&lt;P&gt;The nifi-app.log has basically the same to say about it.&lt;/P&gt;&lt;P&gt;WARN [Replicate Request Thread-7] o.a.n.c.c.h.r.ThreadPoolRequestReplicator Failed to replicate request GET /nifi-api/flow/current-user to my.elb.name:port due to javax.net.ssl.SSLPeerUnverifiedException: Hostname my.elb.name not verified: ... subjectAltNames: [node1.server.name]&lt;/P&gt;&lt;P&gt;I would have expected the subjectAltNames to include my.elb.name because I included it in my tls-toolkit command.&lt;/P&gt;&lt;P&gt;export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-11.0.19.0-7-4.el8.x86_64"&lt;/P&gt;&lt;P&gt;./tls-toolkit.sh standalone -n 'node1.server.name,node2.server.name,node3.server.name' --subjectAlternativeNames 'CN=my.elb.name, OU=NIFI'&lt;/P&gt;&lt;P&gt;To investigate further I performed the following commands to examine the contents of what tls-toolkit generated for me.&lt;/P&gt;&lt;P&gt;keytool -list -v -keystore keystore.jks -storepass redactedpassword1 -storetype JKS&lt;/P&gt;&lt;P&gt;keytool -list -v -keystore truststore.jks -storepass redactedpassword2 -storetype JKS&lt;/P&gt;&lt;P&gt;The output contains no reference to my.elb.name at all.&amp;nbsp; They only list node1.server.name as a SubjectAlternativeName: DNSName.&lt;/P&gt;&lt;P&gt;I'm guessing that I'm calling tls-toolkit.sh incorrectly but I'm not sure how to do it correctly.&amp;nbsp; I've been using these pages as reference but I guess I'm missing some important detail.&lt;/P&gt;&lt;P&gt;&lt;A href="https://nifi.apache.org/docs/nifi-docs/html/toolkit-guide.html#standalone" target="_blank"&gt;https://nifi.apache.org/docs/nifi-docs/html/toolkit-guide.html#standalone&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.cloudera.com/HDPDocuments/HDF3/HDF-3.3.1/nifi-knox/content/creating_certificates_for_knox.html" target="_blank"&gt;Generating Knox Certificates Using the TLS Toolkit (cloudera.com)&lt;/A&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone please help me understand what I'm doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are a few variations on the command that I tested but have also have not resulted in the expected Subject Alternative Name in the keytool -list.&lt;/P&gt;&lt;P&gt;(single dash instead of double dash)&lt;/P&gt;&lt;P&gt;./tls-toolkit.sh standalone -n 'node1.server.name,node2.server.name,node3.server.name' -subjectAlternativeNames 'CN=my.elb.name, OU=NIFI'&lt;/P&gt;&lt;P&gt;(my.elb.name without the CN and OU)&lt;/P&gt;&lt;P&gt;./tls-toolkit.sh standalone -n 'node1.server.name,node2.server.name,node3.server.name' --subjectAlternativeNames 'my.elb.name'&lt;/P&gt;&lt;P&gt;(double quotes instead of single quotes for the SAN parameter)&lt;/P&gt;&lt;P&gt;./tls-toolkit.sh standalone -n 'node1.server.name,node2.server.name,node3.server.name' --subjectAlternativeNames "CN=my.elb.name, OU=NIFI"&lt;/P&gt;</description>
    <pubDate>Fri, 08 Sep 2023 18:25:44 GMT</pubDate>
    <dc:creator>OpenText-Orion</dc:creator>
    <dc:date>2023-09-08T18:25:44Z</dc:date>
    <item>
      <title>NiFi Cluster on AWS EC2 With SSL Using tls-toolkit.sh for Certs</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-Cluster-on-AWS-EC2-With-SSL-Using-tls-toolkit-sh-for/m-p/376143#M242787</link>
      <description>&lt;P&gt;I am configuring a new 3 node NiFi cluster on three AWS EC2 instances.&amp;nbsp; I'm attempting to use the tls-toolkit.sh utility to generate the SSL keystore.jks and truststore.jks for each of the 3 nodes.&amp;nbsp; It generates them and I can start the cluster but when I load the UI it seems like it's working but then I get this message.&lt;/P&gt;&lt;P&gt;An unexpected error has occurred (log out) (home)&lt;/P&gt;&lt;P&gt;javax.net.ssl.SSLPeerUnverifiedException: Hostname my.elb.name not verified: certificate: sha256/LhH2H...hkIE= DN: CN=node1.server.name, OU=NIFI subjectAltNames: [node1.server.name]&lt;/P&gt;&lt;P&gt;The nifi-app.log has basically the same to say about it.&lt;/P&gt;&lt;P&gt;WARN [Replicate Request Thread-7] o.a.n.c.c.h.r.ThreadPoolRequestReplicator Failed to replicate request GET /nifi-api/flow/current-user to my.elb.name:port due to javax.net.ssl.SSLPeerUnverifiedException: Hostname my.elb.name not verified: ... subjectAltNames: [node1.server.name]&lt;/P&gt;&lt;P&gt;I would have expected the subjectAltNames to include my.elb.name because I included it in my tls-toolkit command.&lt;/P&gt;&lt;P&gt;export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-11.0.19.0-7-4.el8.x86_64"&lt;/P&gt;&lt;P&gt;./tls-toolkit.sh standalone -n 'node1.server.name,node2.server.name,node3.server.name' --subjectAlternativeNames 'CN=my.elb.name, OU=NIFI'&lt;/P&gt;&lt;P&gt;To investigate further I performed the following commands to examine the contents of what tls-toolkit generated for me.&lt;/P&gt;&lt;P&gt;keytool -list -v -keystore keystore.jks -storepass redactedpassword1 -storetype JKS&lt;/P&gt;&lt;P&gt;keytool -list -v -keystore truststore.jks -storepass redactedpassword2 -storetype JKS&lt;/P&gt;&lt;P&gt;The output contains no reference to my.elb.name at all.&amp;nbsp; They only list node1.server.name as a SubjectAlternativeName: DNSName.&lt;/P&gt;&lt;P&gt;I'm guessing that I'm calling tls-toolkit.sh incorrectly but I'm not sure how to do it correctly.&amp;nbsp; I've been using these pages as reference but I guess I'm missing some important detail.&lt;/P&gt;&lt;P&gt;&lt;A href="https://nifi.apache.org/docs/nifi-docs/html/toolkit-guide.html#standalone" target="_blank"&gt;https://nifi.apache.org/docs/nifi-docs/html/toolkit-guide.html#standalone&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.cloudera.com/HDPDocuments/HDF3/HDF-3.3.1/nifi-knox/content/creating_certificates_for_knox.html" target="_blank"&gt;Generating Knox Certificates Using the TLS Toolkit (cloudera.com)&lt;/A&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone please help me understand what I'm doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are a few variations on the command that I tested but have also have not resulted in the expected Subject Alternative Name in the keytool -list.&lt;/P&gt;&lt;P&gt;(single dash instead of double dash)&lt;/P&gt;&lt;P&gt;./tls-toolkit.sh standalone -n 'node1.server.name,node2.server.name,node3.server.name' -subjectAlternativeNames 'CN=my.elb.name, OU=NIFI'&lt;/P&gt;&lt;P&gt;(my.elb.name without the CN and OU)&lt;/P&gt;&lt;P&gt;./tls-toolkit.sh standalone -n 'node1.server.name,node2.server.name,node3.server.name' --subjectAlternativeNames 'my.elb.name'&lt;/P&gt;&lt;P&gt;(double quotes instead of single quotes for the SAN parameter)&lt;/P&gt;&lt;P&gt;./tls-toolkit.sh standalone -n 'node1.server.name,node2.server.name,node3.server.name' --subjectAlternativeNames "CN=my.elb.name, OU=NIFI"&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 18:25:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-Cluster-on-AWS-EC2-With-SSL-Using-tls-toolkit-sh-for/m-p/376143#M242787</guid>
      <dc:creator>OpenText-Orion</dc:creator>
      <dc:date>2023-09-08T18:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi Cluster on AWS EC2 With SSL Using tls-toolkit.sh for Certs</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-Cluster-on-AWS-EC2-With-SSL-Using-tls-toolkit-sh-for/m-p/376145#M242789</link>
      <description>&lt;P&gt;Welcome to the community&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/106876"&gt;@OpenText-Orion&lt;/a&gt;. Allow me to tag in a couple of people to see if they may be of assistance.&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/60150"&gt;@stevenmatison&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/31975"&gt;@bbahamondes&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 18:38:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-Cluster-on-AWS-EC2-With-SSL-Using-tls-toolkit-sh-for/m-p/376145#M242789</guid>
      <dc:creator>cjervis</dc:creator>
      <dc:date>2023-09-08T18:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi Cluster on AWS EC2 With SSL Using tls-toolkit.sh for Certs</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-Cluster-on-AWS-EC2-With-SSL-Using-tls-toolkit-sh-for/m-p/376147#M242791</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/106876"&gt;@OpenText-Orion&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;SubjectAlternativeNames would not be full distinquished names (DNs).&amp;nbsp;&lt;BR /&gt;SANs are used to verify the within the TLS exchange that the client is connected to correct intended target server.&amp;nbsp; This avoid things like man in the middle attacks.&lt;BR /&gt;&lt;BR /&gt;So essentially what you have are certificate you created for your 3 NiFi nodes:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;node1.server.name
node2.server.name
node3.server.name&lt;/LI-CODE&gt;&lt;P&gt;However, when you are trying to connect to a NiFi node, you are entering &lt;A href="https://community.cloudera.com/" target="_blank"&gt;https://my.elb.name:&amp;lt;port&amp;gt;/nifi&lt;/A&gt;&amp;nbsp;in your browser which is directed to a NiFi node.&amp;nbsp; Without a SAN entry present that matches the target hostname, the TLS exchange assumes the request was not intended for this target host resulting in the exception you see.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Recreate your node certificates using only Hostnames as the SAN entries instead of a full DN.&lt;BR /&gt;&lt;BR /&gt;I executed the following tls-toolkit.sh command you shared and it provided correct expected output:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;./tls-toolkit.sh standalone -n 'node1.server.name,node2.server.name,node3.server.name' --subjectAlternativeNames 'my.elb.name'&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Alias name: nifi-key
Creation date: Sep 8, 2023
Entry type: PrivateKeyEntry
Certificate chain length: 2
Certificate[1]:
Owner: CN=node1.server.name, OU=NIFI
Issuer: CN=localhost, OU=NIFI
Serial number: 18a76360ce500000000
Valid from: Fri Sep 08 19:12:48 UTC 2023 until: Thu Dec 11 19:12:48 UTC 2025
Certificate fingerprints:
         MD5:  75:70:0C:4F:41:D8:EA:9D:35:46:9E:C1:3B:9C:B0:E9
         SHA1: 5C:0C:CC:B3:C8:29:62:05:5D:5B:C5:BB:71:39:20:40:48:CE:38:A5
         SHA256: 17:79:FF:87:31:07:CB:9A:01:A5:82:03:A4:1B:3F:3D:F0:C3:79:21:C6:90:06:82:3D:FC:A1:0A:5F:64:DB:DE
Signature algorithm name: SHA256withRSA
Subject Public Key Algorithm: 2048-bit RSA key
Version: 3

Extensions:

#1: ObjectId: 2.5.29.35 Criticality=false
AuthorityKeyIdentifier [
KeyIdentifier [
0000: DA A8 38 36 C2 61 E3 CB   DF 66 72 B5 FF D6 B7 F8  ..86.a...fr.....
0010: 92 2B 50 81                                        .+P.
]
]

#2: ObjectId: 2.5.29.19 Criticality=false
BasicConstraints:[
  CA:false
  PathLen: undefined
]

#3: ObjectId: 2.5.29.37 Criticality=false
ExtendedKeyUsages [
  clientAuth
  serverAuth
]

#4: ObjectId: 2.5.29.15 Criticality=true
KeyUsage [
  DigitalSignature
  Non_repudiation
  Key_Encipherment
  Data_Encipherment
  Key_Agreement
]

#5: ObjectId: 2.5.29.17 Criticality=false
SubjectAlternativeName [
  DNSName: node1.server.name
  DNSName: my.elb.name
]

#6: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: 05 52 D3 51 9B 56 27 EB   D2 C1 62 42 A9 43 39 EF  .R.Q.V'...bB.C9.
0010: 3A 8E 0D 42                                        :..B
]
]&lt;/LI-CODE&gt;&lt;P&gt;Make sure you are looking at the PrivateKeyEntry certificate [1].&amp;nbsp; certificate[2] in the PrivateKeyEntry is the signing certificate.&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, 08 Sep 2023 19:23:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-Cluster-on-AWS-EC2-With-SSL-Using-tls-toolkit-sh-for/m-p/376147#M242791</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2023-09-08T19:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi Cluster on AWS EC2 With SSL Using tls-toolkit.sh for Certs</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-Cluster-on-AWS-EC2-With-SSL-Using-tls-toolkit-sh-for/m-p/376151#M242794</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;&amp;nbsp;for the answer and&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/10253"&gt;@cjervis&lt;/a&gt;&amp;nbsp;for the tags.&lt;/P&gt;&lt;P&gt;That did solve my issue but it took me a couple tries.&amp;nbsp; I will be marking yours as the solution but including this note for future readers in case they run into the same thing I did.&amp;nbsp; I had been copy-pasting commands in order to keep notes on my steps and at some point one of the two dashes on the --subjectAlternativeNames had been replaced by a different kind of dash character.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 21:39:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-Cluster-on-AWS-EC2-With-SSL-Using-tls-toolkit-sh-for/m-p/376151#M242794</guid>
      <dc:creator>OpenText-Orion</dc:creator>
      <dc:date>2023-09-08T21:39:42Z</dc:date>
    </item>
  </channel>
</rss>

