Encrypting OAuth1 Credentials in ePagesJ | → 6.17.40 | Created: 6.17.25; Updated: 6.17.32 |
To securely store the OAuth1 credentials, the client secret can be encrypted on the database (MySQL).
Notes:
Table of Contents |
Create file $EPAGESJ_CONFIG/application-secret-key.conf and set secret.key (1234567890abcdef may vary):
cd $EPAGESJ_CONFIG 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.
Restart ePagesJ instances with the new secret key:
/etc/init.d/epagesj restart
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
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'.
After the login, issue the following command to encrypt the OAuth1 credentials:
oauth1 encrypt
ssh -p 2000 -l admin localhost Password authentication Password: Welcome to yourhostname.local + ! It is Wed Oct 21 16:40:53 CEST 2015 now % oauth1 encrypt encrypted records: 42