opal-security 4.0.2 → 4.0.3

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 (--version)
25
- opal-security/4.0.2 darwin-arm64 node-v24.5.0
25
+ opal-security/4.0.3 darwin-arm64 node-v24.5.0
26
26
  $ opal --help [COMMAND]
27
27
  USAGE
28
28
  $ opal COMMAND
@@ -105,7 +105,7 @@ EXAMPLES
105
105
  $ opal aws:identity
106
106
  ```
107
107
 
108
- _See code: [src/commands/aws/identity.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.2/src/commands/aws/identity.ts)_
108
+ _See code: [src/commands/aws/identity.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.3/src/commands/aws/identity.ts)_
109
109
 
110
110
  ## `opal clear-auth-config`
111
111
 
@@ -122,7 +122,7 @@ EXAMPLES
122
122
  $ opal clear-auth-config
123
123
  ```
124
124
 
125
- _See code: [src/commands/clear-auth-config.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.2/src/commands/clear-auth-config.ts)_
125
+ _See code: [src/commands/clear-auth-config.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.3/src/commands/clear-auth-config.ts)_
126
126
 
127
127
  ## `opal groups get`
128
128
 
@@ -143,7 +143,7 @@ EXAMPLES
143
143
  $ opal groups:get --id 54052a3e-5375-4392-aeaf-0c6c44c131d4
144
144
  ```
145
145
 
146
- _See code: [src/commands/groups/get.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.2/src/commands/groups/get.ts)_
146
+ _See code: [src/commands/groups/get.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.3/src/commands/groups/get.ts)_
147
147
 
148
148
  ## `opal help [COMMANDS]`
149
149
 
@@ -193,7 +193,7 @@ EXAMPLES
193
193
  $ opal iam-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --profileName "custom-profile"
194
194
  ```
195
195
 
196
- _See code: [src/commands/iam-roles/start.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.2/src/commands/iam-roles/start.ts)_
196
+ _See code: [src/commands/iam-roles/start.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.3/src/commands/iam-roles/start.ts)_
197
197
 
198
198
  ## `opal kube-roles start`
199
199
 
@@ -224,7 +224,7 @@ EXAMPLES
224
224
  $ opal kube-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --accessLevelRemoteId "arn:aws:iam::712234975475:role/acme-eks-cluster-admin-role"
225
225
  ```
226
226
 
227
- _See code: [src/commands/kube-roles/start.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.2/src/commands/kube-roles/start.ts)_
227
+ _See code: [src/commands/kube-roles/start.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.3/src/commands/kube-roles/start.ts)_
228
228
 
229
229
  ## `opal login`
230
230
 
@@ -247,7 +247,7 @@ EXAMPLES
247
247
  $ opal login
248
248
  ```
249
249
 
250
- _See code: [src/commands/login.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.2/src/commands/login.ts)_
250
+ _See code: [src/commands/login.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.3/src/commands/login.ts)_
251
251
 
252
252
  ## `opal logout`
253
253
 
@@ -267,7 +267,7 @@ EXAMPLES
267
267
  $ opal logout
268
268
  ```
269
269
 
270
- _See code: [src/commands/logout.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.2/src/commands/logout.ts)_
270
+ _See code: [src/commands/logout.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.3/src/commands/logout.ts)_
271
271
 
272
272
  ## `opal postgres-instances start`
273
273
 
@@ -305,7 +305,7 @@ EXAMPLES
305
305
  $ opal postgres-instances:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --accessLevelRemoteId fullaccess --action view
306
306
  ```
307
307
 
308
- _See code: [src/commands/postgres-instances/start.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.2/src/commands/postgres-instances/start.ts)_
308
+ _See code: [src/commands/postgres-instances/start.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.3/src/commands/postgres-instances/start.ts)_
309
309
 
310
310
  ## `opal request create`
311
311
 
@@ -331,7 +331,7 @@ DESCRIPTION
331
331
  Creates an Opal access request via an interactive form
332
332
  ```
333
333
 
334
- _See code: [src/commands/request/create.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.2/src/commands/request/create.ts)_
334
+ _See code: [src/commands/request/create.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.3/src/commands/request/create.ts)_
335
335
 
336
336
  ## `opal request get`
337
337
 
@@ -355,7 +355,7 @@ EXAMPLES
355
355
  $ opal request get --id 54052a3e-5375-4392-aeaf-0c6c44c131d4 --verbose
356
356
  ```
357
357
 
358
- _See code: [src/commands/request/get.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.2/src/commands/request/get.ts)_
358
+ _See code: [src/commands/request/get.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.3/src/commands/request/get.ts)_
359
359
 
360
360
  ## `opal request list`
361
361
 
