January 18, 2022

Blog @ Munaf Sheikh

Latest news from tech-feeds around the world.

Install and Use Mule Secured Property Editor

Great post from our friends at Source link

Securing critical properties like passwords, tokens, and keys is an important aspect of developing a MuleSoft API. Fortunately, MuleSoft supports encryption/decryption of such properties, which can be handled pretty easily by performing the steps mentioned below.

Let’s say you have a mule project named Hello-Mule with critical properties like clientSecret and passwords, and these properties are saved in a property file named dev.properties:

Now in order to encrypt this easily, follow the steps below:

  1. In Anypoint Studio, go to Help > Install New Software:
  2. Anypoint Studio Install New SoftwareEnter the URL http://security-update-site-1.4.s3.amazonaws.com/ in Work With input box.
  3. Work with input boxExpand option Premium and check Mule studio properties file editor.
  4. Mule studio properties file editorClick on Next.
  5. Again, click on Next.
  6. Check I accept the terms of the license agreement and click Finish.
  7.  License agreementA security warning pop-up will appear; click on Install Anyway. 
  8. Security warning pop-upA pop-up to trust the Security Certificate might appear. Click on Ok and the installation will start.
  9. Once installation is complete, you need the restart the Anypoint Studio for the changes to appear.

Restart the Anypoint Studio

That’s it! We are finished with the installation of Mule Studio Property Editor to encrypt and decrypt properties.

Once the Anypoint Studio is restarted, go to Project Explorer and Right Click on file dev.properties, then click on the Open With option.

Project Explorer Open With

The file will be opened through Mule Properties Editor. Now you can select each property to encrypt.

Select each property to encrypt

Click on Encrypt button. You will be asked to select an Algorithm and provide an Encryption Key. Once the details are provided, click on OK.

You can see the property has been encrypted. Now click on OK and Save the file to record the changes.

Save the file to record the changes

Great! We are now done with the encryption of a property through Mule Property Editor. In order to decrypt the encrypted property, you can perform the same steps again. 

Important points to consider:

  1. Make sure you have noted down the Encryption Key somewhere. 
  2. All the properties in a file must be encrypted with the same Algorithm and Key combination to avoid issues while configuring the Mule Secure Configuration for secured property files. You can read more about this here.

That’s it for this time. I hope this will be helpful. See you all with another interesting topic next time!

#Install #Mule #Secured #Property #Editor