Advertisement
Guest User

authorizers.xml

a guest
Oct 18th, 2018
350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.95 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <!--
  17. This file lists the userGroupProviders, accessPolicyProviders, and authorizers to use when running securely. In order
  18. to use a specific authorizer it must be configured here and it's identifier must be specified in the nifi.properties file.
  19. If the authorizer is a managedAuthorizer, it may need to be configured with an accessPolicyProvider and an userGroupProvider.
  20. This file allows for configuration of them, but they must be configured in order:
  21.  
  22. ...
  23. all userGroupProviders
  24. all accessPolicyProviders
  25. all Authorizers
  26. ...
  27. -->
  28. <authorizers>
  29.  
  30. <!--
  31. The FileUserGroupProvider will provide support for managing users and groups which is backed by a file
  32. on the local file system.
  33.  
  34. - Users File - The file where the FileUserGroupProvider will store users and groups.
  35.  
  36. - Legacy Authorized Users File - The full path to an existing authorized-users.xml that will be automatically
  37. be used to load the users and groups into the Users File.
  38.  
  39. - Initial User Identity [unique key] - The identity of a users and systems to seed the Users File. The name of
  40. each property must be unique, for example: "Initial User Identity A", "Initial User Identity B",
  41. "Initial User Identity C" or "Initial User Identity 1", "Initial User Identity 2", "Initial User Identity 3"
  42.  
  43. NOTE: Any identity mapping rules specified in nifi.properties will also be applied to the user identities,
  44. so the values should be the unmapped identities (i.e. full DN from a certificate).
  45. -->
  46. <userGroupProvider>
  47. <identifier>file-user-group-provider</identifier>
  48. <class>org.apache.nifi.authorization.FileUserGroupProvider</class>
  49. <property name="Users File">./conf/users.xml</property>
  50. <property name="Legacy Authorized Users File"></property>
  51.  
  52. <property name="Initial User Identity 1"></property>
  53. </userGroupProvider>
  54.  
  55. <!--
  56. The LdapUserGroupProvider will retrieve users and groups from an LDAP server. The users and groups
  57. are not configurable.
  58.  
  59. 'Authentication Strategy' - How the connection to the LDAP server is authenticated. Possible
  60. values are ANONYMOUS, SIMPLE, LDAPS, or START_TLS.
  61.  
  62. 'Manager DN' - The DN of the manager that is used to bind to the LDAP server to search for users.
  63. 'Manager Password' - The password of the manager that is used to bind to the LDAP server to
  64. search for users.
  65.  
  66. 'TLS - Keystore' - Path to the Keystore that is used when connecting to LDAP using LDAPS or START_TLS.
  67. 'TLS - Keystore Password' - Password for the Keystore that is used when connecting to LDAP
  68. using LDAPS or START_TLS.
  69. 'TLS - Keystore Type' - Type of the Keystore that is used when connecting to LDAP using
  70. LDAPS or START_TLS (i.e. JKS or PKCS12).
  71. 'TLS - Truststore' - Path to the Truststore that is used when connecting to LDAP using LDAPS or START_TLS.
  72. 'TLS - Truststore Password' - Password for the Truststore that is used when connecting to
  73. LDAP using LDAPS or START_TLS.
  74. 'TLS - Truststore Type' - Type of the Truststore that is used when connecting to LDAP using
  75. LDAPS or START_TLS (i.e. JKS or PKCS12).
  76. 'TLS - Client Auth' - Client authentication policy when connecting to LDAP using LDAPS or START_TLS.
  77. Possible values are REQUIRED, WANT, NONE.
  78. 'TLS - Protocol' - Protocol to use when connecting to LDAP using LDAPS or START_TLS. (i.e. TLS,
  79. TLSv1.1, TLSv1.2, etc).
  80. 'TLS - Shutdown Gracefully' - Specifies whether the TLS should be shut down gracefully
  81. before the target context is closed. Defaults to false.
  82.  
  83. 'Referral Strategy' - Strategy for handling referrals. Possible values are FOLLOW, IGNORE, THROW.
  84. 'Connect Timeout' - Duration of connect timeout. (i.e. 10 secs).
  85. 'Read Timeout' - Duration of read timeout. (i.e. 10 secs).
  86.  
  87. 'Url' - Space-separated list of URLs of the LDAP servers (i.e. ldap://<hostname>:<port>).
  88. 'Page Size' - Sets the page size when retrieving users and groups. If not specified, no paging is performed.
  89. 'Sync Interval' - Duration of time between syncing users and groups (i.e. 30 mins). Minimum allowable value is 10 secs.
  90.  
  91. 'User Search Base' - Base DN for searching for users (i.e. ou=users,o=nifi). Required to search users.
  92. 'User Object Class' - Object class for identifying users (i.e. person). Required if searching users.
  93. 'User Search Scope' - Search scope for searching users (ONE_LEVEL, OBJECT, or SUBTREE). Required if searching users.
  94. 'User Search Filter' - Filter for searching for users against the 'User Search Base' (i.e. (memberof=cn=team1,ou=groups,o=nifi) ). Optional.
  95. 'User Identity Attribute' - Attribute to use to extract user identity (i.e. cn). Optional. If not set, the entire DN is used.
  96. 'User Group Name Attribute' - Attribute to use to define group membership (i.e. memberof). Optional. If not set
  97. group membership will not be calculated through the users. Will rely on group membership being defined
  98. through 'Group Member Attribute' if set. The value of this property is the name of the attribute in the user ldap entry that
  99. associates them with a group. The value of that user attribute could be a dn or group name for instance. What value is expected
  100. is configured in the 'User Group Name Attribute - Referenced Group Attribute'.
  101. 'User Group Name Attribute - Referenced Group Attribute' - If blank, the value of the attribute defined in 'User Group Name Attribute'
  102. is expected to be the full dn of the group. If not blank, this property will define the attribute of the group ldap entry that
  103. the value of the attribute defined in 'User Group Name Attribute' is referencing (i.e. name). Use of this property requires that
  104. 'Group Search Base' is also configured.
  105.  
  106. 'Group Search Base' - Base DN for searching for groups (i.e. ou=groups,o=nifi). Required to search groups.
  107. 'Group Object Class' - Object class for identifying groups (i.e. groupOfNames). Required if searching groups.
  108. 'Group Search Scope' - Search scope for searching groups (ONE_LEVEL, OBJECT, or SUBTREE). Required if searching groups.
  109. 'Group Search Filter' - Filter for searching for groups against the 'Group Search Base'. Optional.
  110. 'Group Name Attribute' - Attribute to use to extract group name (i.e. cn). Optional. If not set, the entire DN is used.
  111. 'Group Member Attribute' - Attribute to use to define group membership (i.e. member). Optional. If not set
  112. group membership will not be calculated through the groups. Will rely on group membership being defined
  113. through 'User Group Name Attribute' if set. The value of this property is the name of the attribute in the group ldap entry that
  114. associates them with a user. The value of that group attribute could be a dn or memberUid for instance. What value is expected
  115. is configured in the 'Group Member Attribute - Referenced User Attribute'. (i.e. member: cn=User 1,ou=users,o=nifi vs. memberUid: user1)
  116. 'Group Member Attribute - Referenced User Attribute' - If blank, the value of the attribute defined in 'Group Member Attribute'
  117. is expected to be the full dn of the user. If not blank, this property will define the attribute of the user ldap entry that
  118. the value of the attribute defined in 'Group Member Attribute' is referencing (i.e. uid). Use of this property requires that
  119. 'User Search Base' is also configured. (i.e. member: cn=User 1,ou=users,o=nifi vs. memberUid: user1)
  120.  
  121. NOTE: Any identity mapping rules specified in nifi.properties will also be applied to the user identities.
  122. Group names are not mapped.
  123. -->
  124. <!-- To enable the ldap-user-group-provider remove 2 lines. This is 1 of 2.
  125. <userGroupProvider>
  126. <identifier>ldap-user-group-provider</identifier>
  127. <class>org.apache.nifi.ldap.tenants.LdapUserGroupProvider</class>
  128. <property name="Authentication Strategy">START_TLS</property>
  129.  
  130. <property name="Manager DN"></property>
  131. <property name="Manager Password"></property>
  132.  
  133. <property name="TLS - Keystore"></property>
  134. <property name="TLS - Keystore Password"></property>
  135. <property name="TLS - Keystore Type"></property>
  136. <property name="TLS - Truststore"></property>
  137. <property name="TLS - Truststore Password"></property>
  138. <property name="TLS - Truststore Type"></property>
  139. <property name="TLS - Client Auth"></property>
  140. <property name="TLS - Protocol"></property>
  141. <property name="TLS - Shutdown Gracefully"></property>
  142.  
  143. <property name="Referral Strategy">FOLLOW</property>
  144. <property name="Connect Timeout">10 secs</property>
  145. <property name="Read Timeout">10 secs</property>
  146.  
  147. <property name="Url"></property>
  148. <property name="Page Size"></property>
  149. <property name="Sync Interval">30 mins</property>
  150.  
  151. <property name="User Search Base"></property>
  152. <property name="User Object Class">person</property>
  153. <property name="User Search Scope">ONE_LEVEL</property>
  154. <property name="User Search Filter"></property>
  155. <property name="User Identity Attribute"></property>
  156. <property name="User Group Name Attribute"></property>
  157. <property name="User Group Name Attribute - Referenced Group Attribute"></property>
  158.  
  159. <property name="Group Search Base"></property>
  160. <property name="Group Object Class">group</property>
  161. <property name="Group Search Scope">ONE_LEVEL</property>
  162. <property name="Group Search Filter"></property>
  163. <property name="Group Name Attribute"></property>
  164. <property name="Group Member Attribute"></property>
  165. <property name="Group Member Attribute - Referenced User Attribute"></property>
  166. </userGroupProvider>
  167. To enable the ldap-user-group-provider remove 2 lines. This is 2 of 2. -->
  168.  
  169. <!--
  170. The CompositeUserGroupProvider will provide support for retrieving users and groups from multiple sources.
  171.  
  172. - User Group Provider [unique key] - The identifier of user group providers to load from. The name of
  173. each property must be unique, for example: "User Group Provider A", "User Group Provider B",
  174. "User Group Provider C" or "User Group Provider 1", "User Group Provider 2", "User Group Provider 3"
  175.  
  176. NOTE: Any identity mapping rules specified in nifi.properties are not applied in this implementation. This behavior
  177. would need to be applied by the base implementation.
  178. -->
  179. <!-- To enable the composite-user-group-provider remove 2 lines. This is 1 of 2.
  180. <userGroupProvider>
  181. <identifier>composite-user-group-provider</identifier>
  182. <class>org.apache.nifi.authorization.CompositeUserGroupProvider</class>
  183. <property name="User Group Provider 1"></property>
  184. </userGroupProvider>
  185. To enable the composite-user-group-provider remove 2 lines. This is 2 of 2. -->
  186.  
  187. <!--
  188. The CompositeConfigurableUserGroupProvider will provide support for retrieving users and groups from multiple sources.
  189. Additionally, a single configurable user group provider is required. Users from the configurable user group provider
  190. are configurable, however users loaded from one of the User Group Provider [unique key] will not be.
  191.  
  192. - Configurable User Group Provider - A configurable user group provider.
  193.  
  194. - User Group Provider [unique key] - The identifier of user group providers to load from. The name of
  195. each property must be unique, for example: "User Group Provider A", "User Group Provider B",
  196. "User Group Provider C" or "User Group Provider 1", "User Group Provider 2", "User Group Provider 3"
  197.  
  198. NOTE: Any identity mapping rules specified in nifi.properties are not applied in this implementation. This behavior
  199. would need to be applied by the base implementation.
  200. -->
  201. <!-- To enable the composite-configurable-user-group-provider remove 2 lines. This is 1 of 2.
  202. <userGroupProvider>
  203. <identifier>composite-configurable-user-group-provider</identifier>
  204. <class>org.apache.nifi.authorization.CompositeConfigurableUserGroupProvider</class>
  205. <property name="Configurable User Group Provider">file-user-group-provider</property>
  206. <property name="User Group Provider 1"></property>
  207. </userGroupProvider>
  208. To enable the composite-configurable-user-group-provider remove 2 lines. This is 2 of 2. -->
  209.  
  210. <!--
  211. The FileAccessPolicyProvider will provide support for managing access policies which is backed by a file
  212. on the local file system.
  213.  
  214. - User Group Provider - The identifier for an User Group Provider defined above that will be used to access
  215. users and groups for use in the managed access policies.
  216.  
  217. - Authorizations File - The file where the FileAccessPolicyProvider will store policies.
  218.  
  219. - Initial Admin Identity - The identity of an initial admin user that will be granted access to the UI and
  220. given the ability to create additional users, groups, and policies. The value of this property could be
  221. a DN when using certificates or LDAP, or a Kerberos principal. This property will only be used when there
  222. are no other policies defined. If this property is specified then a Legacy Authorized Users File can not be specified.
  223.  
  224. NOTE: Any identity mapping rules specified in nifi.properties will also be applied to the initial admin identity,
  225. so the value should be the unmapped identity. This identity must be found in the configured User Group Provider.
  226.  
  227. - Legacy Authorized Users File - The full path to an existing authorized-users.xml that will be automatically
  228. converted to the new authorizations model. If this property is specified then an Initial Admin Identity can
  229. not be specified, and this property will only be used when there are no other users, groups, and policies defined.
  230.  
  231. NOTE: Any users in the legacy users file must be found in the configured User Group Provider.
  232.  
  233. - Node Identity [unique key] - The identity of a NiFi cluster node. When clustered, a property for each node
  234. should be defined, so that every node knows about every other node. If not clustered these properties can be ignored.
  235. The name of each property must be unique, for example for a three node cluster:
  236. "Node Identity A", "Node Identity B", "Node Identity C" or "Node Identity 1", "Node Identity 2", "Node Identity 3"
  237.  
  238. NOTE: Any identity mapping rules specified in nifi.properties will also be applied to the node identities,
  239. so the values should be the unmapped identities (i.e. full DN from a certificate). This identity must be found
  240. in the configured User Group Provider.
  241. -->
  242. <accessPolicyProvider>
  243. <identifier>file-access-policy-provider</identifier>
  244. <class>org.apache.nifi.authorization.FileAccessPolicyProvider</class>
  245. <property name="User Group Provider">file-user-group-provider</property>
  246. <property name="Authorizations File">./conf/authorizations.xml</property>
  247. <property name="Initial Admin Identity"></property>
  248. <property name="Legacy Authorized Users File"></property>
  249.  
  250. <property name="Node Identity 1"></property>
  251. </accessPolicyProvider>
  252.  
  253. <!--
  254. The StandardManagedAuthorizer. This authorizer implementation must be configured with the
  255. Access Policy Provider which it will use to access and manage users, groups, and policies.
  256. These users, groups, and policies will be used to make all access decisions during authorization
  257. requests.
  258.  
  259. - Access Policy Provider - The identifier for an Access Policy Provider defined above.
  260. -->
  261. <authorizer>
  262. <identifier>managed-authorizer</identifier>
  263. <class>org.apache.nifi.authorization.StandardManagedAuthorizer</class>
  264. <property name="Access Policy Provider">file-access-policy-provider</property>
  265. </authorizer>
  266.  
  267. <!--
  268. NOTE: This Authorizer has been replaced with the more granular approach configured above with the Standard
  269. Managed Authorizer. However, it is still available for backwards compatibility reasons.
  270.  
  271. The FileAuthorizer is NiFi's provided authorizer and has the following properties:
  272.  
  273. - Authorizations File - The file where the FileAuthorizer will store policies.
  274.  
  275. - Users File - The file where the FileAuthorizer will store users and groups.
  276.  
  277. - Initial Admin Identity - The identity of an initial admin user that will be granted access to the UI and
  278. given the ability to create additional users, groups, and policies. The value of this property could be
  279. a DN when using certificates or LDAP, or a Kerberos principal. This property will only be used when there
  280. are no other users, groups, and policies defined. If this property is specified then a Legacy Authorized
  281. Users File can not be specified.
  282.  
  283. NOTE: Any identity mapping rules specified in nifi.properties will also be applied to the initial admin identity,
  284. so the value should be the unmapped identity.
  285.  
  286. - Legacy Authorized Users File - The full path to an existing authorized-users.xml that will be automatically
  287. converted to the new authorizations model. If this property is specified then an Initial Admin Identity can
  288. not be specified, and this property will only be used when there are no other users, groups, and policies defined.
  289.  
  290. - Node Identity [unique key] - The identity of a NiFi cluster node. When clustered, a property for each node
  291. should be defined, so that every node knows about every other node. If not clustered these properties can be ignored.
  292. The name of each property must be unique, for example for a three node cluster:
  293. "Node Identity A", "Node Identity B", "Node Identity C" or "Node Identity 1", "Node Identity 2", "Node Identity 3"
  294.  
  295. NOTE: Any identity mapping rules specified in nifi.properties will also be applied to the node identities,
  296. so the values should be the unmapped identities (i.e. full DN from a certificate).
  297. -->
  298. <!-- <authorizer>
  299. <identifier>file-provider</identifier>
  300. <class>org.apache.nifi.authorization.FileAuthorizer</class>
  301. <property name="Authorizations File">./conf/authorizations.xml</property>
  302. <property name="Users File">./conf/users.xml</property>
  303. <property name="Initial Admin Identity"></property>
  304. <property name="Legacy Authorized Users File"></property>
  305.  
  306. <property name="Node Identity 1"></property>
  307. </authorizer>
  308. -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement