Authentication for Couchbase Sync in clustered setting


#1

I just started playing with Couchbase Sync Gateway, and I’m trying to figure out a good way to handle custom authentication. I’m reading the following part of the documentation:
http://developer.couchbase.com/documentation/mobile/1.2/develop/guides/sync-gateway/administering-sync-gateway/authenticating-users/index.html
and have the following questions:

  1. Since instances of Couchbase Sync Gateway are unaware of each other, does that mean that one has to create the same user accounts on each of the instances so that regardless of which node our load balancing forwards the user to, authentication will still succeed?

  2. Is there any plan to add REST callback style authentication on CB Sync Gateway? Currently, something like that is already done for Facebook Auth, but how about in general? What I am thinking of is to put a custom auth Rest endpoint in the config file, and CB Sync Gateway would use that whenever it needs to authenticate.

Thanks a lot!


#2

@a.reisberg

When a user is created use info details are stored as document in the backing bucket, if you are using a Couchbase Server bucket then these will be available to all SG instances that share the same bucket.

There has been discussion about adding OAuth2 support, would this meet your use case? If not could you describe your use case in more detail.


#3

@andy Thanks for the quick response.

I didn’t know that adding OAuth2 support has been discussed. My use case is quite simple, just user name + password pair (token would also work as well), so OAuth2 definitely works.

Do you know roughly when 1.3 will be out?

Thanks!