Cloud

Build 23.0.8839
  • AlloyDB
    • Getting Started
      • Establishing a Connection
      • Using Kerberos
      • SSL Configuration
      • Firewall and Proxy
    • Data Model
      • Data Type Mapping
    • Connection String Options
      • Authentication
        • Server
        • Database
        • User
        • Password
        • Port
        • UseSSL
        • Visibility
      • SSL
        • SSLServerCert
      • SSH
        • SSHAuthMode
        • SSHClientCert
        • SSHClientCertPassword
        • SSHClientCertSubject
        • SSHClientCertType
        • SSHServer
        • SSHPort
        • SSHUser
        • SSHPassword
        • SSHServerFingerprint
        • UseSSH
      • Logging
        • Verbosity
      • Schema
        • BrowsableSchemas
        • IgnoredSchemas
      • Miscellaneous
        • AllowPreparedStatement
        • BrowsePartitions
        • FetchResultSetMetadata
        • MaxRows
        • Timeout
        • TimeZone

AlloyDB - CData Cloud

Overview

CData Cloud offers access to AlloyDB across several standard services and protocols, in a cloud-hosted solution. Any application that can connect to a MySQL or SQL Server database can connect to AlloyDB through CData Cloud.

CData Cloud allows you to standardize and configure connections to AlloyDB as though it were any other OData endpoint, or standard SQL Server/MySQL database.

Key Features

  • Full SQL Support: AlloyDB appears as standard relational databases, allowing you to perform operations - Filter, Group, Join, etc. - using standard SQL, regardless of whether these operations are supported by the underlying API.
  • CRUD Support: Both read and write operations are supported, restricted only by security settings that you can configure in Cloud or downstream in the source itself.
  • Secure Access: The administrator can create users and define their access to specific databases and read-only operations or grant full read & write privileges.
  • Comprehensive Data Model & Dynamic Discovery: CData Cloud provides comprehensive access to all of the data exposed in the underlying data source, including full access to dynamic data and easily searchable metadata.

CData Cloud

Getting Started

This page provides a guide to Establishing a Connection to AlloyDB in CData Cloud, as well as information on the available resources, and a reference to the available connection properties.

Connecting to AlloyDB

Establishing a Connection shows how to authenticate to AlloyDB and configure any necessary connection properties to create a database in CData Cloud

Accessing Data from CData Cloud Services

Accessing data from AlloyDB through the available standard services and CData Cloud administration is documented in further details in the CData Cloud Documentation.

CData Cloud

Establishing a Connection

Connect to AlloyDB by selecting the corresponding icon in the Database tab. Required properties are listed under Settings. The Advanced tab lists connection properties that are not typically required.

Connecting to AlloyDB

The following connection properties are required in order to connect to AlloyDB.

  • Server: The host name or IP of the server hosting the AlloyDB database.
  • Port (optional): The port of the server hosting the AlloyDB database. This property is set to 5432 by default.
  • User: The user which will be used to authenticate with the AlloyDB server.
  • Password: The password which will be used to authenticate with the AlloyDB server.
  • Database (optional): The database to connect to when connecting to the AlloyDB Server. If this is not set, the user's default database will be used.

Authenticating to AlloyDB

Standard Authentication

Standard authentication (using the user/password combination supplied earlier) is the default form of authentication.

No further action is required to leverage Standard Authentication to connect.

pg_hba.conf Auth Schemes

There are additional methods of authentication supported by the Cloud which must be enabled in the pg_hba.conf file on the AlloyDB server.

You may find instructions about authentication setup on the AlloyDB Server here.

MD5

You can authenticate using MD5 password verification by setting the auth-method in the pg_hba.conf file to md5.

SASL

The Cloud can authenticate by verifying the password with SASL (particularly, SCRAM-SHA-256).

To use this authentication method, set the auth-method in the pg_hba.conf file to scram-sha-256.

Kerberos

The authentication with Kerberos is initiated by AlloyDB Server when the CData Cloud is trying to connect to it. Set up Kerberos on the AlloyDB Server to activate this authentication method. Once you have Kerberos authentication set up on the AlloyDB server, see Using Kerberos for details regarding how to authenticate with Kerberos by the Cloud.

CData Cloud

Using Kerberos

