PHPackages                             texxasrulez/rounddav\_provision - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. texxasrulez/rounddav\_provision

ActiveRoundcube-plugin[Utility &amp; Helpers](/categories/utility)

texxasrulez/rounddav\_provision
===============================

Roundcube plugin to auto-provision RoundDAV users on first login.

0.0.1(5mo ago)061GPL-3.0PHPPHP &gt;=7.4

Since Dec 15Pushed 2mo agoCompare

[ Source](https://github.com/texxasrulez/rounddav_provision)[ Packagist](https://packagist.org/packages/texxasrulez/rounddav_provision)[ Docs](https://github.com/texxasrulez/rounddav_provision)[ RSS](/packages/texxasrulez-rounddav-provision/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (1)

rounddav\_provision
===================

[](#rounddav_provision)

[![Downloads](https://camo.githubusercontent.com/b5c34aeb54bef482ed00ffcba0ac95479d20b14a8e0de5231fc077b0547c4db0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f74657878617372756c657a2f726f756e646461765f70726f766973696f6e2f746f74616c3f7374796c653d706c6173746963266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465266c6162656c3d446f776e6c6f616473266c6162656c436f6c6f723d6171756126636f6c6f723d626c7565)](https://camo.githubusercontent.com/b5c34aeb54bef482ed00ffcba0ac95479d20b14a8e0de5231fc077b0547c4db0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f74657878617372756c657a2f726f756e646461765f70726f766973696f6e2f746f74616c3f7374796c653d706c6173746963266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465266c6162656c3d446f776e6c6f616473266c6162656c436f6c6f723d6171756126636f6c6f723d626c7565)[![Packagist Downloads](https://camo.githubusercontent.com/e3abd3f2d624fab6af9bec0f4bc93ba209141dfd61feccbd74aa480e9ce8fbf4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74657878617372756c657a2f726f756e646461765f70726f766973696f6e3f7374796c653d706c6173746963266c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465266c6162656c3d446f776e6c6f616473266c6162656c436f6c6f723d626c756526636f6c6f723d676f6c64)](https://packagist.org/packages/texxasrulez/rounddav_provision)[![Packagist Version](https://camo.githubusercontent.com/cc1780176550e2ccd574a50a4a3f298ad5d02fe69e9d67c2ab655f56df80e601/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74657878617372756c657a2f726f756e646461765f70726f766973696f6e3f7374796c653d706c6173746963266c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465266c6162656c3d56657273696f6e266c6162656c436f6c6f723d626c756526636f6c6f723d6c696d65677265656e)](https://packagist.org/packages/texxasrulez/rounddav_provision)[![Github License](https://camo.githubusercontent.com/0472e5df7bc0790b6d29501178577459cb3eb292a111066556ae533b1ef3dc9e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f74657878617372756c657a2f726f756e646461765f70726f766973696f6e3f7374796c653d706c6173746963266c6f676f3d676974687562266c6162656c3d4c6963656e7365266c6162656c436f6c6f723d626c756526636f6c6f723d636f72616c)](https://github.com/texxasrulez/rounddav_provision/LICENSE)[![GitHub Stars](https://camo.githubusercontent.com/836d9624d96638414a78e2356c19c2ecc69fac2563d9c06c550669444391533c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f74657878617372756c657a2f726f756e646461765f70726f766973696f6e3f7374796c653d706c6173746963266c6f676f3d676974687562266c6162656c3d5374617273266c6162656c436f6c6f723d626c756526636f6c6f723d64656570736b79626c7565)](https://github.com/texxasrulez/rounddav_provision/stargazers)[![GitHub Issues](https://camo.githubusercontent.com/f797b34328c5bc62af8c7cd09288f66172094d9af3b53b7717c69a5cdc076c5b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f74657878617372756c657a2f726f756e646461765f70726f766973696f6e3f7374796c653d706c6173746963266c6f676f3d676974687562266c6162656c3d497373756573266c6162656c436f6c6f723d626c756526636f6c6f723d61717561)](https://github.com/texxasrulez/rounddav_provision/issues)[![GitHub Contributors](https://camo.githubusercontent.com/b140aa0ae906109ae2da4442c344dda1a490be5786ebb13af051899dc7cf92cf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f74657878617372756c657a2f726f756e646461765f70726f766973696f6e3f7374796c653d706c6173746963266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465266c6162656c3d436f6e7472696275746f7273266c6162656c436f6c6f723d626c756526636f6c6f723d6f7263686964)](https://github.com/texxasrulez/rounddav_provision/graphs/contributors)[![GitHub Forks](https://camo.githubusercontent.com/6d2da8422093258fbdc1580239c7c0928d89f177572092f1d62361f4eb8c0728/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f74657878617372756c657a2f726f756e646461765f70726f766973696f6e3f7374796c653d706c6173746963266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465266c6162656c3d466f726b73266c6162656c436f6c6f723d626c756526636f6c6f723d6461726b6f72616e6765)](https://github.com/texxasrulez/rounddav_provision/forks)[![Donate Paypal](https://camo.githubusercontent.com/02124075ee7ea4c192ef867cb30577b0b43ba74ea42b8dbe20b56ef518d94cdb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f50617970616c2d4d6f6e65795f506c65617365212d626c75652e7376673f7374796c653d706c6173746963266c6162656c436f6c6f723d626c756526636f6c6f723d666f72657374677265656e266c6f676f3d70617970616c)](https://www.paypal.me/texxasrulez)

Automatic RoundDAV account provisioning and SSO integration for Roundcube.

This plugin binds Roundcube authentication to RoundDAV users, calendars, addressbooks, and the web-based Files UI.

This plugin requires [RoundDAV Server](https://github.com/texxasrulez/rounddav) to function.

Recommended Plugins:

[RoundDAV Files Roundcube Plugin](https://github.com/texxasrulez/rounddav_files)

[RoundDAV Bookmarks Roundcube Plugin](https://github.com/texxasrulez/rounddav_bookmarks)

Check out the [Suite README](README_suite.md) to see what is entailed.

---

Features
--------

[](#features)

- Creates a RoundDAV user on first Roundcube login
- Ensures default calendar and addressbook exist
- Creates extra calendars and addressbooks per user (config-driven)
- Generates one-shot SSO URLs for the RoundDAV Files UI
- Triggers SSO logout when the user logs out of Roundcube
- Logs everything to the `rounddav` log channel for easy debugging

This is the hub that keeps Roundcube and RoundDAV in sync.

---

**Screenshot**
--------------

[](#screenshot)

[![Alt text](/images/rounddav-provision.png?raw=true "RoundDAV Provisiion Screenshot")](/images/rounddav-provision.png?raw=true)

---

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

[](#installation)

1. Copy the plugin into Roundcube:

```
roundcube/plugins/rounddav_provision/

```

2. Enable it in Roundcube config (`config/config.inc.php` or equivalent):

```
$config['plugins'][] = 'rounddav_provision';
```

3. Copy the default config:

```
cd roundcube/plugins/rounddav_provision/
cp config.inc.php.dist config.inc.php

```

4. Edit `config.inc.php` and set at least:

```
$config['rounddav_api_url']   = 'https://your.server/rounddav/public/api.php';
$config['rounddav_base_url']  = 'https://your.server/rounddav/public';
$config['rounddav_sso_secret'] = 'change_me_sso'; // must match RoundDAV sso.secret
$config['rounddav_sso_enabled'] = true;
```

---

Configuration Options
---------------------

[](#configuration-options)

### Core API/SSO

[](#core-apisso)

```
// Where provisioning calls are sent
$config['rounddav_api_url']  = 'https://your.server/rounddav/public/api.php';

// Base URL for browser-facing RoundDAV (SSO, files UI, admin UI)
config['rounddav_base_url']  = 'https://your.server/rounddav/public';

// Shared secret used to HMAC-sign SSO tokens
$config['rounddav_sso_secret'] = 'change_me_sso';

// Toggle SSO integration (if false, rounddav_files falls back to plain URLs)
$config['rounddav_sso_enabled'] = true;
```

### Roundcube Preferences visibility

[](#roundcube-preferences-visibility)

The plugin exposes a configuration card inside **Settings → Preferences**. Control who can see and edit it with `rounddav_provision_settings_user_ids`:

```
// Default: only Roundcube user ID 1 (typically the administrator)
$config['rounddav_provision_settings_user_ids'] = [1];

// Allow everyone
$config['rounddav_provision_settings_user_ids'] = '*';

// Allow a custom list
$config['rounddav_provision_settings_user_ids'] = [1, 7, 12];
```

The page lists the configured API endpoint, SSO state, and lets you edit every `config.inc.php`option without SSH access (the file is rewritten automatically on save).

### Extra per-user calendars

[](#extra-per-user-calendars)

Define zero or more calendars to be created for each new RoundDAV user:

```
$config['rounddav_extra_calendars'] = [
    [
        'uri'         => 'personal',
        'displayname' => 'Personal',
        'mode'        => 'events',  // 'events', 'tasks', or 'both'
        'shared'      => false,
    ],
    [
        'uri'         => 'todo',
        'displayname' => 'Tasks',
        'mode'        => 'tasks',
        'shared'      => false,
    ],
];
```

- `uri` (required) – DAV collection URI segment (unique per user, not "default")
- `displayname` – what clients see; defaults to `uri` if omitted
- `mode` – how RoundDAV configures the `components` field:
    - `events` → `VEVENT`
    - `tasks` → `VTODO`
    - `both` → `VEVENT,VTODO`
- `shared` – reserved for future global/shared collections support

### Extra per-user addressbooks

[](#extra-per-user-addressbooks)

```
$config['rounddav_extra_addressbooks'] = [
    [
        'uri'         => 'work',
        'displayname' => 'Work Contacts',
        'shared'      => false,
    ],
    [
        'uri'         => 'shared',
        'displayname' => 'Shared Contacts',
        'shared'      => true,
    ],
];
```

- `uri` (required) – DAV addressbook URI segment (unique per user, not "default")
- `displayname` – human-readable label
- `shared` – reserved for future global sharing semantics

---

How It Works Internally
-----------------------

[](#how-it-works-internally)

### Hooks

[](#hooks)

The plugin registers:

- `authenticate($args)` – captures credentials for provisioning
- `login_after($args)` – performs provisioning and prepares SSO URL
- `logout_after($args)` – schedules a browser-side hit to RoundDAV SSO logout

### Provisioning Flow

[](#provisioning-flow)

1. User logs into Roundcube.
2. `authenticate` hook sees the username/password and stores them in `$_SESSION` temporarily.
3. `login_after` fires:
    - Reads credentials from `$_SESSION`.
    - Calls RoundDAV `/api.php?r=provision/user` with JSON payload.
    - Logs the response to `logs/rounddav`.
    - Generates SSO login URL and stores it in `$_SESSION['rounddav_sso_login_url']`.
4. `rounddav_files` later reads that SSO URL and uses it for the Files iframe.

### SSO Token Format

[](#sso-token-format)

The SSO login URL looks like:

```
https://your.server/rounddav/public/sso_login.php?user=&ts=&sig=

```

Where:

- `ts` – `time()` at generation
- `sig` – `hash_hmac('sha256', "$user|$ts", $secret)`

Logout uses:

```
https://your.server/rounddav/public/sso_logout.php?user=&ts=&sig=

```

with the string `"$user|$ts|logout"` for the HMAC input.

---

Logging
-------

[](#logging)

The plugin logs to the `rounddav` channel inside Roundcube:

- Provisioning calls and responses
- SSO URL generation
- SSO configuration status

This makes it easy to debug misconfigurations without guessing.

---

Philosophy
----------

[](#philosophy)

`rounddav_provision` is intentionally boring in the best way:

- It doesn’t touch Roundcube core files.
- It uses documented hooks.
- It uses sessions and config like any other plugin.
- It does one job extremely well: keep DAV users in sync with Roundcube users.

Enjoy!

💰 **Donations** 💰

If you use this plugin and would like to show your appreciation by buying me a cup of coffee, I surely would appreciate it. A regular cup of Joe is sufficient, but a Starbucks Coffee would be better ...
Zelle (Zelle is integrated within many major banks Mobile Apps by default) - Just send to texxasrulez at yahoo dot com
No Zelle in your banks mobile app, no problem, just click [Paypal](https://paypal.me/texxasrulez?locale.x=en_US) and I can make a Starbucks run ...

I appreciate the interest in this plugin and hope all the best ...

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance80

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

154d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/95c3af6e41a9786e8be2edb48176e43a7d1ddef429793a312168450ff4269deb?d=identicon)[texxasrulez](/maintainers/texxasrulez)

---

Top Contributors

[![texxasrulez](https://avatars.githubusercontent.com/u/10519182?v=4)](https://github.com/texxasrulez "texxasrulez (11 commits)")

### Embed Badge

![Health badge](/badges/texxasrulez-rounddav-provision/health.svg)

```
[![Health](https://phpackages.com/badges/texxasrulez-rounddav-provision/health.svg)](https://phpackages.com/packages/texxasrulez-rounddav-provision)
```

###  Alternatives

[voodoophp/paginator

Paginator is a simple class that allows you to create pagination. It doesn't require any database connection. It is compatible with Twitter's Bootstrap Framework, by using the CSS class pagination that is also attached.

351.5k1](/packages/voodoophp-paginator)

PHPackages © 2026

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