SSO + LDAP (global addressbook)
This commit is contained in:
parent
0abee6c0f0
commit
359f76e9d2
3 changed files with 33 additions and 7 deletions
|
@ -44,20 +44,22 @@ master user credentials in plugin's config.
|
||||||
[SMTP] For the same reason and also because the same master user does not work in Postfix,
|
[SMTP] For the same reason and also because the same master user does not work in Postfix,
|
||||||
you have to specify SMTP connection parameters/user+password.
|
you have to specify SMTP connection parameters/user+password.
|
||||||
|
|
||||||
|
[LDAP] Global addressbook (read-only) requires LDAP user/password. 'user_specific' option does
|
||||||
|
not work as well as proxy authentication.
|
||||||
|
|
||||||
[Freebusy] Authentication into kolab-freebusy service is not yet implemented. A solution for
|
[Freebusy] Authentication into kolab-freebusy service is not yet implemented. A solution for
|
||||||
now is to add Roundcube host(s) into trustednetworks.allow option in kolab-freebusy service config.
|
now is to add Roundcube host(s) into trustednetworks.allow option in kolab-freebusy service config.
|
||||||
|
|
||||||
[Chwala] Authentication to Chwala will work if it uses the same (session) database as Roundcube.
|
[Chwala] Authentication to Chwala will work if it uses the same (session) database as Roundcube.
|
||||||
Additionally set $config['fileapi_plugins'] = array('kolab_sso', 'kolab_auth', 'kolab_folders');
|
Additionally set $config['fileapi_plugins'] = array('kolab_sso', 'kolab_auth', 'kolab_folders');
|
||||||
Authenticating to Seafile/WebDAV storage is not supported (until it's custom user-defined
|
Authenticating to Seafile/WebDAV storage is not supported (until it's custom user-defined
|
||||||
storage with saved password).
|
storage).
|
||||||
|
|
||||||
|
|
||||||
TODO
|
TODO
|
||||||
----
|
----
|
||||||
|
|
||||||
- LDAP addressbook
|
- kolab_delegation (LDAP auth for write operation)
|
||||||
- kolab_delegation (LDAP auth)
|
|
||||||
- Chwala+Seafile
|
- Chwala+Seafile
|
||||||
- Chwala+WebDAV
|
- Chwala+WebDAV
|
||||||
- Freebusy auth
|
- Freebusy auth
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
$config['kolab_sso_debug'] = true;
|
$config['kolab_sso_debug'] = true;
|
||||||
|
|
||||||
// IMAP (master) user
|
// IMAP (master) user
|
||||||
$config['kolab_sso_username'] = 'cyrus-admin';
|
$config['kolab_sso_imap_user'] = 'cyrus-admin';
|
||||||
|
|
||||||
// IMAP (master) password
|
// IMAP (master) password
|
||||||
$config['kolab_sso_password'] = 'password';
|
$config['kolab_sso_imap_pass'] = 'password';
|
||||||
|
|
||||||
// SMTP server host
|
// SMTP server host
|
||||||
// To override the SMTP port or connection method, provide a full URL like 'tls://somehost:587'
|
// To override the SMTP port or connection method, provide a full URL like 'tls://somehost:587'
|
||||||
|
@ -19,6 +19,12 @@ $config['kolab_sso_smtp_user'] = '';
|
||||||
// SMTP password
|
// SMTP password
|
||||||
$config['kolab_sso_smtp_pass'] = '';
|
$config['kolab_sso_smtp_pass'] = '';
|
||||||
|
|
||||||
|
// LDAP user DN
|
||||||
|
$config['kolab_sso_ldap_user'] = 'uid=kolab-service,ou=Special Users,dc=example,dc=org';
|
||||||
|
|
||||||
|
// LDAP password
|
||||||
|
$config['kolab_sso_ldap_pass'] = 'password';
|
||||||
|
|
||||||
// Require SSO logon by removing possibility to logon with user/password
|
// Require SSO logon by removing possibility to logon with user/password
|
||||||
$config['kolab_sso_disable_login'] = false;
|
$config['kolab_sso_disable_login'] = false;
|
||||||
|
|
||||||
|
|
|
@ -162,6 +162,7 @@ class kolab_sso extends rcube_plugin
|
||||||
$this->add_hook('storage_connect', array($this, 'storage_connect'));
|
$this->add_hook('storage_connect', array($this, 'storage_connect'));
|
||||||
$this->add_hook('managesieve_connect', array($this, 'storage_connect'));
|
$this->add_hook('managesieve_connect', array($this, 'storage_connect'));
|
||||||
$this->add_hook('smtp_connect', array($this, 'smtp_connect'));
|
$this->add_hook('smtp_connect', array($this, 'smtp_connect'));
|
||||||
|
$this->add_hook('ldap_connected', array($this, 'ldap_connected'));
|
||||||
$this->add_hook('chwala_authenticate', array($this, 'chwala_authenticate'));
|
$this->add_hook('chwala_authenticate', array($this, 'chwala_authenticate'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,8 +186,8 @@ class kolab_sso extends rcube_plugin
|
||||||
*/
|
*/
|
||||||
public function storage_connect($args)
|
public function storage_connect($args)
|
||||||
{
|
{
|
||||||
$user = $this->rc->config->get('kolab_sso_username');
|
$user = $this->rc->config->get('kolab_sso_imap_user');
|
||||||
$pass = $this->rc->config->get('kolab_sso_password');
|
$pass = $this->rc->config->get('kolab_sso_imap_pass');
|
||||||
|
|
||||||
if ($user && $pass) {
|
if ($user && $pass) {
|
||||||
$args['auth_cid'] = $user;
|
$args['auth_cid'] = $user;
|
||||||
|
@ -209,6 +210,23 @@ class kolab_sso extends rcube_plugin
|
||||||
return $args;
|
return $args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ldap_connected hook handler
|
||||||
|
*/
|
||||||
|
public function ldap_connected($args)
|
||||||
|
{
|
||||||
|
$user = $this->rc->config->get('kolab_sso_ldap_user');
|
||||||
|
$pass = $this->rc->config->get('kolab_sso_ldap_pass');
|
||||||
|
|
||||||
|
if ($user && $pass && $args['user_specific']) {
|
||||||
|
$args['bind_dn'] = $user;
|
||||||
|
$args['bind_pass'] = $pass;
|
||||||
|
$args['search_filter'] = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $args;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Chwala_authenticate hook handler
|
* Chwala_authenticate hook handler
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue