You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "kevdoran (via GitHub)" <gi...@apache.org> on 2026/03/12 16:13:14 UTC
[PR] NIFI-15710 Always allow node identities to read connectors [nifi]
kevdoran opened a new pull request, #10998:
URL: https://github.com/apache/nifi/pull/10998
<!-- Licensed to the Apache Software Foundation (ASF) under one or more -->
<!-- contributor license agreements. See the NOTICE file distributed with -->
<!-- this work for additional information regarding copyright ownership. -->
<!-- The ASF licenses this file to You under the Apache License, Version 2.0 -->
<!-- (the "License"); you may not use this file except in compliance with -->
<!-- the License. You may obtain a copy of the License at -->
<!-- http://www.apache.org/licenses/LICENSE-2.0 -->
<!-- Unless required by applicable law or agreed to in writing, software -->
<!-- distributed under the License is distributed on an "AS IS" BASIS, -->
<!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -->
<!-- See the License for the specific language governing permissions and -->
<!-- limitations under the License. -->
# Summary
[NIFI-15710](https://issues.apache.org/jira/browse/NIFI-15710)
# Tracking
Please complete the following tracking steps prior to pull request creation.
### Issue Tracking
- [x] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue created
### Pull Request Tracking
- [x] Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-00000`
- [x] Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-00000`
- [ x Pull request contains [commits signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) with a registered key indicating `Verified` status
### Pull Request Formatting
- [ ] Pull Request based on current revision of the `main` branch
- [ ] Pull Request refers to a feature branch with one commit containing changes
# Verification
Please indicate the verification steps performed prior to pull request creation.
### Build
- [x] Build completed using `./mvnw clean install -P contrib-check`
- [x] JDK 21
- [ ] JDK 25
### Licensing
- [ ] New dependencies are compatible with the [Apache License 2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License Policy](https://www.apache.org/legal/resolved.html)
- [ ] New dependencies are documented in applicable `LICENSE` and `NOTICE` files
### Documentation
- [ ] Documentation formatting appears as expected in rendered files
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-15710 Always allow node identities to read connectors [nifi]
Posted by "mcgilman (via GitHub)" <gi...@apache.org>.
mcgilman commented on PR #10998:
URL: https://github.com/apache/nifi/pull/10998#issuecomment-4048213770
Will review...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-15710 Always allow node identities to read connectors [nifi]
Posted by "mcgilman (via GitHub)" <gi...@apache.org>.
mcgilman commented on code in PR #10998:
URL: https://github.com/apache/nifi/pull/10998#discussion_r2926280650
##########
nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ConnectorResource.java:
##########
@@ -327,6 +327,26 @@ private String normalizeUuid(final String clientSpecifiedId) {
}
}
+ private void authorizeReadConnector(final String connectorId) {
+ if (connectorId == null) {
+ throw new IllegalArgumentException("Connector ID must be specified");
+ }
+
+ // In order for a node to complete applying updates to a connector, it needs to be able to READ any connector from every other node in the cluster, and connectors can have specific policies
+ // which would require users adding the node identities to all of these policies, so this identifies if the incoming request is made directly by a known node identity and allows
+ // it to bypass standard authorization, meaning a node is automatically granted READ to any connector
+ final NiFiUser currentUser = NiFiUserUtils.getNiFiUser();
+ if (isRequestFromClusterNode()) {
+ logger.debug("Authorizing READ on Connector[{}] to cluster node [{}]", connectorId, currentUser.getIdentity());
+ return;
+ }
Review Comment:
I've verified this fix does allow the API call to proceed however, the response object isn't fully populated because permissions are evaluated again when the Entity/DTO is created and this new check is missing there.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-15710 Always allow node identities to read connectors [nifi]
Posted by "mcgilman (via GitHub)" <gi...@apache.org>.
mcgilman merged PR #10998:
URL: https://github.com/apache/nifi/pull/10998
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-15710 Always allow node identities to read connectors [nifi]
Posted by "kevdoran (via GitHub)" <gi...@apache.org>.
kevdoran commented on code in PR #10998:
URL: https://github.com/apache/nifi/pull/10998#discussion_r2943099318
##########
nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ConnectorResource.java:
##########
@@ -327,6 +327,26 @@ private String normalizeUuid(final String clientSpecifiedId) {
}
}
+ private void authorizeReadConnector(final String connectorId) {
+ if (connectorId == null) {
+ throw new IllegalArgumentException("Connector ID must be specified");
+ }
+
+ // In order for a node to complete applying updates to a connector, it needs to be able to READ any connector from every other node in the cluster, and connectors can have specific policies
+ // which would require users adding the node identities to all of these policies, so this identifies if the incoming request is made directly by a known node identity and allows
+ // it to bypass standard authorization, meaning a node is automatically granted READ to any connector
+ final NiFiUser currentUser = NiFiUserUtils.getNiFiUser();
+ if (isRequestFromClusterNode()) {
+ logger.debug("Authorizing READ on Connector[{}] to cluster node [{}]", connectorId, currentUser.getIdentity());
+ return;
+ }
Review Comment:
Thanks @mcgilman - I have updated this PR as we discussed to both solve the Entity/DTO creation issue in the service facade layer as well as make the logic for determining when requests come from node identities more reliable by using trusted http headers rather than mtls client cert identity matching against node identities.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org