Hi Matt,
Thanks for taking a look.  I pulled up various custom mongoDB processor code. I 
also pulled up NiFi locally with one of these processors. Our custom mongoDB 
processors do point to the NiFi-provided MongoDBControllerService for providing 
the mongo-uri, the username, and the password. Our mongoDB instances do use a 
password.  The mongo-uri itself is not sensitive for the parameter context we 
use and neither is the username, but the password we list in the controller 
service is marked sensitive in the parameter context, which is valid to do.  I 
recommend making the password for your parameter context that the 
MongoDBControllerService uses to be sensitive, and for having a NiFi-provided 
mongoDB processor use a MongoDBControllerService configured that way to make 
sure you can reproduce.  Please let me know if you still feel you cannot 
produce.

Our code for these MongoDB custom processors is open-source. If you get 
curious, the code is here: 
https://github.com/everwatchsolutions/aces-nifi-processors-bundle

Does this only happen with your own Mongo processors? --> Our flow uses a large 
percentage of our own MongoDB processors due to needs.  I do feel the issue was 
happening on both types of processors.  Going back to be able to verify the 
situation for sure will be a bit too difficult to do. As we are using the same 
MongoDBControllerService that is standard, I feel that this theoretically 
should be able to happen on NiFi-provided mongoDB processors as well, but I 
could be mistaken. However, I recommend you make the password sensitive in your 
parameter context for when you are configuring your MongoDBControllerService to 
make sure you can either reproduce or not.

Is the Mongo URI property sensitive in your component(s)? --> No, the mongo-uri 
itself is not sensitive in our parameter context.  However, as mentioned above, 
the password is marked sensitive (for the parameter context) in the same 
MongoDBControllerService that also has the mongo-uri, but the username is not 
marked sensitive.  

Regards,
-- 
Jeremy H. Taylor


Software Developer

ACES Incorporated, an EverWatch Company

http://acesinc.net <http://acesinc.net/>
http://everwatchsolutions.com <http://everwatchsolutions.com/>

On 1/26/22, 12:51 PM, "Matt Burgess" <mattyb...@apache.org> wrote:

    Jeremy,

    I can't reproduce this on the latest main branch (closest to 1.15.3).
    What's weird about that error message is that it says 'mongo-uri' is a
    sensitive property, but it is not.  I set up a Parameter Context (PC)
    with a non-sensitive parameter "muri", set the PC on the root Process
    Group (where the Controller Service (CS) is defined), I didn't get any
    errors about sensitivity. Then I restarted NiFi and everything worked
    as expected.

    Just to see what happens I tried it the other way, with "muri" being
    sensitive. I then got the expected error in the UI that the
    sensitivity of the property doesn't match the sensitivity of the
    parameter. I then stopped NiFi, edited the flow.json, and restarted.
    Instead of crashing, the CS was marked invalid with the aforementioned
    message about mismatched sensitivity.

    Does this only happen with your own Mongo processors? Is the Mongo URI
    property sensitive in your component(s)?

    Regards,
    Matt
    CAUTION: This email originated from outside of EverWatch. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe.


Reply via email to