Access Control Configuration
Pre-3.0 Legacy Configuration Equivalents
This content describes configuration for Sync Gateway 3.0 and higher — for legacy configuration, see: Legacy Pre-3.0 Configuration |
Introduction
The sync function is crucial to the security of your application. It is in charge of data validation, access control and routing. The function executes every time a new revision/update is made to a document.
For more on the Sync Function and access control see: Sync Function Overview
Set database sync function
PUT /{keyspace}/_config/sync
Description
This will allow you to update the sync function.
Required Sync Gateway RBAC roles:
- Sync Gateway Architect
-
application/javascript
-
application/json
Parameters
Path Parameters
Name | Description | Schema |
---|---|---|
keyspace |
The keyspace to run the operation against. A keyspace is a dot-separated string, comprised of a database name, and optionally a named scope and collection. |
String |
Query Parameters
Name | Description | Schema |
---|---|---|
disable_oidc_validation |
If set, will not attempt to validate the configured OpenID Connect providers are reachable. |
Boolean |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Updated sync function successfully |
|
400 |
There was a problem with your request |
|
404 |
Resource could not be found |
|
412 |
Precondition Failed The supplied If-Match header did not match the current version of the configuration. Returned when optimistic concurrency control is used, and there has been an update to the configuration in between this update. |
Errors
This section shows possible error responses returned by the Admin REST API.
Property | Schema | |
---|---|---|
error |
The error name. |
String |
reason |
The error description. |
String |