Kerberos

Authenticating to AlloyDB via Kerberos requires you to define authentication properties and to choose how Kerberos should retrieve authentication tickets.

Retrieve Kerberos Tickets

Kerberos tickets are used to authenticate the requester's identity. The use of tickets instead of formal logins/passwords eliminates the need to store passwords locally or send them over a network. Users are reauthenticated (tickets are refreshed) whenever they log in at their local computer or enter kinit USER at the command prompt.

The Cloud provides three ways to retrieve the required Kerberos ticket, depending on whether or not the KRB5CCNAME and/or KerberosKeytabFile variables exist in your environment.

MIT Kerberos Credential Cache File

This option enables you to use the MIT Kerberos Ticket Manager or kinit command to get tickets. With this option there is no need to set the User or Password connection properties.

This option requires that KRB5CCNAME has been created in your system.

To enable ticket retrieval via MIT Cerberos Credential Cache Files:

  1. Ensure that the KRB5CCNAME variable is present in your environment.
  2. Set KRB5CCNAME to a path that points to your credential cache file. (For example, C:\krb_cache\krb5cc_0 or /tmp/krb5cc_0.) The credential cache file is created when you use the MIT Kerberos Ticket Manager to generate your ticket.
  3. To obtain a ticket:
    1. Open the MIT Kerberos Ticket Manager application.
    2. Click Get Ticket.
    3. Enter your principal name and password.
    4. Click OK.

    If the ticket is successfully obtained, the ticket information appears in Kerberos Ticket Manager and is stored in the credential cache file.

The Cloud uses the cache file to obtain the Kerberos ticket to connect to AlloyDB.

Note: If you would prefer not to edit KRB5CCNAME, you can use the KerberosTicketCache property to set the file path manually. After this is set, the Cloud uses the specified cache file to obtain the Kerberos ticket to connect to AlloyDB.

Keytab File

If your environment lacks the KRB5CCNAME environment variable, you can retrieve a Kerberos ticket using a Keytab File.

To use this method, set the User property to the desired username, and set the KerberosKeytabFile property to a file path pointing to the keytab file associated with the user.

User and Password

If your environment lacks the KRB5CCNAME environment variable and the KerberosKeytabFile property has not been set, you can retrieve a ticket using a user and password combination.

To use this method, set the User and Password properties to the user/password combination that you use to authenticate with AlloyDB.

Enabling Cross-Realm Authentication

More complex Kerberos environments can require cross-realm authentication where multiple realms and KDC servers are used. For example, they might use one realm/KDC for user authentication, and another realm/KDC for obtaining the service ticket.

To enable this kind of cross-realm authentication, set the KerberosRealm and KerberosKDC properties to the values required for user authentication. Also, set the KerberosServiceRealm and KerberosServiceKDC properties to the values required to obtain the service ticket.

CData Cloud

SSL Configuration

Customizing the SSL Configuration

By default, the Cloud attempts to negotiate SSL/TLS by checking the server's certificate against the system's trusted certificate store.

To specify another certificate, see the SSLServerCert property for the available formats to do so.

Client SSL Certificates

The AlloyDB Cloud also supports setting client certificates. Set the following to connect using a client certificate.

  • SSLClientCert: The name of the certificate store for the client certificate.
  • SSLClientCertType: The type of key store containing the TLS/SSL client certificate.
  • SSLClientCertPassword: The password for the TLS/SSL client certificate.
  • SSLClientCertSubject: The subject of the TLS/SSL client certificate.

CData Cloud

Firewall and Proxy

Connecting Through a Firewall or Proxy

Set the following properties:

  • To use a proxy-based firewall, set FirewallType, FirewallServer, and FirewallPort.
  • To tunnel the connection, set FirewallType to TUNNEL.
  • To authenticate, specify FirewallUser and FirewallPassword.
  • To authenticate to a SOCKS proxy, additionally set FirewallType to SOCKS5.

CData Cloud

Data Model

The Cloud models data directly from AlloyDB.

CData Cloud

Data Type Mapping

Data Type Mappings

The Cloud maps types from the data source to the corresponding data type available in the schema. The table below documents these mappings.