@@ -387,7 +387,7 @@ EXAMPLES
387
387
  $ opal request list --n 5 --pending --verbose
388
388
  ```
389
389
 
390
- _See code: [src/commands/request/list.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.2/src/commands/request/list.ts)_
390
+ _See code: [src/commands/request/list.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.3/src/commands/request/list.ts)_
391
391
 
392
392
  ## `opal request ls`
393
393
 
@@ -438,7 +438,7 @@ EXAMPLES
438
438
  $ opal resources:get --id 54052a3e-5375-4392-aeaf-0c6c44c131d4
439
439
  ```
440
440
 
441
- _See code: [src/commands/resources/get.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.2/src/commands/resources/get.ts)_
441
+ _See code: [src/commands/resources/get.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.3/src/commands/resources/get.ts)_
442
442
 
443
443
  ## `opal set-auth-config`
444
444
 
@@ -468,7 +468,7 @@ EXAMPLES
468
468
  $ opal set-auth-config --organizationID=org-456 --clientID=abc123 --issuerUrl=https://auth.example.com
469
469
  ```
470
470
 
471
- _See code: [src/commands/set-auth-config.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.2/src/commands/set-auth-config.ts)_
471
+ _See code: [src/commands/set-auth-config.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.3/src/commands/set-auth-config.ts)_
472
472
 
473
473
  ## `opal set-custom-header`
474
474
 
@@ -489,7 +489,7 @@ EXAMPLES
489
489
  $ opal set-custom-header --header 'cf-access-token: $TOKEN'
490
490
  ```
491
491
 
492
- _See code: [src/commands/set-custom-header.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.2/src/commands/set-custom-header.ts)_
492
+ _See code: [src/commands/set-custom-header.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.3/src/commands/set-custom-header.ts)_
493
493
 
494
494
  ## `opal set-token`
495
495
 
@@ -509,7 +509,7 @@ EXAMPLES
509
509
  $ opal set-token
510
510
  ```
511
511
 
512
- _See code: [src/commands/set-token.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.2/src/commands/set-token.ts)_
512
+ _See code: [src/commands/set-token.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.3/src/commands/set-token.ts)_
513
513
 
514
514
  ## `opal set-url [URL]`
515
515
 
@@ -533,7 +533,7 @@ EXAMPLES
533
533
  $ opal set-url
534
534
  ```
535
535
 
536
- _See code: [src/commands/set-url.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.2/src/commands/set-url.ts)_
536
+ _See code: [src/commands/set-url.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.3/src/commands/set-url.ts)_
537
537
 
538
538
  ## `opal ssh copyFrom`
539
539
 
@@ -564,7 +564,7 @@ EXAMPLES
564
564
  $ opal ssh:copyFrom --src instance/dir --dest my/dir --id 51f7176b-0464-4a6f-8369-e951e187b398
565
565
  ```
566
566
 
567
- _See code: [src/commands/ssh/copyFrom.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.2/src/commands/ssh/copyFrom.ts)_
567
+ _See code: [src/commands/ssh/copyFrom.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.3/src/commands/ssh/copyFrom.ts)_
568
568
 
569
569
  ## `opal ssh copyTo`
570
570
 
@@ -595,7 +595,7 @@ EXAMPLES
595
595
  $ opal ssh:copyTo --src my/dir --dest instance/dir --id 51f7176b-0464-4a6f-8369-e951e187b398
596
596
  ```
597
597
 
598
- _See code: [src/commands/ssh/copyTo.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.2/src/commands/ssh/copyTo.ts)_
598
+ _See code: [src/commands/ssh/copyTo.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.3/src/commands/ssh/copyTo.ts)_
599
599
 
600
600
  ## `opal ssh start`
601
601
 
@@ -622,7 +622,7 @@ EXAMPLES
622
622
  $ opal ssh:start --id 51f7176b-0464-4a6f-8369-e951e187b398
623
623
  ```
624
624
 
625
- _See code: [src/commands/ssh/start.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.2/src/commands/ssh/start.ts)_
625
+ _See code: [src/commands/ssh/start.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.3/src/commands/ssh/start.ts)_
626
626
 
627
627
  ## `opal version`
628
628
 
@@ -659,5 +659,5 @@ DESCRIPTION
659
659
  Describes current url set, organization name, and logged in user if applicable.
660
660
  ```
661
661
 
