alopresto commented on a change in pull request #4231: URL: https://github.com/apache/nifi/pull/4231#discussion_r416248876
########## File path: nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/GetMongo.java ########## @@ -253,7 +278,13 @@ public void onTrigger(final ProcessContext context, final ProcessSession session }); outgoingFlowFile = session.putAllAttributes(outgoingFlowFile, attributes); - session.getProvenanceReporter().receive(outgoingFlowFile, getURI(context)); + String uriPass = ""; + if (context.getProperty(USER_NAME).getValue() != null) { + uriPass = "mongodb://" + context.getProperty(USER_NAME).getValue() + ":" + context.getProperty(PASSWORD).getValue() + "@" + getURI(context).substring(10); Review comment: Also, there is a note in the [MongoDB docs](https://docs.mongodb.com/manual/reference/connection-string/) regarding usernames and passwords that contain special characters: > If the username or password includes the at sign @, colon :, slash /, or the percent sign % character, use [percent encoding](https://tools.ietf.org/html/rfc3986#section-2.1). ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org