SSO + SMTP
This commit is contained in:
parent
a53f1283f5
commit
2efad48657
3 changed files with 18 additions and 11 deletions
|
@ -6,7 +6,9 @@ services. Currently the only supported method of authentication is OpenID Connec
|
||||||
|
|
||||||
Because Kolab backends do not support token authentication it is required
|
Because Kolab backends do not support token authentication it is required
|
||||||
to use master user (sasl proxy) authentication, i.e. you have to put
|
to use master user (sasl proxy) authentication, i.e. you have to put
|
||||||
master user credentials in plugin's config.
|
master user credentials in plugin's config. 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.
|
||||||
|
|
||||||
Plugin requires libkolab plugin and HTTP/Request2 library.
|
Plugin requires libkolab plugin and HTTP/Request2 library.
|
||||||
Plugin contains BSD-licensed https://github.com/firebase/php-jwt (v5.0.0) library.
|
Plugin contains BSD-licensed https://github.com/firebase/php-jwt (v5.0.0) library.
|
||||||
|
@ -22,7 +24,7 @@ INSTALLATION
|
||||||
Enable plugin in Roundcube's main configuration file. Make sure it is first
|
Enable plugin in Roundcube's main configuration file. Make sure it is first
|
||||||
on the list of plugins, especially before any authentication plugin, e.g. kolab_auth.
|
on the list of plugins, especially before any authentication plugin, e.g. kolab_auth.
|
||||||
|
|
||||||
Default return URL for Auth Provider is https://host.roundcube?_task=login&_action=sso,
|
Default return-URL for Auth Provider is https://host.roundcube?_task=login&_action=sso,
|
||||||
but not all providers support query params. To workaround this limitation you have to
|
but not all providers support query params. To workaround this limitation you have to
|
||||||
define an alias URI or redirect. For example:
|
define an alias URI or redirect. For example:
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,22 @@
|
||||||
// Enable debugging
|
// Enable debugging
|
||||||
$config['kolab_sso_debug'] = true;
|
$config['kolab_sso_debug'] = true;
|
||||||
|
|
||||||
// Proxy user
|
// IMAP (master) user
|
||||||
$config['kolab_sso_username'] = 'cyrus-admin';
|
$config['kolab_sso_username'] = 'cyrus-admin';
|
||||||
|
|
||||||
// Proxy user password
|
// IMAP (master) password
|
||||||
$config['kolab_sso_password'] = 'password';
|
$config['kolab_sso_password'] = 'password';
|
||||||
|
|
||||||
|
// SMTP server host
|
||||||
|
// To override the SMTP port or connection method, provide a full URL like 'tls://somehost:587'
|
||||||
|
$config['kolab_sso_smtp_server'] = null;
|
||||||
|
|
||||||
|
// SMTP username
|
||||||
|
$config['kolab_sso_smtp_user'] = '';
|
||||||
|
|
||||||
|
// SMTP password
|
||||||
|
$config['kolab_sso_smtp_pass'] = '';
|
||||||
|
|
||||||
// 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;
|
||||||
|
|
||||||
|
|
|
@ -186,13 +186,8 @@ class kolab_sso extends rcube_plugin
|
||||||
*/
|
*/
|
||||||
public function smtp_connect($args)
|
public function smtp_connect($args)
|
||||||
{
|
{
|
||||||
$user = $this->rc->config->get('kolab_sso_username');
|
foreach (array('smtp_server', 'smtp_user', 'smtp_pass') as $prop) {
|
||||||
$pass = $this->rc->config->get('kolab_sso_password');
|
$args[$prop] = $this->rc->config->get("kolab_sso_$prop", $args[$prop]);
|
||||||
|
|
||||||
if ($user && $pass) {
|
|
||||||
$args['smtp_auth_cid'] = $user;
|
|
||||||
$args['smtp_auth_pw'] = $pass;
|
|
||||||
$args['smtp_auth_type'] = 'PLAIN';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $args;
|
return $args;
|
||||||
|
|
Loading…
Add table
Reference in a new issue