尝试设置安全NIFI群集时获取不受信任的代理消息

时间:2017-07-13 11:26:03

标签: security proxy apache-nifi

我正在使用nifi V-1.3,并尝试设置3节点安全NIFI群集。

我添加了所有必需的属性,我可以看到节点在所有节点的日志中发送心跳但在屏幕上我收到所有节点的不可信代理消息。附加错误屏幕截图。

错误日志获取NiFiAuthenticationFilter 拒绝访问网络API 不受信任的代理CN =主机名

你能否告诉我们是否有人克服它。

感谢。

  Find the nifi properties below:
<authorizer>
            <identifier>file-provider</identifier>
            <class>org.apache.nifi.authorization.FileAuthorizer</class>
            <property name="AuthorizationsFile">./conf/authorizations.xml</property>
            <property name="Users File">./conf/users.xml</property>
            <property name="Initial Admin Identity">Mathes@example.com</property>
            <property name="Legacy Authorized Users File"></property>
            <property name="Node Identity 1">CN=node1@example.com, OU=NIFI</property>
            <property name="Node Identity 2">CN=CN=node2@example.com, OU=NIFI</property>
            <property name="Node Identity 3">CN=CN=node3@example.com, OU=NIFI</property>
    </authorizer>

2 个答案:

答案 0 :(得分:0)

您的代理节点值似乎可能不正确。您在DN中有一个额外的CN=

更改

<property name="Node Identity 1">CN=node1@example.com, OU=NIFI</property>
<property name="Node Identity 2">CN=CN=node2@example.com, OU=NIFI</property>
<property name="Node Identity 3">CN=CN=node3@example.com, OU=NIFI</property>

<property name="Node Identity 1">CN=node1@example.com, OU=NIFI</property>
<property name="Node Identity 2">CN=node2@example.com, OU=NIFI</property>
<property name="Node Identity 3">CN=node3@example.com, OU=NIFI</property>

如果检查完整的logs/nifi-app.loglogs/nifi-user.log堆栈跟踪输出,您应该能够在连接上看到提供的主机名,并将其与您提供的证书的实际DN进行比较。

答案 1 :(得分:0)

我遇到了同样的问题,我的解决方法是这样:

编辑nifi.properties映射,以便当您尝试使用证书连接到nifi时,它将您映射到初始管理员用户:

nifi.security.identity.mapping.pattern.dn=^CN=(.*?), OU=(.*?)
nifi.security.identity.mapping.value.dn=<Initial Admin Identity>, OU=

然后,您必须编辑authorizations.xml并添加以下行:

<policy identifier="nifi-cluster-write" resource="/proxy" action="W">
        <user identifier="HASH OF INITIAL ADMIN"/>
</policy>

显然,问题在于初始管理员身份没有“ / proxy”策略。