Things you should consider while changing the Realhost domain to custom Domain.
[[Before reading the below content please refer cloudstack docs :Role of realhostip in cloudstack:https://cwiki.apache.org/confluence/display/CLOUDSTACK/Role+of+realhostip+in+CloudStack
Note:author assumes you are familar with cloudstack concepts if not please refer online documentation on cloudstack. ]]
[[Before reading the below content please refer cloudstack docs :Role of realhostip in cloudstack:https://cwiki.apache.org/confluence/display/CLOUDSTACK/Role+of+realhostip+in+CloudStack
Note:author assumes you are familar with cloudstack concepts if not please refer online documentation on cloudstack. ]]
Note:author assumes you are familar with cloudstack concepts if not please refer online documentation on cloudstack. ]]
1)
The SSL certificates are stored in the Keystore table.
So before changing realhost ip domain ,Please take back up of keystore table. So that if any problem occurs during transition to new domain, you can safely revert back immediately with your backed-up details.
2)
Due to security reasons, CloudStack won't support self Signed certificates.So uploaded certificate should be authorized by RootCA or any provider.
3)
Earlier CloudStack used to take care of realhost ip DNS resolution automatically but now end user has to take of Name resolution explicitly for their custom domain.
4)
Make sure System VMs and the corresponding agents are up and running while uploading the
certificates,If they are not up, the existing URL might still be pointing to the obsolete realhostip.com domain.
5) Depending on your requirements perform following settings:
For 4.3>= releases onwards:
- HTTP --> Set the consoleproxy.url.open = empty(i.e clear the existing entries if it exits)
- HTTPS --> Set the consoleproxy.url.open = *.yourdomain.com
Note:IN SSL certificate wizard,while entering the certificate details , The value for "DNS Domain Suffix" should be set as "yourdomain.com" and not as "*.yourdomain.com"( eg:it should be xyz.com)
- Cloudstack will encode the certificates while uploading the Server certificates from SSL certificate wizard, So manually you no need to encode the certificates again.
Note:
After changing from https to http mode , you will still see a problem i.e it will fail to display the console till you destroy the console proxy.
so destroy the system vms after changing from https to http mode so new system vms will be recreated with new settings.
For pre-4.3 releases
config parameter "consoleproxy.url.domain" should be set to "yourdomain.com", and not "*.yourdomain.com" (no asterisk) for pre-4.3 releases
Also Same holds true for secstorage.cert.domain parameter.
6)Upload certificates in the correct order. Use id=1for the first root certificate, then for the subsequent intermediate certificates use id=2, id=3, id=4, and so on.
7)
if you seen ANY java security exception like "" sun.security.provider.certpath.SunCertPathBuilderException: " after uploading certificates ,that means there is probability of missing information as mentioned below:
- Check Uploaded certificates are in right order or not.
- Check Certificates are URL encoded or no
- Check Uploaded SSL Private Key in supported format 'PKCS#8' or not.
- Check the following files in SSVM,CPVM for uploaded certificates are stored properly or not
/etc/ssl/private/cert_apache.key – Server Key File path
/etc/ssl/certs/cert_apache.crt – Server Certificate File path
/etc/ssl/certs/cert_apache_chain.crt – SSL Chain File Path
-
-- Also if you don't setup the DNS then you can resolve it temporarily by resolving as DNS (10-10-10-10.domain.com) locally like below:
- in your client's machine put the entries in the /etc/hosts file as below:
- 10.127.20.31 10-127-20-31.realhostip.com here 10.127.20.31 IP --> is your public IP of your console proxy.
How do i check whether my certificate is uploaded correctly or not:
Once you uploaded certificate,run the below command to see its updated in the system vms or not .by default its 4 entries will be found in our output with the feb3 2012 date and if your certifcate is uploaded successfully then you can see additional certificate finger print with uploaded date.
like here jun2 2014(please check highlighted text in the command output)
root@s-2-VM:/etc/ssl/certs#
keytool -list -keystore /usr/local/cloud/systemvm/certs/realhostip.keystore
Enter
keystore password:vmops.com
Keystore
type: JKS
Keystore
provider: SUN
Your
keystore contains 5 entries
root, Feb
3, 2012, trustedCertEntry,
Certificate
fingerprint (MD5): 91:DE:06:25:AB:DA:FD:32:17:0C:BB:25:17:2A:84:67
realhostip,
Feb 3, 2012, PrivateKeyEntry,
Certificate
fingerprint (MD5): 20:D6:FB:76:AB:83:55:28:F7:22:9F:58:5E:0E:E3:05
cross,
Feb 3, 2012, trustedCertEntry,
Certificate
fingerprint (MD5): 82:BD:9A:0B:82:6A:0E:3E:91:AD:3E:27:04:2B:3F:45
intermed,
Feb 3, 2012, trustedCertEntry,
Certificate
fingerprint (MD5): D5:DF:85:B7:9A:52:87:D1:8C:D5:0F:90:23:2D:B5:34
cpvmcertificate,
Jun 2, 2014, trustedCertEntry,
Certificate
fingerprint (MD5): 20:D6:FB:76:AB:83:55:28:F7:22:9F:58:5E:0E:E3:05
Note:IN SSL certificate wizard,while entering the certificate details , The value for "DNS Domain Suffix" should be set as "yourdomain.com" and not as "*.yourdomain.com"( eg:it should be xyz.com)

- Check Uploaded certificates are in right order or not.
- Check Certificates are URL encoded or no
- Check Uploaded SSL Private Key in supported format 'PKCS#8' or not.
- Check the following files in SSVM,CPVM for uploaded certificates are stored properly or not
/etc/ssl/private/cert_apache.key – Server Key File path
/etc/ssl/certs/cert_apache.crt – Server Certificate File path
/etc/ssl/certs/cert_apache_chain.crt – SSL Chain File Path
Once you uploaded certificate,run the below command to see its updated in the system vms or not .by default its 4 entries will be found in our output with the feb3 2012 date and if your certifcate is uploaded successfully then you can see additional certificate finger print with uploaded date.
like here jun2 2014(please check highlighted text in the command output)
root@s-2-VM:/etc/ssl/certs#
keytool -list -keystore /usr/local/cloud/systemvm/certs/realhostip.keystore
Enter
keystore password:vmops.com
Keystore
type: JKS
Keystore
provider: SUN
Your
keystore contains 5 entries
root, Feb
3, 2012, trustedCertEntry,
Certificate
fingerprint (MD5): 91:DE:06:25:AB:DA:FD:32:17:0C:BB:25:17:2A:84:67
realhostip,
Feb 3, 2012, PrivateKeyEntry,
Certificate
fingerprint (MD5): 20:D6:FB:76:AB:83:55:28:F7:22:9F:58:5E:0E:E3:05
cross,
Feb 3, 2012, trustedCertEntry,
Certificate
fingerprint (MD5): 82:BD:9A:0B:82:6A:0E:3E:91:AD:3E:27:04:2B:3F:45
intermed,
Feb 3, 2012, trustedCertEntry,
Certificate
fingerprint (MD5): D5:DF:85:B7:9A:52:87:D1:8C:D5:0F:90:23:2D:B5:34
cpvmcertificate,
Jun 2, 2014, trustedCertEntry,
Certificate
fingerprint (MD5): 20:D6:FB:76:AB:83:55:28:F7:22:9F:58:5E:0E:E3:05
thanks !
ReplyDelete