Not understanding how to get couchbase lite to pull down all exsisting dbs from sync gateway

I was going to do a lecture in this post but I will skip it for now. I will say that most, 99%, of your post wasn’t helpful at all. I have already read the documentation for the API’s, Logging, and ext. I am sure that the configurations for the users where done right. I was merely asking if we needed to set the access control in the sync function as well as in the users that we define.

So I think there is some confusion about my question on the guest user.I don’t think I was completely clear about the scenario. I have users defined using the Admin API, they are defined correctly. I am able to connect with a defined user, using basic authentication, to the gateway. But While reading the gateway logs, when I was attempting to sync, I noticed that the logs mentioned something about a guest user. Now I was wondering why would it try to sync as a guest user when I have authenticated, using the basic authentication. (Please do not post about basic authentication using cbl I have already read the documentation and I am doing it correctly).

We are trying to help here based on our interpretation of the questions you posted. So perhaps you should take that into consideration before dismissing a response. So let’s try again .

If you assign a channel to a role and assign that role to a user will you still have to set access in the sync function i.e. access(doc.username, doc.channels);

As indicated in may previous response, you do not assign channels to roles and you do not assign role to user. You assign users to roles and provide roles access to channels. That is a subtle but important distinction to be clear about. You also mentioned " access(doc.username, doc.channels)" which provides users access to channels. As indicated in my earlier post, that is not required

If you assign a channel to a role and assign that role to a user will you still have to set access in the sync function i.e. access(doc.username, doc.channels); so that the sync function will know to return those documents to the user?
am sure that the configurations for the users where done right. I was merely asking if we needed to set the access control in the sync function as well as in the users that we define.
[/quote]

Not required.

I am not sure why it would try to sync as guest in the first place… So I think there is some confusion about my question on the guest user.I don’t think I was completely clear about the scenario. I have users defined using the Admin API, they are defined correctly. I am able to connect with a defined user, using basic authentication, to the gateway.

The way auth is handled various slightly by platform depending on underlying network stack… On Android, even if you set auth header , the authorization header is only sent after the 401 unauthorized response from sync gateway. That’s why you see the guest on initial connection setup. In contrast, on iOS, the auth header is sent during initial connection setup . Both are perfectly valid.

The logging link that I shared with option to support plaintext was in response to your the above question where you complained about binary log decoding.

My team and I were able to find the solutions its seems as if the Basic Authenticator, config.setAuthenticator(new BasicAuthenticator(“username”, “password”)); Doesn’t set the Authorization Header. We tested it by adding it with custom headers and we were able to get it to sync correctly. Sorry If I seemed a little irritated or frustrated. I pray that the Yahweh/Yahshuah/and HolySpirit continues to bless you and your family. Everyone stay safe out there.

Just a heads up we set the Authorization as follows.
We set the Authentication with
Map<String, String> headers = new HashMap<>();
headers.put(“Authentication”, "Basic "+ Random Authentication);
config.setHeaders(headers);

@Christopher_Hobbs Could you submit an issue about BasicAuthenticator not working at here ?

hi… how did you set Random Authentication? Surely it cant be anything random, can it? base64?

Not sure I understood your question but the Authorization header format must comply with RFC 7617.