在Windows中配置了NIFI 1.1.1版本。
我已经启用了带有以下属性的客户端证书auth
nifi.properties
nifi.web.war.directory=./lib
nifi.web.http.host=
nifi.web.http.port=
nifi.web.https.host=hostname
nifi.web.https.port=8080
nifi.web.jetty.working.directory=./work/jetty
nifi.web.jetty.threads=200
nifi.security.keystore=./conf/ssl/server.keystore
nifi.security.keystoreType=JKS
nifi.security.keystorePasswd=server_password
nifi.security.keyPasswd=server_keypassword
nifi.security.truststore=./conf/ssl/server.truststore
nifi.security.truststoreType=JKS
nifi.security.truststorePasswd=server_password
nifi.security.needClientAuth=true
nifi.security.user.authorizer=file-provider
nifi.security.user.login.identity.provider=
nifi.security.ocsp.responder.url=
nifi.security.ocsp.responder.certificate=
授权者.xml
<authorizer>
<identifier>file-provider</identifier>
<class>org.apache.nifi.authorization.FileAuthorizer</class>
<property name="Authorizations File">./conf/authorizations.xml</property>
<property name="Users File">./conf/users.xml</property>
<property name="Initial Admin Identity"></property>
<property name="Legacy Authorized Users File">./conf/authorized-users.xml</property>
<!-- Provide the identity (typically a DN) of each node when clustered, see above description of Node Identity.
<property name="Node Identity 1"></property>
<property name="Node Identity 2"></property>
-->
</authorizer>
授权 - users.xml
<users>
<user dn="CN=Kumar">
<role name="ROLE_ADMIN"/>
<role name="ROLE_DFM"/>
</user>
</users>
遵循生成服务器和客户端SSL证书
一切都很好。NIFI服务器启动并获取logs,因为UI在以下URL中可用:
https://主机名:8080/nifi
但是,当我在Firefox和Chrome中浏览UI时,Nifi Web URL无法打开,并且显示
firefox中的Secure Connection Failed
和This site can’t be reached
在Chrome
它没有要求客户证书。
我做错了什么?我该如何实现?
帮助您将不胜感激。提前致谢。
我建议使用Apache Nifi的TLS-ToolKit来促进证书生成。它可以生成证书授权(以导入浏览器),NIFI的密钥库和信托店以及单个命令中的客户端p12文件。
您可以作为Nifi-Toolkit的一部分从NIFI下载页面获得。
NIFI(从版本1.0开始)和Nifi-Toolkit都需要Java 8运行。
如果您运行(用您的实际主机名替换您的_hostName):
bin/tls-toolkit.sh standalone -n YOUR_HOSTNAME -C 'CN=Kumar'
您应该使用包含密钥库,TrustStore,Nifi.Properties以及P12和PSSUCTION文件的您的Your_hostName目录和您的客户端证书的密码文件。
您需要将nifi-cert.pem导入到浏览器中,作为值得信赖的CA,以便知道它可以信任服务器。
然后使用.Password文件中提供的密码将客户端p12导入到浏览器中。
(编辑代码格式,添加到答案)