I am writing a programe to connect to VBox server, and I am using VBox's webserver by runing vboxwebsrv.exe.
By setting: VBoxManage setproperty websrvauthlibrary null
can login the web server without username and password.
however, I need some kind of authentication, so I need to set a user name and password. Any one knows how to set that?
(seems need to do with WSDL, but I am not sure how to do)
How to set username and password in VBox websrv
-
liupengjian
- Posts: 20
- Joined: 29. Sep 2008, 03:54
-
TerryE
- Volunteer
- Posts: 3572
- Joined: 28. May 2008, 08:40
- Primary OS: Ubuntu other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
- Contact:
This is all described in the SDK documentation.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Google your Q site:VirtualBox.org or search for the answer before posting.
-
liupengjian
- Posts: 20
- Joined: 29. Sep 2008, 03:54
-
liupengjian
- Posts: 20
- Joined: 29. Sep 2008, 03:54
-
liupengjian
- Posts: 20
- Joined: 29. Sep 2008, 03:54
Sorry, still have problem here, it seems any username and password will pass the authentication.and in VBox API I called:but it seems all string can pass the authentication.
I saw in SDK doc:
If I want to set up an user name and password,do I have to change the code above? How do I make sure of this code?
what is <library>? what should I put here for library?
Thanks , very urgent.
Code: Select all
VBoxManage setproperty websrvauthlibrary default
vboxwebsrv -t 1000Code: Select all
vbox = VirtualBox.connect(HostIP, "Admin", "pswd"); //admin, and pswd are my system username and passwordI saw in SDK doc:
Code: Select all
#include "VRDPAuth.h"
/**
* Authentication library entry point. Decides whether to allow
* a client connection.
*
* Parameters:
*
* pUuid Pointer to the UUID of the virtual machine
* which the client connected to.
* guestJudgement Result of the guest authentication.
* szUser User name passed in by the client (UTF8).
* szPassword Password passed in by the client (UTF8).
* szDomain Domain passed in by the client (UTF8).
*
* Return code:
*
* VRDPAuthAccessDenied Client access has been denied.
* VRDPAuthAccessGranted Client has the right to use the
* virtual machine.
* VRDPAuthDelegateToGuest Guest operating system must
* authenticate the client and the
* library must be called again with
* the result of the guest
* authentication.
*/
VRDPAuthResult VRDPAUTHCALL VRDPAuth(PVRDPAUTHUUID pUuid,
VRDPAuthGuestJudgement guestJudgement,
const char *szUser,
const char *szPassword
const char *szDomain)
{
/* process request against your authentication source of choice */
return VRDPAuthAccessGranted;
}Code: Select all
VBoxManage setproperty websrvauthlibrary default|null|<library>
Thanks , very urgent.