opal-security 2.0.8 → 2.0.9

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 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.8 darwin-x64 node-v14.16.1
25
+ opal-security/2.0.9 darwin-x64 node-v14.16.1
26
26
  $ opal --help [COMMAND]
27
27
  USAGE
28
28
  $ opal COMMAND
@@ -86,7 +86,7 @@ EXAMPLE
86
86
  opal aws:identity
87
87
  ```
88
88
 
89
- _See code: [src/commands/aws/identity.ts](https://github.com/cli/opal/blob/v2.0.8/src/commands/aws/identity.ts)_
89
+ _See code: [src/commands/aws/identity.ts](https://github.com/cli/opal/blob/v2.0.9/src/commands/aws/identity.ts)_
90
90
 
91
91
  ## `opal curl-example`
92
92
 
@@ -100,7 +100,7 @@ OPTIONS
100
100
  -h, --help show CLI help
101
101
  ```
102
102
 
103
- _See code: [src/commands/curl-example.ts](https://github.com/cli/opal/blob/v2.0.8/src/commands/curl-example.ts)_
103
+ _See code: [src/commands/curl-example.ts](https://github.com/cli/opal/blob/v2.0.9/src/commands/curl-example.ts)_
104
104
 
105
105
  ## `opal help [COMMAND]`
106
106
 
@@ -136,7 +136,7 @@ EXAMPLES
136
136
  opal iam-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398
137
137
  ```
138
138
 
139
- _See code: [src/commands/iam-roles/start.ts](https://github.com/cli/opal/blob/v2.0.8/src/commands/iam-roles/start.ts)_
139
+ _See code: [src/commands/iam-roles/start.ts](https://github.com/cli/opal/blob/v2.0.9/src/commands/iam-roles/start.ts)_
140
140
 
141
141
  ## `opal kube-roles:start`
142
142
 
@@ -158,7 +158,7 @@ EXAMPLES
158
158
  "arn:aws:iam::712234975475:role/acme-eks-cluster-admin-role"
159
159
  ```
160
160
 
161
- _See code: [src/commands/kube-roles/start.ts](https://github.com/cli/opal/blob/v2.0.8/src/commands/kube-roles/start.ts)_
161
+ _See code: [src/commands/kube-roles/start.ts](https://github.com/cli/opal/blob/v2.0.9/src/commands/kube-roles/start.ts)_
162
162
 
163
163
  ## `opal login`
164
164
 
@@ -175,7 +175,7 @@ EXAMPLE
175
175
  $ opal login
176
176
  ```
177
177
 
178
- _See code: [src/commands/login.ts](https://github.com/cli/opal/blob/v2.0.8/src/commands/login.ts)_
178
+ _See code: [src/commands/login.ts](https://github.com/cli/opal/blob/v2.0.9/src/commands/login.ts)_
179
179
 
180
180
  ## `opal logout`
181
181
 
@@ -192,7 +192,7 @@ EXAMPLE
192
192
  $ opal logout
193
193
  ```
194
194
 
195
- _See code: [src/commands/logout.ts](https://github.com/cli/opal/blob/v2.0.8/src/commands/logout.ts)_
195
+ _See code: [src/commands/logout.ts](https://github.com/cli/opal/blob/v2.0.9/src/commands/logout.ts)_
196
196
 
197
197
  ## `opal postgres-instances:start`
198
198
 
@@ -213,7 +213,7 @@ EXAMPLES
213
213
  opal postgres-instances:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --accessLevelRemoteId "fullaccess"
214
214
  ```
215
215
 
216
- _See code: [src/commands/postgres-instances/start.ts](https://github.com/cli/opal/blob/v2.0.8/src/commands/postgres-instances/start.ts)_
216
+ _See code: [src/commands/postgres-instances/start.ts](https://github.com/cli/opal/blob/v2.0.9/src/commands/postgres-instances/start.ts)_
217
217
 
218
218
  ## `opal resources:get`
219
219
 
@@ -231,7 +231,7 @@ EXAMPLE
231
231
  opal resources:get --id 54052a3e-5375-4392-aeaf-0c6c44c131d4
232
232
  ```
233
233
 
234
- _See code: [src/commands/resources/get.ts](https://github.com/cli/opal/blob/v2.0.8/src/commands/resources/get.ts)_
234
+ _See code: [src/commands/resources/get.ts](https://github.com/cli/opal/blob/v2.0.9/src/commands/resources/get.ts)_
235
235
 
236
236
  ## `opal set-url`
237
237
 
@@ -254,7 +254,7 @@ EXAMPLE
254
254
  $ opal set-host
255
255
  ```
256
256
 
257
- _See code: [src/commands/set-url.ts](https://github.com/cli/opal/blob/v2.0.8/src/commands/set-url.ts)_
257
+ _See code: [src/commands/set-url.ts](https://github.com/cli/opal/blob/v2.0.9/src/commands/set-url.ts)_
258
258
 
259
259
  ## `opal ssh:copyFrom`
260
260
 
@@ -280,7 +280,7 @@ EXAMPLES
280
280
  opal ssh:copyFrom --src instance/dir --dest my/dir --id 51f7176b-0464-4a6f-8369-e951e187b398
281
281
  ```
282
282
 
283
- _See code: [src/commands/ssh/copyFrom.ts](https://github.com/cli/opal/blob/v2.0.8/src/commands/ssh/copyFrom.ts)_
283
+ _See code: [src/commands/ssh/copyFrom.ts](https://github.com/cli/opal/blob/v2.0.9/src/commands/ssh/copyFrom.ts)_
284
284
 
285
285
  ## `opal ssh:copyTo`
286
286
 
@@ -306,7 +306,7 @@ EXAMPLES
306
306
  opal ssh:copyTo --src my/dir --dest instance/dir --id 51f7176b-0464-4a6f-8369-e951e187b398
307
307
  ```
308
308
 
309
- _See code: [src/commands/ssh/copyTo.ts](https://github.com/cli/opal/blob/v2.0.8/src/commands/ssh/copyTo.ts)_
309
+ _See code: [src/commands/ssh/copyTo.ts](https://github.com/cli/opal/blob/v2.0.9/src/commands/ssh/copyTo.ts)_
310
310
 
311
311
  ## `opal ssh:start`
312
312
 
@@ -325,5 +325,5 @@ EXAMPLES
325
325
  opal ssh:start --id 51f7176b-0464-4a6f-8369-e951e187b398
326
326
  ```
327
327
 
328
- _See code: [src/commands/ssh/start.ts](https://github.com/cli/opal/blob/v2.0.8/src/commands/ssh/start.ts)_
328
+ _See code: [src/commands/ssh/start.ts](https://github.com/cli/opal/blob/v2.0.9/src/commands/ssh/start.ts)_
329
329
  <!-- commandsstop -->
package/lib/lib/apollo.js CHANGED
@@ -44,15 +44,15 @@ exports.initClient = async (command) => {
44
44
  const headers = (_a = operation.getContext().response) === null || _a === void 0 ? void 0 : _a.headers;
45
45
  if (headers) {
46
46
  const expectedCLIMajorVersion = headers.get('Opal-CLI-Expected-Major-Version');
47
- // defaults to version 1 since old Opal version won't have an advertised expected client version
48
- const semvarExpectedMinCLIVersion = `${expectedCLIMajorVersion || '1'}.0.0`;
49
- if (semver_1.major(currentCLIVersion) < semver_1.major(semvarExpectedMinCLIVersion)) {
50
- command.warn(chalk_1.default.yellow(`❗️ Update your CLI to match the compatible version. Expected major version ${chalk_1.default.blueBright(semvarExpectedMinCLIVersion)}, but version ${chalk_1.default.blueBright(currentCLIVersion)} is installed.
51
-
52
- Upgrade using the following command: ${chalk_1.default.blueBright('brew upgrade opalsecurity/brew/opal-security')}`));
53
- }
54
- else if (semver_1.major(currentCLIVersion) > semver_1.major(semvarExpectedMinCLIVersion)) {
55
- command.warn(chalk_1.default.yellow('❗️ Uh oh! The currently installed Opal server is outdated. Please contact your Opal admins to let them know they need to upgrade their deployment.'));
47
+ if (expectedCLIMajorVersion) {
48
+ const semvarExpectedMinCLIVersion = `${expectedCLIMajorVersion}.0.0`;
49
+ if (semver_1.major(currentCLIVersion) < semver_1.major(semvarExpectedMinCLIVersion)) {
50
+ command.warn(chalk_1.default.yellow(`❗️ Update your CLI to match the compatible version. Expected major version ${chalk_1.default.blueBright(semvarExpectedMinCLIVersion)}, but version ${chalk_1.default.blueBright(currentCLIVersion)} is installed.
51
+ Upgrade using the following command: ${chalk_1.default.blueBright('brew upgrade opalsecurity/brew/opal-security')}`));
52
+ }
53
+ else if (semver_1.major(currentCLIVersion) > semver_1.major(semvarExpectedMinCLIVersion)) {
54
+ command.warn(chalk_1.default.yellow('❗️ Uh oh! The currently installed Opal server is outdated. Please contact your Opal admins to let them know they need to upgrade their deployment.'));
55
+ }
56
56
  }
57
57
  }
58
58
  };
@@ -1 +1 @@
1
- {"version":"2.0.8","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-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},"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."}},"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."}},"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."}},"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."}},"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."}},"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."}},"args":[]}}}
1
+ {"version":"2.0.9","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-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},"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."}},"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."}},"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."}},"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."}},"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."}},"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."}},"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.8",
4
+ "version": "2.0.9",
5
5
  "author": "Stephen Cobbe",
6
6
  "bin": {
7
7
  "opal": "./bin/run"