@salesforce/plugin-auth 3.5.0 → 3.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/lib/hooks/diagnostics.d.ts +6 -0
- package/lib/hooks/diagnostics.js +166 -0
- package/lib/hooks/diagnostics.js.map +1 -0
- package/messages/diagnostics.md +11 -0
- package/npm-shrinkwrap.json +2395 -1462
- package/oclif.lock +1253 -756
- package/oclif.manifest.json +1 -1
- package/package.json +11 -7
package/README.md
CHANGED
|
@@ -108,7 +108,7 @@ EXAMPLES
|
|
|
108
108
|
$ sf org list auth
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
-
_See code: [src/commands/org/list/auth.ts](https://github.com/salesforcecli/plugin-auth/blob/3.5.
|
|
111
|
+
_See code: [src/commands/org/list/auth.ts](https://github.com/salesforcecli/plugin-auth/blob/3.5.2/src/commands/org/list/auth.ts)_
|
|
112
112
|
|
|
113
113
|
## `sf org login access-token`
|
|
114
114
|
|
|
@@ -162,7 +162,7 @@ FLAG DESCRIPTIONS
|
|
|
162
162
|
To specify a sandbox, set --instance-url to "https://<MyDomainName>--<SandboxName>.sandbox.my.salesforce.com".
|
|
163
163
|
```
|
|
164
164
|
|
|
165
|
-
_See code: [src/commands/org/login/access-token.ts](https://github.com/salesforcecli/plugin-auth/blob/3.5.
|
|
165
|
+
_See code: [src/commands/org/login/access-token.ts](https://github.com/salesforcecli/plugin-auth/blob/3.5.2/src/commands/org/login/access-token.ts)_
|
|
166
166
|
|
|
167
167
|
## `sf org login device`
|
|
168
168
|
|
|
@@ -222,7 +222,7 @@ FLAG DESCRIPTIONS
|
|
|
222
222
|
To specify a sandbox, set --instance-url to "https://<MyDomainName>--<SandboxName>.sandbox.my.salesforce.com".
|
|
223
223
|
```
|
|
224
224
|
|
|
225
|
-
_See code: [src/commands/org/login/device.ts](https://github.com/salesforcecli/plugin-auth/blob/3.5.
|
|
225
|
+
_See code: [src/commands/org/login/device.ts](https://github.com/salesforcecli/plugin-auth/blob/3.5.2/src/commands/org/login/device.ts)_
|
|
226
226
|
|
|
227
227
|
## `sf org login jwt`
|
|
228
228
|
|
|
@@ -313,7 +313,7 @@ FLAG DESCRIPTIONS
|
|
|
313
313
|
To specify a sandbox, set --instance-url to "https://<MyDomainName>--<SandboxName>.sandbox.my.salesforce.com".
|
|
314
314
|
```
|
|
315
315
|
|
|
316
|
-
_See code: [src/commands/org/login/jwt.ts](https://github.com/salesforcecli/plugin-auth/blob/3.5.
|
|
316
|
+
_See code: [src/commands/org/login/jwt.ts](https://github.com/salesforcecli/plugin-auth/blob/3.5.2/src/commands/org/login/jwt.ts)_
|
|
317
317
|
|
|
318
318
|
## `sf org login sfdx-url`
|
|
319
319
|
|
|
@@ -379,7 +379,7 @@ EXAMPLES
|
|
|
379
379
|
$ echo url | sf org login sfdx-url --sfdx-url-stdin
|
|
380
380
|
```
|
|
381
381
|
|
|
382
|
-
_See code: [src/commands/org/login/sfdx-url.ts](https://github.com/salesforcecli/plugin-auth/blob/3.5.
|
|
382
|
+
_See code: [src/commands/org/login/sfdx-url.ts](https://github.com/salesforcecli/plugin-auth/blob/3.5.2/src/commands/org/login/sfdx-url.ts)_
|
|
383
383
|
|
|
384
384
|
## `sf org login web`
|
|
385
385
|
|
|
@@ -466,7 +466,7 @@ FLAG DESCRIPTIONS
|
|
|
466
466
|
To specify a sandbox, set --instance-url to "https://<MyDomainName>--<SandboxName>.sandbox.my.salesforce.com".
|
|
467
467
|
```
|
|
468
468
|
|
|
469
|
-
_See code: [src/commands/org/login/web.ts](https://github.com/salesforcecli/plugin-auth/blob/3.5.
|
|
469
|
+
_See code: [src/commands/org/login/web.ts](https://github.com/salesforcecli/plugin-auth/blob/3.5.2/src/commands/org/login/web.ts)_
|
|
470
470
|
|
|
471
471
|
## `sf org logout`
|
|
472
472
|
|
|
@@ -527,6 +527,6 @@ FLAG DESCRIPTIONS
|
|
|
527
527
|
All orgs includes Dev Hubs, sandboxes, DE orgs, and expired, deleted, and unknown-status scratch orgs.
|
|
528
528
|
```
|
|
529
529
|
|
|
530
|
-
_See code: [src/commands/org/logout.ts](https://github.com/salesforcecli/plugin-auth/blob/3.5.
|
|
530
|
+
_See code: [src/commands/org/logout.ts](https://github.com/salesforcecli/plugin-auth/blob/3.5.2/src/commands/org/logout.ts)_
|
|
531
531
|
|
|
532
532
|
<!-- commandsstop -->
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2022, salesforce.com, inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
+
*/
|
|
7
|
+
import childProcess from 'node:child_process';
|
|
8
|
+
import util from 'node:util';
|
|
9
|
+
import { join } from 'node:path';
|
|
10
|
+
import fs from 'node:fs';
|
|
11
|
+
import { Global, Lifecycle, Logger, Messages } from '@salesforce/core';
|
|
12
|
+
import { asString, isString } from '@salesforce/ts-types';
|
|
13
|
+
import { parseJsonMap } from '@salesforce/kit';
|
|
14
|
+
let logger;
|
|
15
|
+
const getLogger = () => {
|
|
16
|
+
if (!logger) {
|
|
17
|
+
logger = Logger.childFromRoot('plugin-auth-diagnostics');
|
|
18
|
+
}
|
|
19
|
+
return logger;
|
|
20
|
+
};
|
|
21
|
+
const pluginName = '@salesforce/plugin-auth';
|
|
22
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
23
|
+
const messages = Messages.loadMessages(pluginName, 'diagnostics');
|
|
24
|
+
let exec;
|
|
25
|
+
export const hook = async (options) => {
|
|
26
|
+
getLogger().debug(`Running SfDoctor diagnostics for ${pluginName}`);
|
|
27
|
+
exec = util.promisify(childProcess.exec);
|
|
28
|
+
try {
|
|
29
|
+
await exec('npm -v');
|
|
30
|
+
return await Promise.all([cryptoVersionTest(options.doctor)]);
|
|
31
|
+
}
|
|
32
|
+
catch (e) {
|
|
33
|
+
const errMsg = e instanceof Error ? e.message : isString(e) ? e : 'unknown';
|
|
34
|
+
getLogger().warn(`Unable to run SfDoctor diagnostics for ${pluginName} due to: ${errMsg}`);
|
|
35
|
+
return Promise.resolve([undefined]);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
// ============================
|
|
39
|
+
// *** DIAGNOSTIC TESTS ***
|
|
40
|
+
// ============================
|
|
41
|
+
// Detects if the auth key used is crypto v1 or v2
|
|
42
|
+
// Detects if the SF_CRYPTO_V2 env var is set and if it matches the key crypto version
|
|
43
|
+
const cryptoVersionTest = async (doctor) => {
|
|
44
|
+
getLogger().debug('Running Crypto Version tests');
|
|
45
|
+
const sfCryptoV2Support = await supportsCliV2Crypto(doctor);
|
|
46
|
+
let cryptoVersion = 'unknown';
|
|
47
|
+
const sfCryptoV2 = process.env.SF_CRYPTO_V2;
|
|
48
|
+
const isUsingGenericKeychain = process.platform === 'win32' ||
|
|
49
|
+
process.env.SF_USE_GENERIC_UNIX_KEYCHAIN?.toLowerCase() === 'true' ||
|
|
50
|
+
process.env.USE_GENERIC_UNIX_KEYCHAIN?.toLowerCase() === 'true';
|
|
51
|
+
// If the CLI is using key.json, we can read the file and get the key length
|
|
52
|
+
// to discover the crypto version being used. If not, then we can't detect it.
|
|
53
|
+
if (isUsingGenericKeychain) {
|
|
54
|
+
try {
|
|
55
|
+
const keyFile = join(Global.DIR, 'key.json');
|
|
56
|
+
const key = asString(parseJsonMap(fs.readFileSync(keyFile, 'utf8'))?.key);
|
|
57
|
+
cryptoVersion = key?.length === 64 ? 'v2' : key?.length === 32 ? 'v1' : 'unknown';
|
|
58
|
+
}
|
|
59
|
+
catch (e) {
|
|
60
|
+
const errMsg = e instanceof Error ? e.message : isString(e) ? e : 'unknown';
|
|
61
|
+
getLogger().debug(`Could not detect key size due to:\n${errMsg}`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
doctor.addPluginData(pluginName, {
|
|
65
|
+
sfCryptoV2,
|
|
66
|
+
isUsingGenericKeychain,
|
|
67
|
+
sfCryptoV2Support,
|
|
68
|
+
cryptoVersion,
|
|
69
|
+
});
|
|
70
|
+
const testName1 = `[${pluginName}] CLI supports v2 crypto`;
|
|
71
|
+
let status1 = 'pass';
|
|
72
|
+
if (!sfCryptoV2Support) {
|
|
73
|
+
status1 = 'warn';
|
|
74
|
+
doctor.addSuggestion(messages.getMessage('sfCryptoV2Support'));
|
|
75
|
+
}
|
|
76
|
+
void Lifecycle.getInstance().emit('Doctor:diagnostic', { testName: testName1, status: status1 });
|
|
77
|
+
// Only do this test if we know they are using v2 crypto
|
|
78
|
+
if (cryptoVersion === 'v2') {
|
|
79
|
+
const testName2 = `[${pluginName}] CLI using stable v2 crypto`;
|
|
80
|
+
let status2 = 'pass';
|
|
81
|
+
if (!sfCryptoV2Support) {
|
|
82
|
+
status2 = 'fail';
|
|
83
|
+
doctor.addSuggestion(messages.getMessage('sfCryptoV2Unstable'));
|
|
84
|
+
}
|
|
85
|
+
void Lifecycle.getInstance().emit('Doctor:diagnostic', { testName: testName2, status: status2 });
|
|
86
|
+
}
|
|
87
|
+
// Only do this test if we know they are using v1 crypto
|
|
88
|
+
if (cryptoVersion === 'v1') {
|
|
89
|
+
const testName3 = `[${pluginName}] CLI using stable v1 crypto`;
|
|
90
|
+
let status3 = 'pass';
|
|
91
|
+
if (sfCryptoV2?.toLowerCase() === 'true') {
|
|
92
|
+
// They have SF_CRYPTO_V2=true but are using v1 crypto. They might not know this
|
|
93
|
+
// or know how to generate a v2 key.
|
|
94
|
+
if (sfCryptoV2Support) {
|
|
95
|
+
status3 = 'warn';
|
|
96
|
+
doctor.addSuggestion(messages.getMessage('sfCryptoV2Desired'));
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
void Lifecycle.getInstance().emit('Doctor:diagnostic', { testName: testName3, status: status3 });
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
// Inspect CLI install and plugins to ensure all versions of `@salesforce/core` can support v2 crypto.
|
|
103
|
+
// This uses `npm explain @salesforce/core` to ensure all versions are greater than 6.6.0.
|
|
104
|
+
const supportsCliV2Crypto = async (doctor) => {
|
|
105
|
+
const diagnosis = doctor.getDiagnosis();
|
|
106
|
+
let coreSupportsV2 = false;
|
|
107
|
+
let pluginsSupportV2 = false;
|
|
108
|
+
let linksSupportsV2 = false;
|
|
109
|
+
const { root, dataDir } = diagnosis.cliConfig;
|
|
110
|
+
// check core CLI
|
|
111
|
+
if (root?.length) {
|
|
112
|
+
try {
|
|
113
|
+
const { stdout } = await exec('npm explain @salesforce/core --json', { cwd: root });
|
|
114
|
+
const coreExplanation = JSON.parse(stdout);
|
|
115
|
+
coreSupportsV2 = coreExplanation.every((exp) => exp?.version > '6.6.0');
|
|
116
|
+
}
|
|
117
|
+
catch (e) {
|
|
118
|
+
const errMsg = e instanceof Error ? e.message : isString(e) ? e : 'unknown';
|
|
119
|
+
getLogger().debug(`Cannot determine CLI v2 crypto core support due to: ${errMsg}`);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
// check installed plugins
|
|
123
|
+
if (dataDir?.length) {
|
|
124
|
+
try {
|
|
125
|
+
const { stdout } = await exec('npm explain @salesforce/core --json', { cwd: dataDir });
|
|
126
|
+
const pluginsExplanation = JSON.parse(stdout);
|
|
127
|
+
pluginsSupportV2 = pluginsExplanation?.length ? pluginsExplanation.every((exp) => exp?.version > '6.6.0') : true;
|
|
128
|
+
}
|
|
129
|
+
catch (e) {
|
|
130
|
+
const errMsg = e instanceof Error ? e.message : isString(e) ? e : 'unknown';
|
|
131
|
+
if (errMsg.includes('No dependencies found matching @salesforce/core')) {
|
|
132
|
+
pluginsSupportV2 = true;
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
getLogger().debug(`Cannot determine CLI v2 crypto installed plugins support due to: ${errMsg}`);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
// check linked plugins
|
|
140
|
+
const pluginVersions = diagnosis?.versionDetail?.pluginVersions;
|
|
141
|
+
const linkedPlugins = pluginVersions.filter((pv) => pv.includes('(link)'));
|
|
142
|
+
if (linkedPlugins?.length) {
|
|
143
|
+
try {
|
|
144
|
+
const coreVersionChecks = await Promise.all(linkedPlugins.map(async (pluginEntry) => {
|
|
145
|
+
// last entry is the path. E.g., "auth 3.3.17 (link) /Users/me/dev/plugin-auth",
|
|
146
|
+
const pluginPath = pluginEntry.split(' ')?.pop();
|
|
147
|
+
if (pluginPath?.length) {
|
|
148
|
+
const { stdout } = await exec('npm explain @salesforce/core --json', { cwd: pluginPath });
|
|
149
|
+
const linksExplanation = JSON.parse(stdout);
|
|
150
|
+
return linksExplanation?.every((exp) => exp?.version > '6.6.0');
|
|
151
|
+
}
|
|
152
|
+
return true;
|
|
153
|
+
}));
|
|
154
|
+
linksSupportsV2 = !coreVersionChecks.includes(false);
|
|
155
|
+
}
|
|
156
|
+
catch (e) {
|
|
157
|
+
const errMsg = e instanceof Error ? e.message : isString(e) ? e : 'unknown';
|
|
158
|
+
getLogger().debug(`Cannot determine CLI v2 crypto linked plugins support due to: ${errMsg}`);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
linksSupportsV2 = true;
|
|
163
|
+
}
|
|
164
|
+
return coreSupportsV2 && pluginsSupportV2 && linksSupportsV2;
|
|
165
|
+
};
|
|
166
|
+
//# sourceMappingURL=diagnostics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../../src/hooks/diagnostics.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAE9C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE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AAG,IAAI,CAAC;IACzB,CAAC;IAED,OAAO,cAAc,IAAI,gBAAgB,IAAI,eAAe,CAAC;AAC/D,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# sfCryptoV2Support
|
|
2
|
+
|
|
3
|
+
Your current installation of Salesforce CLI, including all the plugins you've linked and installed, doesn't yet support v2 crypto. All plugins and libraries must use at least version 6.7.0 of `@salesforce/core` to support v2 crypto. You're generally still able to successfully authenticate with your current CLI installation, but not if you generate a v2 crypto key.
|
|
4
|
+
|
|
5
|
+
# sfCryptoV2Unstable
|
|
6
|
+
|
|
7
|
+
Your current installation of Salesforce CLI, including all the plugins you've linked and installed, is using v2 crypto without proper library support, which can cause authentication failures. We recommend that you switch back to v1 crypto.
|
|
8
|
+
|
|
9
|
+
# sfCryptoV2Desired
|
|
10
|
+
|
|
11
|
+
SF_CRYPTO_V2=true is set in your environment, but you're actually using v1 crypto. Your Salesforce CLI installation supports using v2 crypto. If you desire this behavior, follow the instructions in the documentation (provide link).
|