662
- _See code: [src/commands/whoami.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.2/src/commands/whoami.ts)_
662
+ _See code: [src/commands/whoami.ts](https://github.com/opalsecurity/opal-cli/blob/v4.0.3/src/commands/whoami.ts)_
663
663
  <!-- commandsstop -->
@@ -84,7 +84,7 @@ mutation CLITokenExchange($input: CLITokenExchangeInput!) {
84
84
  `;
85
85
  class Login extends Command {
86
86
  async run() {
87
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
87
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
88
88
  try {
89
89
  await initClient(this, false);
90
90
  const { flags } = await this.parse(Login);
@@ -94,7 +94,7 @@ class Login extends Command {
94
94
  let email = flags.email;
95
95
  let organizationId = existingCreds.organizationID;
96
96
  let organizationName;
97
- let clientIDCandidate = existingCreds.clientID;
97
+ let clientIDCandidate = (_a = existingCreds.clientID) !== null && _a !== void 0 ? _a : configData.creds.clientIDCandidate; // configData.creds.clientIDCandidate is pre-4.0, load from here for backwards-compat
98
98
  const useDeviceCodeFlow = flags["device-code"];
99
99
  // If user starts a new login, remove their existing auth cookie / API token
100
100
  await removeAuthSecret(this);
@@ -145,11 +145,11 @@ class Login extends Command {
145
145
  return handleError(this, "Could not connect to Opal. Did you set the right URL? (`opal set-url --help`)");
146
146
  }
147
147
  }
148
- const signInOrganizations = ((_b = (_a = signInOrganizationsResponse === null || signInOrganizationsResponse === void 0 ? void 0 : signInOrganizationsResponse.data) === null || _a === void 0 ? void 0 : _a.signInMethod) === null || _b === void 0 ? void 0 : _b.__typename) ===
148
+ const signInOrganizations = ((_c = (_b = signInOrganizationsResponse === null || signInOrganizationsResponse === void 0 ? void 0 : signInOrganizationsResponse.data) === null || _b === void 0 ? void 0 : _b.signInMethod) === null || _c === void 0 ? void 0 : _c.__typename) ===
149
149
  "SignInMethodResult"
150
150
  ? signInOrganizationsResponse.data.signInMethod.signInOrganizations
151
- : ((_d = (_c = signInOrganizationsLegacyResponse === null || signInOrganizationsLegacyResponse === void 0 ? void 0 : signInOrganizationsLegacyResponse.data) === null || _c === void 0 ? void 0 : _c.signInMethod) === null || _d === void 0 ? void 0 : _d.__typename) === "SignInMethodResult"
152
- ? (_e = signInOrganizationsLegacyResponse === null || signInOrganizationsLegacyResponse === void 0 ? void 0 : signInOrganizationsLegacyResponse.data.signInMethod) === null || _e === void 0 ? void 0 : _e.signInOrganizations
151
+ : ((_e = (_d = signInOrganizationsLegacyResponse === null || signInOrganizationsLegacyResponse === void 0 ? void 0 : signInOrganizationsLegacyResponse.data) === null || _d === void 0 ? void 0 : _d.signInMethod) === null || _e === void 0 ? void 0 : _e.__typename) === "SignInMethodResult"
152
+ ? (_f = signInOrganizationsLegacyResponse === null || signInOrganizationsLegacyResponse === void 0 ? void 0 : signInOrganizationsLegacyResponse.data.signInMethod) === null || _f === void 0 ? void 0 : _f.signInOrganizations
153
153
  : undefined;
154
154
  if (signInOrganizations && signInOrganizations.length > 0) {
155
155
  if (signInOrganizations.length === 1) {
@@ -192,7 +192,7 @@ class Login extends Command {
192
192
  input: { organizationId },
193
193
  },
194
194
  });
195
- const signInRespState = (_g = (_f = signInResp === null || signInResp === void 0 ? void 0 : signInResp.data) === null || _f === void 0 ? void 0 : _f.signIn) === null || _g === void 0 ? void 0 : _g.state;
195
+ const signInRespState = (_h = (_g = signInResp === null || signInResp === void 0 ? void 0 : signInResp.data) === null || _g === void 0 ? void 0 : _g.signIn) === null || _h === void 0 ? void 0 : _h.state;
196
196
  let server; // Authorization Server's Issuer Identifier
197
197
  let clientId; // Client identifier at the Authorization Server
198
198
  let isAuth0Issuer = true;
@@ -221,7 +221,7 @@ class Login extends Command {
221
221
  // This scope is evaluated in Auth0 "MFA Rule" Action to skip or enabled MFA
222
222
  let scope = "openid email profile";
223
223
  // This extra scope is only supported in Auth0, so if the user has a custom issuer, we omit it
224
- if (!((_j = (_h = signInResp === null || signInResp === void 0 ? void 0 : signInResp.data) === null || _h === void 0 ? void 0 : _h.signIn) === null || _j === void 0 ? void 0 : _j.forceExtraStep) && isAuth0Issuer) {
224
+ if (!((_k = (_j = signInResp === null || signInResp === void 0 ? void 0 : signInResp.data) === null || _j === void 0 ? void 0 : _j.signIn) === null || _k === void 0 ? void 0 : _k.forceExtraStep) && isAuth0Issuer) {
225
225
  scope += " mfa:skip";
226
226
  }
227
227
  let tokens;
@@ -348,7 +348,7 @@ ${redirectTo}
348
348
  variables: {},
349
349
  });
350
350
  if (authCheckErr ||
351
- !((_m = (_l = (_k = authCheckResp === null || authCheckResp === void 0 ? void 0 : authCheckResp.data) === null || _k === void 0 ? void 0 : _k.organizationSettings) === null || _l === void 0 ? void 0 : _l.settings) === null || _m === void 0 ? void 0 : _m.id)) {
351
+ !((_o = (_m = (_l = authCheckResp === null || authCheckResp === void 0 ? void 0 : authCheckResp.data) === null || _l === void 0 ? void 0 : _l.organizationSettings) === null || _m === void 0 ? void 0 : _m.settings) === null || _o === void 0 ? void 0 : _o.id)) {
352
352
  this.log("Error verifying log in. Authenticated commands may fail. Please double check your URL and use `opal logout; opal login` to try again.\n");
353
353
  await removeAuthSecret(this);
354
354
  process.exit(1);
@@ -602,6 +602,46 @@
602
602
  "start.js"
603
603
  ]
604
604
  },
605
+ "resources:get": {
606
+ "aliases": [],
607
+ "args": {},
608
+ "description": "Get resource info for a particular resource.",
609
+ "examples": [
610
+ "opal resources:get --id 54052a3e-5375-4392-aeaf-0c6c44c131d4"
611
+ ],
612
+ "flags": {
613
+ "help": {
614
+ "char": "h",
615
+ "description": "Show CLI help.",
616
+ "name": "help",
617
+ "allowNo": false,
618
+ "type": "boolean"
619
+ },
620
+ "id": {
621
+ "char": "i",
622
+ "description": "The Opal ID of the asset. You can find this from the URL, e.g. https://opal.dev/resources/[ID]",
623
+ "name": "id",
624
+ "hasDynamicHelp": false,
625
+ "multiple": false,
626
+ "type": "option"
627
+ }
628
+ },
629
+ "hasDynamicHelp": false,
630
+ "hiddenAliases": [],
631
+ "id": "resources:get",
632
+ "pluginAlias": "opal-security",
633
+ "pluginName": "opal-security",
634
+ "pluginType": "core",
635
+ "strict": true,
636
+ "enableJsonFlag": false,
637
+ "isESM": true,
638
+ "relativePath": [
639
+ "build",
640
+ "commands",
641
+ "resources",
642
+ "get.js"
643
+ ]
644
+ },
605
645
  "request:create": {
606
646
  "aliases": [],
607
647
  "args": {},
@@ -779,46 +819,6 @@
779
819
  "list.js"
780
820
  ]
781
821
  },
782
- "resources:get": {
783
- "aliases": [],
784
- "args": {},
785
- "description": "Get resource info for a particular resource.",
786
- "examples": [
787
- "opal resources:get --id 54052a3e-5375-4392-aeaf-0c6c44c131d4"
788
- ],
789
- "flags": {
790
- "help": {
791
- "char": "h",
792
- "description": "Show CLI help.",
793
- "name": "help",
794
- "allowNo": false,
795
- "type": "boolean"
796
- },
797
- "id": {
798
- "char": "i",
799
- "description": "The Opal ID of the asset. You can find this from the URL, e.g. https://opal.dev/resources/[ID]",
800
- "name": "id",
801
- "hasDynamicHelp": false,
802
- "multiple": false,
803
- "type": "option"
804
- }
805
- },
806
- "hasDynamicHelp": false,
807
- "hiddenAliases": [],
808
- "id": "resources:get",
809
- "pluginAlias": "opal-security",
810
- "pluginName": "opal-security",
811
- "pluginType": "core",
812
- "strict": true,
813
- "enableJsonFlag": false,
814
- "isESM": true,
815
- "relativePath": [
816
- "build",
817
- "commands",
818
- "resources",
819
- "get.js"
820
- ]
821
- },
822
822
  "ssh:copyFrom": {
823
823
  "aliases": [],
824
824
  "args": {},
@@ -1026,5 +1026,5 @@
1026
1026
  ]
1027
1027
  }
1028
1028
  },
1029
- "version": "4.0.2"
1029
+ "version": "4.0.3"
1030
1030
  }
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": "4.0.2",
4
+ "version": "4.0.3",
5
5
  "type": "module",
6
6
  "author": "Opal Security",
7
7
  "bin": {