PHPackages                             kolab/kolab\_2fa - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. kolab/kolab\_2fa

AbandonedArchivedRoundcube-plugin[Authentication &amp; Authorization](/categories/authentication)

kolab/kolab\_2fa
================

Kolab 2-Factor Authentication

3.5.5.2(5y ago)111.4k10[5 issues](https://github.com/thomascube/roundcube-plugin-kolab-2fa/issues)AGPL-3.0-or-laterPHPPHP &gt;=5.3.0

Since Jan 7Pushed 4y ago1 watchersCompare

[ Source](https://github.com/thomascube/roundcube-plugin-kolab-2fa)[ Packagist](https://packagist.org/packages/kolab/kolab_2fa)[ Docs](https://git.kolab.org/diffusion/RPK/)[ RSS](/packages/kolab-kolab-2fa/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (4)Versions (4)Used By (0)

IMPORTANT INFORMATION
=====================

[](#important-information)

> This is a clone from
> For bug reports and pull requests, please go to

How to upgrade this clone
=========================

[](#how-to-upgrade-this-clone)

Execute the [synchronise\_with\_source.sh](bin/synchronise_with_source.sh) shell script.

Kolab Multi-Factor Authentication Plugin
========================================

[](#kolab-multi-factor-authentication-plugin)

The plugin is designed to be a generic container for different 2nd factor authentication mechanisms paired with different ways to store the related data for Roundcube user accounts. Both drivers and storage backends are derived from abstract classes which define the common interface and are configurable.

Drivers
-------

[](#drivers)

Multiple methods for 2nd factor authentication can be enabled for the users to select from. The basic implementation covers TOTP, HOTP and Yubikey methods.

TOTP (RFC 6238) and HOTP (RFC 4226) can be used in conjunction with freely available mobile phone apps like FreeOTP (TOTP only!) or Google Authenticator. To provision the app with your account settings, a QR code is displayed which can be scanned with the mobile phone camera.

The Yubikey driver uses the Yubico Validation Service either by using the public YubiCloud API or another locally hosted verification server. The host(s) to use for validation are configurable.

Storage Backends
----------------

[](#storage-backends)

Some authentication methods require to store secret data per user account on the server. For this, one of different storage backends can be selected:

**Roundcube**

The simplest way is to store authentication secrets and configuration in the user preferences of Roundcube itself.

**LDAP**

For an external storage option, the LDAP module can be used. This keeps the authentication data separated from the Roundcube user database. See //LDAP Storage// below for more information. The LDAP connection parameters are defined through the `kolab_2fa_storage_config` config option.

Installation
------------

[](#installation)

After placing the plugin contents into Roundcube's plugins directory, the 3rd party libraries need to be installed using Composer:

```
$ composer require "endroid/qrcode" "~1.5.0" --no-update
$ composer require "spomky-labs/otphp" "~5.0.0" --no-update
$ composer require "enygma/yubikey" "~3.2"

```

See the `composer.json` file for the actual module names and versions.

Configuration
-------------

[](#configuration)

Copy the sample `config.inc.php.dist` file into `config.inc.php` and adjust the settings according to your desired setup. All options are described with inline comments directly in the sample file.

When using the LDAP storage together with a Kolab installation, you may want to save an additional LDAP lookup for authentication factors on every login, the LDAP driver can assign roles to the user record when registering authentication factors (see `user_roles` storage config option). With the following additions to the `kolab_auth` plugin config, these roles can be used to determine whether the user has multi-factor authentication enabled:

```
// Disable lokkups by default:
$config['kolab_2fa_check'] = false;

// Enable 2nd factor lookup on a role-by-role basis
$config['kolab_auth_role_settings'] = array(
    'cn=totp-user,dc=example,dc=org' => array(
        'kolab_2fa_check' => array(
            'mode' => 'override',
            'value' => true,
        ),
    ),
);

```

LDAP Storage
------------

[](#ldap-storage)

Define an `organizationalunit` with DN `ou=Tokens,dc=example,dc=org` to store all authentication tokens.

For token records, the \[\[ | FreeIPA OTP schema\]\] can be used. Please install this schema in your Kolab LDAP directory.

This is an example record for a TOTP token registered to user :

```
dn: ipatokenUniqueID=totp:c4a1ced768a0da55df662e73,ou=Tokens,dc=example,dc=org
objectClass: top
objectClass: ipaToken
objectClass: ipatokenTOTP
objectClass: ldapSubEntry
cn: Mobile App (TOTP)
ipatokenUniqueID: totp:c4a1ced768a0da55df662e73
ipatokenOwner: uid=doe,ou=People,dc=example,dc=org
ipatokenNotBefore: 201506110211Z
ipatokenOTPkey: 4T5CI7SOKWYQ5JTM
ipatokenDisabled: TRUE

```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance11

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 57.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~577 days

Total

3

Last Release

1893d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ca375ba7fba191a133e70100629611d9f4277281366188c7798da7ae39d92218?d=identicon)[roundcubedev](/maintainers/roundcubedev)

---

Top Contributors

[![thomascube](https://avatars.githubusercontent.com/u/1577511?v=4)](https://github.com/thomascube "thomascube (8 commits)")[![stevleibelt](https://avatars.githubusercontent.com/u/2287220?v=4)](https://github.com/stevleibelt "stevleibelt (6 commits)")

### Embed Badge

![Health badge](/badges/kolab-kolab-2fa/health.svg)

```
[![Health](https://phpackages.com/badges/kolab-kolab-2fa/health.svg)](https://phpackages.com/packages/kolab-kolab-2fa)
```

###  Alternatives

[scheb/2fa

Two-factor authentication for Symfony applications (please use scheb/2fa-bundle to install)

578630.7k1](/packages/scheb-2fa)[scheb/2fa-google-authenticator

Extends scheb/2fa-bundle with two-factor authentication using Google Authenticator

298.2M30](/packages/scheb-2fa-google-authenticator)[scheb/2fa-totp

Extends scheb/2fa-bundle with two-factor authentication using TOTP

292.7M22](/packages/scheb-2fa-totp)[born05/craft-twofactorauthentication

Craft 4 plugin for two-factor or two-step login using Time Based OTP.

36100.1k1](/packages/born05-craft-twofactorauthentication)[sandstorm/neostwofactorauthentication

1223.6k](/packages/sandstorm-neostwofactorauthentication)[thecodework/two-factor-authentication

Two Factor Authentication (2FA) for Laravel

225.5k](/packages/thecodework-two-factor-authentication)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
