Hi Traun,
I was referring to the sentence "
(...) add a new property called shadow to the database configuration object (...)" in the
bucket shadowing docs with the config snippet:
"shadow": {
"bucket": "myapp"
}
It was unclear to me where to put this in my config.json file. I would have preferred if you would have simply put a complete and valid config section there, which makes it much easier to pick up for newbies in the NoSQL and Sync Gateway domain. I.e. something like this.
{
"interface":":4984",
"adminInterface":":4985",
"log":["REST"],
"databases":{
"sync_gateway":{
"bucket":"sync_gateway",
"sync":`function(doc) {channel(doc.channels);}`,
"shadow": {
"bucket": "name_of_the_bucket_you_want_to_shadow"
}
}
}
}
The other thing is what is the minimal configuration as far as user access is concerned. I believe all the sync databases have a default GUEST user configured, but it is disabled? I didn't get the sync to work before I added a user via the Sync Admin REST API, explicitly added that user in the sync function with access to my channel and used a basic authenticator on my Replication instance in Android. You can set restriction on the bucket, channels, roles, login via Facebook, Persona's custom cookies, etc. It's a bit overwhelming if you are new on all the subjects (like I am). I would love to see some end-to-end example there. I.e. setup Couchbase Server, of course you have to set an admin username / password, but you can also restrict your buckets? How could and why should you do this? Then you can add user sections to the Sync Gateway config, but you must also add them via the Sync Admin REST api on port 4985, etc. You can explicitly grant access to users and roles via the sync function. Then you have to do something with setting an Authenticator on the Replication instance, etc. I got it working, it's all there in various places. I'm just saying I'd like to see a more elaborate section which combines all the components (Couchbase Lite for Android / iOS, Sync Gateway, Couchbase Server) in a single end-to-end / step-by-step tutorial.
Cheers,
Johan.