Skip to content

MINIFICPP-2644 Add proxy controller service support for AWS and Azure processors#2045

Open
lordgamez wants to merge 12 commits intoapache:mainfrom
lordgamez:MINIFICPP-2644_aws_azure
Open

MINIFICPP-2644 Add proxy controller service support for AWS and Azure processors#2045
lordgamez wants to merge 12 commits intoapache:mainfrom
lordgamez:MINIFICPP-2644_aws_azure

Conversation

@lordgamez
Copy link
Copy Markdown
Contributor

https://issues.apache.org/jira/browse/MINIFICPP-2644


Thank you for submitting a contribution to Apache NiFi - MiNiFi C++.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

For all changes:

  • Is there a JIRA ticket associated with this PR? Is it referenced
    in the commit message?

  • Does your PR title start with MINIFICPP-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

  • Has your PR been rebased against the latest commit within the target branch (typically main)?

  • Is your initial contribution a single, squashed commit?

For code changes:

  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE file?
  • If applicable, have you updated the NOTICE file?

For documentation related changes:

  • Have you ensured that format looks appropriate for the output in which it is rendered?

Note:

Please ensure that once the PR is submitted, you check GitHub Actions CI results for build issues and submit an update to your PR as soon as possible.

@lordgamez lordgamez force-pushed the MINIFICPP-2644_aws_azure branch from 93b6f3b to a1a832e Compare October 9, 2025 12:35
@lordgamez
Copy link
Copy Markdown
Contributor Author

The clang tidy errors are already fixed in #2040

@lordgamez lordgamez requested a review from Copilot October 9, 2025 12:56
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds proxy controller service support for AWS and Azure processors, allowing centralized proxy configuration management through a new ProxyConfigurationService controller service instead of requiring individual proxy properties on each processor.

  • Introduces a new ProxyConfigurationService controller service for centralized proxy configuration management
  • Updates AWS and Azure processors to support using the proxy configuration service as an alternative to individual proxy properties
  • Adds comprehensive test coverage for the new proxy configuration service functionality

Reviewed Changes

