mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-04-25 13:46:02 +03:00
[GH-ISSUE #3731] Password not persisting in data-sources.json when using ConfigMap for preconfigured connections in DBeaver #1308
Labels
No labels
AS
can't reproduce
can't reproduce
deployment
development
documentation
duplicate
duplicate
ee
enhancement
external
new driver
performance
pull-request
third party issue
wait for response
wait for review
wontfix
x:Oracle
x:cassandra
x:clickhouse
x:db2
x:duckdb
x:greenplum
x:h2
x:h2gis
x:hana
x:hive
x:intersystems
x:kyuubi
x:maria
x:mongo
x:mysql
x:postgresql
x:presto
x:sql server
x:sqlite
x:teradata
x:trino
xf:accessibility
xf:administration
xf:ai
xf:authentication
xf:aws
xf:commit-mode
xf:connection
xf:dark theme
xf:data editor
xf:datatransfer
xf:dba
xf:driver management
xf:erd
xf:filters
xf:i18n
xf:i18n
xf:installer
xf:json
xf:kerberos
xf:ldap
xf:local config
xf:log viewer
xf:metadata
xf:metadata editor
xf:navigator
xf:okta
xf:query manager
xf:resource manager
xf:scripts
xf:sql editor
xf:tasks
xf:ui/uix
xo: Firefox
xo:eclipse
xo:internet explorer
xo:macos
xp:major
xrn:internal
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cloudbeaver#1308
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @LukashevichVitali on GitHub (Sep 9, 2025).
Original GitHub issue: https://github.com/dbeaver/cloudbeaver/issues/3731
Description
Description:
I am deploying CloudBeaver in a Kubernetes cluster using a Helm chart. My setup includes predefined database connections (e.g., PostgreSQL) configured via a data-sources.json file stored in a ConfigMap. However, I am facing an issue where the password for the predefined connection is not persisted after redeploying the Pod.
Setup Details
Helm Chart: avisto/cloudbeaver
CloudBeaver Version: 25.1.4
Persistence: Disabled (no external storage, such as PostgreSQL, for CloudBeaver's configuration)
Dynamic Environments: The setup is used in dynamic environments, so the database (PostgreSQL) is in the same Kubernetes namespace as CloudBeaver.
Connection Configuration: The data-sources.json file is stored in a ConfigMap and mounted to /opt/cloudbeaver/workspace/GlobalConfiguration/.dbeaver.
Values File for Helm Chart
Here is the values.yaml file I am using for the Helm chart:
Problem
Even though I set "save-password": true in the data-sources.json file, the password is not saved. After deploying the Pod with the predefined configuration, I manually input the password into the CloudBeaver UI and verify that the connection works. When I then copy the updated data-sources.json file from the container and use it in the ConfigMap for future deployments, the password is still not persisted.
It appears that CloudBeaver does not store the password in the data-sources.json file directly, even if "save-password": true. Instead, the password is likely stored in an encrypted format elsewhere. Since I am not using persistence (e.g., a dedicated PostgreSQL database for CloudBeaver), this password is lost when the Pod restarts.
Questions
Is there a way to persist passwords for predefined connections when using a ConfigMap for data-sources.json?
If passwords are stored elsewhere (e.g., encrypted storage), is there a way to automate their configuration in a stateless setup like mine?
Are there any additional configurations I can provide to ensure predefined connections retain their passwords?
Steps to reproduce
ERROR:
Error connecting to database:
The server requested password-based authentication, but no password was provided by plugin null
org.postgresql.util.PSQLException: The server requested password-based authentication, but no password was provided by plugin null
at org.postgresql.Driver$ConnectThread.getResult(Driver.java:397)
at org.postgresql.Driver.connect(Driver.java:305)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCConnectionOpener.run(JDBCConnectionOpener.java:112)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCConnectionOpener.run(JDBCConnectionOpener.java:86)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.openConnection(JDBCDataSource.java:215)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.openConnection(JDBCDataSource.java:133)
at org.jkiss.dbeaver.ext.postgresql.model.PostgreDataSource.openConnection(PostgreDataSource.java:565)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCExecutionContext.connect(JDBCExecutionContext.java:124)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCRemoteInstance.initializeMainContext(JDBCRemoteInstance.java:106)
at org.jkiss.dbeaver.ext.postgresql.model.PostgreDatabase.checkInstanceConnection(PostgreDatabase.java:237)
at org.jkiss.dbeaver.ext.postgresql.model.PostgreDatabase.(PostgreDatabase.java:122)
at org.jkiss.dbeaver.ext.postgresql.model.PostgreDataSource.createDatabaseImpl(PostgreDataSource.java:276)
at org.jkiss.dbeaver.ext.postgresql.model.PostgreDataSource.initializeRemoteInstance(PostgreDataSource.java:170)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.(JDBCDataSource.java:109)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.(JDBCDataSource.java:100)
at org.jkiss.dbeaver.ext.postgresql.model.PostgreDataSource.(PostgreDataSource.java:108)
at org.jkiss.dbeaver.ext.postgresql.PostgreDataSourceProvider.openDataSource(PostgreDataSourceProvider.java:122)
at org.jkiss.dbeaver.registry.DataSourceDescriptor.openDataSource(DataSourceDescriptor.java:1413)
at org.jkiss.dbeaver.registry.DataSourceDescriptor.connect0(DataSourceDescriptor.java:1271)
at org.jkiss.dbeaver.registry.DataSourceDescriptor.connect(DataSourceDescriptor.java:1061)
at io.cloudbeaver.service.ConnectionControllerCE.initConnection(ConnectionControllerCE.java:455)
at io.cloudbeaver.service.core.impl.WebServiceCore.initConnection(WebServiceCore.java:294)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
Expected/Desired Behavior
The password for the predefined connection should persist across Pod restarts when using the same data-sources.json file.
CloudBeaver Version
25.1.4
Additional context
Helm chart: https://artifacthub.io/packages/helm/avisto/cloudbeaver
@EvgeniaBzzz commented on GitHub (Sep 10, 2025):
Hi @LukashevichVitali
This behavior is expected - for security reasons, the password is not stored in plain text in data-sources.json.
As a workaround, you can manually add the user/password to the connection configuration.
Please, let me know if it works for you.
@LukashevichVitali commented on GitHub (Sep 10, 2025):
Hi @EvgeniaBzzz
Thank you for your response! Your workaround worked perfectly for me, much appreciated.
I believe it might be a good idea to include this information in the documentation for others who might face the same issue, for example there Automatic server configuration or there User credentials storage
Thanks again!