Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename --disable-keytar to --use-inmemory-secretstorage #192312

Merged
merged 1 commit into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/test-integration.bat
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if %errorlevel% neq 0 exit /b %errorlevel%

:: Tests in the extension host

set API_TESTS_EXTRA_ARGS=--disable-telemetry --skip-welcome --skip-release-notes --crash-reporter-directory=%VSCODECRASHDIR% --logsPath=%VSCODELOGSDIR% --no-cached-data --disable-updates --disable-keytar --disable-extensions --disable-workspace-trust --user-data-dir=%VSCODEUSERDATADIR%
set API_TESTS_EXTRA_ARGS=--disable-telemetry --skip-welcome --skip-release-notes --crash-reporter-directory=%VSCODECRASHDIR% --logsPath=%VSCODELOGSDIR% --no-cached-data --disable-updates --use-inmemory-secretstorage --disable-extensions --disable-workspace-trust --user-data-dir=%VSCODEUSERDATADIR%

echo.
echo ### API tests (folder)
Expand Down
2 changes: 1 addition & 1 deletion scripts/test-integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ echo

# Tests in the extension host

API_TESTS_EXTRA_ARGS="--disable-telemetry --skip-welcome --skip-release-notes --crash-reporter-directory=$VSCODECRASHDIR --logsPath=$VSCODELOGSDIR --no-cached-data --disable-updates --disable-keytar --disable-extensions --disable-workspace-trust --user-data-dir=$VSCODEUSERDATADIR"
API_TESTS_EXTRA_ARGS="--disable-telemetry --skip-welcome --skip-release-notes --crash-reporter-directory=$VSCODECRASHDIR --logsPath=$VSCODELOGSDIR --no-cached-data --disable-updates --use-inmemory-secretstorage --disable-extensions --disable-workspace-trust --user-data-dir=$VSCODEUSERDATADIR"

if [ -z "$INTEGRATION_TEST_APP_NAME" ]; then
kill_app() { true; }
Expand Down
2 changes: 1 addition & 1 deletion scripts/test-remote-integration.bat
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ echo Storing log files into '%VSCODELOGSDIR%'

:: Tests in the extension host

set API_TESTS_EXTRA_ARGS=--disable-telemetry --skip-welcome --skip-release-notes --crash-reporter-directory=%VSCODECRASHDIR% --logsPath=%VSCODELOGSDIR% --no-cached-data --disable-updates --disable-keytar --disable-inspect --disable-workspace-trust --user-data-dir=%VSCODEUSERDATADIR%
set API_TESTS_EXTRA_ARGS=--disable-telemetry --skip-welcome --skip-release-notes --crash-reporter-directory=%VSCODECRASHDIR% --logsPath=%VSCODELOGSDIR% --no-cached-data --disable-updates --use-inmemory-secretstorage --disable-inspect --disable-workspace-trust --user-data-dir=%VSCODEUSERDATADIR%

echo.
echo ### API tests (folder)
Expand Down
2 changes: 1 addition & 1 deletion scripts/test-remote-integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ else
kill_app() { killall $INTEGRATION_TEST_APP_NAME || true; }
fi

API_TESTS_EXTRA_ARGS="--disable-telemetry --skip-welcome --skip-release-notes --crash-reporter-directory=$VSCODECRASHDIR --logsPath=$VSCODELOGSDIR --no-cached-data --disable-updates --disable-keytar --disable-workspace-trust --user-data-dir=$VSCODEUSERDATADIR"
API_TESTS_EXTRA_ARGS="--disable-telemetry --skip-welcome --skip-release-notes --crash-reporter-directory=$VSCODECRASHDIR --logsPath=$VSCODELOGSDIR --no-cached-data --disable-updates --use-inmemory-secretstorage --disable-workspace-trust --user-data-dir=$VSCODEUSERDATADIR"

echo "Storing crash reports into '$VSCODECRASHDIR'."
echo "Storing log files into '$VSCODELOGSDIR'."
Expand Down
2 changes: 1 addition & 1 deletion src/vs/platform/environment/common/argv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export interface NativeParsedArgs {
'export-default-configuration'?: string;
'install-source'?: string;
'disable-updates'?: boolean;
'disable-keytar'?: boolean;
'use-inmemory-secretstorage'?: boolean;
'password-store'?: string;
'disable-workspace-trust'?: boolean;
'disable-crash-reporter'?: boolean;
Expand Down
4 changes: 2 additions & 2 deletions src/vs/platform/environment/common/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ export interface INativeEnvironmentService extends IEnvironmentService {
extensionsDownloadLocation: URI;
builtinExtensionsPath: string;

// --- use keytar for credentials
disableKeytar?: boolean;
// --- use in-memory Secret Storage
useInMemorySecretStorage?: boolean;

crossOriginIsolated?: boolean;

Expand Down
2 changes: 1 addition & 1 deletion src/vs/platform/environment/common/environmentService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ export abstract class AbstractNativeEnvironmentService implements INativeEnviron
get disableWorkspaceTrust(): boolean { return !!this.args['disable-workspace-trust']; }

@memoize
get disableKeytar(): boolean { return !!this.args['disable-keytar']; }
get useInMemorySecretStorage(): boolean { return !!this.args['use-inmemory-secretstorage']; }

@memoize
get policyFile(): URI | undefined {
Expand Down
2 changes: 1 addition & 1 deletion src/vs/platform/environment/node/argv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export const OPTIONS: OptionDescriptions<Required<NativeParsedArgs>> = {
'skip-welcome': { type: 'boolean' },
'disable-telemetry': { type: 'boolean' },
'disable-updates': { type: 'boolean' },
'disable-keytar': { type: 'boolean' },
'use-inmemory-secretstorage': { type: 'boolean', deprecates: ['disable-keytar'] },
'password-store': { type: 'string' },
'disable-workspace-trust': { type: 'boolean' },
'disable-crash-reporter': { type: 'boolean' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ export class NativeSecretStorageService extends BaseSecretStorageService {
@ILogService logService: ILogService
) {
super(
// TODO: rename disableKeytar to disableSecretStorage or similar
!!_environmentService.disableKeytar,
!!_environmentService.useInMemorySecretStorage,
storageService,
encryptionService,
logService
Expand All @@ -43,7 +42,7 @@ export class NativeSecretStorageService extends BaseSecretStorageService {
this._sequencer.queue(key, async () => {
await this.resolvedStorageService;

if (this.type !== 'persisted' && !this._environmentService.disableKeytar) {
if (this.type !== 'persisted' && !this._environmentService.useInMemorySecretStorage) {
this._logService.trace('[NativeSecretStorageService] Notifying user that secrets are not being stored on disk.');
await this.notifyOfNoEncryptionOnce();
}
Expand Down
2 changes: 1 addition & 1 deletion test/automation/src/electron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export async function resolveElectronConfiguration(options: LaunchOptions): Prom
'--disable-telemetry',
'--no-cached-data',
'--disable-updates',
'--disable-keytar',
'--use-inmemory-secretstorage',
`--crash-reporter-directory=${crashesPath}`,
'--disable-workspace-trust',
`--extensions-dir=${extensionsPath}`,
Expand Down