Sync GateWay LiteCoreException 403 Forbidden after creating db via API

CBS 5.5
CBL 2.0 db023
SGW 2.0 beta2

Hi,

We perform a PUT with following dbSetting:

"user": {
			"server": "http://xx.xx.xx.xx:8091",
			"username": "xxxx",
			"password": "xxxxxxx",
			"bucket": "user",
			"enable_shared_bucket_access": true,
			"import_docs": "continuous",
			"import_filter": `
			function(doc) {
				if (doc.db != "user") {
					return false
				}
				return true
			}
			`,
			"users": {
				"GUEST": {
					"disabled": true
				},
				"xxx": {
					"password": "xxxxx",
					"admin_channels": ["*"],
					"allow_empty_password": false
				}

			},
			"unsupported": {
				"replicator_2": true,
				"enable_extended_attributes": true
			}

		},

This results the user in the bucket _sync:user:xxx as

{
	"name": "xxx",
	"admin_channels": {
		"*": 1
	},
	"all_channels": null,
	"sequence": 1,
	"passwordhash_bcrypt": "pwhash",
	"rolesSince": {}
}

But we get a 403 when replicating with CBL.

The main question is: why this error? I suppose it has something to do with how the user gets defined. I can see that _sync:seq is 2 and the user sequence is 1. Is that the problem? Is this user only allowed all admin_channels at sequence 1? How can I give the user all access at any time?

The other questions are:

  • what does "*":1 mean? I know that * is all but the :1 puzzles me
  • I’m not sure but I think I saw "!":1 elsewhere else
  • Why do the sequence and all_channels get set automatically? Did I do something wrong?

update:
In the sync logs I find
WS: [92778d9] Error: Client doesn't support WS protocol BLIP_3+CBMobile_2, only BLIP_3a2

update 2:
The CBL output:

00:29:27.566359| [WS] WARNING: {N8litecore9websocket12C4SocketImplE#2}==> N8litecore9websocket12C4SocketImplE ws:xx.xx.xx.xx:xxxx/promo/_blipsync
00:29:2703-20 13:54:20.550 D/Mono    ( 9421): Probing 'FLSliceResult_Free'.

.566910| [WS] WARNING: {N8litecore9websocket12C4SocketImplE#2} Unexpected or unclean socket disconnect! (reason=WebSocket status, code=403)03-20 13:54:20.550 D/Mono    ( 9421): Found as 'FLSliceResult_Free'.

Thread started:  #18
2 Likes