AlloyDB CData Schema
abstime string
aclitem string
bigint long
bigserial long
bit varying string
bit string
boolean bool
box string
bytea binary
char string
character varying string
character string
cid string
cidr string
circle string
date date
daterange string
double precision float
gtsvector string
inet string
int2vector string
int4range string
int8range string
integer int
json string
jsonb binary
line string
lseg string
macaddr8 string
macaddr string
money decimal
name string
numeric decimal
numrange string
oid string
oidvector string
path string
pg_dependencies string
pg_lsn string
pg_ndistinct string
pg_node_tree string
point string
polygon string
real float
refcursor string
regclass string
regconfig string
regdictionary string
regnamespace string
regoper string
regoperator string
regproc string
regprocedure string
regrole string
regtype string
reltime string
serial int
smallint int
smallserial int
smgr string
text string
tid string
time with time zone string
time without time zone time
timestamp with time zone datetime
timestamp without time zone datetime
tinterval string
tsquery string
tsrange string
tstzrange string
tsvector string
txid_snapshot string
uuid string
xid string
xml string

CData Cloud

Connection String Options

The connection string properties are the various options that can be used to establish a connection. This section provides a complete list of the options you can configure in the connection string for this provider. Click the links for further details.

For more information on establishing a connection, see Establishing a Connection.

Authentication


PropertyDescription
ServerThe host name or IP address of the server.
DatabaseThe name of the AlloyDB database.
UserThe AlloyDB user account used to authenticate.
PasswordThe password used to authenticate the user.
PortThe port number of the AlloyDB server.
UseSSLThis field sets whether SSL is enabled.
VisibilityVisibility restrictions used to filter exposed metadata for tables with privileges granted to them for the current user.

SSL


PropertyDescription
SSLServerCertThe certificate to be accepted from the server when connecting using TLS/SSL.

SSH


PropertyDescription
SSHAuthModeThe authentication method used when establishing an SSH Tunnel to the service.
SSHClientCertA certificate to be used for authenticating the SSHUser.
SSHClientCertPasswordThe password of the SSHClientCert key if it has one.
SSHClientCertSubjectThe subject of the SSH client certificate.
SSHClientCertTypeThe type of SSHClientCert private key.
SSHServerThe SSH server.
SSHPortThe SSH port.
SSHUserThe SSH user.
SSHPasswordThe SSH password.
SSHServerFingerprintThe SSH server fingerprint.
UseSSHWhether to tunnel the AlloyDB connection over SSH. Use SSH.

Logging


PropertyDescription
VerbosityThe verbosity level that determines the amount of detail included in the log file.

Schema


PropertyDescription
BrowsableSchemasThis property restricts the schemas reported to a subset of the available schemas. For example, BrowsableSchemas=SchemaA,SchemaB,SchemaC.
IgnoredSchemasVisibility restriction filter which is used to hide schemas from the list of schemas obtained by querying metadata. For example, 'information_schema, pg_catalog'. Schema names are case sensitive.

Miscellaneous


PropertyDescription
AllowPreparedStatementPrepare a query statement before its execution.
BrowsePartitionsBy default, the provider exposes the super table and its partitions by metadata. You may hide sub partitions by setting this property to false.
FetchResultSetMetadataThis field sets whether the provider retrieves metadata pertaining to the schema and table name for resultset columns returned by the server.
MaxRowsLimits the number of rows returned when no aggregation or GROUP BY is used in the query. This takes precedence over LIMIT clauses.
TimeoutThe value in seconds until the timeout error is thrown, canceling the operation.
TimeZoneNotifies the server about the timezone on the client with a standard SET TIMEZONE query when a connection is being opened.
CData Cloud

Authentication

This section provides a complete list of the Authentication properties you can configure in the connection string for this provider.


PropertyDescription
ServerThe host name or IP address of the server.
DatabaseThe name of the AlloyDB database.
UserThe AlloyDB user account used to authenticate.
PasswordThe password used to authenticate the user.
PortThe port number of the AlloyDB server.
UseSSLThis field sets whether SSL is enabled.
VisibilityVisibility restrictions used to filter exposed metadata for tables with privileges granted to them for the current user.
CData Cloud

Server

The host name or IP address of the server.

Data Type

string

Default Value

"EMPTYSTRING"

Remarks

The host name or IP of the server hosting the AlloyDB Database. If not set, the default value "localhost" is used.

