Skip to content
This repository has been archived by the owner on Oct 17, 2022. It is now read-only.

rfc(per-doc-access): first draft #424

Closed
wants to merge 9 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: add extra notes about security issues
  • Loading branch information
janl committed Jul 15, 2019
commit 1077dbc0cd9119234f0b225fac02208dd4d9d975
19 changes: 19 additions & 0 deletions rfcs/010-per-document-access-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,25 @@ None
This is a significant change to the CouchDB security model. All of the
above are security considerations.

Specifically these two issues are worth highlighting however:

1. If a doc ever gets a new username written to `_access` (only admins
can do this), that new user then has access to **all** previous
revisions of this document. If compaction hasn’t run yet, they will be
able to access full revision bodies. After compaction, they only get
revision hashes. Since revision hashes are content addressible, they
could try and brute-force a document body that matches an earlier rev
id. This is not a downside of this proposal, it is just something that
implementors have to have in mind.

2. If two users write the same, perviously unexisting document `A` with
differnt values for `_access`, they create a conflict. Since doc
contents may contain sensitive information, CouchDB can’t allow access
to either version. Similar to how conflicting _user docs result in a
user no longer being able to log-in, an admin has to resolve this doc
conflict before the doc can be used again.


# References

https://lists.apache.org/thread.html/6aa77dd8e5974a3a540758c6902ccb509ab5a2e4802ecf4fd724a5e4@%3Cdev.couchdb.apache.org%3E
Expand Down