Directory Services π‘ BETA
The directory layer is the botcoredirectory crate plus the Zitadel provider: it owns organisation, user and group provisioning and the /api/directory/* HTTP surface.
When to use
- Provisioning or searching users and groups through the directory API.
- Checking which directory routes exist before wiring a UI or an automation to them.
- Separating the Zitadel provider from botserver's own identity and permission checks.
Before you start
| Check | Requirement |
|---|---|
| Provider | Zitadel is the bundled directory provider; its version is pinned in botserver/3rdparty.toml. |
| Secrets | Credentials live in secret/gbo/directory, never in a page or a committed file. |
| Ports | API 8080, suite 3000, cloud 4000, login 5000 (root AGENTS.md). |
| Authority | botserver/crates/botcoredirectory/src/ and the generated API reference for routes. |
Module map
| Module | Responsibility |
|---|---|
api.rs |
/api/directory/users, /users/provision, /services/status, /users/create |
ui_api.rs |
/api/directory/organizations/list |
ui_fragments/ |
paginated user and group list/search and group creation routes |
groups/ |
group membership and authorisation |
organizations.rs |
organisation records |
provisioning.rs |
provisioning from the directory provider |
scim/, users/ |
SCIM and user surfaces |
Other routes in the inventory include /api/directory/groups/create, /api/directory/groups/list, /api/directory/groups/search and /api/directory/users/{id}.
Steps
- Confirm the provider is reachable and the Vault credentials resolve before provisioning.
- Use the route inventory to pick the exact endpoint; do not guess a path from the general idea of a directory.
- Provision users or groups through the documented routes, then confirm the record with a list or search call.
- Keep authorisation checks in the server: the directory is an identity source, not an HTTP-exposed database.
Verify
| Check | Expected result |
|---|---|
| Provider status | GET /api/directory/services/status answers with the provider reachable. |
| User lookup | A provisioned user is returned by the list or search route. |
| Group membership | Group authorisation reflects the directory state. |
| Route inventory | Every /api/directory/* route used by the UI appears in the generated reference. |
| Secrets | No credential value appears in a response, log or page. |
Roll back
- Reverse the provisioning operation through the same route family (remove the group membership or user you added).
- Restore the previous
secret/gbo/directoryvalues if the provider connection changed, and rotate any exposed credential. - Re-run the Verify table. A user or group that cannot be resolved must fail authorisation rather than fall back to an unrestricted path.
What the directory is not
It is not the mail service, not the web login page and not the source of bot permissions by itself. Bot-level authorisation is enforced by the server's permission checks; see User Authentication and the security matrix. Network exposure and hostnames are described in the network contract.
Related
- Network Contract β hostnames and routing.
- Security Matrix β the wider security model.
- User Authentication β identity resolution.
- Hosting, DNS, and MDA Integration β provider-side DNS and mail.