CData Cloud

Database

The name of the AlloyDB database.

Data Type

string

Default Value

""

Remarks

The database to connect to when connecting to the AlloyDB Server. If a database is not provided, the user's default database will be used.

CData Cloud

User

The AlloyDB user account used to authenticate.

Data Type

string

Default Value

""

Remarks

Together with Password, this field is used to authenticate against the AlloyDB server.

CData Cloud

Password

The password used to authenticate the user.

Data Type

string

Default Value

""

Remarks

The User and Password are together used to authenticate with the server.

CData Cloud

Port

The port number of the AlloyDB server.

Data Type

string

Default Value

"5432"

Remarks

The port number of the Server hosting the AlloyDB Database. If not specified, the default port number (5432) is used.

CData Cloud

UseSSL

This field sets whether SSL is enabled.

Data Type

bool

Default Value

true

Remarks

This field sets whether the Cloud will attempt to negotiate TLS/SSL connections to the server. By default, the Cloud checks the server's certificate against the system's trusted certificate store. To specify another certificate, set SSLServerCert.

CData Cloud

Visibility

Visibility restrictions used to filter exposed metadata for tables with privileges granted to them for the current user.

Data Type

string

Default Value

""

Remarks

By default, visibility filtering is not applied. Filtering values are case insensitive.

For example, the 'SELECT,INSERT' filter is restricting metadata visibility only for those tables which may be accessed by the current user for the SELECT and INSERT operations. Supported privilege values are SELECT, INSERT, UPDATE, DELETE, REFERENCES.

CData Cloud

SSL

This section provides a complete list of the SSL properties you can configure in the connection string for this provider.


PropertyDescription
SSLServerCertThe certificate to be accepted from the server when connecting using TLS/SSL.
CData Cloud

SSLServerCert

The certificate to be accepted from the server when connecting using TLS/SSL.

Data Type

string

Default Value

""

Remarks

If using a TLS/SSL connection, this property can be used to specify the TLS/SSL certificate to be accepted from the server. Any other certificate that is not trusted by the machine is rejected.

This property can take the following forms:

Description Example
A full PEM Certificate (example shortened for brevity) -----BEGIN CERTIFICATE----- MIIChTCCAe4CAQAwDQYJKoZIhv......Qw== -----END CERTIFICATE-----
A path to a local file containing the certificate C:\cert.cer
The public key (example shortened for brevity) -----BEGIN RSA PUBLIC KEY----- MIGfMA0GCSq......AQAB -----END RSA PUBLIC KEY-----
The MD5 Thumbprint (hex values can also be either space or colon separated) ecadbdda5a1529c58a1e9e09828d70e4
The SHA1 Thumbprint (hex values can also be either space or colon separated) 34a929226ae0819f2ec14b4a3d904f801cbb150d

If not specified, any certificate trusted by the machine is accepted.

Use '*' to signify to accept all certificates. Note that this is not recommended due to security concerns.

CData Cloud

SSH

This section provides a complete list of the SSH properties you can configure in the connection string for this provider.


PropertyDescription
SSHAuthModeThe authentication method used when establishing an SSH Tunnel to the service.
SSHClientCertA certificate to be used for authenticating the SSHUser.
SSHClientCertPasswordThe password of the SSHClientCert key if it has one.
SSHClientCertSubjectThe subject of the SSH client certificate.
SSHClientCertTypeThe type of SSHClientCert private key.
SSHServerThe SSH server.
SSHPortThe SSH port.
SSHUserThe SSH user.
SSHPasswordThe SSH password.
SSHServerFingerprintThe SSH server fingerprint.
UseSSHWhether to tunnel the AlloyDB connection over SSH. Use SSH.
CData Cloud

SSHAuthMode

The authentication method used when establishing an SSH Tunnel to the service.

Possible Values

None, Password, Public_Key

Data Type

string

Default Value

"Password"

Remarks

  • None: No authentication is performed. The current User value is ignored, and the connection is logged in as anonymous.
  • Password: The Cloud uses the values of User and Password to authenticate the user.
  • Public_Key: The Cloud uses the values of User and SSHClientCert to authenticate the user. SSHClientCert must have a private key available for this authentication method to succeed.

CData Cloud

