Secure Properties Placeholder

 

As the name suggest it’s another level of security which can be applied in MuleSoft application code base. Some application related data are confidential and should not be put as plain text in code base. to manage confidential data efficiently we have secure properties placeholder.

First create a secure properties file – add secure properties plugin

Secure Properties Placeholder

 

After encryption

Secure Properties Placeholder

 

Please choose your appropriate encryption algorithm and key

Goto Global Element -> Choose Global Type -> filter – Secure

Secure Properties Placeholder

 

If you cannot see the Secure Configuration Property option then please do following

Click search in exchange

Secure Properties Placeholder

 

Type – secure

 

Add the Mule Secure Configuration Property module and Click Finish

Go back to Global properties and search for secure properties config

 

Provide the correct key and encrypt algorithm (chosen while creating the secure properties file)

 

This will create a Secure Properties Config

 

To read secure properties in Mule flow – ${secure::database.username}

 

To read secure properties in Dataweave – p(‘secure::database.username’)

 

Dataweave expression

%dw 2.0
output application/java
 
---
log("DB username ", p('secure::database.username') as String)
++
log("DB password ", p('secure::database.password') as String)

 

Logs

Sample application – secure-properties-application

 

  
Thank you for taking out time to read the above post. Hope you found it useful. In case of any questions, feel free to comment below. Also, if you are keen on knowing about a specific topic, happy to explore your recommendations as well.
 
For any latest updates or posts on our website, you can follow us on LinkedIn. Look forward to connecting with you there.


Share this:
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments