[ 
https://issues.apache.org/jira/browse/NIFI-14626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James Coulson updated NIFI-14626:
---------------------------------
    Description: 
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}
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

  was:
When configuring the MongoDBControllerService, trying to validate or enable the 
service results in a connection test failure with the error "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}
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


> MongoDBControllerService does not pull credtentials 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
>            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}
> 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



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to