mirror of https://github.com/apache/cloudstack.git
Temporarily add a blank system vm for vmware testing, explcitly check the ticket info in console access URL
This commit is contained in:
parent
0d07743858
commit
d307b86b07
|
|
@ -1276,8 +1276,13 @@ public class ConsoleProxyManagerImpl implements ConsoleProxyManager, VirtualMach
|
|||
public AgentControlAnswer onConsoleAccessAuthentication(ConsoleAccessAuthenticationCommand cmd) {
|
||||
long vmId = 0;
|
||||
|
||||
String ticket = ConsoleProxyServlet.genAccessTicket(cmd.getHost(), cmd.getPort(), cmd.getSid(), cmd.getVmId());
|
||||
String ticketInUrl = cmd.getTicket();
|
||||
if(ticketInUrl == null) {
|
||||
s_logger.error("Access ticket could not be found, you could be running an old version of console proxy. vmId: " + cmd.getVmId());
|
||||
return new ConsoleAccessAuthenticationAnswer(cmd, false);
|
||||
}
|
||||
|
||||
String ticket = ConsoleProxyServlet.genAccessTicket(cmd.getHost(), cmd.getPort(), cmd.getSid(), cmd.getVmId());
|
||||
if(!ticket.startsWith(ticketInUrl)) {
|
||||
s_logger.error("Access ticket expired or has been modified. vmId: " + cmd.getVmId());
|
||||
return new ConsoleAccessAuthenticationAnswer(cmd, false);
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ INSERT INTO `cloud`.`vm_template` (id, unique_name, name, public, created, type,
|
|||
INSERT INTO `cloud`.`vm_template` (id, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured, cross_zones, hypervisor_type)
|
||||
VALUES (7, 'centos53-x64', 'centos53-x64', 1, now(), 'builtin', 0, 64, 1, 'http://nfs1.lab.vmops.com/templates/vmware/CentOS5.3-x86_64.ova.bz2', '', 0, 'centos53-x64', 'OVA', 112, 1, 1, 'VMware');
|
||||
|
||||
INSERT INTO `cloud`.`vm_template` (id, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured, cross_zones, hypervisor_type)
|
||||
VALUES (8, 'routing_vmware', 'SystemVM Template (VMWare)', 0, now(), 'system', 0, 64, 1, 'http://nfs1.lab.vmops.com/templates/vmware/Blank.ova.bz2', '', 0, 'SystemVM Template VMWare', 'OVA', 47, 0, 1, 'VMware');
|
||||
|
||||
INSERT INTO `cloud`.`guest_os_category` (id, name) VALUES (1, 'CentOS');
|
||||
INSERT INTO `cloud`.`guest_os_category` (id, name) VALUES (2, 'Debian');
|
||||
|
|
|
|||
Loading…
Reference in New Issue