MySQL: Add option to allow cleartext passwords (#63232)

* Add "Allow Cleartext Passwords" checkbox to MySQL connection settings

* Fix lint issues

* Add docs

* Add line break and bold text

---------

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
This commit is contained in:
enginecan
2023-05-26 03:33:55 -07:00
committed by GitHub
parent 7f7b03d794
commit 6758fd4888
5 changed files with 65 additions and 36 deletions

View File

@@ -48,7 +48,7 @@ export const ConfigurationEditor = (props: DataSourcePluginOptionsEditorProps<My
};
const WIDTH_SHORT = 15;
const WIDTH_MEDIUM = 22;
const WIDTH_MEDIUM = 25;
const WIDTH_LONG = 40;
return (
@@ -150,6 +150,26 @@ export const ConfigurationEditor = (props: DataSourcePluginOptionsEditorProps<My
value={jsonData.tlsSkipVerify || false}
></InlineSwitch>
</InlineField>
<InlineField
labelWidth={WIDTH_MEDIUM}
tooltip={
<span>
Allows using the cleartext client side plugin if required by an account, such as one defined with the PAM
authentication plugin. Sending passwords in clear text may be a security problem in some configurations.
To avoid problems if there is any possibility that the password would be intercepted, clients should
connect to MySQL Server using a method that protects the password. Possibilities include TLS / SSL, IPsec,
or a private network.
</span>
}
htmlFor="allowCleartextPasswords"
label="Allow Cleartext Passwords"
>
<InlineSwitch
id="allowCleartextPasswords"
onChange={onSwitchChanged('allowCleartextPasswords')}
value={jsonData.allowCleartextPasswords || false}
></InlineSwitch>
</InlineField>
</FieldSet>
{config.secureSocksDSProxyEnabled && (

View File

@@ -1,5 +1,7 @@
import { SQLOptions, SQLQuery } from 'app/features/plugins/sql/types';
export interface MySQLOptions extends SQLOptions {}
export interface MySQLOptions extends SQLOptions {
allowCleartextPasswords?: boolean;
}
export interface MySQLQuery extends SQLQuery {}