That is one way you could do it if it fits your use-case. Where you take in the JSON flowfile, pass it through either the EvaluateJSONPath or RouteText (if it's new line deliminated) processors then encrypt the entire flowfile's content.
The main problem is at the moment the only processor that does encryption is the EncryptContent Processor which encrypts the entire FlowFile contents and there is no concept of sensitive attributes (that I've seen). So you could either route the sensitive properties out of the original flowfile and encrypt that (mentioned above) or extract out the JSON objects you need to work with to attributes then encrypt the entire content. If your use-case only works when you can encrypt specific JSON values within a JSON text flowfile I'd suggest you file a Jira for it and we can work on it together. Joe - - - - - - Joseph Percivall linkedin.com/in/Percivall e: [email protected] On Monday, November 30, 2015 12:39 PM, "Madhire, Naveen" <[email protected]> wrote: Hey Joe, My requirement is to encrypt few sensitive customer information before processing those files and decrypting those fields is not important now. I want to see how Nifi can be useful here like encrpyting only few fields before processing. Is it possible to create a new flow file with those fields, route and encrypt that flow file? Thanks, Naveen On 11/30/15, 11:28 AM, "Joe Percivall" <[email protected]> wrote: >Hello Naveen, > >Simply encrypting only certain parts of a text file is a use-case I >hadn't thought of before. It could potentially be added as an option to >the ReplaceText processor. > >That being said, what is the end-goal of encrypting certain elements of >the flowfile content and why do you not want to encrypt the whole thing? >Are you expecting to encrypt the certain elements of the JSON contents >and un-encrypt them at a later point (in nifi or otherwise)? Keeping in >mind that would require keeping track what password was used to encrypt >every single flowfile. > >I can see the usefulness but just trying to see if that's the solution >you really want (a feature not easily if at all supported now) or if >there is a work around to meet your end-goal. > >Joe > > >- - - - - - >Joseph Percivall >linkedin.com/in/Percivall >e: [email protected] > > > > > >On Monday, November 30, 2015 11:56 AM, "Madhire, Naveen" ><[email protected]> wrote: > > > >Hi, > >My requirement is to encrypt only selected elements of the JSON flow >file. I was thinking of adding those selected elements into attributes >and encrypt those. > >Is there a way to encrypt specific/sensitive elements of the flow file >instead of the whole flow file? > > >Thanks, >Naveen >________________________________ > >The information contained in this e-mail is confidential and/or >proprietary to Capital One and/or its affiliates and may only be used >solely in performance of work or services for Capital One. The >information transmitted herewith is intended only for use by the >individual or entity to which it is addressed. If the reader of this >message is not the intended recipient, you are hereby notified that any >review, retransmission, dissemination, distribution, copying or other use >of, or taking of any action in reliance upon this information is strictly >prohibited. If you have received this communication in error, please >contact the sender and delete the material from your computer. > ________________________________________________________ The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates and may only be used solely in performance of work or services for Capital One. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.
