mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Fix BDC deployment removing all security settings from config (#14756)
This commit is contained in:
@@ -61,7 +61,7 @@ export class AzdataService implements IAzdataService {
|
|||||||
const env: NodeJS.ProcessEnv = {};
|
const env: NodeJS.ProcessEnv = {};
|
||||||
// azdata requires this environment variables to be set
|
// azdata requires this environment variables to be set
|
||||||
env['ACCEPT_EULA'] = 'yes';
|
env['ACCEPT_EULA'] = 'yes';
|
||||||
await this.platformService.runCommand(`azdata bdc config init --source ${profileName} --target ${profileName} --force`, { workingDirectory: this.platformService.storagePath(), additionalEnvironmentVariables: env });
|
await this.platformService.runCommand(`azdata bdc config init --source ${profileName} --path ${profileName} --force`, { workingDirectory: this.platformService.storagePath(), additionalEnvironmentVariables: env });
|
||||||
const configObjects = await Promise.all([
|
const configObjects = await Promise.all([
|
||||||
this.getJsonObjectFromFile(path.join(this.platformService.storagePath(), profileName, 'bdc.json')),
|
this.getJsonObjectFromFile(path.join(this.platformService.storagePath(), profileName, 'bdc.json')),
|
||||||
this.getJsonObjectFromFile(path.join(this.platformService.storagePath(), profileName, 'control.json'))
|
this.getJsonObjectFromFile(path.join(this.platformService.storagePath(), profileName, 'control.json'))
|
||||||
|
|||||||
@@ -270,10 +270,10 @@ export class BigDataClusterDeploymentProfile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public setAuthenticationMode(mode: string): void {
|
public setAuthenticationMode(mode: string): void {
|
||||||
// If basic authentication is picked, the security section must be removed
|
// If basic authentication is picked, the activeDirectory security section must be removed
|
||||||
// otherwise azdata will throw validation error
|
// otherwise azdata will throw validation error
|
||||||
if (mode === AuthenticationMode.Basic && 'security' in this._controlConfig) {
|
if (mode === AuthenticationMode.Basic && 'security' in this._controlConfig && 'activeDirectory' in this._controlConfig.security) {
|
||||||
delete this._controlConfig.security;
|
delete this._controlConfig.security.activeDirectory;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user