Repository navigation
docs(acl): reserve view audit retention to the built-in admin - #609
Open
glasstiger wants to merge 5 commits into
Open
glasstiger wants to merge 5 commits into
glasstiger wants to merge 5 commits into
Conversation
|
🚀 Build success! Latest successful preview: https://preview-609--questdb-documentation.netlify.app/docs/ Commit SHA: fded463
|
… the built-in admin is disabled With acl.admin.user.enabled=false no principal can change the trail's storage policy, which is deliberate. Say so, and recommend a policy with a DROP LOCAL stage up front: view.audit.storage.policy on every node before the server creates the table, a new deployment or an upgrade from a release before 4.1.0, or ALTER TABLE SET STORAGE POLICY before upgrading from 4.1.0. Enabling the admin, with a restart, also covers repairing the trail with FORCE DROP PARTITION.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Documents questdb/questdb-enterprise#1316: on QuestDB Enterprise, only the built-in admin can remove rows from
sys.view_audit, the audit trail of audited views, or set its storage policy or TTL. Every other principal is refused, whatever it holds,DATABASE ADMINand grantsON ALL TABLESincluded, withonly the built-in admin can manage the retention, partitions and parameters of the view audit table. The message names partitions and parameters becauseSQUASH PARTITIONS,SET PARAM, and a storage policy withoutDROP LOCALare refused too, although they remove no rows. The audited views page currently says the opposite: that removing rows is not refused, and that these statements need only their table permissions, on the table orON ALL TABLES.Refused statements on the trail:
TRUNCATE TABLE,DROP PARTITION,SQUASH PARTITIONS,DETACH PARTITION,SET TTL,SET PARAM,SET STORAGE POLICY(any policy), andENABLE STORAGE POLICY.SELECT,DISABLE STORAGE POLICY,DROP STORAGE POLICY, partition conversion and a plainRESUME WALstay grantable. This breaks 4.1.0 deployments whose operators manage the trail's retention with grants, and leaves nobody able to manage it while the built-in admin is disabled (acl.admin.user.enabled=false), as the RBAC page recommends for production. That is deliberate, since the trail records administrators' reads too, so the pages document the workaround: a storage policy with aDROP LOCALstage, set up front, keeps pruning the trail without any principal, and changing it means enabling the admin, which takes a restart.Changes
security/audited-views.md:DROP LOCALstage, throughview.audit.storage.policybefore the server creates the table, checked withSHOW CREATE TABLE, or the built-in admin'sSET STORAGE POLICYbefore it is disabled. Changing the policy, removing rows and repairing the table withFORCE DROP PARTITIONthen mean enabling the admin, which takes a restart.operations/upgrade.md: new Upgrading to 4.1.1 section. Lists the refused statements, a query that finds the principals that can run them on 4.1.0, and the steps for deployments with the built-in admin disabled: set a storage policy with aDROP LOCALstage before upgrading from 4.1.0, clearing any TTL first, or setview.audit.storage.policywhen upgrading from a release before 4.1.0, and enable the admin to change the policy or repair the trail afterwards.configuration/audited-views.md(view.audit.storage.policy),query/sql/alter-table-set-storage-policy.md(Permissions),query/sql/alter-table-set-ttl.md,security/governance.md, andsecurity/rbac.md(Built-in admin): one or two sentences each, pointing to the new rules.configuration/audited-views.mdandsecurity/rbac.mdalso recommend aDROP LOCALstage before the built-in admin is disabled, and the former to set the property on every node before the first start.changelog.mdx: an Updated entry for October 2026.Verification
ON ALL TABLESand as aDATABASE ADMINholder: each is refused with the documented error.TRUNCATE TABLEnaming the trail with another table truncates neither.DISABLE STORAGE POLICY,DROP STORAGE POLICY,CONVERT PARTITION TO PARQUETandRESUME WALsucceed, andENABLE STORAGE POLICYis then refused. The built-in admin is refused while it has assumed a service account. Theactive_permissions()query in the upgrade section returns the expected holders. With the built-in admin disabled, a policy set throughview.audit.storage.policybefore the first start is active with itsDROP LOCALstage, and aGRANT ALL ... WITH GRANT OPTIONadministrator is refusedSET TTL 0 HOURSandSET STORAGE POLICY, asEntViewAuditRetentionWithoutBuiltInAdminTestin questdb/questdb-enterprise#1316 checks.docusaurus buildpasses, with broken links and anchors set to fail the build.Dependencies
Merge once the QuestDB Enterprise release that includes questdb/questdb-enterprise#1316 ships; until then, the pages describe behavior that 4.1.0 does not have.
The pages call that release 4.1.1, the version Enterprise
mainbuilds now. If it ships under another number, update the Upgrading to 4.1.1 heading, the#upgrading-to-411link on the audited views page, and the changelog entry. Move the changelog entry if the merge lands after October 2026.