Fair enough, thanks for the info.

I had been thinking I might also just reject user-supplied design
documents, on the basis that user-supplied data is *presumed to be
encrypted*, and a design doc would represent unencrypted data -- a
liability, to the service's operator. In any case, it seems like I have
options. Thanks again!

Sincerely,
Diana

On Tue, Nov 28, 2023 at 3:10 PM Robert Newson <[email protected]> wrote:

> Hi,
>
> Not great options out of the box, unfortunately.
>
> 1) the autoupdate property (true|false) in the design document itself,
> disables "background" indexing.
> 2) ken.ignore config items would let you block building of databases by
> name.
> 3) disable ken entirely.
>
> You'd also have to ensure users couldn't trigger interactive view building
> (i.e, don't let them call _view, _search, _find) but I think that's already
> achieved in your proposed setup.
>
> autoupdate seems inappropriate as that would also inhibit background
> building of the ddoc's views everywhere they're replicated to as well.
>
> the ken.ignore property seems maybe viable option but is not great. you'd
> need to list the dbname (and that's _shard_ level name I think) for every
> db you don't want to index.
>
> disabling ken entirely might suit you if you query your views often (and
> thus they don't get too stale) or you're prepared to take the latency hit
> when stale or you are happy to make a homegrown ken of your own for just
> your indexes.
>
> Beyond that it would need to be an enhancement or fork.
>
> HTH,
>
> B.
>
> > On 28 Nov 2023, at 22:45, Diana Thayer <[email protected]> wrote:
> >
> > Howdy!
> >
> > Is it possible to configure CouchDB to only index design documents on
> > certain databases?
> >
> > For context, I'm developing a service that wraps CouchDB so that users
> can
> > generate access tokens they can replicate with. These tokens look like
> > URLs, but they point to a proxy that processes the request before passing
> > it to the server. As these tokens permit replication *only*, it would be
> > pointless to build indices off the design documents that users replicate,
> > as they will never be able to query them.
> >
> > However, the service also uses CouchDB to store its own data, and I do
> want
> > it to be able to build and query indices. So, is there a way to permit
> both
> > use-cases in one CouchDB server?
> >
> > Best regards,
> > Diana
>
>

Reply via email to