Skip to content

Commit 3355903

Browse files
committed
Pass password (even if empty) to connection regardless of user input
1 parent df60c34 commit 3355903

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

cratedb_jdbc/connectionFields.xml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22

33
<connection-fields>
4-
<field name="server" label="Server" value-type="string" category="endpoint" >
5-
</field>
6-
4+
<field name="server" label="Server" value-type="string" category="endpoint"/>
75
<field name="port" label="Port" value-type="string" category="endpoint" default-value="5432" />
8-
9-
<field name="authentication" label="Authentication" category="authentication" value-type="string" editable="false" default-value="auth-user" />
10-
116
<field name="username" label="Username" value-type="string" category="authentication" />
12-
137
<field name="password" label="Password" value-type="string" category="authentication" secure="true" optional="true" />
148

159
<field name="sslmode" label="Require SSL" value-type="boolean" category="general" default-value="" >

cratedb_jdbc/connectionProperties.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,7 @@
22
var props = {};
33

44
props["user"] = attr[connectionHelper.attributeUsername];
5-
6-
var authAttrValue = attr[connectionHelper.attributeAuthentication];
7-
8-
if(authAttrValue == "auth-user-pass"){
9-
props["password"] = attr[connectionHelper.attributePassword];
10-
}
5+
props["password"] = attr[connectionHelper.attributePassword];
116

127
if (attr[connectionHelper.attributeSSLMode] == "require") {
138
props["ssl"] = "true";

0 commit comments

Comments
 (0)