Add VBoxAuthSimple#15
Add VBoxAuthSimple#15xqus wants to merge 2 commits intophpvirtualbox:developfrom xqus:xqus-vboxauthsimple
Conversation
Patch contributed as part of https://sourceforge.net/p/phpvirtualbox/feature-requests/15/
|
I completely agree with this PR, however we're going to need to be careful as far as version management is concerned. We'll need to document the change and the upgrade path for people using the current versions, so we may want to do this at a point release point. |
|
It seems this is the same as the "Builtin" authentication. |
|
Yes, but it's different from what phpvirtualbox currently does, so some user migration will be required. No? |
|
I don't use it, but as far as I can see from the code, the username and password are stored in the extradata section of virtualbox. If there is a difference, you have to explain it a bit more detailed. |
|
I have just tested this new authentication module. It is totally different from the 'Builtin' authentication module which store username and password hash in virtualbox's extradata. Instead of setting Of course, this module is only relevant for a single user configuration. However, the "vboxmanage" commands stated by @xqus are useless. The provided code doesn't look at Virtualbox "extradatas", it only checks that the given username and password are accepted by vboxwebsrv. |
Adds VBoxAuthSimple so we don't have to store username and password in plain text.
To set up Virtualbox:
Configure VurtualBox web server to use VBoxAuthSimple.
$ VBoxManage setproperty websrvauthlibrary "VBoxAuthSimple"
Create a password hash.
$ VBoxManage internalcommands passwordhash "secret"
Add a user to the VirtualBox config. Username: username, with password: secret.
$ VBoxManage setextradata global "VBoxAuthSimple/users/username" / 2bb80d537b1da3e38bd30361aa855686bde0eacd7162fef6a25fe97bf527a25b`
Set VBoxAuthSimple as authentication library
var $authLib = 'VBoxAuthSimple';