Encrypting OAuth1 Credentials in ePagesJ 6.17.41
Created: 6.17.25; Updated: 6.17.32

To securely store the OAuth1 credentials, the client secret can be encrypted on the database (MySQL).


Table of Contents

1 Create Configuration File

Create file $EPAGESJ_CONFIG/application-secret-key.conf and set secret.key (1234567890abcdef may vary):

  cp -p application-secret-key.sample.conf application-secret-key.conf
  sed -ri 's,(secret.key)=,\1=1234567890abcdef,' application-secret-key.conf

NOTE: The secret key (e.g. 1234567890abcdef) must be exactly 16 characters long.

2 Restart ePagesJ

Restart ePagesJ instances with the new secret key:

  /etc/init.d/epagesj restart

3 Encrypt the Data

3.1 Connect to the ePagesJ console

Connect to the ePagesJ console and start the migration using the provided secret key (epagesj.host.name may vary):

  ssh -p 2000 -l admin epagesj.host.name

3.2 Login into the ePagesJ Console

Login with the password of user 'admin'. User and password can be set in section [Console] of $EPAGES_CONFIG/epagesj.conf. Find your password in epagesj.conf:

  /var/epages/ini-config.sh -f $EPAGES_CONFIG/epagesj.conf -s Console -k password -G

If no password is set then use the default password 'admin'.

3.3 Encrypt the OAuth1 Credentials

After the login, issue the following command to encrypt the OAuth1 credentials:

  oauth1 encrypt

3.4 Example Session

  ssh -p 2000 -l admin localhost
  Password authentication
  Welcome to yourhostname.local + !
  It is Wed Oct 21 16:40:53 CEST 2015 now
  % oauth1 encrypt
  encrypted records: 42

Copyright ePages GmbH 2016