In this topic, we replace clear text passwords in the sts.properties file with protected values.

Note: To protect passwords, OpenEdge encoding protects sensitive values using encryption-based encoding. An encoded value contains an encryption-based encoding prefix that identifies the method OpenEdge uses to securely process the value at runtime. Although the underlying protection uses cryptography, OpenEdge refers to the resulting platform representation and operation as encoding.

Use genpassword to protect sts.server.keyfilepassword

To remove the clear text password found in oeauthserver\webapps\ROOT\WEB-INF\config\sts.properties:

  1. Open oeauthserver\webapps\ROOT\WEB-INF\config\sts.properties and verify the property has the following value:
    sts.server.keyfilepassword=password
  2. From Proenv, generate an encoded value for password:
    proenv>genpassword -prefix ae2h4 -password password				

    The command returns a value in the form prefix::encoded-value.

    The output is:
    ae2h4::56a5f53c1873637c4d5bb6561ff00f79fb37805d5ddf0d6b955c22af9018e3b5626d4449b815cda322d99a81eb910793

    For more information, see Encoding prefix.

  3. Replace the clear text value in sts.properties with the generated value. For example:
    sts.server.keyfilepassword=ae2h4::56a5f53c1873637c4d5bb6561ff00f79fb37805d5ddf0d6b955c22af9018e3b5626d4449b815cda322d99a81eb910793
  4. Stop, clean, and restart the Authentication Gateway server:
    proenv>cd C:\OpenEdge\WRK\oeauthserver\bin
    proenv>tcman pasoestart -restart
  5. On your database machine, verify you can still log into the database using the local operating system credentials of the Authentication Gateway server, for example:
    proenv>cd %WRKDIR%\db
    proenv>mpro sports2020 -U adminOScredentials@local -P adminOSpassword

Create an encoded password for LDAP configuration

If LDAP is the third-party authentication source, use stspwdutil to generate the value for the sts.ldap.context.password. LDAP is not configured in this tutorial, but these steps show how to protect LDAP property value.

  1. In sts.properties, verify that the property has the following value:
    sts.ldap.context.password=secret
  2. In Proenv, generate an encoded value:
    proenv>stspwdutil encrypt secret oeph0::C7580909560800DBCBD60808A618A1B6

    The oeph0 prefix identifies the encryption-based encoding method that OpenEdge uses to process the value.

  3. Optional: Specify a key pad ID from 0 through 9. If you omit the ID, the default is 0. The following example uses key pad Id 5:
    proenv>stspwdutil encrypt secret 5 oeph5::8ADD701874613EE778988A41E6EB26DE
  4. Replace the clear text LDAP context password with one of the generated values.
    sts.ldap.context.password=oeph5::8ADD701874613EE778988A41E6EB26DE

Summary

In this topic, we replaced all clear text passwords. At runtime, OpenEdge recognizes each encoding prefix and uses the corresponding encryption-based encoding method to process the protected password.