You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Implementation Details of uploading custom certificate

API - UploadCustomCertificate 

 

DataBase - table storing the certificates 'keystore'

Schema

mysql> desc keystore;
+---------------+---------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------------+---------------------+------+-----+---------+----------------+
| id | bigint(20) unsigned | NO | PRI | NULL | auto_increment |
| name | varchar(64) | NO | UNI | NULL | |
| certificate | text | NO | | NULL | |
| key | text | YES | | NULL | |
| domain_suffix | varchar(256) | NO | | NULL | |
| seq | int(11) | YES | | NULL | |
+---------------+---------------------+------+-----+---------+----------------+

SSVM

  • SSVM java keystore has the right certificate  (keytool -list -keystore /usr/local/cloud/systemvm/certs/realhostip.keystore -storepass vmops.com)
  • Apache server has the latest key and cert - /etc/ssl/private/cert_apache.key and /etc/ssl/certs/cert_apache.crt
  • /etc/apache2/sites-available/default-ssl is the file for apache server where we configure the chain location (and server cert with private key)


TroubleShooting

  1. Download urls point to the old domain.
    1. Reduce the expiration duration of the urls by changing global config extract.url.expiration.interval 
    2. And change the frequency for cleanup thread through extract.url.cleanup.interval restart MS. 
    3. Wait for the cleanup thread duration and try downloading again. See whether the url is deleted.
  2. CopyTemplate giving the exception - PKIX certification error
    1. Via browser or any client, check whether Apache Webserver for SSVM is sending the entire chain
    2. Check whether the realhostip.keystore (Java keystore) on SSVM has the root CA certificate : keytool -list -keystore realhostip.keystore -storepass vmops.com
  3. Download urls are not working. 
    1. Via browser or any client, check whether Apache Webserver for SSVM is sending the entire chain
  4. I don’t see the latest systemvm.iso being patched since the /usr/local/cloud/systemvm/config_ssl.sh  on ssvm is still the old one

  5. I changed CPVM to work on HTTPS from HTTP, or vice-versa. It does not change.
    1. You may need to destroy and recreate your CPVM when switching between HTTP and HTTPS protocols
  6. Certificate encoding - 
    1. Make sure you have correctly url encoded the certificates. To do this you can check cloud database and check the entries in keystore table and match them with the original certificates you had.
  7. Uploaded wrong certificate -
    1. In case you uploaded wrong certificates for root/intermediate, you can undo that by calling the api with same name and domainsuffix. In case you uploaded wrong server certificate upload the right one through the UI keeping the same domain suffix.
  8. Any other issues with ssvm -  
    1. Check logs - Check MS logs (/var/log/cloudstack/management ) and ssvm logs (under /var/log/cloud/) to see if you can find any exceptions in programming the certificate.
    2. Destroy ssvm - If nothing is apparent from the logs try destroying ssvm as one of the last resorts. Try this in one of the zones and see if the new ssvm which comes up solves the issues.
  9. I have already uploaded certificate and chain in a prior CCP version. Am I all good?
    1. Unfortunately, no. You will need to re-upload the whole chain using the same API parameters (name, id etc.)
  • No labels