[gollem] Pass common set of credentials to Gollem

Jeff Graves jeff at image-src.com
Wed Feb 19 15:48:55 PST 2003


Well, I'm kinda flying blind here, but here's my attempt at
troubleshooting this thing.

Config:
Win32 Platform
Windows 2000 SP3
IIS 5.0
PHP 4.3.0
MySQL 3.23.55 (mysqld-nt.exe server)
Horde 3.0-cvs
IMP 4.0-cvs
Gollem 0.0.1-cvs (I think it's actually 0.0.3 but the tag hasn't been
update)

IMP is set up to do authentication for horde. I log in to Horde and
what I want to be able to do is click on File Manager and have file
manager automatically log on to my FTP server using a common set of
credentials (all users log on to FTP server using the same
username/password combo). In order to do this I had to:

1) When I clicked File Manager I was prompted with the file manager
login screen. Typing anything here immediately brought me to a Horde
login screen. In ./lib/base I commented out the following:

// If Gollem isn't responsible for Horde auth, and no one is logged
// into Horde, redirect to the login screen.
//if (!(Auth::getAuth() || $registry->allowGuests())) {
//    Horde::authenticationFailureRedirect();
//}

It seems that Auth::getAuth() isn't returning true and that's why I
get redirected to the horde login page. This isn't a solution to the
problem, but it fixed my situation. I don't know where to look to
troubleshoot this puppy.

2) Then, to get the autologin to work (after specifying a username and
password ./config/backends.php) I added hordeauth = 'default' to my
FTP settings ./config/backends.php and made this change in
./lib/Gollem.php:

        // Set authentication parameters.
        if (!empty($gollem['hordeauth'])) {
>         if ($gollem['hordeauth'] == 'default') {
>		$uid = 'username';
>		$password = 'password';
>		$gollem['params']['username'] = $uid;
>		$gollem['params']['password'] = $password;
>	    } else {
		$uid = Auth::getAuth();
            	if ($gollem['hordeauth'] != 'full' &&
               	   ($pos = strpos($uid, '@')) !== false) {
                   $uid = substr($uid, 0, $pos);
            	}
            	$gollem['params']['username'] = $uid;
            	$gollem['params']['password'] =
Auth::getCredential('password');
	    }
        } else {
	    foreach ($vfs->getRequiredCredentials() as $credential) {
                $gollem['params'][$credential] =
Horde::getPost($credential);
            }
        }

Again this is more of a hack to fix the problem but it works for my
situation. I started troubleshooting this and I think I have traced it
to here (in ./login.php):

if (($reason == 'login') &&
    (count($backends) == 1 || Horde::getFormData('autologin')) &&
    (count($vfs->getRequiredCredentials()) == 0 ||
     (Auth::getAuth() &&
      implode(',', $vfs->getRequiredCredentials()) ==
'username,password' &&
      !empty($backends[$backend_key]['hordeauth'])))) {
    $url = Horde::applicationUrl('redirect.php', true);
    $url = Horde::addParameter($url, 'backend=' . $backend_key);
    $url = Horde::addParameter($url, 'actionID=' . GOLLEM_LOGIN);
    header('Location: ' . $url);
    exit;
}

This appears to be where the 'hordeauth' setting gets its "autologin"
capability. I'm not sure how to tell gollem to "autologin" without
setting the 'hordeauth' param in ./config/backends.php (maybe just a
./config/backends.php setting).

Jeff Graves
Customer Support Engineer
Image Source, Inc.
10 Mill Street
Bellingham, MA 02019

jeff at image-src.com - Email
508.966.5200 X31 - Phone
508.966.5170 - Fax



More information about the gollem mailing list