@rockcarver/frodo-cli 0.12.5 → 0.13.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/CHANGELOG.md CHANGED
@@ -7,6 +7,56 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.13.1] - 2022-09-23
11
+
12
+ ## [0.13.0] - 2022-09-17
13
+
14
+ ### Added
15
+
16
+ - Frodo now allows two new parameters when adding a connection profile:
17
+
18
+ \--authentication-service [service] Name of the authentication service/tree to use.
19
+
20
+ \--authentication-header-overrides [headers] Map of headers: {"host":"am.example.com:8081"}.
21
+
22
+ These parameters are currently only supported in the `frodo conn add` command and the configuration elements will be automatically applied to commands issued using that connection profile.
23
+
24
+ % frodo conn add https://platform.example.com:9443/am username password --authentication-service ldapService --authentication-header-overrides '{"host":"am.example.com:8081"}' -k
25
+ ForgeOps deployment detected.
26
+ Connected to ForgeRock Access Management 7.2.0 Build 64ef7ebc01ed3df1a1264d7b0400351bc101361f (2022-June-27 08:15)
27
+ Saving creds in /Users/vscheuber/.frodo/.frodorc...
28
+ Updating connection profile https://platform.example.com:9443/am
29
+ Advanced setting: Authentication Service: ldapService
30
+ Advanced setting: Authentication Header Overrides:
31
+ { host: 'am.example.com:8081' }
32
+ %
33
+
34
+ After the connection profile is created with the additional parameters, the environment can be accessed as usual. In this case it requires the `-k` parameter for every command, as the environment uses a self-signed certificate.
35
+
36
+ % frodo journey list platform alpha -k
37
+ ForgeOps deployment detected.
38
+ Connected to ForgeRock Access Management 7.2.0 Build 64ef7ebc01ed3df1a1264d7b0400351bc101361f (2022-June-27 08:15)
39
+ Listing journeys in realm "alpha"...
40
+ Agent
41
+ Example
42
+ Facebook-ProvisionIDMAccount
43
+ Google-AnonymousUser
44
+ Google-DynamicAccountCreation
45
+ HmacOneTimePassword
46
+ PersistentCookie
47
+ PlatformForgottenUsername
48
+ PlatformLogin
49
+ PlatformProgressiveProfile
50
+ PlatformRegistration
51
+ PlatformResetPassword
52
+ PlatformUpdatePassword
53
+ RetryLimit
54
+ %
55
+
56
+ ### Fixed
57
+
58
+ - rockcarver/frodo-lib#94: Frodo can now connect to improperly configured platform instances
59
+
10
60
  ## [0.12.5] - 2022-09-16
11
61
 
12
62
  ### Fixed
@@ -487,7 +537,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
487
537
  - Fixed problem with adding connection profiles
488
538
  - Miscellaneous bug fixes
489
539
 
490
- [Unreleased]: https://github.com/rockcarver/frodo-cli/compare/v0.12.5...HEAD
540
+ [Unreleased]: https://github.com/rockcarver/frodo-cli/compare/v0.13.1...HEAD
541
+
542
+ [0.13.1]: https://github.com/rockcarver/frodo-cli/compare/v0.13.0...v0.13.1
543
+
544
+ [0.13.0]: https://github.com/rockcarver/frodo-cli/compare/v0.12.5...v0.13.0
491
545
 
492
546
  [0.12.5]: https://github.com/rockcarver/frodo-cli/compare/v0.12.4...v0.12.5
493
547
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rockcarver/frodo-cli",
3
- "version": "0.12.5",
3
+ "version": "0.13.1",
4
4
  "type": "module",
5
5
  "description": "A command line interface to manage ForgeRock Identity Cloud tenants, ForgeOps deployments, and classic deployments.",
6
6
  "keywords": [
@@ -85,7 +85,7 @@
85
85
  },
86
86
  "dependencies": {
87
87
  "@colors/colors": "^1.5.0",
88
- "@rockcarver/frodo-lib": "0.12.3",
88
+ "@rockcarver/frodo-lib": "0.12.4",
89
89
  "cli-progress": "^3.11.2",
90
90
  "cli-table3": "^0.6.2",
91
91
  "commander": "^9.4.0",
@@ -21,6 +21,18 @@ program
21
21
  .addOption(common.deploymentOption)
22
22
  .addOption(common.insecureOption)
23
23
  .addOption(new Option('--no-validate', 'Do not validate connection.'))
24
+ .addOption(
25
+ new Option(
26
+ '--authentication-service [service]',
27
+ 'Name of the authentication service/tree to use.'
28
+ )
29
+ )
30
+ .addOption(
31
+ new Option(
32
+ '--authentication-header-overrides [headers]',
33
+ 'Map of headers: {"host":"am.example.com:8081"}.'
34
+ )
35
+ )
24
36
  .action(
25
37
  // implement command logic inside action handler
26
38
  async (host, user, password, key, secret, options) => {
@@ -31,6 +43,16 @@ program
31
43
  state.default.session.setLogApiSecret(secret);
32
44
  state.default.session.setDeploymentType(options.type);
33
45
  state.default.session.setAllowInsecureConnection(options.insecure);
46
+ if (options.authenticationService) {
47
+ state.default.session.setAuthenticationService(
48
+ options.authenticationService
49
+ );
50
+ }
51
+ if (options.authenticationHeaderOverrides) {
52
+ state.default.session.setAuthenticationHeaderOverrides(
53
+ JSON.parse(options.authenticationHeaderOverrides)
54
+ );
55
+ }
34
56
  if ((options.validate && (await getTokens())) || !options.validate) {
35
57
  saveConnectionProfile();
36
58
  } else {
@@ -17,7 +17,12 @@ program
17
17
  .addArgument(common.passwordArgument)
18
18
  .addOption(common.deploymentOption)
19
19
  .addOption(common.insecureOption)
20
- .addOption(new Option('-i, --secret-id <secret-id>', 'Secret id.'))
20
+ .addOption(
21
+ new Option(
22
+ '-i, --secret-id <secret-id>',
23
+ 'Secret id.'
24
+ ).makeOptionMandatory()
25
+ )
21
26
  .action(
22
27
  // implement command logic inside action handler
23
28
  async (host, realm, user, password, options) => {
@@ -17,7 +17,12 @@ program
17
17
  .addArgument(common.passwordArgument)
18
18
  .addOption(common.deploymentOption)
19
19
  .addOption(common.insecureOption)
20
- .addOption(new Option('-i, --variable-id <variable-id>', 'Variable id.'))
20
+ .addOption(
21
+ new Option(
22
+ '-i, --variable-id <variable-id>',
23
+ 'Variable id.'
24
+ ).makeOptionMandatory()
25
+ )
21
26
  .action(
22
27
  // implement command logic inside action handler
23
28
  async (host, realm, user, password, options) => {