[
https://issues.apache.org/jira/browse/NIFI-14626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pierre Villard reassigned NIFI-14626:
-------------------------------------
Assignee: Pierre Villard
> MongoDBControllerService does not pull credentials correctly from config
> ------------------------------------------------------------------------
>
> Key: NIFI-14626
> URL: https://issues.apache.org/jira/browse/NIFI-14626
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Affects Versions: 2.4.0
> Environment: NiFi Docker Image: pulled from latest (2.4.0)
> Reporter: James Coulson
> Assignee: Pierre Villard
> Priority: Minor
> Attachments: Screenshot from 2025-06-05 10-13-36.png
>
>
> When configuring the MongoDBControllerService, trying to validate or enable
> the service results in a connection test failure with the error
> "username/password can not be null". This happens when using the connection
> string that does not contain any credentials (as the credentials are defined
> in the Database User and Password Property) eg:
> {code:java}
> mongodb://server:27017/?tls=true&authMechanism=SCRAM-SHA-256 {code}
> Adding the credentials to the connection URI but leaving them blank in the
> controller properties also triggers this error.
>
> A workaround found was to add the credentials in the MongoURI property eg:
> {code:java}
> mongodb://username:password@server:27017/?tls=true&authMechanism=SCRAM-SHA-256
> {code}
> while also specifying them in the properties of the controller.
>
> Previously worked in 2.2.0 with the credentials defined in controller
> properties and no credentials in server URI
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)