SSHClientCert

A certificate to be used for authenticating the SSHUser.

Data Type

string

Default Value

""

Remarks

SSHClientCert must contain a valid private key in order to use public key authentication. A public key is optional, if one is not included then the Cloud generates it from the private key. The Cloud sends the public key to the server and the connection is allowed if the user has authorized the public key.

The SSHClientCertType field specifies the type of the key store specified by SSHClientCert. If the store is password protected, specify the password in SSHClientCertPassword.

Some types of key stores are containers which may include multiple keys. By default the Cloud will select the first key in the store, but you can specify a specific key using SSHClientCertSubject.

CData Cloud

SSHClientCertPassword

The password of the SSHClientCert key if it has one.

Data Type

string

Default Value

""

Remarks

This property is only used when authenticating to SFTP servers with SSHAuthMode set to PublicKey and SSHClientCert set to a private key.

CData Cloud

SSHClientCertSubject

The subject of the SSH client certificate.

Data Type

string

Default Value

"*"

Remarks

When loading a certificate the subject is used to locate the certificate in the store.

If an exact match is not found, the store is searched for subjects containing the value of the property.

If a match is still not found, the property is set to an empty string, and no certificate is selected.

The special value "*" picks the first certificate in the certificate store.

The certificate subject is a comma separated list of distinguished name fields and values. For instance "CN=www.server.com, OU=test, C=US, [email protected]". Common fields and their meanings are displayed below.

FieldMeaning
CNCommon Name. This is commonly a host name like www.server.com.
OOrganization
OUOrganizational Unit
LLocality
SState
CCountry
EEmail Address

If a field value contains a comma it must be quoted.

CData Cloud

SSHClientCertType

The type of SSHClientCert private key.

Possible Values

USER, MACHINE, PFXFILE, PFXBLOB, JKSFILE, JKSBLOB, PEMKEY_FILE, PEMKEY_BLOB, PPKFILE, PPKBLOB, XMLFILE, XMLBLOB

Data Type

string

Default Value

"PEMKEY_FILE"

Remarks

This property can take one of the following values:

TypesDescriptionAllowed Blob Values
MACHINE/USER Blob values are not supported.
JKSFILE/JKSBLOB base64-only
PFXFILE/PFXBLOBA PKCS12-format (.pfx) file. Must contain both a certificate and a private key.base64-only
PEMKEY_FILE/PEMKEY_BLOBA PEM-format file. Must contain an RSA, DSA, or OPENSSH private key. Can optionally contain a certificate matching the private key.base64 or plain text. Newlines may be replaced with spaces when providing the blob as text.
PPKFILE/PPKBLOBA PuTTY-format private key created using the puttygen tool.base64-only
XMLFILE/XMLBLOBAn XML key in the format generated by the .NET RSA class: RSA.ToXmlString(true).base64 or plain text.

CData Cloud

SSHServer

The SSH server.

Data Type

string

Default Value

""

Remarks

The SSH server.

CData Cloud

SSHPort

The SSH port.

Data Type

string

Default Value

"22"

Remarks

The SSH port.

CData Cloud

SSHUser

The SSH user.

Data Type

string

Default Value

""

Remarks

The SSH user.

CData Cloud

SSHPassword

The SSH password.

Data Type

string

Default Value

""

Remarks

The SSH password.

CData Cloud

SSHServerFingerprint

The SSH server fingerprint.

Data Type

string

Default Value

""

Remarks

The SSH server fingerprint.

CData Cloud

UseSSH

Whether to tunnel the AlloyDB connection over SSH. Use SSH.

Data Type

bool

Default Value

false

Remarks

By default the Cloud will attempt to connect directly to AlloyDB. When this option is enabled, the Cloud will instead establish an SSH connection with the SSHServer and tunnel the connection to AlloyDB through it.

CData Cloud

Logging

This section provides a complete list of the Logging properties you can configure in the connection string for this provider.


PropertyDescription
VerbosityThe verbosity level that determines the amount of detail included in the log file.
CData Cloud

Verbosity

The verbosity level that determines the amount of detail included in the log file.

Data Type

string

Default Value

"1"

Remarks

The verbosity level determines the amount of detail that the Cloud reports to the Logfile. Verbosity levels from 1 to 5 are supported. These are detailed in the Logging page.

