
My forum is using CAS authentication (feature provided by the CasAuthLdapBB MOD @ http://www.phpbb.com/community/viewtopi ... 6&t=399977), and I had to make some modifications to Smartfeed to get it working.
CasAuthLdapBB allows users to login/logout via the CAS server, and it also grabs user information (user's name, email address, etc) from LDAP. This part here works very similar to the LDAP authentication provided by phpbb by default. I have had a read of bvrielink's post on querying the possibility of getting Smartfeed to work with LDAP authentication. I have some thoughts on it based on the observation of phpbb's behaviour with the CAS authentication, which might not be exactly the same for the LDAP authentication case - please correct me if I am wrong.
When a user first logs in to phpbb via CAS/LDAP, phpbb retrieves the user's account information including the password (encrypted), and stores them locally in the phpbb database. This persisted password can then be used to generate the authentication token as well as authenticate the user on a feed request. However, as far as I know, this phpbb persisted password will not get updated even if the one in LDAP changes(?), which then means that there is no way to invalidate a previously generated feed URL -> security issue

I will be doing work on synchronizing phpbb's user info with LDAP's later, so I decided to still go with this approach. Here are the changes that I've made to get Smartfeed working with the CAS authentication.
In smartfeed.php -
Find:
Code: Select all
case 'ldap':
Code: Select all
case 'casldap':
$registered_user = true;
break;
In smartfeed.php -
Find:
Code: Select all
include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
$method = 'logout_' . $method;
if (function_exists($method))
{
$method($user->data, $new_session);
}
Code: Select all
if ($method != 'casldap')
{
include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
$method = 'logout_' . $method;
if (function_exists($method))
{
$method($user->data, $new_session);
}
}