Skip to main content

Adding a Couchbase Connection

Prerequisites

  • A user with sufficient permissions is required to establish a connection with Couchbase.
  • Zeenea traffic flows towards the database must be open.
TargetProtocolUsual Ports
CouchbaseJava SDK8091
note

A link to the configuration template can be found here: Zeenea Connector Downloads.

Supported Versions

The Couchbase connector was developed and tested with version 7.0.2. It is compatible with versions 7.0 and later.

Installing the Plugin

The Couchbase connector can be downloaded here: Zeenea Connector Downloads.

For more information on how to install a plugin, please refer to the following article: Installing and Configuring Connectors as a Plugin.

Declaring the Connection

Creating and configuring connectors is done through a dedicated configuration file located in the /connections folder of the relevant scanner.

Read more: Managing Connections

In order to establish a connection with a Couchbase instance, specifying the following parameters in the dedicated file is required:

ParameterExpected value
nameThe name that will be displayed to catalog users for this connection.
codeThe unique identifier of the connection on the Zeenea platform. Once registered on the platform, this code must not be modified or the connection will be considered as new and the old one removed from the scanner.
connector_idThe type of connector to be used for the connection. Here, the value must be couchbase and this value must not be modified.
connection.urlDatabase address (example: couchbase://host:port)
connection.usernameUsername
connection.passwordUser password
schema_analysis.sample.sizeLimits the size of the sample for identifying the pattern of collections. Default value is 1000.
tls.truststore.pathThe Trust Store file path. This file must be provided in case TLS encryption is activated (protocol https) and when certificates of Kafka servers are delivered by a specific authority. It must contain the certification chain.
tls.truststore.passwordPassword of the trust store file
tls.truststore.typeType of the trust store file (PKCS12 or JKS). Default value is discovered from the file extension.
tls.keystore.pathThe key Store file path. This file must be provided in case TLS encryption is activated (protocol https) and when certificates of Couchbase servers are delivered by a specific authority. It must contain the certification chain.
tls.keystore.passwordPassword of the key store file.
tls.keystore.typeType of the trust store file (PKCS12 or JKS). Default value is discovered from the file extension.

User Permissions

In order to collect metadata, the running user's permissions must allow them to access and read databases that need cataloging.

Here, the user must have the following roles:

  • Read-Only Admin (ro_admin)
  • Query Select (query_select[*])

For more information, refer to the Couchbase docs: https://docs.couchbase.com/server/current/learn/security/roles.html

Data Extraction

As Couchbase does not use schemas, knowing datasets format needs identification from data extracting.

This connector uses a sampling request. Because the request is probabilistic, rare fields can't be detected.

The sample size is defined in the connector. There is no risk of a timeout failure, and no script code is run on the Couchbase server. Some data is read by the connector but it is never saved or sent and is "forgotten" as soon as the information has been extracted.

Collected Metadata

Inventory

Will collect the list of collection accessible by the user.

Dataset

A dataset is a collection.

  • Name
  • Source Description
  • Technical Data:
    • Bucket
    • Scope

Field

Dataset field.

  • Name
  • Source Description: N/A
  • Type: Field type
  • Can be null: Depending on field presence
  • Multivalued: Depending on field settings
  • Primary Key: N/A
  • Technical metadata:
    • Technical name
    • Native type

Unique Identification Keys

A key is associated with each item of the catalog. When the object comes from an external system, the key is built and provided by the connector.

Read more: Identification Keys

ObjectIdentifier KeyDescription
Datasetcode/bucket/scope/dataset name
  • code: Unique identifier of the connection noted in the configuration file
  • bucket: Bucket name
  • scope: Scope name
  • dataset name: Collection name
Fieldcode/keyspace/dataset name/field name
  • code: Unique identifier of the connection noted in the configuration file
  • bucket: Bucket name
  • scope: Scope name
  • dataset name: Collection name
  • field name