opal-security 2.1.3 → 2.3.1
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 +233 -157
- package/bin/dev +6 -0
- package/bin/dev.cmd +3 -0
- package/bin/run +4 -4
- package/lib/commands/aws/identity.d.ts +2 -2
- package/lib/commands/aws/identity.js +5 -5
- package/lib/commands/curl-example.d.ts +2 -2
- package/lib/commands/curl-example.js +7 -6
- package/lib/commands/iam-roles/start.d.ts +6 -6
- package/lib/commands/iam-roles/start.js +16 -16
- package/lib/commands/kube-roles/start.d.ts +6 -6
- package/lib/commands/kube-roles/start.js +13 -13
- package/lib/commands/login.d.ts +4 -4
- package/lib/commands/login.js +29 -30
- package/lib/commands/logout.d.ts +3 -3
- package/lib/commands/logout.js +5 -5
- package/lib/commands/migrate-creds.d.ts +8 -0
- package/lib/commands/migrate-creds.js +48 -0
- package/lib/commands/postgres-instances/start.d.ts +7 -7
- package/lib/commands/postgres-instances/start.js +14 -14
- package/lib/commands/resources/get.d.ts +3 -3
- package/lib/commands/resources/get.js +8 -8
- package/lib/commands/set-custom-header.d.ts +4 -4
- package/lib/commands/set-custom-header.js +9 -9
- package/lib/commands/set-token.d.ts +3 -3
- package/lib/commands/set-token.js +10 -17
- package/lib/commands/set-url.d.ts +10 -12
- package/lib/commands/set-url.js +19 -20
- package/lib/commands/ssh/copyFrom.d.ts +7 -7
- package/lib/commands/ssh/copyFrom.js +13 -13
- package/lib/commands/ssh/copyTo.d.ts +7 -7
- package/lib/commands/ssh/copyTo.js +13 -13
- package/lib/commands/ssh/start.d.ts +5 -5
- package/lib/commands/ssh/start.js +16 -16
- package/lib/handler.d.ts +6 -5
- package/lib/handler.js +8 -6
- package/lib/index.d.ts +1 -1
- package/lib/index.js +3 -2
- package/lib/lib/apollo.d.ts +2 -2
- package/lib/lib/apollo.js +26 -19
- package/lib/lib/aws.js +4 -2
- package/lib/lib/cmd.d.ts +5 -4
- package/lib/lib/cmd.js +10 -5
- package/lib/lib/config.js +8 -5
- package/lib/lib/credentials/index.d.ts +11 -0
- package/lib/lib/credentials/index.js +55 -0
- package/lib/lib/credentials/keychain.d.ts +3 -0
- package/lib/lib/credentials/keychain.js +41 -0
- package/lib/lib/credentials/localEncryption.d.ts +3 -0
- package/lib/lib/credentials/localEncryption.js +75 -0
- package/lib/lib/flags.d.ts +5 -6
- package/lib/lib/flags.js +6 -6
- package/lib/lib/resources.d.ts +4 -4
- package/lib/lib/resources.js +14 -11
- package/lib/lib/sessions.d.ts +2 -2
- package/lib/lib/sessions.js +13 -11
- package/lib/lib/ssh.d.ts +1 -1
- package/lib/lib/ssh.js +6 -4
- package/lib/lib/util.js +8 -5
- package/lib/types.d.ts +1204 -1204
- package/lib/types.js +49 -49
- package/oclif.manifest.json +756 -1
- package/package.json +29 -24
- package/lib/lib/credentials.d.ts +0 -9
- package/lib/lib/credentials.js +0 -76
package/README.md
CHANGED
|
@@ -21,8 +21,8 @@ Opal allows you to centrally manage access to all of your sensitive systems.
|
|
|
21
21
|
$ npm install -g opal-security
|
|
22
22
|
$ opal COMMAND
|
|
23
23
|
running command...
|
|
24
|
-
$ opal (
|
|
25
|
-
opal-security/2.1
|
|
24
|
+
$ opal (--version)
|
|
25
|
+
opal-security/2.3.1 darwin-arm64 node-v18.19.0
|
|
26
26
|
$ opal --help [COMMAND]
|
|
27
27
|
USAGE
|
|
28
28
|
$ opal COMMAND
|
|
@@ -36,11 +36,12 @@ USAGE
|
|
|
36
36
|
* [`opal autocomplete [SHELL]`](#opal-autocomplete-shell)
|
|
37
37
|
* [`opal aws:identity`](#opal-awsidentity)
|
|
38
38
|
* [`opal curl-example`](#opal-curl-example)
|
|
39
|
-
* [`opal help [
|
|
39
|
+
* [`opal help [COMMANDS]`](#opal-help-commands)
|
|
40
40
|
* [`opal iam-roles:start`](#opal-iam-rolesstart)
|
|
41
41
|
* [`opal kube-roles:start`](#opal-kube-rolesstart)
|
|
42
42
|
* [`opal login`](#opal-login)
|
|
43
43
|
* [`opal logout`](#opal-logout)
|
|
44
|
+
* [`opal migrate-creds`](#opal-migrate-creds)
|
|
44
45
|
* [`opal postgres-instances:start`](#opal-postgres-instancesstart)
|
|
45
46
|
* [`opal resources:get`](#opal-resourcesget)
|
|
46
47
|
* [`opal set-custom-header`](#opal-set-custom-header)
|
|
@@ -49,6 +50,7 @@ USAGE
|
|
|
49
50
|
* [`opal ssh:copyFrom`](#opal-sshcopyfrom)
|
|
50
51
|
* [`opal ssh:copyTo`](#opal-sshcopyto)
|
|
51
52
|
* [`opal ssh:start`](#opal-sshstart)
|
|
53
|
+
* [`opal version`](#opal-version)
|
|
52
54
|
|
|
53
55
|
## `opal autocomplete [SHELL]`
|
|
54
56
|
|
|
@@ -56,22 +58,28 @@ display autocomplete installation instructions
|
|
|
56
58
|
|
|
57
59
|
```
|
|
58
60
|
USAGE
|
|
59
|
-
$ opal autocomplete [SHELL]
|
|
61
|
+
$ opal autocomplete [SHELL] [-r]
|
|
60
62
|
|
|
61
63
|
ARGUMENTS
|
|
62
64
|
SHELL shell type
|
|
63
65
|
|
|
64
|
-
|
|
66
|
+
FLAGS
|
|
65
67
|
-r, --refresh-cache Refresh cache (ignores displaying instructions)
|
|
66
68
|
|
|
69
|
+
DESCRIPTION
|
|
70
|
+
display autocomplete installation instructions
|
|
71
|
+
|
|
67
72
|
EXAMPLES
|
|
68
73
|
$ opal autocomplete
|
|
74
|
+
|
|
69
75
|
$ opal autocomplete bash
|
|
76
|
+
|
|
70
77
|
$ opal autocomplete zsh
|
|
78
|
+
|
|
71
79
|
$ opal autocomplete --refresh-cache
|
|
72
80
|
```
|
|
73
81
|
|
|
74
|
-
_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/
|
|
82
|
+
_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v1.4.6/src/commands/autocomplete/index.ts)_
|
|
75
83
|
|
|
76
84
|
## `opal aws:identity`
|
|
77
85
|
|
|
@@ -79,16 +87,19 @@ Gets the current caller identity for the "opal" AWS profile.
|
|
|
79
87
|
|
|
80
88
|
```
|
|
81
89
|
USAGE
|
|
82
|
-
$ opal aws:identity
|
|
90
|
+
$ opal aws:identity [-h]
|
|
83
91
|
|
|
84
|
-
|
|
85
|
-
-h, --help
|
|
92
|
+
FLAGS
|
|
93
|
+
-h, --help Show CLI help.
|
|
86
94
|
|
|
87
|
-
|
|
88
|
-
opal
|
|
95
|
+
DESCRIPTION
|
|
96
|
+
Gets the current caller identity for the "opal" AWS profile.
|
|
97
|
+
|
|
98
|
+
EXAMPLES
|
|
99
|
+
$ opal aws:identity
|
|
89
100
|
```
|
|
90
101
|
|
|
91
|
-
_See code: [src/commands/aws/identity.ts](https://github.com/opalsecurity/opal-cli/blob/v2.1
|
|
102
|
+
_See code: [src/commands/aws/identity.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.1/src/commands/aws/identity.ts)_
|
|
92
103
|
|
|
93
104
|
## `opal curl-example`
|
|
94
105
|
|
|
@@ -96,30 +107,36 @@ Prints out an example cURL command containing the parameters the CLI uses to que
|
|
|
96
107
|
|
|
97
108
|
```
|
|
98
109
|
USAGE
|
|
99
|
-
$ opal curl-example
|
|
110
|
+
$ opal curl-example [-h]
|
|
100
111
|
|
|
101
|
-
|
|
102
|
-
-h, --help
|
|
112
|
+
FLAGS
|
|
113
|
+
-h, --help Show CLI help.
|
|
114
|
+
|
|
115
|
+
DESCRIPTION
|
|
116
|
+
Prints out an example cURL command containing the parameters the CLI uses to query the Opal server.
|
|
103
117
|
```
|
|
104
118
|
|
|
105
|
-
_See code: [src/commands/curl-example.ts](https://github.com/opalsecurity/opal-cli/blob/v2.1
|
|
119
|
+
_See code: [src/commands/curl-example.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.1/src/commands/curl-example.ts)_
|
|
106
120
|
|
|
107
|
-
## `opal help [
|
|
121
|
+
## `opal help [COMMANDS]`
|
|
108
122
|
|
|
109
123
|
Display help for opal.
|
|
110
124
|
|
|
111
125
|
```
|
|
112
126
|
USAGE
|
|
113
|
-
$ opal help [
|
|
127
|
+
$ opal help [COMMANDS] [-n]
|
|
114
128
|
|
|
115
129
|
ARGUMENTS
|
|
116
|
-
|
|
130
|
+
COMMANDS Command to show help for.
|
|
117
131
|
|
|
118
|
-
|
|
132
|
+
FLAGS
|
|
119
133
|
-n, --nested-commands Include all nested commands in the output.
|
|
134
|
+
|
|
135
|
+
DESCRIPTION
|
|
136
|
+
Display help for opal.
|
|
120
137
|
```
|
|
121
138
|
|
|
122
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.
|
|
139
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.2.20/src/commands/help.ts)_
|
|
123
140
|
|
|
124
141
|
## `opal iam-roles:start`
|
|
125
142
|
|
|
@@ -127,28 +144,29 @@ Starts a session to assume an IAM role.
|
|
|
127
144
|
|
|
128
145
|
```
|
|
129
146
|
USAGE
|
|
130
|
-
$ opal iam-roles:start
|
|
131
|
-
|
|
132
|
-
OPTIONS
|
|
133
|
-
-h, --help show CLI help
|
|
147
|
+
$ opal iam-roles:start [-h] [-i <value>] [-s <value>] [-r] [--profileName <value>]
|
|
134
148
|
|
|
135
|
-
|
|
149
|
+
FLAGS
|
|
150
|
+
-h, --help Show CLI help.
|
|
151
|
+
-i, --id=<value> The Opal ID of the resource. You can find this from the URL, e.g.
|
|
136
152
|
https://opal.dev/resources/[ID]
|
|
137
|
-
|
|
138
153
|
-r, --refresh Starts a new session even if one already exists. Useful if a session is about to expire.
|
|
139
|
-
|
|
140
|
-
-s, --sessionId=sessionId The Opal ID of the session to connect to. Uses an existing session that was created via the
|
|
154
|
+
-s, --sessionId=<value> The Opal ID of the session to connect to. Uses an existing session that was created via the
|
|
141
155
|
web flow.
|
|
156
|
+
--profileName=<value> Uses a custom AWS profile name for the IAM role. Default value is the role's name.
|
|
142
157
|
|
|
143
|
-
|
|
158
|
+
DESCRIPTION
|
|
159
|
+
Starts a session to assume an IAM role.
|
|
144
160
|
|
|
145
161
|
EXAMPLES
|
|
146
|
-
opal iam-roles:start
|
|
147
|
-
|
|
148
|
-
opal iam-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398
|
|
162
|
+
$ opal iam-roles:start
|
|
163
|
+
|
|
164
|
+
$ opal iam-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398
|
|
165
|
+
|
|
166
|
+
$ opal iam-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --profileName "custom-profile"
|
|
149
167
|
```
|
|
150
168
|
|
|
151
|
-
_See code: [src/commands/iam-roles/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.1
|
|
169
|
+
_See code: [src/commands/iam-roles/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.1/src/commands/iam-roles/start.ts)_
|
|
152
170
|
|
|
153
171
|
## `opal kube-roles:start`
|
|
154
172
|
|
|
@@ -156,29 +174,30 @@ Starts a session to assume a Kubernetes cluster IAM role.
|
|
|
156
174
|
|
|
157
175
|
```
|
|
158
176
|
USAGE
|
|
159
|
-
$ opal kube-roles:start
|
|
177
|
+
$ opal kube-roles:start [-h] [-i <value>] [-a <value>] [-s <value>] [-r]
|
|
160
178
|
|
|
161
|
-
|
|
162
|
-
-a, --accessLevelRemoteId
|
|
163
|
-
-h, --help
|
|
179
|
+
FLAGS
|
|
180
|
+
-a, --accessLevelRemoteId=<value> The remote ID of the access level with which to access the resource.
|
|
181
|
+
-h, --help Show CLI help.
|
|
182
|
+
-i, --id=<value> The Opal ID of the resource. You can find this from the URL, e.g.
|
|
183
|
+
https://opal.dev/resources/[ID]
|
|
184
|
+
-r, --refresh Starts a new session even if one already exists. Useful if a session is about to
|
|
185
|
+
expire.
|
|
186
|
+
-s, --sessionId=<value> The Opal ID of the session to connect to. Uses an existing session that was created
|
|
187
|
+
via the web flow.
|
|
164
188
|
|
|
165
|
-
|
|
166
|
-
|
|
189
|
+
DESCRIPTION
|
|
190
|
+
Starts a session to assume a Kubernetes cluster IAM role.
|
|
167
191
|
|
|
168
|
-
|
|
169
|
-
|
|
192
|
+
EXAMPLES
|
|
193
|
+
$ opal kube-roles:start
|
|
170
194
|
|
|
171
|
-
-
|
|
172
|
-
was created via the web flow.
|
|
195
|
+
$ opal kube-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398
|
|
173
196
|
|
|
174
|
-
|
|
175
|
-
opal kube-roles:start
|
|
176
|
-
opal kube-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398
|
|
177
|
-
opal kube-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --accessLevelRemoteId
|
|
178
|
-
"arn:aws:iam::712234975475:role/acme-eks-cluster-admin-role"
|
|
197
|
+
$ opal kube-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --accessLevelRemoteId "arn:aws:iam::712234975475:role/acme-eks-cluster-admin-role"
|
|
179
198
|
```
|
|
180
199
|
|
|
181
|
-
_See code: [src/commands/kube-roles/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.1
|
|
200
|
+
_See code: [src/commands/kube-roles/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.1/src/commands/kube-roles/start.ts)_
|
|
182
201
|
|
|
183
202
|
## `opal login`
|
|
184
203
|
|
|
@@ -186,17 +205,20 @@ Authenticates you with the Opal server.
|
|
|
186
205
|
|
|
187
206
|
```
|
|
188
207
|
USAGE
|
|
189
|
-
$ opal login
|
|
208
|
+
$ opal login [-h] [--email <value>]
|
|
209
|
+
|
|
210
|
+
FLAGS
|
|
211
|
+
-h, --help Show CLI help.
|
|
212
|
+
--email=<value> Email address to login with.
|
|
190
213
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
--email=email Email address to login with.
|
|
214
|
+
DESCRIPTION
|
|
215
|
+
Authenticates you with the Opal server.
|
|
194
216
|
|
|
195
|
-
|
|
217
|
+
EXAMPLES
|
|
196
218
|
$ opal login
|
|
197
219
|
```
|
|
198
220
|
|
|
199
|
-
_See code: [src/commands/login.ts](https://github.com/opalsecurity/opal-cli/blob/v2.1
|
|
221
|
+
_See code: [src/commands/login.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.1/src/commands/login.ts)_
|
|
200
222
|
|
|
201
223
|
## `opal logout`
|
|
202
224
|
|
|
@@ -204,51 +226,74 @@ Clears locally stored Opal server authentication credentials.
|
|
|
204
226
|
|
|
205
227
|
```
|
|
206
228
|
USAGE
|
|
207
|
-
$ opal logout
|
|
229
|
+
$ opal logout [-h]
|
|
208
230
|
|
|
209
|
-
|
|
210
|
-
-h, --help
|
|
231
|
+
FLAGS
|
|
232
|
+
-h, --help Show CLI help.
|
|
211
233
|
|
|
212
|
-
|
|
234
|
+
DESCRIPTION
|
|
235
|
+
Clears locally stored Opal server authentication credentials.
|
|
236
|
+
|
|
237
|
+
EXAMPLES
|
|
213
238
|
$ opal logout
|
|
214
239
|
```
|
|
215
240
|
|
|
216
|
-
_See code: [src/commands/logout.ts](https://github.com/opalsecurity/opal-cli/blob/v2.1
|
|
241
|
+
_See code: [src/commands/logout.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.1/src/commands/logout.ts)_
|
|
217
242
|
|
|
218
|
-
## `opal
|
|
243
|
+
## `opal migrate-creds`
|
|
219
244
|
|
|
220
|
-
|
|
245
|
+
Migrates credentials from old keystore to new store. Should only need to be run once
|
|
221
246
|
|
|
222
247
|
```
|
|
223
248
|
USAGE
|
|
224
|
-
$ opal
|
|
249
|
+
$ opal migrate-creds [-h]
|
|
225
250
|
|
|
226
|
-
|
|
227
|
-
-
|
|
228
|
-
-h, --help show CLI help
|
|
251
|
+
FLAGS
|
|
252
|
+
-h, --help Show CLI help.
|
|
229
253
|
|
|
230
|
-
|
|
231
|
-
|
|
254
|
+
DESCRIPTION
|
|
255
|
+
Migrates credentials from old keystore to new store. Should only need to be run once
|
|
256
|
+
```
|
|
232
257
|
|
|
233
|
-
|
|
234
|
-
about to expire.
|
|
258
|
+
_See code: [src/commands/migrate-creds.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.1/src/commands/migrate-creds.ts)_
|
|
235
259
|
|
|
236
|
-
|
|
237
|
-
was created via the web flow.
|
|
260
|
+
## `opal postgres-instances:start`
|
|
238
261
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
262
|
+
Starts a session to connect to a Postgres database.
|
|
263
|
+
|
|
264
|
+
```
|
|
265
|
+
USAGE
|
|
266
|
+
$ opal postgres-instances:start [-h] [-i <value>] [-a <value>] [-s <value>] [-r] [--action open|psql|view]
|
|
267
|
+
|
|
268
|
+
FLAGS
|
|
269
|
+
-a, --accessLevelRemoteId=<value> The remote ID of the access level with which to access the resource.
|
|
270
|
+
-h, --help Show CLI help.
|
|
271
|
+
-i, --id=<value> The Opal ID of the resource. You can find this from the URL, e.g.
|
|
272
|
+
https://opal.dev/resources/[ID]
|
|
273
|
+
-r, --refresh Starts a new session even if one already exists. Useful if a session is about to
|
|
274
|
+
expire.
|
|
275
|
+
-s, --sessionId=<value> The Opal ID of the session to connect to. Uses an existing session that was created
|
|
276
|
+
via the web flow.
|
|
277
|
+
--action=<option> Method of connecting to the database.
|
|
278
|
+
- open: Open external database app
|
|
279
|
+
- psql: Start psql session in shell
|
|
280
|
+
- view: View connection configuration details
|
|
281
|
+
<options: open|psql|view>
|
|
282
|
+
|
|
283
|
+
DESCRIPTION
|
|
284
|
+
Starts a session to connect to a Postgres database.
|
|
243
285
|
|
|
244
286
|
EXAMPLES
|
|
245
|
-
opal postgres-instances:start
|
|
246
|
-
|
|
247
|
-
opal postgres-instances:start --id 51f7176b-0464-4a6f-8369-e951e187b398
|
|
248
|
-
|
|
287
|
+
$ opal postgres-instances:start
|
|
288
|
+
|
|
289
|
+
$ opal postgres-instances:start --id 51f7176b-0464-4a6f-8369-e951e187b398
|
|
290
|
+
|
|
291
|
+
$ opal postgres-instances:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --accessLevelRemoteId fullaccess
|
|
292
|
+
|
|
293
|
+
$ opal postgres-instances:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --accessLevelRemoteId fullaccess --action view
|
|
249
294
|
```
|
|
250
295
|
|
|
251
|
-
_See code: [src/commands/postgres-instances/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.1
|
|
296
|
+
_See code: [src/commands/postgres-instances/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.1/src/commands/postgres-instances/start.ts)_
|
|
252
297
|
|
|
253
298
|
## `opal resources:get`
|
|
254
299
|
|
|
@@ -256,17 +301,20 @@ Get resource info for a particular resource.
|
|
|
256
301
|
|
|
257
302
|
```
|
|
258
303
|
USAGE
|
|
259
|
-
$ opal resources:get
|
|
304
|
+
$ opal resources:get [-h] [-i <value>]
|
|
260
305
|
|
|
261
|
-
|
|
262
|
-
-h, --help
|
|
263
|
-
-i, --id
|
|
306
|
+
FLAGS
|
|
307
|
+
-h, --help Show CLI help.
|
|
308
|
+
-i, --id=<value> The Opal ID of the resource. You can find this from the URL, e.g. https://opal.dev/resources/[ID]
|
|
264
309
|
|
|
265
|
-
|
|
266
|
-
|
|
310
|
+
DESCRIPTION
|
|
311
|
+
Get resource info for a particular resource.
|
|
312
|
+
|
|
313
|
+
EXAMPLES
|
|
314
|
+
$ opal resources:get --id 54052a3e-5375-4392-aeaf-0c6c44c131d4
|
|
267
315
|
```
|
|
268
316
|
|
|
269
|
-
_See code: [src/commands/resources/get.ts](https://github.com/opalsecurity/opal-cli/blob/v2.1
|
|
317
|
+
_See code: [src/commands/resources/get.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.1/src/commands/resources/get.ts)_
|
|
270
318
|
|
|
271
319
|
## `opal set-custom-header`
|
|
272
320
|
|
|
@@ -274,17 +322,20 @@ Sets a custom HTTP header to connect to the Opal server.
|
|
|
274
322
|
|
|
275
323
|
```
|
|
276
324
|
USAGE
|
|
277
|
-
$ opal set-custom-header
|
|
325
|
+
$ opal set-custom-header [-h] [--header <value>]
|
|
326
|
+
|
|
327
|
+
FLAGS
|
|
328
|
+
-h, --help Show CLI help.
|
|
329
|
+
--header=<value>
|
|
278
330
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
--header=header
|
|
331
|
+
DESCRIPTION
|
|
332
|
+
Sets a custom HTTP header to connect to the Opal server.
|
|
282
333
|
|
|
283
|
-
|
|
334
|
+
EXAMPLES
|
|
284
335
|
$ opal set-custom-header --header 'cf-access-token: $TOKEN'
|
|
285
336
|
```
|
|
286
337
|
|
|
287
|
-
_See code: [src/commands/set-custom-header.ts](https://github.com/opalsecurity/opal-cli/blob/v2.1
|
|
338
|
+
_See code: [src/commands/set-custom-header.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.1/src/commands/set-custom-header.ts)_
|
|
288
339
|
|
|
289
340
|
## `opal set-token`
|
|
290
341
|
|
|
@@ -292,16 +343,19 @@ Sets an API token to authenticate with the Opal server - alternative auth flow f
|
|
|
292
343
|
|
|
293
344
|
```
|
|
294
345
|
USAGE
|
|
295
|
-
$ opal set-token
|
|
346
|
+
$ opal set-token [-h]
|
|
296
347
|
|
|
297
|
-
|
|
298
|
-
-h, --help
|
|
348
|
+
FLAGS
|
|
349
|
+
-h, --help Show CLI help.
|
|
299
350
|
|
|
300
|
-
|
|
351
|
+
DESCRIPTION
|
|
352
|
+
Sets an API token to authenticate with the Opal server - alternative auth flow for headless environments.
|
|
353
|
+
|
|
354
|
+
EXAMPLES
|
|
301
355
|
$ opal set-token
|
|
302
356
|
```
|
|
303
357
|
|
|
304
|
-
_See code: [src/commands/set-token.ts](https://github.com/opalsecurity/opal-cli/blob/v2.1
|
|
358
|
+
_See code: [src/commands/set-token.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.1/src/commands/set-token.ts)_
|
|
305
359
|
|
|
306
360
|
## `opal set-url [URL]`
|
|
307
361
|
|
|
@@ -309,20 +363,23 @@ Sets the url of the Opal server. Defaults to https://app.opal.dev.
|
|
|
309
363
|
|
|
310
364
|
```
|
|
311
365
|
USAGE
|
|
312
|
-
$ opal set-url [URL]
|
|
366
|
+
$ opal set-url [URL] [-h] [--allowSelfSignedCerts]
|
|
313
367
|
|
|
314
368
|
ARGUMENTS
|
|
315
369
|
URL URL of the Opal server to use. If unspecified, defaults to https://app.opal.dev
|
|
316
370
|
|
|
317
|
-
|
|
318
|
-
-h, --help
|
|
371
|
+
FLAGS
|
|
372
|
+
-h, --help Show CLI help.
|
|
319
373
|
--allowSelfSignedCerts
|
|
320
374
|
|
|
321
|
-
|
|
375
|
+
DESCRIPTION
|
|
376
|
+
Sets the url of the Opal server. Defaults to https://app.opal.dev.
|
|
377
|
+
|
|
378
|
+
EXAMPLES
|
|
322
379
|
$ opal set-url
|
|
323
380
|
```
|
|
324
381
|
|
|
325
|
-
_See code: [src/commands/set-url.ts](https://github.com/opalsecurity/opal-cli/blob/v2.1
|
|
382
|
+
_See code: [src/commands/set-url.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.1/src/commands/set-url.ts)_
|
|
326
383
|
|
|
327
384
|
## `opal ssh:copyFrom`
|
|
328
385
|
|
|
@@ -330,31 +387,30 @@ Use SCP to copy files from a compute instance.
|
|
|
330
387
|
|
|
331
388
|
```
|
|
332
389
|
USAGE
|
|
333
|
-
$ opal ssh:copyFrom
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
-h, --help
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
--user=user [default: ssm-user] The user you want to run SCP over. Keep in mind not all users will have
|
|
350
|
-
access to each other's home directory.
|
|
390
|
+
$ opal ssh:copyFrom --src <value> [-h] [--dest <value>] [--user <value>] [-i <value>] [-s <value>]
|
|
391
|
+
|
|
392
|
+
FLAGS
|
|
393
|
+
-h, --help Show CLI help.
|
|
394
|
+
-i, --id=<value> The Opal ID of the resource. You can find this from the URL, e.g.
|
|
395
|
+
https://opal.dev/resources/[ID]
|
|
396
|
+
-s, --sessionId=<value> The Opal ID of the session to connect to. Uses an existing session that was created via the
|
|
397
|
+
web flow.
|
|
398
|
+
--dest=<value> [default: .] The directory you want your files to be copied to.
|
|
399
|
+
--src=<value> (required) The directory or file you would like to copy over SCP. Note we only support one
|
|
400
|
+
file or directory at a time.
|
|
401
|
+
--user=<value> [default: ssm-user] The user you want to run SCP over. Keep in mind not all users will have
|
|
402
|
+
access to each other's home directory.
|
|
403
|
+
|
|
404
|
+
DESCRIPTION
|
|
405
|
+
Use SCP to copy files from a compute instance.
|
|
351
406
|
|
|
352
407
|
EXAMPLES
|
|
353
|
-
opal ssh:copyFrom --src instance/dir --dest my/dir
|
|
354
|
-
|
|
408
|
+
$ opal ssh:copyFrom --src instance/dir --dest my/dir
|
|
409
|
+
|
|
410
|
+
$ opal ssh:copyFrom --src instance/dir --dest my/dir --id 51f7176b-0464-4a6f-8369-e951e187b398
|
|
355
411
|
```
|
|
356
412
|
|
|
357
|
-
_See code: [src/commands/ssh/copyFrom.ts](https://github.com/opalsecurity/opal-cli/blob/v2.1
|
|
413
|
+
_See code: [src/commands/ssh/copyFrom.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.1/src/commands/ssh/copyFrom.ts)_
|
|
358
414
|
|
|
359
415
|
## `opal ssh:copyTo`
|
|
360
416
|
|
|
@@ -362,55 +418,75 @@ Use SCP to copy files to a compute instance.
|
|
|
362
418
|
|
|
363
419
|
```
|
|
364
420
|
USAGE
|
|
365
|
-
$ opal ssh:copyTo
|
|
421
|
+
$ opal ssh:copyTo --src <value> [-h] [--dest <value>] [--user <value>] [-i <value>] [-s <value>]
|
|
422
|
+
|
|
423
|
+
FLAGS
|
|
424
|
+
-h, --help Show CLI help.
|
|
425
|
+
-i, --id=<value> The Opal ID of the resource. You can find this from the URL, e.g.
|
|
426
|
+
https://opal.dev/resources/[ID]
|
|
427
|
+
-s, --sessionId=<value> The Opal ID of the session to connect to. Uses an existing session that was created via the
|
|
428
|
+
web flow.
|
|
429
|
+
--dest=<value> [default: .] The directory you want your files to be copied to.
|
|
430
|
+
--src=<value> (required) The directory or file you would like to copy over SCP. Note we only support one
|
|
431
|
+
file or directory at a time.
|
|
432
|
+
--user=<value> [default: ssm-user] The user you want to run SCP over. Keep in mind not all users will have
|
|
433
|
+
access to each other's home directory.
|
|
434
|
+
|
|
435
|
+
DESCRIPTION
|
|
436
|
+
Use SCP to copy files to a compute instance.
|
|
366
437
|
|
|
367
|
-
|
|
368
|
-
|
|
438
|
+
EXAMPLES
|
|
439
|
+
$ opal ssh:copyTo --src my/dir --dest instance/dir
|
|
369
440
|
|
|
370
|
-
|
|
371
|
-
|
|
441
|
+
$ opal ssh:copyTo --src my/dir --dest instance/dir --id 51f7176b-0464-4a6f-8369-e951e187b398
|
|
442
|
+
```
|
|
372
443
|
|
|
373
|
-
|
|
374
|
-
|
|
444
|
+
_See code: [src/commands/ssh/copyTo.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.1/src/commands/ssh/copyTo.ts)_
|
|
445
|
+
|
|
446
|
+
## `opal ssh:start`
|
|
447
|
+
|
|
448
|
+
Starts an SSH session to access a compute instance.
|
|
375
449
|
|
|
376
|
-
|
|
450
|
+
```
|
|
451
|
+
USAGE
|
|
452
|
+
$ opal ssh:start [-h] [-i <value>] [-s <value>] [-r]
|
|
377
453
|
|
|
378
|
-
|
|
379
|
-
|
|
454
|
+
FLAGS
|
|
455
|
+
-h, --help Show CLI help.
|
|
456
|
+
-i, --id=<value> The Opal ID of the resource. You can find this from the URL, e.g.
|
|
457
|
+
https://opal.dev/resources/[ID]
|
|
458
|
+
-r, --refresh Starts a new session even if one already exists. Useful if a session is about to expire.
|
|
459
|
+
-s, --sessionId=<value> The Opal ID of the session to connect to. Uses an existing session that was created via the
|
|
460
|
+
web flow.
|
|
380
461
|
|
|
381
|
-
|
|
382
|
-
|
|
462
|
+
DESCRIPTION
|
|
463
|
+
Starts an SSH session to access a compute instance.
|
|
383
464
|
|
|
384
465
|
EXAMPLES
|
|
385
|
-
opal ssh:
|
|
386
|
-
opal ssh:copyTo --src my/dir --dest instance/dir --id 51f7176b-0464-4a6f-8369-e951e187b398
|
|
387
|
-
```
|
|
466
|
+
$ opal ssh:start
|
|
388
467
|
|
|
389
|
-
|
|
468
|
+
$ opal ssh:start --id 51f7176b-0464-4a6f-8369-e951e187b398
|
|
469
|
+
```
|
|
390
470
|
|
|
391
|
-
|
|
471
|
+
_See code: [src/commands/ssh/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.1/src/commands/ssh/start.ts)_
|
|
392
472
|
|
|
393
|
-
|
|
473
|
+
## `opal version`
|
|
394
474
|
|
|
395
475
|
```
|
|
396
476
|
USAGE
|
|
397
|
-
$ opal
|
|
477
|
+
$ opal version [--json] [--verbose]
|
|
398
478
|
|
|
399
|
-
|
|
400
|
-
|
|
479
|
+
FLAGS
|
|
480
|
+
--verbose Show additional information about the CLI.
|
|
401
481
|
|
|
402
|
-
|
|
403
|
-
|
|
482
|
+
GLOBAL FLAGS
|
|
483
|
+
--json Format output as json.
|
|
404
484
|
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
-s, --sessionId=sessionId The Opal ID of the session to connect to. Uses an existing session that was created via the
|
|
408
|
-
web flow.
|
|
485
|
+
FLAG DESCRIPTIONS
|
|
486
|
+
--verbose Show additional information about the CLI.
|
|
409
487
|
|
|
410
|
-
|
|
411
|
-
opal ssh:start
|
|
412
|
-
opal ssh:start --id 51f7176b-0464-4a6f-8369-e951e187b398
|
|
488
|
+
Additionally shows the architecture, node version, operating system, and versions of plugins that the CLI is using.
|
|
413
489
|
```
|
|
414
490
|
|
|
415
|
-
_See code: [
|
|
491
|
+
_See code: [@oclif/plugin-version](https://github.com/oclif/plugin-version/blob/v2.0.11/src/commands/version.ts)_
|
|
416
492
|
<!-- commandsstop -->
|
package/bin/dev
ADDED
package/bin/dev.cmd
ADDED
package/bin/run
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
require("@oclif/
|
|
4
|
-
.
|
|
5
|
-
.then(require("@oclif/
|
|
6
|
-
.catch(require("@oclif/
|
|
3
|
+
require("@oclif/core")
|
|
4
|
+
.execute({ development: false, dir: __dirname })
|
|
5
|
+
.then(require("@oclif/core/flush"))
|
|
6
|
+
.catch(require("@oclif/core/handle"));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Command } from '@oclif/
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
2
|
export default class Identity extends Command {
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
help: import("@oclif/
|
|
6
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
7
7
|
};
|
|
8
8
|
run(): Promise<void>;
|
|
9
9
|
}
|