This is a great idea actually. I do something like that myself where I&#x27;ve exposed a couchdb instance publically but the access through it is controlled by access_by_lua. I use basic authentication instead of token based auth but the principle is the same.