Pre-configured database connections
As an administrator, you can pre-configure database connections for your Team Edition server. Users just pick a connection from the toolbar and enter their credentials - no other setup needed on their side.
Datasources configuration file¶
Each project in Team Edition has its own data-sources.json, located in the cloudbeaver-rm container at
${WORKSPACE}/workspace/shared-projects/<project-name>/.dbeaver. Connections are defined there.
Tip
To find your workspace, see Workspace location.
Pre-configuring credentials¶
If you deploy the server repeatedly, you can include credentials directly in data-sources.json instead of setting them
up in the UI each time.
Warning
Credentials in data-sources.json are stored in plain text until the first connection. Make sure no
unauthorized users have access to the server config files during this time.
To pre-configure credentials:
- Add
auth-propertieswith your credentials todata-sources.json. Theauth-propertiesfield names depend on the auth model. - Start the server.
- Open the connection in the UI for the first time.
- CloudBeaver encrypts the credentials, removes them from
data-sources.json, and users can connect from now on without entering credentials.
Example
{
"folders": {},
"connections": {
"postgres-jdbc-test": {
"provider": "postgresql",
"driver": "postgres-jdbc",
"name": "PostgreSQL_test",
"configuration": {
"host": "localhost",
"port": "5432",
"database": "postgres",
"url": "jdbc:postgresql://localhost:5432/postgres",
"configurationType": "MANUAL",
"type": "dev",
"closeIdleConnection": true,
"auth-model": "native",
"auth-properties": {
"name": "postgres",
"password": "postgres"
},
"bootstrap": {
"autocommit": true
}
}
}
}
}
This file follows the same format as the DBeaver datasources configuration file. You can create this configuration in DBeaver and then copy it to your Team Edition server.
SSH tunnel credentials¶
To pre-configure SSH tunnel credentials, add them to the handlers.ssh_tunnel block inside the connection configuration.
Example
Managing access to connections¶
You can control which users and teams have access to each pre-configured connection. For details, see Pre-configured permissions for connections.