opal-security 2.3.3 → 2.3.4
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 +16 -16
- package/lib/commands/postgres-instances/start.js +7 -5
- package/lib/lib/cmd.js +1 -1
- package/lib/lib/ssh.js +3 -1
- package/oclif.manifest.json +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ $ npm install -g opal-security
|
|
|
22
22
|
$ opal COMMAND
|
|
23
23
|
running command...
|
|
24
24
|
$ opal (--version)
|
|
25
|
-
opal-security/2.3.
|
|
25
|
+
opal-security/2.3.4 darwin-arm64 node-v18.19.0
|
|
26
26
|
$ opal --help [COMMAND]
|
|
27
27
|
USAGE
|
|
28
28
|
$ opal COMMAND
|
|
@@ -99,7 +99,7 @@ EXAMPLES
|
|
|
99
99
|
$ opal aws:identity
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
-
_See code: [src/commands/aws/identity.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.
|
|
102
|
+
_See code: [src/commands/aws/identity.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.4/src/commands/aws/identity.ts)_
|
|
103
103
|
|
|
104
104
|
## `opal curl-example`
|
|
105
105
|
|
|
@@ -116,7 +116,7 @@ DESCRIPTION
|
|
|
116
116
|
Prints out an example cURL command containing the parameters the CLI uses to query the Opal server.
|
|
117
117
|
```
|
|
118
118
|
|
|
119
|
-
_See code: [src/commands/curl-example.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.
|
|
119
|
+
_See code: [src/commands/curl-example.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.4/src/commands/curl-example.ts)_
|
|
120
120
|
|
|
121
121
|
## `opal help [COMMANDS]`
|
|
122
122
|
|
|
@@ -166,7 +166,7 @@ EXAMPLES
|
|
|
166
166
|
$ opal iam-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --profileName "custom-profile"
|
|
167
167
|
```
|
|
168
168
|
|
|
169
|
-
_See code: [src/commands/iam-roles/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.
|
|
169
|
+
_See code: [src/commands/iam-roles/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.4/src/commands/iam-roles/start.ts)_
|
|
170
170
|
|
|
171
171
|
## `opal kube-roles:start`
|
|
172
172
|
|
|
@@ -197,7 +197,7 @@ EXAMPLES
|
|
|
197
197
|
$ opal kube-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --accessLevelRemoteId "arn:aws:iam::712234975475:role/acme-eks-cluster-admin-role"
|
|
198
198
|
```
|
|
199
199
|
|
|
200
|
-
_See code: [src/commands/kube-roles/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.
|
|
200
|
+
_See code: [src/commands/kube-roles/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.4/src/commands/kube-roles/start.ts)_
|
|
201
201
|
|
|
202
202
|
## `opal login`
|
|
203
203
|
|
|
@@ -218,7 +218,7 @@ EXAMPLES
|
|
|
218
218
|
$ opal login
|
|
219
219
|
```
|
|
220
220
|
|
|
221
|
-
_See code: [src/commands/login.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.
|
|
221
|
+
_See code: [src/commands/login.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.4/src/commands/login.ts)_
|
|
222
222
|
|
|
223
223
|
## `opal logout`
|
|
224
224
|
|
|
@@ -238,7 +238,7 @@ EXAMPLES
|
|
|
238
238
|
$ opal logout
|
|
239
239
|
```
|
|
240
240
|
|
|
241
|
-
_See code: [src/commands/logout.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.
|
|
241
|
+
_See code: [src/commands/logout.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.4/src/commands/logout.ts)_
|
|
242
242
|
|
|
243
243
|
## `opal migrate-creds`
|
|
244
244
|
|
|
@@ -255,7 +255,7 @@ DESCRIPTION
|
|
|
255
255
|
Migrates credentials from old keystore to new store. Should only need to be run once
|
|
256
256
|
```
|
|
257
257
|
|
|
258
|
-
_See code: [src/commands/migrate-creds.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.
|
|
258
|
+
_See code: [src/commands/migrate-creds.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.4/src/commands/migrate-creds.ts)_
|
|
259
259
|
|
|
260
260
|
## `opal postgres-instances:start`
|
|
261
261
|
|
|
@@ -293,7 +293,7 @@ EXAMPLES
|
|
|
293
293
|
$ opal postgres-instances:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --accessLevelRemoteId fullaccess --action view
|
|
294
294
|
```
|
|
295
295
|
|
|
296
|
-
_See code: [src/commands/postgres-instances/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.
|
|
296
|
+
_See code: [src/commands/postgres-instances/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.4/src/commands/postgres-instances/start.ts)_
|
|
297
297
|
|
|
298
298
|
## `opal resources:get`
|
|
299
299
|
|
|
@@ -314,7 +314,7 @@ EXAMPLES
|
|
|
314
314
|
$ opal resources:get --id 54052a3e-5375-4392-aeaf-0c6c44c131d4
|
|
315
315
|
```
|
|
316
316
|
|
|
317
|
-
_See code: [src/commands/resources/get.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.
|
|
317
|
+
_See code: [src/commands/resources/get.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.4/src/commands/resources/get.ts)_
|
|
318
318
|
|
|
319
319
|
## `opal set-custom-header`
|
|
320
320
|
|
|
@@ -335,7 +335,7 @@ EXAMPLES
|
|
|
335
335
|
$ opal set-custom-header --header 'cf-access-token: $TOKEN'
|
|
336
336
|
```
|
|
337
337
|
|
|
338
|
-
_See code: [src/commands/set-custom-header.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.
|
|
338
|
+
_See code: [src/commands/set-custom-header.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.4/src/commands/set-custom-header.ts)_
|
|
339
339
|
|
|
340
340
|
## `opal set-token`
|
|
341
341
|
|
|
@@ -355,7 +355,7 @@ EXAMPLES
|
|
|
355
355
|
$ opal set-token
|
|
356
356
|
```
|
|
357
357
|
|
|
358
|
-
_See code: [src/commands/set-token.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.
|
|
358
|
+
_See code: [src/commands/set-token.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.4/src/commands/set-token.ts)_
|
|
359
359
|
|
|
360
360
|
## `opal set-url [URL]`
|
|
361
361
|
|
|
@@ -379,7 +379,7 @@ EXAMPLES
|
|
|
379
379
|
$ opal set-url
|
|
380
380
|
```
|
|
381
381
|
|
|
382
|
-
_See code: [src/commands/set-url.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.
|
|
382
|
+
_See code: [src/commands/set-url.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.4/src/commands/set-url.ts)_
|
|
383
383
|
|
|
384
384
|
## `opal ssh:copyFrom`
|
|
385
385
|
|
|
@@ -410,7 +410,7 @@ EXAMPLES
|
|
|
410
410
|
$ opal ssh:copyFrom --src instance/dir --dest my/dir --id 51f7176b-0464-4a6f-8369-e951e187b398
|
|
411
411
|
```
|
|
412
412
|
|
|
413
|
-
_See code: [src/commands/ssh/copyFrom.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.
|
|
413
|
+
_See code: [src/commands/ssh/copyFrom.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.4/src/commands/ssh/copyFrom.ts)_
|
|
414
414
|
|
|
415
415
|
## `opal ssh:copyTo`
|
|
416
416
|
|
|
@@ -441,7 +441,7 @@ EXAMPLES
|
|
|
441
441
|
$ opal ssh:copyTo --src my/dir --dest instance/dir --id 51f7176b-0464-4a6f-8369-e951e187b398
|
|
442
442
|
```
|
|
443
443
|
|
|
444
|
-
_See code: [src/commands/ssh/copyTo.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.
|
|
444
|
+
_See code: [src/commands/ssh/copyTo.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.4/src/commands/ssh/copyTo.ts)_
|
|
445
445
|
|
|
446
446
|
## `opal ssh:start`
|
|
447
447
|
|
|
@@ -468,7 +468,7 @@ EXAMPLES
|
|
|
468
468
|
$ opal ssh:start --id 51f7176b-0464-4a6f-8369-e951e187b398
|
|
469
469
|
```
|
|
470
470
|
|
|
471
|
-
_See code: [src/commands/ssh/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.
|
|
471
|
+
_See code: [src/commands/ssh/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.4/src/commands/ssh/start.ts)_
|
|
472
472
|
|
|
473
473
|
## `opal version`
|
|
474
474
|
|
|
@@ -17,10 +17,6 @@ const RdsSessionMetadataFragment = `
|
|
|
17
17
|
dbName
|
|
18
18
|
}`;
|
|
19
19
|
const methodChoices = [
|
|
20
|
-
{
|
|
21
|
-
name: 'Open external database app',
|
|
22
|
-
value: 'open',
|
|
23
|
-
},
|
|
24
20
|
{
|
|
25
21
|
name: 'Start psql session in shell',
|
|
26
22
|
value: 'psql',
|
|
@@ -30,6 +26,12 @@ const methodChoices = [
|
|
|
30
26
|
value: 'view',
|
|
31
27
|
},
|
|
32
28
|
];
|
|
29
|
+
if (process.platform === 'darwin') {
|
|
30
|
+
methodChoices.unshift({
|
|
31
|
+
name: 'Open external database app',
|
|
32
|
+
value: 'open',
|
|
33
|
+
});
|
|
34
|
+
}
|
|
33
35
|
class StartPostgresInstanceSession extends core_1.Command {
|
|
34
36
|
async run() {
|
|
35
37
|
(0, cmd_1.setMostRecentCommand)(this);
|
|
@@ -77,7 +79,7 @@ class StartPostgresInstanceSession extends core_1.Command {
|
|
|
77
79
|
const dbUrl = `postgresql://${metadata.dbUser}:${encodeURIComponent(metadata.dbPassword)}@${metadata.dbHostname}:${metadata.dbPort}/${metadata.dbName}`;
|
|
78
80
|
switch (action) {
|
|
79
81
|
case 'open': {
|
|
80
|
-
|
|
82
|
+
let startSessionCmd = `open ${dbUrl}`;
|
|
81
83
|
(0, cmd_1.runCommandExec)(startSessionCmd, `Opened external app for ${instanceName ? `"${instanceName}" instance` : 'instance'}`, `Failed to open external app for ${instanceName ? `"${instanceName}" instance` : 'instance'}`);
|
|
82
84
|
break;
|
|
83
85
|
}
|
package/lib/lib/cmd.js
CHANGED
|
@@ -12,7 +12,7 @@ const setMostRecentCommand = (cmd) => {
|
|
|
12
12
|
};
|
|
13
13
|
exports.setMostRecentCommand = setMostRecentCommand;
|
|
14
14
|
const startInteractiveShell = (runCmd, shellName) => {
|
|
15
|
-
const shell = spawn(`$
|
|
15
|
+
const shell = spawn(`${runCmd}`, [], {
|
|
16
16
|
env: Object.assign(Object.assign({}, process.env), { SCRIPT_PATH: __dirname }),
|
|
17
17
|
stdio: 'inherit',
|
|
18
18
|
shell: true,
|
package/lib/lib/ssh.js
CHANGED
|
@@ -11,7 +11,9 @@ const assertSessionManagerPluginExists = async () => {
|
|
|
11
11
|
const errorMessage = '❗ AWS session manager plugin is required to use SSH functionality. ' +
|
|
12
12
|
'Please install it then retry your command. Installation instructions can be found at ' +
|
|
13
13
|
'https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html.';
|
|
14
|
-
|
|
14
|
+
let checkPluginCommand = 'command -v session-manager-plugin';
|
|
15
|
+
if (process.platform === 'win32')
|
|
16
|
+
checkPluginCommand = 'where session-manager-plugin';
|
|
15
17
|
try {
|
|
16
18
|
const stdOut = await (0, cmd_1.runCommandExecWithCallback)(checkPluginCommand, function (error, stdOut, stdErr) {
|
|
17
19
|
// Error if there's no output, meaning the plugin is not installed
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opal-security",
|
|
3
3
|
"description": "Opal allows you to centrally manage access to all of your sensitive systems.",
|
|
4
|
-
"version": "2.3.
|
|
4
|
+
"version": "2.3.4",
|
|
5
5
|
"author": "Stephen Cobbe",
|
|
6
6
|
"bin": {
|
|
7
7
|
"opal": "./bin/run"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"@oclif/plugin-help": "^5.2.20",
|
|
15
15
|
"@oclif/plugin-version": "^2.0.12",
|
|
16
16
|
"@types/prettyjson": "0.0.29",
|
|
17
|
-
"argon2": "^0.
|
|
17
|
+
"argon2": "^0.40.1",
|
|
18
18
|
"chalk": "^2.4.2",
|
|
19
19
|
"graphql": "^15.5.0",
|
|
20
20
|
"inquirer": "^8.2.6",
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
"better-npm-audit": "^3.7.3",
|
|
48
48
|
"chai": "^4.3.4",
|
|
49
49
|
"eslint-config-oclif": "^5.0.2",
|
|
50
|
-
"eslint-config-oclif-typescript": "^3.
|
|
50
|
+
"eslint-config-oclif-typescript": "^3.1.4",
|
|
51
51
|
"eslint-plugin-simple-import-sort": "^12.0.0",
|
|
52
52
|
"eslint-plugin-unused-imports": "^3.1.0",
|
|
53
53
|
"globby": "^10.0.2",
|
|
54
54
|
"mocha": "^10.0.0",
|
|
55
55
|
"nyc": "^15.1.0",
|
|
56
|
-
"oclif": "^4.
|
|
56
|
+
"oclif": "^4.8.0",
|
|
57
57
|
"ts-node": "^8.10.2",
|
|
58
58
|
"typescript": "^5.3.3"
|
|
59
59
|
},
|