From b910367ae1180f9cf344fbded3644d622126e44c Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Thu, 15 May 2025 19:48:07 +0200 Subject: [PATCH 1/2] Inventory: Inform about user management and privilege assignment --- CHANGES.md | 4 ++- .../outline/cratedb-outline.yaml | 28 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 0cd2b8c..071dcbf 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -13,7 +13,7 @@ - Query: Added a few example questions specific to CrateDB - Outline: Renamed `CRATEDB_CONTEXT_URL` to `ABOUT_CONTEXT_URL` - Outline: Fixed `llms_txt` currently does not accept newlines in description fields -- Outline: Significantly update `cratedb-outline.yaml` +- Inventory: Significantly update `cratedb-outline.yaml` - Bundle: Started accepting `--url`/`ABOUT_OUTLINE_URL` option to specify alternative input outline file - Bundle: Improved handling of `--format` option @@ -21,6 +21,8 @@ per `ABOUT_CONTEXT_URL` - Query: Introduced caching for context payloads on HTTP remote URLs - llms-txt: Introduced caching for expanding outline into Markdown file +- Inventory: Added information about user and role management, privilege assignment, + and multi-tenancy implementation suggestions ## v0.0.3 - 2025-05-10 - Outline: Refactored the source of truth for the documentation outline diff --git a/src/cratedb_about/outline/cratedb-outline.yaml b/src/cratedb_about/outline/cratedb-outline.yaml index 93cd202..0076343 100644 --- a/src/cratedb_about/outline/cratedb-outline.yaml +++ b/src/cratedb_about/outline/cratedb-outline.yaml @@ -300,6 +300,34 @@ data: parents: [ reference ] tags: [ sql, reflection ] + # Admin: User management, roles, privileges, multi-tenancy. + - title: "CrateDB reference: Users and roles management" + link: https://cratedb.com/docs/crate/reference/en/latest/_sources/admin/user-management.rst.txt + description: | + Users and roles account information is stored in the cluster metadata of CrateDB and supports + standard SQL statements to create, alter and drop users and roles. + parents: [reference] + source: docs + - title: "CrateDB reference: Privileges" + link: https://cratedb.com/docs/crate/reference/en/latest/_sources/admin/privileges.rst.txt + description: | + To execute statements, a user needs to have the required privileges. + CrateDB has a built-in superuser account (`crate`) which has the privilege to do anything. + The privileges of other users and roles have to be managed using the `GRANT`, `DENY` or `REVOKE` statements. + The privileges that can be granted, denied or revoked are: `DQL`, `DML`, `DDL`, `AL`. + The privileges can be granted on different classes: `CLUSTER`, `SCHEMA`, `TABLE`, `VIEW`. + parents: [reference] + source: docs + - title: "CrateDB tutorial: Multi-tenancy with CrateDB" + link: https://community.cratedb.com/raw/1153/1 + description: | + Multi-tenancy is an architecture in which different tenants share a single software instance. + CrateDB does not support the creation of multiple databases and catalogs as some other solutions + (e.g., PostgreSQL). However, there are several ways to implement multi-tenancy in CrateDB, and, + as is often the case, which one works the best depends on a variety of options and trade-offs. + The article illustrates two methods for sharing a single CrateDB instance between multiple tenants. + source: tutorials + # SQL - title: "CrateDB SQL reference: Syntax" description: You can use Structured Query Language (SQL) to query your data. From 5305138be4f91c879695a3e9020a9bd8d97d1211 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Thu, 15 May 2025 23:27:17 +0200 Subject: [PATCH 2/2] Inventory: Associate "privileges" with "permissions" It's just a different jargon? --- src/cratedb_about/outline/cratedb-outline.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cratedb_about/outline/cratedb-outline.yaml b/src/cratedb_about/outline/cratedb-outline.yaml index 0076343..1642547 100644 --- a/src/cratedb_about/outline/cratedb-outline.yaml +++ b/src/cratedb_about/outline/cratedb-outline.yaml @@ -306,6 +306,7 @@ data: description: | Users and roles account information is stored in the cluster metadata of CrateDB and supports standard SQL statements to create, alter and drop users and roles. + You need this knowledge to work with permissions in CrateDB. parents: [reference] source: docs - title: "CrateDB reference: Privileges" @@ -316,6 +317,7 @@ data: The privileges of other users and roles have to be managed using the `GRANT`, `DENY` or `REVOKE` statements. The privileges that can be granted, denied or revoked are: `DQL`, `DML`, `DDL`, `AL`. The privileges can be granted on different classes: `CLUSTER`, `SCHEMA`, `TABLE`, `VIEW`. + You need this knowledge to work with permissions in CrateDB. parents: [reference] source: docs - title: "CrateDB tutorial: Multi-tenancy with CrateDB" @@ -326,6 +328,7 @@ data: (e.g., PostgreSQL). However, there are several ways to implement multi-tenancy in CrateDB, and, as is often the case, which one works the best depends on a variety of options and trade-offs. The article illustrates two methods for sharing a single CrateDB instance between multiple tenants. + You need this knowledge to work with permissions in CrateDB. source: tutorials # SQL