GitHub user dave-csc added a comment to the discussion: How to apply encryption on passwords if password is passed on Parameters and not in password fields
Hi @vkydhyani, I use this workaround in situations where an encypted/obfuscated field is needed, but can't be used in such way in Hop. I simply decrypt it in real time 😅 : 1. Store the encrypted field in a configuration file, as you would do with a normal password (insert the value, and then use the Encode value button) 2. In your pipeline, use a Get variables transform to retrieve this field (save it in a field named e.g. `pwd_encrypted`) 3. Link this to a User Defined Java Expression, and configure it as following: - New field: `pwd_decrypted` - Java expression: `org.apache.hop.core.encryption.Encr.decryptPasswordOptionallyEncrypted(pwd_encrypted)` - Value type: `String` You will get the decrypted field in the field `pwd_decrypted`, and you can use it for example in REST client as header or parameter. Just a side note: beware of the log level of your workflows/pipelines, the more detailed it is the higher is the risk that your decrypted field appears somehow in the log trace (especially if you take the next step to store the `pwd_decrypted` field in a variable). You probably don't want this... Hope this helps GitHub link: https://github.com/apache/hop/discussions/4639#discussioncomment-11414307 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
