I am attempting to provide users with console access to their CS4 managed VMs 
through our branded control panel. I haven't found this feature in the API 
documentation. I did find this thread:

https://mail-archives.apache.org/mod_mbox/incubator-cloudstack-users/201302.mbox/%3ccd39bd71.22b58%[email protected]%3e

in which Asmita Patil Vagyani is asking the same question. Abhinandan Prateek 
posts a little information and a link 
(http://support.citrix.com/proddocs/topic/cloudportalbusiness-14/ccpb-troubleshoot.html)
 which hints that Cloud Portal uses CloudStacks SSO (Single Sign On) Key to 
authenticate a session with the console VM.

I found the SSO key in the CloudStack database. The next step was figuring out 
what to do with it.

When I click the console button within the CloudStack portal, the console 
session comes up with a URL like this:

https://208-87-NN-196.realhostip.com/ajax?token=k3DDanC6hP<snip very long 
line>TmL2nx6XQFbY

It appears I need a token. I'm guessing that to get it, I need to submit a 
request to a URL like this one:

https://csm1.domain/client/console?cmd=access&vm=818d0264-1b52-NNNN-996b-28NNNN54ee0

I modified my API request method replacing the api path  of '/client/api?' with 
'/client/console?' and using command=access. When I run it, I get back this 
error: 'Access denied. Invalid web session or API key in request'  This doesn't 
surprise me, because my application doesn't have a valid web session. But it 
does have a request signed with the API key.  I'm confident that the SSO Key is 
the piece of the puzzle that's going to allow this to work.

Any assistance (URL references, code samples, etc) you can offer is appreciated.

Matt

Reply via email to