dgzyk / phpvirtualbox

Automatically exported from code.google.com/p/phpvirtualbox
Other
0 stars 0 forks source link

Authentication via HTTP-Auth / Builtin.php vs. WebAuth.php #581

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
My phpvirtualbox installation is guarded via HTTP authentication (".htaccess"). 
in lib/auth I found WebAuth.php as well as Builtin.php plus the section in 
config.php listed below. 

// Authentication library.
var $authLib = 'Builtin';
#var $authLib = 'WebAuth';

I changed the setting in config.php to WebAuth, created a user with matching 
password and username in the users section and expected to get directly to the 
phpvirtualbox gui skipping the login screen after having provided valid HTTP 
authentication credentials in the browsers dialogbox. This did not happen. 

Is that module intended to work as I assumed? What do I need to do to get it 
working as described above?

What version of phpVirtualBox, VirtualBox, and PHP are you using? On what
operating system?
Virtualbox 4.1.20, phpvirtualbox 4.1.0-9, Firefox ESR latest, Apache 2.2.16

Original issue reported on code.google.com by johanne...@web.de on 6 Sep 2012 at 3:26

GoogleCodeExporter commented 8 years ago
Hello,

Try adding this to your config.php under that setting:

var $authConfig = array('serverUserKey'=>'REMOTE_USER');

Original comment by imooreya...@gmail.com on 10 Sep 2012 at 12:39

GoogleCodeExporter commented 8 years ago
Actually, make that:

var $authConfig = array('serverUserKey'=>'REMOTE_USER','adminUser'=>'admin');

where 'admin' is the username of the user you are logging in as.

Original comment by imooreya...@gmail.com on 10 Sep 2012 at 12:43

GoogleCodeExporter commented 8 years ago
Looks like that worked, thanks. :)
Maybe you could you add it to one of wiki pages so it is easier to find for 
others? 

Original comment by johanne...@web.de on 11 Sep 2012 at 10:03

GoogleCodeExporter commented 8 years ago
I just resumed the box from suspend which broke the connection. After a reload 
of the page the result was the following:
"Exception Object
(
    [message:protected] => Not logged in.
    [string:Exception:private] => 
    [code:protected] => 32
    [file:protected] => /var/www/vboxweb/lib/vboxconnector.php
    [line:protected] => 162
    [trace:Exception:private] => Array
        (
            [0] => Array
                (
                    [file] => /var/www/vboxweb/lib/vboxconnector.php
                    [line] => 209
                    [function] => connect
                    [class] => vboxconnector
                    [type] => ->
                    [args] => Array
                        (
                        )

                )

            [1] => Array
                (
                    [file] => /var/www/vboxweb/lib/ajax.php
                    [line] => 93
                    [function] => getVersion
                    [class] => vboxconnector
                    [type] => ->
                    [args] => Array
                        (
                        )

                )

        )

    [previous:Exception:private] => 
)"

I cleared the HTTP-Auth-Credentials from the browser and reloaded the page 
anyhow to no avail, a dialog box saying "Not logged in." remains.

Original comment by johanne...@web.de on 11 Sep 2012 at 12:57

GoogleCodeExporter commented 8 years ago
After clearing the HTTP-Auth credentials I did obviously relogin with HTTP-Auth.

Original comment by johanne...@web.de on 11 Sep 2012 at 1:01

GoogleCodeExporter commented 8 years ago
Can you attach your config.php?

Original comment by imooreya...@gmail.com on 27 Sep 2012 at 12:29

GoogleCodeExporter commented 8 years ago
There you go.

Original comment by johanne...@web.de on 27 Sep 2012 at 10:31

Attachments:

GoogleCodeExporter commented 8 years ago
Did you try reloading the page after you resumed from suspend?

Original comment by imooreya...@gmail.com on 27 Sep 2012 at 1:41

GoogleCodeExporter commented 8 years ago
OK, I've figured it out and fixed it. Please download the latest 4.1-11 release.

Original comment by imooreya...@gmail.com on 3 Oct 2012 at 2:04