opal-security 2.0.14 → 2.0.15
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 +18 -18
- package/lib/commands/set-url.js +2 -0
- package/oclif.manifest.json +1 -1
- package/package.json +12 -8
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ $ npm install -g opal-security
|
|
|
22
22
|
$ opal COMMAND
|
|
23
23
|
running command...
|
|
24
24
|
$ opal (-v|--version|version)
|
|
25
|
-
opal-security/2.0.
|
|
25
|
+
opal-security/2.0.15 darwin-x64 node-v14.16.1
|
|
26
26
|
$ opal --help [COMMAND]
|
|
27
27
|
USAGE
|
|
28
28
|
$ opal COMMAND
|
|
@@ -87,7 +87,7 @@ EXAMPLE
|
|
|
87
87
|
opal aws:identity
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
_See code: [src/commands/aws/identity.ts](https://github.com/opalsecurity/opal-cli/blob/v2.0.
|
|
90
|
+
_See code: [src/commands/aws/identity.ts](https://github.com/opalsecurity/opal-cli/blob/v2.0.15/src/commands/aws/identity.ts)_
|
|
91
91
|
|
|
92
92
|
## `opal curl-example`
|
|
93
93
|
|
|
@@ -101,24 +101,24 @@ OPTIONS
|
|
|
101
101
|
-h, --help show CLI help
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
_See code: [src/commands/curl-example.ts](https://github.com/opalsecurity/opal-cli/blob/v2.0.
|
|
104
|
+
_See code: [src/commands/curl-example.ts](https://github.com/opalsecurity/opal-cli/blob/v2.0.15/src/commands/curl-example.ts)_
|
|
105
105
|
|
|
106
106
|
## `opal help [COMMAND]`
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
Display help for opal.
|
|
109
109
|
|
|
110
110
|
```
|
|
111
111
|
USAGE
|
|
112
112
|
$ opal help [COMMAND]
|
|
113
113
|
|
|
114
114
|
ARGUMENTS
|
|
115
|
-
COMMAND
|
|
115
|
+
COMMAND Command to show help for.
|
|
116
116
|
|
|
117
117
|
OPTIONS
|
|
118
|
-
--
|
|
118
|
+
-n, --nested-commands Include all nested commands in the output.
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/
|
|
121
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.1.12/src/commands/help.ts)_
|
|
122
122
|
|
|
123
123
|
## `opal iam-roles:start`
|
|
124
124
|
|
|
@@ -138,7 +138,7 @@ EXAMPLES
|
|
|
138
138
|
opal iam-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398
|
|
139
139
|
```
|
|
140
140
|
|
|
141
|
-
_See code: [src/commands/iam-roles/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.0.
|
|
141
|
+
_See code: [src/commands/iam-roles/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.0.15/src/commands/iam-roles/start.ts)_
|
|
142
142
|
|
|
143
143
|
## `opal kube-roles:start`
|
|
144
144
|
|
|
@@ -161,7 +161,7 @@ EXAMPLES
|
|
|
161
161
|
"arn:aws:iam::712234975475:role/acme-eks-cluster-admin-role"
|
|
162
162
|
```
|
|
163
163
|
|
|
164
|
-
_See code: [src/commands/kube-roles/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.0.
|
|
164
|
+
_See code: [src/commands/kube-roles/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.0.15/src/commands/kube-roles/start.ts)_
|
|
165
165
|
|
|
166
166
|
## `opal login`
|
|
167
167
|
|
|
@@ -178,7 +178,7 @@ EXAMPLE
|
|
|
178
178
|
$ opal login
|
|
179
179
|
```
|
|
180
180
|
|
|
181
|
-
_See code: [src/commands/login.ts](https://github.com/opalsecurity/opal-cli/blob/v2.0.
|
|
181
|
+
_See code: [src/commands/login.ts](https://github.com/opalsecurity/opal-cli/blob/v2.0.15/src/commands/login.ts)_
|
|
182
182
|
|
|
183
183
|
## `opal logout`
|
|
184
184
|
|
|
@@ -195,7 +195,7 @@ EXAMPLE
|
|
|
195
195
|
$ opal logout
|
|
196
196
|
```
|
|
197
197
|
|
|
198
|
-
_See code: [src/commands/logout.ts](https://github.com/opalsecurity/opal-cli/blob/v2.0.
|
|
198
|
+
_See code: [src/commands/logout.ts](https://github.com/opalsecurity/opal-cli/blob/v2.0.15/src/commands/logout.ts)_
|
|
199
199
|
|
|
200
200
|
## `opal postgres-instances:start`
|
|
201
201
|
|
|
@@ -217,7 +217,7 @@ EXAMPLES
|
|
|
217
217
|
opal postgres-instances:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --accessLevelRemoteId "fullaccess"
|
|
218
218
|
```
|
|
219
219
|
|
|
220
|
-
_See code: [src/commands/postgres-instances/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.0.
|
|
220
|
+
_See code: [src/commands/postgres-instances/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.0.15/src/commands/postgres-instances/start.ts)_
|
|
221
221
|
|
|
222
222
|
## `opal resources:get`
|
|
223
223
|
|
|
@@ -235,7 +235,7 @@ EXAMPLE
|
|
|
235
235
|
opal resources:get --id 54052a3e-5375-4392-aeaf-0c6c44c131d4
|
|
236
236
|
```
|
|
237
237
|
|
|
238
|
-
_See code: [src/commands/resources/get.ts](https://github.com/opalsecurity/opal-cli/blob/v2.0.
|
|
238
|
+
_See code: [src/commands/resources/get.ts](https://github.com/opalsecurity/opal-cli/blob/v2.0.15/src/commands/resources/get.ts)_
|
|
239
239
|
|
|
240
240
|
## `opal set-token`
|
|
241
241
|
|
|
@@ -252,7 +252,7 @@ EXAMPLE
|
|
|
252
252
|
$ opal set-token
|
|
253
253
|
```
|
|
254
254
|
|
|
255
|
-
_See code: [src/commands/set-token.ts](https://github.com/opalsecurity/opal-cli/blob/v2.0.
|
|
255
|
+
_See code: [src/commands/set-token.ts](https://github.com/opalsecurity/opal-cli/blob/v2.0.15/src/commands/set-token.ts)_
|
|
256
256
|
|
|
257
257
|
## `opal set-url`
|
|
258
258
|
|
|
@@ -276,7 +276,7 @@ EXAMPLE
|
|
|
276
276
|
$ opal set-host
|
|
277
277
|
```
|
|
278
278
|
|
|
279
|
-
_See code: [src/commands/set-url.ts](https://github.com/opalsecurity/opal-cli/blob/v2.0.
|
|
279
|
+
_See code: [src/commands/set-url.ts](https://github.com/opalsecurity/opal-cli/blob/v2.0.15/src/commands/set-url.ts)_
|
|
280
280
|
|
|
281
281
|
## `opal ssh:copyFrom`
|
|
282
282
|
|
|
@@ -303,7 +303,7 @@ EXAMPLES
|
|
|
303
303
|
opal ssh:copyFrom --src instance/dir --dest my/dir --id 51f7176b-0464-4a6f-8369-e951e187b398
|
|
304
304
|
```
|
|
305
305
|
|
|
306
|
-
_See code: [src/commands/ssh/copyFrom.ts](https://github.com/opalsecurity/opal-cli/blob/v2.0.
|
|
306
|
+
_See code: [src/commands/ssh/copyFrom.ts](https://github.com/opalsecurity/opal-cli/blob/v2.0.15/src/commands/ssh/copyFrom.ts)_
|
|
307
307
|
|
|
308
308
|
## `opal ssh:copyTo`
|
|
309
309
|
|
|
@@ -330,7 +330,7 @@ EXAMPLES
|
|
|
330
330
|
opal ssh:copyTo --src my/dir --dest instance/dir --id 51f7176b-0464-4a6f-8369-e951e187b398
|
|
331
331
|
```
|
|
332
332
|
|
|
333
|
-
_See code: [src/commands/ssh/copyTo.ts](https://github.com/opalsecurity/opal-cli/blob/v2.0.
|
|
333
|
+
_See code: [src/commands/ssh/copyTo.ts](https://github.com/opalsecurity/opal-cli/blob/v2.0.15/src/commands/ssh/copyTo.ts)_
|
|
334
334
|
|
|
335
335
|
## `opal ssh:start`
|
|
336
336
|
|
|
@@ -350,5 +350,5 @@ EXAMPLES
|
|
|
350
350
|
opal ssh:start --id 51f7176b-0464-4a6f-8369-e951e187b398
|
|
351
351
|
```
|
|
352
352
|
|
|
353
|
-
_See code: [src/commands/ssh/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.0.
|
|
353
|
+
_See code: [src/commands/ssh/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.0.15/src/commands/ssh/start.ts)_
|
|
354
354
|
<!-- commandsstop -->
|
package/lib/commands/set-url.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const command_1 = require("@oclif/command");
|
|
4
4
|
const apollo_1 = require("../lib/apollo");
|
|
5
5
|
const config_1 = require("../lib/config");
|
|
6
|
+
const credentials_1 = require("../lib/credentials");
|
|
6
7
|
class SetUrl extends command_1.Command {
|
|
7
8
|
async run() {
|
|
8
9
|
try {
|
|
@@ -31,6 +32,7 @@ class SetUrl extends command_1.Command {
|
|
|
31
32
|
configData[config_1.allowSelfSignedCertsKey] = flags.allowSelfSignedCerts !== undefined;
|
|
32
33
|
config_1.writeConfigData(this.config.configDir, configData);
|
|
33
34
|
const updatedConfigData = config_1.getOrCreateConfigData(this.config.configDir);
|
|
35
|
+
await credentials_1.cred.removeCredentials(-1);
|
|
34
36
|
await apollo_1.initClient(this);
|
|
35
37
|
this.log(`Opal CLI will now make requests to the server at ${updatedConfigData[config_1.urlKey]}`);
|
|
36
38
|
}
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"2.0.
|
|
1
|
+
{"version":"2.0.15","commands":{"curl-example":{"id":"curl-example","description":"Prints out an example cURL command containing the parameters the CLI uses to query the Opal server.","pluginName":"opal-security","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"login":{"id":"login","description":"Authenticates you with the Opal server.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["$ opal login"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"logout":{"id":"logout","description":"Clears locally stored Opal server authentication credentials.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["$ opal logout"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"set-token":{"id":"set-token","description":"Sets an API token to authenticate with the Opal server - alternative auth flow for headless environments.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["$ opal set-token"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"set-url":{"id":"set-url","description":"Sets the url of the Opal server. Defaults to https://app.opal.dev.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["$ opal set-host"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"custom":{"name":"custom","type":"option"},"allowSelfSignedCerts":{"name":"allowSelfSignedCerts","type":"boolean","allowNo":false},"prod":{"name":"prod","type":"boolean","allowNo":false},"staging":{"name":"staging","type":"boolean","allowNo":false},"demo":{"name":"demo","type":"boolean","allowNo":false},"dev":{"name":"dev","type":"boolean","allowNo":false},"devLocal":{"name":"devLocal","type":"boolean","allowNo":false}},"args":[]},"aws:identity":{"id":"aws:identity","description":"Gets the current caller identity for the \"opal\" AWS profile.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["opal aws:identity"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"iam-roles:start":{"id":"iam-roles:start","description":"Starts a session to assume an IAM role.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["opal iam-roles:start","opal iam-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"id":{"name":"id","type":"option","description":"The ID of the Opal role resource."},"sessionId":{"name":"sessionId","type":"option","description":"SessionId of a session that has already been created via the web flow."}},"args":[]},"kube-roles:start":{"id":"kube-roles:start","description":"Starts a session to assume a Kubernetes cluster IAM role.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["opal kube-roles:start","opal kube-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398","opal kube-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --accessLevelRemoteId \"arn:aws:iam::712234975475:role/acme-eks-cluster-admin-role\""],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"id":{"name":"id","type":"option","description":"The ID of the Opal role resource."},"accessLevelRemoteId":{"name":"accessLevelRemoteId","type":"option","description":"The remote ID of the access level with which to access the cluster."},"sessionId":{"name":"sessionId","type":"option","description":"SessionId of a session that has already been created via the web flow."}},"args":[]},"postgres-instances:start":{"id":"postgres-instances:start","description":"Starts a session to query a Postgres database.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["opal postgres-instances:start","opal postgres-instances:start --id 51f7176b-0464-4a6f-8369-e951e187b398","opal postgres-instances:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --accessLevelRemoteId \"fullaccess\""],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"id":{"name":"id","type":"option","description":"The ID of the Opal instance resource."},"accessLevelRemoteId":{"name":"accessLevelRemoteId","type":"option","description":"The remote ID of the access level with which to access the database."},"sessionId":{"name":"sessionId","type":"option","description":"SessionId of a session that has already been created via the web flow."}},"args":[]},"resources:get":{"id":"resources:get","description":"Get resource info for a particular resource.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["opal resources:get --id 54052a3e-5375-4392-aeaf-0c6c44c131d4"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"id":{"name":"id","type":"option","required":true}},"args":[]},"ssh:copyFrom":{"id":"ssh:copyFrom","description":"Use SCP to copy files from a compute instance.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["opal ssh:copyFrom --src instance/dir --dest my/dir","opal ssh:copyFrom --src instance/dir --dest my/dir --id 51f7176b-0464-4a6f-8369-e951e187b398"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"src":{"name":"src","type":"option","description":"The path of the directory or file you would like to copy over SCP. Note we only support one file or directory at a time.","required":true},"dest":{"name":"dest","type":"option","description":"Pick which directory you want your files to be copied to.","required":false,"default":"."},"user":{"name":"user","type":"option","description":"Pick which user you want to run SCP over. Keep in mind not all users will have access to each other's home directory.","required":false,"default":"ssm-user"},"id":{"name":"id","type":"option","description":"The ID of the Opal instance resource."},"sessionId":{"name":"sessionId","type":"option","description":"SessionId of a session that has already been created via the web flow."}},"args":[]},"ssh:copyTo":{"id":"ssh:copyTo","description":"Use SCP to copy files to a compute instance.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["opal ssh:copyTo --src my/dir --dest instance/dir","opal ssh:copyTo --src my/dir --dest instance/dir --id 51f7176b-0464-4a6f-8369-e951e187b398"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"src":{"name":"src","type":"option","description":"The path of the directory or file you would like to copy over SCP. Note we only support one file or directory at a time.","required":true},"dest":{"name":"dest","type":"option","description":"Pick which directory you want your files to be copied to.","required":false,"default":"."},"user":{"name":"user","type":"option","description":"Pick which user you want to run SCP over. Keep in mind not all users will have access to each other's home directory.","required":false,"default":"ssm-user"},"id":{"name":"id","type":"option","description":"The ID of the Opal instance resource."},"sessionId":{"name":"sessionId","type":"option","description":"SessionId of a session that has already been created via the web flow."}},"args":[]},"ssh:start":{"id":"ssh:start","description":"Start an SSH session to access a particular compute instance.","pluginName":"opal-security","pluginType":"core","aliases":[],"examples":["opal ssh:start","opal ssh:start --id 51f7176b-0464-4a6f-8369-e951e187b398"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"id":{"name":"id","type":"option","description":"The ID of the Opal instance resource."},"sessionId":{"name":"sessionId","type":"option","description":"SessionId of a session that has already been created via the web flow."}},"args":[]}}}
|
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.0.
|
|
4
|
+
"version": "2.0.15",
|
|
5
5
|
"author": "Stephen Cobbe",
|
|
6
6
|
"bin": {
|
|
7
7
|
"opal": "./bin/run"
|
|
@@ -9,22 +9,24 @@
|
|
|
9
9
|
"bugs": "https://github.com/opalsecurity/opal-cli/issues",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@apollo/client": "^3.3.13",
|
|
12
|
-
"@graphql-codegen/cli": "^
|
|
12
|
+
"@graphql-codegen/cli": "^2.6.2",
|
|
13
13
|
"@graphql-codegen/near-operation-file-preset": "^1.17.13",
|
|
14
14
|
"@graphql-codegen/typescript": "^1.21.1",
|
|
15
15
|
"@graphql-codegen/typescript-oclif": "^1.17.9",
|
|
16
|
-
"@oclif/command": "^1.8.
|
|
16
|
+
"@oclif/command": "^1.8.16",
|
|
17
17
|
"@oclif/config": "^1.17.0",
|
|
18
|
+
"@oclif/errors": "^1.3.5",
|
|
18
19
|
"@oclif/plugin-autocomplete": "^0.3.0",
|
|
19
|
-
"@oclif/plugin-help": "^
|
|
20
|
+
"@oclif/plugin-help": "^5.1.12",
|
|
20
21
|
"@types/inquirer": "^7.3.1",
|
|
21
22
|
"@types/prettyjson": "0.0.29",
|
|
22
23
|
"chalk": "^2.4.2",
|
|
23
24
|
"graphql": "^15.5.0",
|
|
25
|
+
"inquirer": "^8.2.4",
|
|
24
26
|
"inquirer-autocomplete-prompt": "^1.4.0",
|
|
25
27
|
"keytar": "^7.7.0",
|
|
26
28
|
"lodash": "^4.17.21",
|
|
27
|
-
"node-fetch": "^2.6.
|
|
29
|
+
"node-fetch": "^2.6.7",
|
|
28
30
|
"open": "^8.0.4",
|
|
29
31
|
"openid-client": "^4.6.0",
|
|
30
32
|
"prettyjson": "^1.2.1",
|
|
@@ -35,17 +37,16 @@
|
|
|
35
37
|
"@oclif/dev-cli": "^1.26.0",
|
|
36
38
|
"@oclif/test": "^1.2.8",
|
|
37
39
|
"@types/chai": "^4.2.16",
|
|
38
|
-
"@types/chalk": "^2.2.0",
|
|
39
40
|
"@types/lodash": "^4.14.169",
|
|
40
41
|
"@types/mocha": "^5.2.7",
|
|
41
42
|
"@types/node": "^14.14.37",
|
|
42
43
|
"@types/semver": "^7.3.8",
|
|
43
44
|
"chai": "^4.3.4",
|
|
44
|
-
"eslint": "^
|
|
45
|
+
"eslint": "^8.17.0",
|
|
45
46
|
"eslint-config-oclif": "^3.1.0",
|
|
46
47
|
"eslint-config-oclif-typescript": "^0.1.0",
|
|
47
48
|
"globby": "^10.0.2",
|
|
48
|
-
"mocha": "^
|
|
49
|
+
"mocha": "^10.0.0",
|
|
49
50
|
"nyc": "^14.1.1",
|
|
50
51
|
"ts-node": "^8.10.2",
|
|
51
52
|
"typescript": "^3.9.9"
|
|
@@ -78,6 +79,9 @@
|
|
|
78
79
|
"type": "git",
|
|
79
80
|
"url": "https://github.com/opalsecurity/opal-cli.git"
|
|
80
81
|
},
|
|
82
|
+
"resolutions": {
|
|
83
|
+
"ansi-regex": "5.0.1"
|
|
84
|
+
},
|
|
81
85
|
"scripts": {
|
|
82
86
|
"postpack": "rm -f oclif.manifest.json",
|
|
83
87
|
"posttest": "eslint . --ext .ts --config .eslintrc",
|