Tanmoy
Tanmoy

Reputation: 1399

How to secure liquibase properties (database password etc.) in springboot application?

While developing a springboot-liquibase application following this I need to specify the database username + password as liquibase.user and liquibase.password in the application.properties file. I am looking for a better secure way to use these parameter (dynamically fetched from some other place and use inside my java code) Is there a way to achieve this?

Upvotes: 1

Views: 2345

Answers (2)

Kyle Anderson
Kyle Anderson

Reputation: 7041

Spring Cloud Config

This project allows you to use an external, centralized configuration repository for one or more applications. You don't need to rebuild your application if a property changes. You can simply change the property in your configuration repository and even push the changes to all of your applications.

See this Getting Started Guide.

Upvotes: 1

sol4me
sol4me

Reputation: 15708

There are couple of things you can do:

  1. You can encrypt you properties file using jasypt-spring-boot. For more details have a look at demo app

  2. If you are developing distributed system, then spring-cloud-config provides server and client-side support for externalized configuration in a distributed system. With the Config Server you have a central place to manage external properties for applications across all environments

Upvotes: 1

Related Questions