Copilot reviewed 36 out of 36 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
minifi-api/include/minifi-cpp/controllers/ProxyConfigurationServiceInterface.h Interface definition for proxy configuration service
libminifi/include/controllers/ProxyConfigurationService.h Implementation header for proxy configuration service
libminifi/src/controllers/ProxyConfigurationService.cpp Core implementation of proxy configuration service
libminifi/test/unit/ProxyConfigurationServiceTests.cpp Unit tests for proxy configuration service
extensions/azure/processors/* Azure processor base classes updated to support proxy service
extensions/azure/storage/* Azure storage clients updated to handle proxy configuration
extensions/azure/tests/* Test files updated to include proxy service test cases
extensions/aws/processors/AwsProcessor.* AWS processor updated to support proxy configuration service
extensions/aws/tests/* AWS test files updated to test both proxy service and direct properties
docker/test/integration/* Integration test support for proxy configuration service
PROCESSORS.md Documentation updated to reflect new proxy configuration service property
CONTROLLERS.md Documentation for the new ProxyConfigurationService controller

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread PROCESSORS.md
Comment thread PROCESSORS.md
Comment thread PROCESSORS.md
Comment thread PROCESSORS.md
@lordgamez
Copy link
Copy Markdown
Contributor Author

lordgamez commented Oct 13, 2025

The issues listed in the clang tidy checks are fixed in the following PR: #2040

@lordgamez lordgamez marked this pull request as ready for review October 13, 2025 07:15
@lordgamez lordgamez force-pushed the MINIFICPP-2644_aws_azure branch from a1a832e to cd31ed2 Compare October 18, 2025 12:50
Comment thread CONTROLLERS.md Outdated
Comment thread minifi-api/include/minifi-cpp/controllers/ProxyConfigurationServiceInterface.h Outdated
@lordgamez lordgamez force-pushed the MINIFICPP-2644_aws_azure branch 2 times, most recently from 12e4262 to ee61c70 Compare January 10, 2026 08:56
Comment thread extensions/aws/processors/AwsProcessor.cpp Outdated
Comment thread CONTROLLERS.md Outdated
Comment thread libminifi/include/controllers/ProxyConfigurationService.h
@lordgamez lordgamez marked this pull request as draft January 14, 2026 16:31
@lordgamez lordgamez force-pushed the MINIFICPP-2644_aws_azure branch from b361c6f to ee61c70 Compare January 14, 2026 16:32
@lordgamez lordgamez force-pushed the MINIFICPP-2644_aws_azure branch 2 times, most recently from 530067c to fa7ded8 Compare February 18, 2026 16:19
@lordgamez lordgamez marked this pull request as ready for review February 18, 2026 16:20
Comment thread extensions/aws/processors/AwsProcessor.h Outdated
std::string file_system_name;
std::string directory_name;
std::optional<uint64_t> number_of_retries;
std::optional<minifi::controllers::ProxyConfiguration> proxy_configuration;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of an optional member, it could default to type==DIRECT, which means no proxy. That would make one more impossible state unrepresentable, which is considered a best practice nowadays.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I'm convinced about this. What do you mean by "one more impossible state unrepresentable"? It seem a bit unintuitive to me. When the user adds a proxy controller service their intention is to use a proxy, if they do not want to use a proxy they should not add a service at all. What would be the benefit of adding a proxy service and configure it to not to use a proxy?

Copy link
Copy Markdown
Contributor Author

@lordgamez lordgamez Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in 8890e9f

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove the optional member now

Comment thread extensions/aws/processors/AwsProcessor.cpp Outdated
Comment thread minifi-api/include/minifi-cpp/controllers/ProxyConfigurationServiceInterface.h Outdated
Comment thread libminifi/include/controllers/ProxyConfigurationService.h Outdated
Comment thread extensions/azure/tests/DeleteAzureBlobStorageTests.cpp Outdated
@lordgamez lordgamez force-pushed the MINIFICPP-2644_aws_azure branch 2 times, most recently from f70ac21 to 99207e1 Compare March 10, 2026 16:02
@lordgamez lordgamez force-pushed the MINIFICPP-2644_aws_azure branch 2 times, most recently from fd4984e to bbefc33 Compare April 15, 2026 13:01
@lordgamez lordgamez force-pushed the MINIFICPP-2644_aws_azure branch from bbefc33 to 8890e9f Compare April 15, 2026 13:03
Comment on lines +29 to +31
std::optional<uint16_t> proxy_port;
std::optional<std::string> proxy_user;
std::optional<std::string> proxy_password;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd make proxy_port a raw uint16_t, it's always going to be set anyway, or we can use 0 as a default value if need be. Also let's move the username + password into a separate struct with not optional string fields, and have an optional here.

std::string file_system_name;
std::string directory_name;
std::optional<uint64_t> number_of_retries;
std::optional<minifi::controllers::ProxyConfiguration> proxy_configuration;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove the optional member now

plan_->setProperty(proxy_configuration_service, "Proxy Server Port", "1234");
plan_->setProperty(proxy_configuration_service, "Proxy User Name", "username");
plan_->setProperty(proxy_configuration_service, "Proxy User Password", "password");
plan_->setProperty(proxy_configuration_service, "Proxy Type", "HTTPS");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HTTPS is no longer supported, we should change it to HTTP

std::unique_ptr<Azure::Storage::Files::DataLake::DataLakeFileSystemClient> AzureDataLakeStorageClient::createClient(
const AzureStorageCredentials& credentials, const std::string& file_system_name, std::optional<uint64_t> number_of_retries) {
std::unique_ptr<Azure::Storage::Files::DataLake::DataLakeFileSystemClient> AzureDataLakeStorageClient::createClient(const AzureStorageCredentials& credentials,
const std::string& file_system_name, std::optional<uint64_t> number_of_retries, const std::optional<minifi::controllers::ProxyConfiguration>& proxy_configuration) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An optional non-owning reference can be more simply represented as a pointer

Suggested change
const std::string& file_system_name, std::optional<uint64_t> number_of_retries, const std::optional<minifi::controllers::ProxyConfiguration>& proxy_configuration) {
const std::string& file_system_name, std::optional<uint64_t> number_of_retries, minifi::controllers::ProxyConfiguration* const proxy_configuration) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants