====== Ahsay Backup SSL Notes ====== See also **[[https://www.sonoracomm.com/wiki/doku.php?do=search&id=ahsay|Other Ahsay pages in this wiki]]** Ahsay OBS comes with a 'dummy' SSL certificate that works. ===== Force the Web Interface to Use SSL ===== https://help.ahsay.com/display/2/articleDirect/index.aspx?aid=2291 vim /opt/obs/webapps/obs/WEB-INF/web.xml Locate ''[Enforce SSL]'' section near the bottom. Remove the XML comment tags ("") and save. vim /opt/obs/webapps/ROOT/WEB-INF/web.xml Now add this just above the '''' closing tag: Automatic SSL Forwarding *.html /* CONFIDENTIAL Restart OBS: /etc/init.d/obsr stop /etc/init.d/obsr start ===== Install Commercial SSL Certificate ===== List keys in keystore: /opt/obs/java/bin/keytool -list -keystore /opt/obs/conf/keystore :!: Use the default password for the following: ''changeit'' Delete the existing cert: ''/opt/obs/java/bin/keytool -delete -alias tomcat -keystore /opt/obs/conf/keystore'' Generate an RSA key pair: ''/opt/obs/java/bin/keytool -genkey -alias tomcat -keyalg RSA -keysize 2048 -keystore /opt/obs/conf/keystore'' Press for the (default) keystore password (changeit) Certificate request for a commercial cert: /opt/obs/java/bin/keytool -certreq -keyalg RSA -alias tomcat -file ssl.csr -keystore /opt/obs/conf/keystore Import the intermediate certificate(s) first, then the primary cert: :!: Comodo PositiveSSL Domain Validated intermediate certs shown. :!: You don't need to import a cert if it already exists. /opt/obs/java/bin/keytool -import -alias intermediate -trustcacerts -file /path/to/SectigoRSADomainValidationSecureServerCA.crt -keystore /opt/obs/conf/keystore /opt/obs/java/bin/keytool -import -alias intermediate1 -trustcacerts -file /path/to/AAACertificateServices.crt -keystore /opt/obs/conf/keystore /opt/obs/java/bin/keytool -import -alias intermediate1 -trustcacerts -file /path/to/USERTrustRSAAAACA.crt -keystore /opt/obs/conf/keystore /opt/obs/java/bin/keytool -import -alias tomcat -trustcacerts -file /path/to/hostname.yourdomain.com.crt -keystore /opt/obs/conf/keystore Restart OBSR: service obsr stop && service obsr start Make sure SSL port 443 is listening: netstat -tapn ===== Install a Commercial Wildcard Certificate ===== FIXME Unverified These are instructions on how to import an existing wildcard certificate. - Download the keystore file from your backup server * /opt/obs/conf/keystore - Download the free KeyStore Explorer and install on your computer * Linux, Mac or Windows * Requires Sun Java * https://keystore-explorer.org - Open the downloaded keystore file in KeyStore Explorer - Delete the ''tomcat'' entry * The default password is ''changeit'' - Import the commercial key pair - **Tools -> Import Key Pair** - Choose OpenSSL, but it could be different for your cert - De-select ''Encrypted Private Key'' - Select your Private Key (probably a ''.key'' file) - Select your Certificate (probably a ''.crt'' file) - Click Import - On the next screen, change the alias to ''tomcat'' and click OK - Enter ''changeit'' (twice) as the password and click OK - Save the keystore file - Upload it back to the original location on your Ahsay backup server - Restart your Ahsay backup server