feat: ACL_REQUIRE_CREATOR rejects unstamped document creates - #15
Merged
Conversation
Bake an opt-in require-creator rule into the generated Couch VDU so non-admin creates cannot omit creator. Default remains off; flag flips bump the ddoc version so ensure rewrites on deploy. Co-authored-by: Peter Baker <PeterBaker0@users.noreply.github.com>
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
Adds opt-in
ACL_REQUIRE_CREATOR(defaultfalse) so the installed Couch_design/aclvalidate_doc_updatecan reject non-admin creates that omit a non-emptycreator. This closes the hole where unstamped docs become world-open to every DB member viar-*, without changing default create semantics or map behaviour for already-written open docs.Changes
ACL_REQUIRE_CREATOR→couch.aclRequireCreator(bool, default off)creatorfor non-_designdocs (_adminexempt)2.3.0(flag off) ↔2.4.0(flag on); ensure/migrate rewrites generated VDUs on flag flipTest plan
pnpm lint/pnpm fmt:check/pnpm typecheck/pnpm test(206 unit tests)docker compose up -d --buildthenpnpm test:integration(156 tests, including require-creator + existing ACL isolation)Release notes
After merge, cut a minor release (
1.5.0) so the GHCR image includes this flag. Changelog entry is under[Unreleased].