mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Datasource: Remove support for unencrypted passwords (#49987)
* Datasource: Remove support for unencrypted passwords * regenerate swagger * [WIP] Remove references to datasource password and basic auth password fields (#50015) * try delete moar tings * delete provisioning stuff * remove from yaml * update snapshots * remove lingering snapshot fields * fix ds http settings * Re-generate swagger and fix swagger-api-spec make target Co-authored-by: Will Browne <will.browne@grafana.com> Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
b344f48e68
commit
36c3398c6d
@@ -536,11 +536,9 @@ export interface DataSourceSettings<T extends DataSourceJsonData = DataSourceJso
|
||||
typeName: string;
|
||||
access: string;
|
||||
url: string;
|
||||
password: string;
|
||||
user: string;
|
||||
database: string;
|
||||
basicAuth: boolean;
|
||||
basicAuthPassword: string;
|
||||
basicAuthUser: string;
|
||||
isDefault: boolean;
|
||||
jsonData: T;
|
||||
|
||||
@@ -12,7 +12,6 @@ export const BasicAuthSettings: React.FC<HttpSettingsProps> = ({ dataSourceConfi
|
||||
const onPasswordReset = () => {
|
||||
onChange({
|
||||
...dataSourceConfig,
|
||||
basicAuthPassword: '',
|
||||
secureJsonData: {
|
||||
...dataSourceConfig.secureJsonData,
|
||||
basicAuthPassword: '',
|
||||
@@ -48,10 +47,7 @@ export const BasicAuthSettings: React.FC<HttpSettingsProps> = ({ dataSourceConfi
|
||||
</InlineField>
|
||||
<InlineField>
|
||||
<SecretFormField
|
||||
isConfigured={
|
||||
!!dataSourceConfig.basicAuthPassword ||
|
||||
!!(dataSourceConfig.secureJsonFields && dataSourceConfig.secureJsonFields.basicAuthPassword)
|
||||
}
|
||||
isConfigured={!!(dataSourceConfig.secureJsonFields && dataSourceConfig.secureJsonFields.basicAuthPassword)}
|
||||
value={password || ''}
|
||||
inputWidth={18}
|
||||
labelWidth={10}
|
||||
|
||||
@@ -17,12 +17,10 @@ const setup = (propOverrides?: object) => {
|
||||
typeLogoUrl: '',
|
||||
access: 'direct',
|
||||
url: 'http://localhost:8086',
|
||||
password: '',
|
||||
user: 'grafana',
|
||||
database: 'site',
|
||||
basicAuth: false,
|
||||
basicAuthUser: '',
|
||||
basicAuthPassword: '',
|
||||
withCredentials: false,
|
||||
isDefault: false,
|
||||
jsonData: {
|
||||
|
||||
@@ -17,12 +17,10 @@ const settingsMock: DataSourceSettings<any, any> = {
|
||||
typeLogoUrl: '',
|
||||
access: 'direct',
|
||||
url: 'http://localhost:8086',
|
||||
password: '',
|
||||
user: 'grafana',
|
||||
database: 'site',
|
||||
basicAuth: false,
|
||||
basicAuthUser: '',
|
||||
basicAuthPassword: '',
|
||||
withCredentials: false,
|
||||
isDefault: false,
|
||||
jsonData: {
|
||||
|
||||
@@ -18,12 +18,10 @@ const setup = (propOverrides?: object) => {
|
||||
typeLogoUrl: '',
|
||||
access: 'direct',
|
||||
url: 'http://localhost:8086',
|
||||
password: '',
|
||||
user: 'grafana',
|
||||
database: 'site',
|
||||
basicAuth: false,
|
||||
basicAuthUser: '',
|
||||
basicAuthPassword: '',
|
||||
withCredentials: false,
|
||||
isDefault: false,
|
||||
jsonData: {
|
||||
|
||||
Reference in New Issue
Block a user