DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Related

  • When Drones Go Dark
  • GDPR Compliance With .NET: Securing Data the Right Way
  • Data Privacy and Governance in Real-Time Data Streaming
  • USA PATRIOT Act vs SecNumCloud: Which Model for the Future?

Trending

  • Build a Simple REST API Using Python Flask and SQLite (With Tests)
  • Efficient API Communication With Spring WebClient
  • Introducing Graph Concepts in Java With Eclipse JNoSQL
  • How To Introduce a New API Quickly Using Quarkus and ChatGPT
  1. DZone
  2. Data Engineering
  3. Data
  4. Secure Sensitive Data With Mule Credentials Vault

Secure Sensitive Data With Mule Credentials Vault

In this post, we'll go over securing sensitive data using the Mule Credentials Vault, from setup to actually using it to protect your data.

By 
Jitendra Bafna user avatar
Jitendra Bafna
DZone Core CORE ·
Updated May. 10, 17 · Tutorial
Likes (8)
Comment
Save
Tweet
Share
19.0K Views

Join the DZone community and get the full member experience.

Join For Free

Mule Credentials Vault is used to encrypt the data in a .properties file. Data is stored in the properties file as a name-value pair. It can store various information like usernames, passwords, and security tokens. This data is very sensitive and required by the application at runtime. So you need to store the data in a properties file as encrypted data to restrict it from unauthorized access and to protect the data. To do this, use the three ingredients below:

  • Mule Credentials Vault.

  • Global Secure Property Placeholder element.

  • A key to unlock the vault.

In the context of Anypoint Enterprise Security, the property file which stores the encrypted property is know as a Mule Credentials Vault.

Placeholders, Keys, and Vaults

In Mule, you can set up several variations of the Placeholder-Vault-Key relationship.

One-to-One-to-One Relationship

A one-to-one-to-one relationship is simple. This relationship uses one key that decrypts the properties in one property file.

Image title

One-to-One-to-Many Relationship

 This relationship uses one key to decrypt the properties in multiple property files.

Image title

Many-to-Many-to-Many Relationship

 This relationship uses one key to decrypt the properties in only one property file.

Image title

Now, we will walk through how to create a mule credentials vault.

Encrypt Properties

First, make sure that Anypoint Enterprise Security is installed in your Anypoint Studio.

Go to src/main/resources folder in your Mule application and right click it. Select New > File.

Image title


In New file wizard, enter the filename security-test.properties. You can enter the filename of your choice but make sure the file extension is .properties and click Finish.

Image title

Close the .properties file by clicking on the ex.

Image title

In Package Explorer, right-click on the .properties file and select Open With > Mule Properties Editor.

Image titleClick on the green add button to open the 'Add a new property' dialog.

Image title

Add Key-Value as per your requirements.

Image title

If you do not want to encrypt the data, simply click ok to add a new property to the properties file. However, if you want to encrypt the data click on Encrypt button. This will open a new dialog in which you need to provide Key and select Algorithm that can be used to encrypt the data.

This Key is very important. The key that you enter to encrypt the properties file is the same key that the administrator enters at runtime. Be sure to keep this key secure and pass it to the administrator(s) who deploys and runs your Mule application.

Image title

Click OK to complete the encryption.

In the Add a new property dialog, Studio displays the encrypted value in the Value field (see below). Click OK to save the property. 

Image title

Repeat all the above steps to add more properties in the property file.

Set Global Secure Property Placeholder

Under Global Mule Configuration, create Secure Property Placeholder.

Image title

Configure the field values of the global element.

Image title

Field

Value

Name

It is a unique name for your global secure placeholder.

Encryption Algorithm

The type of algorithm you used to encrypt the content of the Credentials Vault.

Encryption Mode

The procedure that allows Mule to repeatedly use a block cipher with a single key.

Location

It is the name of the property file that the key unlocks.

Key

The word or phrase to unlock the Credentials Vault according to the system property you define in this field. For example, ${production.myproperty} instructs Mule to demand the key at runtime.


Now, you know how to secure your sensitive data with Mule Credentials Vault.

Here is the video tutorial.



Data (computing) security Property (programming)

Published at DZone with permission of Jitendra Bafna, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • When Drones Go Dark
  • GDPR Compliance With .NET: Securing Data the Right Way
  • Data Privacy and Governance in Real-Time Data Streaming
  • USA PATRIOT Act vs SecNumCloud: Which Model for the Future?

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!