Skip to content

Inventory: Inform about user management and privilege assignment#32

Merged
amotl merged 2 commits intomainfrom
outline-permissions
May 15, 2025
Merged

Inventory: Inform about user management and privilege assignment#32
amotl merged 2 commits intomainfrom
outline-permissions

Conversation

@amotl
Copy link
Member

@amotl amotl commented May 15, 2025

About

Relevant material about this topic is super important API information, but the outline missed to index it yet.

/cc @hammerhead, @hlcianfagna, @surister

@coderabbitai
Copy link

coderabbitai bot commented May 15, 2025

Warning

Rate limit exceeded

@amotl has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 11 minutes and 29 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 5c32708 and 5305138.

📒 Files selected for processing (2)
  • CHANGES.md (1 hunks)
  • src/cratedb_about/outline/cratedb-outline.yaml (1 hunks)

Walkthrough

The changes update documentation by expanding the changelog and the outline to include new entries about user and role management, privilege assignment, and multi-tenancy in CrateDB. No code or public API changes are made; only documentation structure and content are affected.

Changes

File(s) Change Summary
CHANGES.md Updated the "Unreleased" changelog section to rename a category from "Outline" to "Inventory" and add details on user/role management, privilege assignment, and multi-tenancy suggestions.
src/cratedb_about/outline/cratedb-outline.yaml Added three new documentation outline entries under the "API" section for user/role management, privileges, and a multi-tenancy tutorial.

Suggested reviewers

  • surister

Poem

In the docs, new outlines grow,
User roles and privileges now in tow.
Multi-tenancy gets a guide,
With admin secrets not to hide.
CrateDB’s knowledge hops ahead,
As rabbits document what’s said!
🐇📚✨


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Comment on lines +303 to +333
# Admin: User management, roles, privileges.
- 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.
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`.
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

Copy link
Member Author

@amotl amotl May 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would also like to drop the term "permission(s)" here. If it's yet missing from the leaf node content, we can at least provide it per description text.

Do you have any suggestions how to optimally sneak in that term?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a blatant association of terms per 1bbe828.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9286056 and ac29c79.

📒 Files selected for processing (2)
  • CHANGES.md (1 hunks)
  • src/cratedb_about/outline/cratedb-outline.yaml (1 hunks)

@amotl amotl force-pushed the outline-permissions branch from ac29c79 to 621bd3a Compare May 15, 2025 17:59
@amotl amotl marked this pull request as ready for review May 15, 2025 18:00
@amotl amotl force-pushed the outline-permissions branch from 621bd3a to 9ee1224 Compare May 15, 2025 19:37
@amotl amotl force-pushed the outline-permissions branch from 9ee1224 to 5c32708 Compare May 15, 2025 19:43
@amotl amotl changed the title Outline: Add information about user management and privilege assignment Inventory: Inform about user management and privilege assignment May 15, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ac29c79 and 5c32708.

📒 Files selected for processing (2)
  • CHANGES.md (1 hunks)
  • src/cratedb_about/outline/cratedb-outline.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • CHANGES.md
🔇 Additional comments (2)
src/cratedb_about/outline/cratedb-outline.yaml (2)

304-310: Parents attribute added correctly
The "Users and roles management" entry now includes parents: [reference], matching adjacent reference items for consistent categorization in the generated docs.


311-320: Parents attribute added correctly
The "Privileges" entry also has parents: [reference], maintaining alignment with other reference docs under the API section.

Comment on lines +321 to +332
- 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
Copy link

@coderabbitai coderabbitai bot May 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Relocate tutorial to the Tutorials section
The multi-tenancy tutorial is misplaced under the Admin block. It should live under the existing # Tutorials section (lines ~266–279) to preserve the logical flow of content.

For example, apply these diffs to remove it here and insert it under # Tutorials:

@@ -321,9 +321,6
-    - 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.
-      source: tutorials

@@ -267,2 +267,11
     - title: "Integration Tutorials II"
       link: https://community.cratedb.com/raw/1015/1
+    - 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.
+      source: tutorials
🤖 Prompt for AI Agents
In src/cratedb_about/outline/cratedb-outline.yaml around lines 321 to 329, the
multi-tenancy tutorial is incorrectly placed under the Admin section. Remove
this tutorial entry from these lines and insert it into the existing Tutorials
section located around lines 266 to 279 to maintain proper content organization
and logical flow.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coderabbitai: It was intentional to slot this element in here, next to the others about the same topic.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amotl Thank you for clarifying. You're absolutely right that keeping related content together by topic makes sense here. Grouping the multi-tenancy tutorial with the user management and privileges documentation provides better context for readers exploring these related concepts.


✏️ Learnings added
Learnt from: amotl
PR: crate/about#32
File: src/cratedb_about/outline/cratedb-outline.yaml:321-329
Timestamp: 2025-05-15T21:25:54.831Z
Learning: In the CrateDB outline YAML, content organization prioritizes thematic grouping (keeping related topics together) over content type grouping (separating tutorials from reference docs), as demonstrated by placing the multi-tenancy tutorial alongside user management and privileges documentation in the API section.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant