Skip to content

This project shows how to use a custom Security Domain to encrypt your DB password without exposing it in your configuration files. You can also use the logic on yml for Oracle Db.

Notifications You must be signed in to change notification settings

brunowdev/security-domains-wildfly-swarm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Security Domains Example

This project shows how to use a custom Security Domain to encrypt your DB password without exposing it in your configuration files.

You can also use the logic on yaml for Oracle Db.

Step 1:

You can run Postgresql with docker or just use your running instance. If you choose an existing instance, check your pass and database name.

docker run -e POSTGRES_PASSWORD=yourDbPass -d -p 5432:5432 postgres

Step 2:

To encrypt an DB pass with picketbox, just run the jar file inside the jars folder passing the following paramters:

java -cp picketbox-5.0.2.Final.jar org.picketbox.datasource.security.SecureIdentityLoginModule yourDbPass

Step 3:

Update the DB password property on yaml file with your encrypted password

Step 4:

Run the example:

mvn wildfly-swarm:run

Check if is connect by accessing localhost:8080

Howdy using driver: PostgreSQL JDBC Driver

The project-defaults-exposing-password.yaml file is the same yaml file without configuring a security domain.

About

This project shows how to use a custom Security Domain to encrypt your DB password without exposing it in your configuration files. You can also use the logic on yml for Oracle Db.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages