How to obfuscate the password for Jetty?
search cancel

How to obfuscate the password for Jetty?

book

Article ID: 267403

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine CA Automic One Automation

Issue/Introduction

How can the AWI password within the configuration.properties be encrypted/obfuscated?

Environment

Release: 21.0.X

Cause

How To.

Resolution

The https.keystore.password and https.manager.password can be encrypted with the Jetty util that can be downloaded here: https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-util/

The current version of the utility jar is 11.0.25 – download jetty-util-11.0.25.jar

Place this anywhere. This assumes that the env variable JAVA_HOME is correctly set.

 

For Windows, open a command line where this jar file is located and run the following command:

For UNIX run the command from the folder where the jar file is located:

 

This example is from Windows, the command starts with    java -cp

java -cp jetty-util-11.0.25.jar org.eclipse.jetty.util.security.Password --prompt ( please note that there are two dashes prior to the word prompt and NOT an em dash)

 

You will be prompted for a username – hit enter to leave this blank:

 

Username:

You will then be prompted for the password you want to obfuscate:

Password: Th1sPassw0rd

The following with then be output:

OBF:1pin1w8l18cg1zej1roc1v1p1v2p1rqa1zer18ce1w951pjj
MD5:2472270699C7B62aD1F5B2298e8212D6

Now add the obfuscated password in the configuration.properties file including the string OBF as follows:

https.keystore.password= OBF:1pin1w8l18cg1zej1roc1v1p1v2p1rqa1zer18ce1w951pjj
https.manager.password= OBF:1pin1w8l18cg1zej1roc1v1p1v2p1rqa1zer18ce1w951pjj