gresockj commented on pull request #5391:
URL: https://github.com/apache/nifi/pull/5391#issuecomment-931597824


   > > Thoughts on this approach?
   > 
   > @markap14 Thanks for describing some options for implementation, 
particularly in relation to the AWS Secrets Manager web user interface. PR 
#5410 for NIFI-9221 provides similar capabilities for NiFi Sensitive 
Properties. Using a plain string is easier to handle in code since it avoids 
the need for JSON parsing, but it also looks like the AWS Secrets Manager UI 
encourages using a JSON object as the default representation for generic secret 
values.
   > 
   > Going with the JSON object approach provides the ability to store multiple 
keys and values in a single Secret as you described, which could be useful. On 
the other hand, requiring a JSON obejct representation would break use cases 
where the Secret is a simple string. Without getting too complicated, a 
potential hybrid approach might be to attempt JSON parsing, and otherwise 
return the plain string, at least in the case of the NiFi Sensitive Property 
Provider for NIFI-9221.
   > 
   > Either way, it would be helpful to have a consistent approach, even though 
these are different use cases.
   
   An additional benefit of the JSON approach is that it would store fewer 
secrets (less cost).  In the case of the AWS Secrets Manager Sensitive Property 
Provider, in order to stay consistent we could map the 
`ProtectedPropertyContext.contextName` to the Secret name, and 
`ProtectedPropertyContext.propertyName` to the key within the secret.
   
   As for allowing Parameter Contexts to be arbitrarily mapped to different 
Secret names, @markap14, I'm going to suggest we go for simplicity here and 
simply enforce that a Parameter Context represents exactly one Secret, and so 
its name would become the Secret name.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to