CData Cloud

Schema

This section provides a complete list of the Schema properties you can configure in the connection string for this provider.


PropertyDescription
BrowsableSchemasThis property restricts the schemas reported to a subset of the available schemas. For example, BrowsableSchemas=SchemaA,SchemaB,SchemaC.
IgnoredSchemasVisibility restriction filter which is used to hide schemas from the list of schemas obtained by querying metadata. For example, 'information_schema, pg_catalog'. Schema names are case sensitive.
CData Cloud

BrowsableSchemas

This property restricts the schemas reported to a subset of the available schemas. For example, BrowsableSchemas=SchemaA,SchemaB,SchemaC.

Data Type

string

Default Value

""

Remarks

Listing the schemas from databases can be expensive. Providing a list of schemas in the connection string improves the performance.

CData Cloud

IgnoredSchemas

Visibility restriction filter which is used to hide schemas from the list of schemas obtained by querying metadata. For example, 'information_schema, pg_catalog'. Schema names are case sensitive.

Data Type

string

Default Value

""

Remarks

By default, restrictions are not applied.

CData Cloud

Miscellaneous

This section provides a complete list of the Miscellaneous properties you can configure in the connection string for this provider.


PropertyDescription
AllowPreparedStatementPrepare a query statement before its execution.
BrowsePartitionsBy default, the provider exposes the super table and its partitions by metadata. You may hide sub partitions by setting this property to false.
FetchResultSetMetadataThis field sets whether the provider retrieves metadata pertaining to the schema and table name for resultset columns returned by the server.
MaxRowsLimits the number of rows returned when no aggregation or GROUP BY is used in the query. This takes precedence over LIMIT clauses.
TimeoutThe value in seconds until the timeout error is thrown, canceling the operation.
TimeZoneNotifies the server about the timezone on the client with a standard SET TIMEZONE query when a connection is being opened.
CData Cloud

AllowPreparedStatement

Prepare a query statement before its execution.

Data Type

bool

Default Value

true

Remarks

If the AllowPreparedStatement property is set to false, statements are parsed each time they are executed. Setting this property to false can be useful if you are executing many different queries only once.

If you are executing the same query repeatedly, you will generally see better performance by leaving this property set to the default, True. Preparing the query avoids recompiling the same query over and over. However, prepared statements also require the Cloud to keep the connection active and open while the statement is prepared.

CData Cloud

BrowsePartitions

By default, the provider exposes the super table and its partitions by metadata. You may hide sub partitions by setting this property to false.

Data Type

bool

Default Value

true

Remarks

This property has an effect on the server with version 10 and later.

CData Cloud

FetchResultSetMetadata

This field sets whether the provider retrieves metadata pertaining to the schema and table name for resultset columns returned by the server.

Data Type

bool

Default Value

false

Remarks

By default, the Cloud will not request that the server provides detailed information about resultset columns like the table name or schema name. It requires issuing additional metadata queries via Cloud , and it may affect query performance essentially in some scenarios. Consider setting this property to True when you need such detailed descriptive information for the resultset columns.

CData Cloud

MaxRows

Limits the number of rows returned when no aggregation or GROUP BY is used in the query. This takes precedence over LIMIT clauses.

Data Type

int

Default Value

-1

Remarks

Limits the number of rows returned when no aggregation or GROUP BY is used in the query. This takes precedence over LIMIT clauses.

CData Cloud

Timeout

The value in seconds until the timeout error is thrown, canceling the operation.

Data Type

int

Default Value

30

Remarks

If Timeout = 0, operations do not time out. The operations run until they complete successfully or until they encounter an error condition.

If Timeout expires and the operation is not yet complete, the Cloud throws an exception.

CData Cloud

TimeZone

Notifies the server about the timezone on the client with a standard SET TIMEZONE query when a connection is being opened.

Data Type

string

Default Value

""

Remarks

The server stores time with timezone and timestamp with timezone in UTC. When the server is accepting a value without timezone specified explicitly, it uses the TimeZone for the respective adjustment to UTC.

If the TimeZone property is not set, the provider uses the client's local timezone. Setting this property can be useful when you need the server to convert to a specific timezone, which is different from the client's local timezone.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839