Skip to content

Add read-only backup permissions - #2186

Merged
g-despot merged 2 commits into
weaviate:mainfrom
denis-samatov:feat/read-backups-permission
Oct 8, 2026
Merged

g-despot merged 2 commits into
weaviate:mainfrom
denis-samatov:feat/read-backups-permission

Conversation

@denis-samatov

Copy link
Copy Markdown
Contributor

Fixes #2183.

Weaviate 1.39 adds the collection-scoped read_backups action, but the Python client cannot currently construct it and skips it when reading role permissions.

This adds Actions.Backups.READ and the keyword-only read option to Permissions.backup(). A read-only role can list backups and inspect backup/restore status without granting create, restore, or cancel. Existing manage=True behavior and defaults are preserved.

Validation on Python 3.12.14:

  • RBAC tests: 11 passed; new cases fail on the unchanged implementation.
  • Full unit suite: 534 passed, 1 skipped.
  • Full mock suite: 64 passed, 1 failed. The same auth-warning assertion fails on the unchanged base commit; the individual test passes alone.
  • Ruff with basic rules, format, Flake8, Pyright for the changed module, and diff checks passed.
  • Added a Weaviate 1.39+ integration test; no live-server integration run was performed locally.

AI assistance was used to implement, test, and review this change.

Support the collection-scoped read_backups action introduced in Weaviate 1.39, with construction and role round-trip tests.

Refs weaviate#2183

@orca-security-eu orca-security-eu Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

@weaviate-git-bot

Copy link
Copy Markdown

To avoid any confusion in the future about your contribution to Weaviate, we work with a Contributor License Agreement. If you agree, you can simply add a comment to this PR that you agree with the CLA so that we can merge.

beep boop - the Weaviate bot 👋🤖

PS:
Are you already a member of the Weaviate Forum?

read_backups ships in Weaviate 1.39.10 and 1.40.0, not 1.39.0, so the
integration check moves into the test_create_role table with
min_version=40 and skips on the 1.39.0 server CI runs. The unit tests
shrink to the two cases the issue needs, and the docstring goes to
match the other Permissions helpers.
@g-despot
g-despot self-requested a review October 8, 2026 09:02
@g-despot
g-despot merged commit 0b9bede into weaviate:main Oct 8, 2026
128 checks passed
@g-despot

g-despot commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Thank you for the contribution! 😄

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.

New RBAC role needs client changes to grant permission

3 participants