@rockcarver/frodo-cli 4.0.0-10 → 4.0.0-12

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,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [4.0.0-11] - 2026-02-24
11
+
12
+ ## [4.0.0-10] - 2026-02-23
13
+
10
14
  ## [4.0.0-9] - 2026-02-23
11
15
 
12
16
  ## [4.0.0-8] - 2026-02-23
@@ -2181,7 +2185,9 @@ Frodo CLI 2.x automatically refreshes session and access tokens before they expi
2181
2185
  - Fixed problem with adding connection profiles
2182
2186
  - Miscellaneous bug fixes
2183
2187
 
2184
- [unreleased]: https://github.com/rockcarver/frodo-cli/compare/v4.0.0-9...HEAD
2188
+ [unreleased]: https://github.com/rockcarver/frodo-cli/compare/v4.0.0-11...HEAD
2189
+ [4.0.0-11]: https://github.com/rockcarver/frodo-cli/compare/v4.0.0-10...v4.0.0-11
2190
+ [4.0.0-10]: https://github.com/rockcarver/frodo-cli/compare/v4.0.0-9...v4.0.0-10
2185
2191
  [4.0.0-9]: https://github.com/rockcarver/frodo-cli/compare/v4.0.0-8...v4.0.0-9
2186
2192
  [4.0.0-8]: https://github.com/rockcarver/frodo-cli/compare/v4.0.0-7...v4.0.0-8
2187
2193
  [4.0.0-7]: https://github.com/rockcarver/frodo-cli/compare/v4.0.0-6...v4.0.0-7
package/dist/app.cjs CHANGED
@@ -28757,6 +28757,12 @@ var require_Client = __commonJS2({
28757
28757
  async _downloadFromWorkingDir(localDirPath) {
28758
28758
  await ensureLocalDirectory(localDirPath);
28759
28759
  for (const file of await this.list()) {
28760
+ const hasInvalidName = !file.name || (0, path_1.basename)(file.name) !== file.name;
28761
+ if (hasInvalidName) {
28762
+ const safeName = JSON.stringify(file.name);
28763
+ this.ftp.log(`Invalid filename from server listing, will skip file. (${safeName})`);
28764
+ continue;
28765
+ }
28760
28766
  const localPath = (0, path_1.join)(localDirPath, file.name);
28761
28767
  if (file.isDirectory) {
28762
28768
  await this.cd(file.name);
@@ -141687,54 +141693,70 @@ var AVAILABLE_SCOPES = {
141687
141693
  AMIntrospectAllTokensAnyRealm: "am-introspect-all-tokens-any-realm",
141688
141694
  OpenIdScope: "openid",
141689
141695
  ProfileScope: "profile",
141690
- // All Access Management APIs
141691
141696
  AmFullScope: "fr:am:*",
141692
- // All Auto Access APIs
141697
+ // All Access Management APIs
141693
141698
  AutoAccessFullScope: "fr:autoaccess:*",
141694
- // All Analytics APIs
141699
+ // All Auto Access APIs
141695
141700
  AnalyticsFullScope: "fr:idc:analytics:*",
141696
- // All TLS certificate APIs
141701
+ // All Analytics APIs
141697
141702
  CertificateFullScope: "fr:idc:certificate:*",
141698
- // Read TLS certificates
141703
+ // All TLS certificate APIs
141699
141704
  CertificateReadScope: "fr:idc:certificate:read",
141700
- // All content security policy APIs
141705
+ // Read TLS certificates
141701
141706
  ContentSecurityPolicyFullScope: "fr:idc:content-security-policy:*",
141702
- // All cookie domain APIs
141707
+ // All content security policy APIs
141708
+ ContentSecurityPolicyReadScope: "fr:idc:content-security-policy:read",
141709
+ // Read content security policy
141703
141710
  CookieDomainsFullScope: "fr:idc:cookie-domain:*",
141704
- // All custom domain APIs
141711
+ // All cookie domain APIs
141712
+ CookieDomainsReadScope: "fr:idc:cookie-domain:read",
141713
+ // Read cookie domain APIs
141705
141714
  CustomDomainFullScope: "fr:idc:custom-domain:*",
141706
- // All dataset deletion APIs
141715
+ // All custom domain APIs
141716
+ CustomDomainReadScope: "fr:idc:custom-domain:read",
141717
+ // Read custom domain configuration
141707
141718
  DatasetDeletionFullScope: "fr:idc:dataset:*",
141708
- // All ESV APIs
141719
+ // All dataset deletion APIs
141720
+ DatasetDeletionReadScope: "fr:idc:dataset:read",
141721
+ // Read dataset deletion configuration
141709
141722
  ESVFullScope: "fr:idc:esv:*",
141710
- // Read ESVs, excluding values of secrets
141723
+ // All ESV APIs
141711
141724
  ESVReadScope: "fr:idc:esv:read",
141712
- // Create, modify, and delete ESVs
141725
+ // Read ESVs, excluding values of secrets
141713
141726
  ESVUpdateScope: "fr:idc:esv:update",
141714
- // Restart workloads that consume ESVs
141727
+ // Create, modify, and delete ESVs
141715
141728
  ESVRestartScope: "fr:idc:esv:restart",
141716
- // Create, modify, and delete Admin Federation configuration
141729
+ // Restart workloads that consume ESVs
141717
141730
  AdminFederationFullScope: "fr:idc:federation:*",
141718
- // Read Admin Federation configuration
141731
+ // Create, modify, and delete Admin Federation configuration
141719
141732
  AdminFederationReadScope: "fr:idc:federation:read",
141720
- // All mTLS APIs
141733
+ // Read Admin Federation configuration
141721
141734
  MTLSFullScope: "fr:idc:mtls:*",
141722
- // All configuration promotion APIs
141735
+ // All mTLS APIs
141723
141736
  PromotionScope: "fr:idc:promotion:*",
141724
- // All Proxy Connect APIs
141737
+ // All configuration promotion APIs
141738
+ PromotionReadScope: "fr:idc:promotion:read",
141739
+ // Read configuration promotion configuration
141725
141740
  ProxyConnectFullScope: "fr:idc:proxy-connect:*",
141726
- // Read Proxy Connect configuration
141741
+ // All Proxy Connect APIs
141727
141742
  ProxyConnectReadScope: "fr:idc:proxy-connect:read",
141728
- // Create and update Proxy Connect configuration
141743
+ // Read Proxy Connect configuration
141729
141744
  ProxyConnectWriteScope: "fr:idc:proxy-connect:write",
141730
- // All product release APIs
141745
+ // Create and update Proxy Connect configuration
141731
141746
  ReleaseFullScope: "fr:idc:release:*",
141732
- // All SSO cookie APIs
141747
+ // All product release APIs
141748
+ ReleaseReadScope: "fr:idc:release:read",
141749
+ // Read product release information
141733
141750
  SSOCookieFullScope: "fr:idc:sso-cookie:*",
141734
- // All Identity Management APIs
141751
+ // All SSO cookie APIs
141752
+ SSOCookieReadScope: "fr:idc:sso-cookie:read",
141753
+ // Read SSO cookie configuration
141754
+ WSFedAdminScope: "fr:idc:ws:admin",
141755
+ // All PingFederate APIs
141735
141756
  IdmFullScope: "fr:idm:*",
141736
- // All Governance APIs
141757
+ // All Identity Management APIs
141737
141758
  IGAFullScope: "fr:iga:*"
141759
+ // All Governance APIs
141738
141760
  };
141739
141761
  var RETRY_EVERYTHING_KEY = "everything";
141740
141762
  var RETRY_NETWORK_KEY = "network";
@@ -142000,7 +142022,7 @@ function stringify(obj) {
142000
142022
  }
142001
142023
  var package_default = {
142002
142024
  name: "@rockcarver/frodo-lib",
142003
- version: "4.0.0-10",
142025
+ version: "4.0.0-12",
142004
142026
  type: "commonjs",
142005
142027
  main: "./dist/index.js",
142006
142028
  module: "./dist/index.mjs",
@@ -142256,6 +142278,12 @@ var State_default = (initialState) => {
142256
142278
  getAuthenticationService() {
142257
142279
  return state2.authenticationService || process.env.FRODO_AUTHENTICATION_SERVICE;
142258
142280
  },
142281
+ setConfigurationHeaderOverrides(overrides) {
142282
+ state2.configurationHeaderOverrides = overrides;
142283
+ },
142284
+ getConfigurationHeaderOverrides() {
142285
+ return state2.configurationHeaderOverrides;
142286
+ },
142259
142287
  setServiceAccountId(uuid) {
142260
142288
  state2.serviceAccountId = uuid;
142261
142289
  },
@@ -142501,6 +142529,7 @@ var logger = import_winston.default.createLogger({
142501
142529
  });
142502
142530
  var globalState = {
142503
142531
  authenticationHeaderOverrides: {},
142532
+ configurationHeaderOverrides: {},
142504
142533
  printHandler: (message) => {
142505
142534
  if (!message) return;
142506
142535
  if (typeof message === "object") {
@@ -160550,6 +160579,57 @@ function generateAmApi({
160550
160579
  resource,
160551
160580
  requestOverride = {},
160552
160581
  state: state2
160582
+ }) {
160583
+ const headers2 = {
160584
+ "User-Agent": userAgent,
160585
+ "X-ForgeRock-TransactionId": transactionId,
160586
+ "Content-Type": "application/json",
160587
+ // only add API version if we have it
160588
+ ...resource.apiVersion && { "Accept-API-Version": resource.apiVersion },
160589
+ // only send session cookie if we know its name and value and we are not instructed to use the bearer token for AM APIs
160590
+ ...!state2.getUseBearerTokenForAmApis() && state2.getCookieName() && state2.getCookieValue() && {
160591
+ Cookie: `${state2.getCookieName()}=${state2.getCookieValue()}`
160592
+ },
160593
+ // only add authorization header if we have a bearer token and are instructed to use it for AM APIs
160594
+ ...state2.getUseBearerTokenForAmApis() && state2.getBearerToken() && {
160595
+ Authorization: `Bearer ${state2.getBearerToken()}`
160596
+ }
160597
+ };
160598
+ const requestConfig = mergeDeep(
160599
+ {
160600
+ // baseURL: `${storage.session.getTenant()}/json`,
160601
+ timeout: timeout3,
160602
+ headers: {
160603
+ ...headers2,
160604
+ ...state2.getAuthenticationHeaderOverrides(),
160605
+ ...state2.getConfigurationHeaderOverrides()
160606
+ },
160607
+ ...process.env.FRODO_MOCK !== "record" && process.env.FRODO_POLLY_MODE !== "record" && {
160608
+ httpAgent: getHttpAgent(),
160609
+ httpsAgent: getHttpsAgent(state2.getAllowInsecureConnection())
160610
+ },
160611
+ proxy: getProxy()
160612
+ },
160613
+ requestOverride
160614
+ );
160615
+ debugMessage({
160616
+ message: `Generating AM API client for resource with request headers ${JSON.stringify(
160617
+ requestConfig.headers,
160618
+ null,
160619
+ 2
160620
+ )}`,
160621
+ state: state2
160622
+ });
160623
+ const request = createAxiosInstance(state2, requestConfig);
160624
+ if (state2.getCurlirize()) {
160625
+ curlirize(request, state2);
160626
+ }
160627
+ return request;
160628
+ }
160629
+ function generateAmAuthApi({
160630
+ resource,
160631
+ requestOverride = {},
160632
+ state: state2
160553
160633
  }) {
160554
160634
  const headers2 = {
160555
160635
  "User-Agent": userAgent,
@@ -160582,6 +160662,14 @@ function generateAmApi({
160582
160662
  },
160583
160663
  requestOverride
160584
160664
  );
160665
+ debugMessage({
160666
+ message: `Generating AM API client for resource with request headers ${JSON.stringify(
160667
+ requestConfig.headers,
160668
+ null,
160669
+ 2
160670
+ )}`,
160671
+ state: state2
160672
+ });
160585
160673
  const request = createAxiosInstance(state2, requestConfig);
160586
160674
  if (state2.getCurlirize()) {
160587
160675
  curlirize(request, state2);
@@ -160594,7 +160682,7 @@ function generateOauth2Api({
160594
160682
  authenticate = true,
160595
160683
  state: state2
160596
160684
  }) {
160597
- let headers2 = {
160685
+ const headers2 = {
160598
160686
  "User-Agent": userAgent,
160599
160687
  "X-ForgeRock-TransactionId": transactionId,
160600
160688
  // only add API version if we have it
@@ -160608,26 +160696,30 @@ function generateOauth2Api({
160608
160696
  Authorization: `Bearer ${state2.getBearerToken()}`
160609
160697
  }
160610
160698
  };
160611
- if (requestOverride["headers"]) {
160612
- headers2 = {
160613
- ...headers2,
160614
- ...requestOverride["headers"]
160615
- };
160616
- }
160617
- const requestConfig = {
160618
- // baseURL: `${storage.session.getTenant()}/json${resource.path}`,
160619
- timeout: timeout3,
160620
- ...requestOverride,
160621
- headers: {
160622
- ...headers2,
160623
- ...state2.getAuthenticationHeaderOverrides()
160624
- },
160625
- ...process.env.FRODO_MOCK !== "record" && process.env.FRODO_POLLY_MODE !== "record" && {
160626
- httpAgent: getHttpAgent(),
160627
- httpsAgent: getHttpsAgent(state2.getAllowInsecureConnection())
160699
+ const requestConfig = mergeDeep(
160700
+ {
160701
+ // baseURL: `${storage.session.getTenant()}/json${resource.path}`,
160702
+ timeout: timeout3,
160703
+ headers: {
160704
+ ...headers2,
160705
+ ...state2.getAuthenticationHeaderOverrides()
160706
+ },
160707
+ ...process.env.FRODO_MOCK !== "record" && process.env.FRODO_POLLY_MODE !== "record" && {
160708
+ httpAgent: getHttpAgent(),
160709
+ httpsAgent: getHttpsAgent(state2.getAllowInsecureConnection())
160710
+ },
160711
+ proxy: getProxy()
160628
160712
  },
160629
- proxy: getProxy()
160630
- };
160713
+ requestOverride
160714
+ );
160715
+ debugMessage({
160716
+ message: `Generating OAuth2 API client for resource with request headers ${JSON.stringify(
160717
+ requestConfig.headers,
160718
+ null,
160719
+ 2
160720
+ )}`,
160721
+ state: state2
160722
+ });
160631
160723
  const request = createAxiosInstance(state2, requestConfig);
160632
160724
  if (state2.getCurlirize()) {
160633
160725
  curlirize(request, state2);
@@ -160647,6 +160739,7 @@ function generateIdmApi({
160647
160739
  "X-ForgeRock-TransactionId": transactionId,
160648
160740
  "Content-Type": "application/json",
160649
160741
  ...state2.getAuthenticationHeaderOverrides(),
160742
+ ...state2.getConfigurationHeaderOverrides(),
160650
160743
  // only add authorization header if we have a bearer token
160651
160744
  ...state2.getBearerToken() && {
160652
160745
  Authorization: `Bearer ${state2.getBearerToken()}`
@@ -160660,6 +160753,14 @@ function generateIdmApi({
160660
160753
  },
160661
160754
  requestOverride
160662
160755
  );
160756
+ debugMessage({
160757
+ message: `Generating IDM API client for resource with request headers ${JSON.stringify(
160758
+ requestConfig.headers,
160759
+ null,
160760
+ 2
160761
+ )}`,
160762
+ state: state2
160763
+ });
160663
160764
  const request = createAxiosInstance(state2, requestConfig);
160664
160765
  if (state2.getCurlirize()) {
160665
160766
  curlirize(request, state2);
@@ -160689,6 +160790,14 @@ function generateLogKeysApi({
160689
160790
  },
160690
160791
  requestOverride
160691
160792
  );
160793
+ debugMessage({
160794
+ message: `Generating LogKeys API client for resource with request headers ${JSON.stringify(
160795
+ requestConfig.headers,
160796
+ null,
160797
+ 2
160798
+ )}`,
160799
+ state: state2
160800
+ });
160692
160801
  const request = createAxiosInstance(state2, requestConfig);
160693
160802
  if (state2.getCurlirize()) {
160694
160803
  curlirize(request, state2);
@@ -160717,6 +160826,14 @@ function generateLogApi({
160717
160826
  },
160718
160827
  requestOverride
160719
160828
  );
160829
+ debugMessage({
160830
+ message: `Generating Log API client for resource with request headers ${JSON.stringify(
160831
+ requestConfig.headers,
160832
+ null,
160833
+ 2
160834
+ )}`,
160835
+ state: state2
160836
+ });
160720
160837
  const request = createAxiosInstance(state2, requestConfig);
160721
160838
  request.interceptors.response.use(
160722
160839
  (response) => {
@@ -160759,17 +160876,27 @@ function generateEnvApi({
160759
160876
  Authorization: `Bearer ${state2.getBearerToken()}`
160760
160877
  }
160761
160878
  };
160762
- const requestConfig = {
160763
- // baseURL: getTenantURL(storage.session.getTenant()),
160764
- timeout: timeout3,
160765
- headers: headers2,
160766
- ...requestOverride,
160767
- ...process.env.FRODO_MOCK !== "record" && process.env.FRODO_POLLY_MODE !== "record" && {
160768
- httpAgent: getHttpAgent(),
160769
- httpsAgent: getHttpsAgent(state2.getAllowInsecureConnection())
160879
+ const requestConfig = mergeDeep(
160880
+ {
160881
+ // baseURL: getTenantURL(storage.session.getTenant()),
160882
+ timeout: timeout3,
160883
+ headers: headers2,
160884
+ ...process.env.FRODO_MOCK !== "record" && process.env.FRODO_POLLY_MODE !== "record" && {
160885
+ httpAgent: getHttpAgent(),
160886
+ httpsAgent: getHttpsAgent(state2.getAllowInsecureConnection())
160887
+ },
160888
+ proxy: getProxy()
160770
160889
  },
160771
- proxy: getProxy()
160772
- };
160890
+ requestOverride
160891
+ );
160892
+ debugMessage({
160893
+ message: `Generating Environment API client for resource with request headers ${JSON.stringify(
160894
+ requestConfig.headers,
160895
+ null,
160896
+ 2
160897
+ )}`,
160898
+ state: state2
160899
+ });
160773
160900
  const request = createAxiosInstance(state2, requestConfig);
160774
160901
  if (state2.getCurlirize()) {
160775
160902
  curlirize(request, state2);
@@ -160785,6 +160912,7 @@ function generateGovernanceApi({
160785
160912
  "User-Agent": userAgent,
160786
160913
  "Content-Type": "application/json",
160787
160914
  ...state2.getAuthenticationHeaderOverrides(),
160915
+ ...state2.getConfigurationHeaderOverrides(),
160788
160916
  // only add API version if we have it
160789
160917
  ...resource.apiVersion && { "Accept-API-Version": resource.apiVersion },
160790
160918
  // only add authorization header if we have a bearer token
@@ -160792,16 +160920,26 @@ function generateGovernanceApi({
160792
160920
  Authorization: `Bearer ${state2.getBearerToken()}`
160793
160921
  }
160794
160922
  };
160795
- const requestConfig = {
160796
- timeout: timeout3,
160797
- headers: headers2,
160798
- ...requestOverride,
160799
- ...process.env.FRODO_MOCK !== "record" && process.env.FRODO_POLLY_MODE !== "record" && {
160800
- httpAgent: getHttpAgent(),
160801
- httpsAgent: getHttpsAgent(state2.getAllowInsecureConnection())
160923
+ const requestConfig = mergeDeep(
160924
+ {
160925
+ timeout: timeout3,
160926
+ headers: headers2,
160927
+ ...process.env.FRODO_MOCK !== "record" && process.env.FRODO_POLLY_MODE !== "record" && {
160928
+ httpAgent: getHttpAgent(),
160929
+ httpsAgent: getHttpsAgent(state2.getAllowInsecureConnection())
160930
+ },
160931
+ proxy: getProxy()
160802
160932
  },
160803
- proxy: getProxy()
160804
- };
160933
+ requestOverride
160934
+ );
160935
+ debugMessage({
160936
+ message: `Generating Governance API client for resource with request headers ${JSON.stringify(
160937
+ requestConfig.headers,
160938
+ null,
160939
+ 2
160940
+ )}`,
160941
+ state: state2
160942
+ });
160805
160943
  const request = createAxiosInstance(state2, requestConfig);
160806
160944
  if (state2.getCurlirize()) {
160807
160945
  curlirize(request, state2);
@@ -160813,20 +160951,30 @@ function generateReleaseApi({
160813
160951
  requestOverride = {},
160814
160952
  state: state2
160815
160953
  }) {
160816
- const requestConfig = {
160817
- baseURL: baseUrl,
160818
- timeout: timeout3,
160819
- headers: {
160820
- "User-Agent": userAgent,
160821
- "Content-Type": "application/json"
160822
- },
160823
- ...requestOverride,
160824
- ...process.env.FRODO_MOCK !== "record" && process.env.FRODO_POLLY_MODE !== "record" && {
160825
- httpAgent: getHttpAgent(),
160826
- httpsAgent: getHttpsAgent(state2.getAllowInsecureConnection())
160954
+ const requestConfig = mergeDeep(
160955
+ {
160956
+ baseURL: baseUrl,
160957
+ timeout: timeout3,
160958
+ headers: {
160959
+ "User-Agent": userAgent,
160960
+ "Content-Type": "application/json"
160961
+ },
160962
+ ...process.env.FRODO_MOCK !== "record" && process.env.FRODO_POLLY_MODE !== "record" && {
160963
+ httpAgent: getHttpAgent(),
160964
+ httpsAgent: getHttpsAgent(state2.getAllowInsecureConnection())
160965
+ },
160966
+ proxy: getProxy()
160827
160967
  },
160828
- proxy: getProxy()
160829
- };
160968
+ requestOverride
160969
+ );
160970
+ debugMessage({
160971
+ message: `Generating Release API client for resource with request headers ${JSON.stringify(
160972
+ requestConfig.headers,
160973
+ null,
160974
+ 2
160975
+ )}`,
160976
+ state: state2
160977
+ });
160830
160978
  const request = createAxiosInstance(state2, requestConfig);
160831
160979
  if (state2.getCurlirize()) {
160832
160980
  curlirize(request, state2);
@@ -161678,7 +161826,7 @@ async function step({
161678
161826
  state2.getHost(),
161679
161827
  getRealmPath(realm2)
161680
161828
  );
161681
- const { data: data2 } = await generateAmApi({
161829
+ const { data: data2 } = await generateAmAuthApi({
161682
161830
  resource: getApiConfig2(),
161683
161831
  state: state2
161684
161832
  }).post(urlString, body2, config4);
@@ -174541,7 +174689,7 @@ var getServerVersionApiConfig = () => ({
174541
174689
  });
174542
174690
  async function getServerInfo({ state: state2 }) {
174543
174691
  const urlString = _util2.default.format(serverInfoUrlTemplate, state2.getHost(), "*");
174544
- const { data: data2 } = await generateAmApi({
174692
+ const { data: data2 } = await generateAmAuthApi({
174545
174693
  resource: getServerInfoApiConfig(),
174546
174694
  requestOverride: {},
174547
174695
  state: state2
@@ -174554,7 +174702,7 @@ async function getServerVersionInfo({ state: state2 }) {
174554
174702
  state2.getHost(),
174555
174703
  "version"
174556
174704
  );
174557
- const { data: data2 } = await generateAmApi({
174705
+ const { data: data2 } = await generateAmAuthApi({
174558
174706
  resource: getServerVersionApiConfig(),
174559
174707
  requestOverride: {},
174560
174708
  state: state2
@@ -174744,6 +174892,7 @@ var SERVICE_ACCOUNT_ALLOWED_SCOPES = [
174744
174892
  s2.CertificateReadScope,
174745
174893
  s2.ContentSecurityPolicyFullScope,
174746
174894
  s2.CustomDomainFullScope,
174895
+ s2.DatasetDeletionFullScope,
174747
174896
  s2.ESVFullScope,
174748
174897
  s2.ESVReadScope,
174749
174898
  s2.ESVRestartScope,
@@ -174756,7 +174905,8 @@ var SERVICE_ACCOUNT_ALLOWED_SCOPES = [
174756
174905
  s2.ProxyConnectFullScope,
174757
174906
  s2.ProxyConnectReadScope,
174758
174907
  s2.ProxyConnectWriteScope,
174759
- s2.CookieDomainsFullScope
174908
+ s2.CookieDomainsFullScope,
174909
+ s2.WSFedAdminScope
174760
174910
  ];
174761
174911
  var SERVICE_ACCOUNT_DEFAULT_SCOPES = [
174762
174912
  s2.AmFullScope,
@@ -174766,13 +174916,15 @@ var SERVICE_ACCOUNT_DEFAULT_SCOPES = [
174766
174916
  s2.ContentSecurityPolicyFullScope,
174767
174917
  s2.CookieDomainsFullScope,
174768
174918
  s2.CustomDomainFullScope,
174919
+ s2.DatasetDeletionFullScope,
174769
174920
  s2.ESVFullScope,
174770
174921
  s2.IdmFullScope,
174771
174922
  s2.IGAFullScope,
174772
174923
  s2.PromotionScope,
174773
174924
  s2.ReleaseFullScope,
174774
174925
  s2.SSOCookieFullScope,
174775
- s2.ProxyConnectFullScope
174926
+ s2.ProxyConnectFullScope,
174927
+ s2.WSFedAdminScope
174776
174928
  ];
174777
174929
  async function isServiceAccountsFeatureAvailable({
174778
174930
  state: state2
@@ -175161,6 +175313,7 @@ Specify a sub-string uniquely identifying a single connection profile host URL.`
175161
175313
  logApiSecret: profiles[0].encodedLogApiSecret ? await dataProtection.decrypt(profiles[0].encodedLogApiSecret) : null,
175162
175314
  authenticationService: profiles[0].authenticationService ? profiles[0].authenticationService : null,
175163
175315
  authenticationHeaderOverrides: profiles[0].authenticationHeaderOverrides ? profiles[0].authenticationHeaderOverrides : {},
175316
+ configurationHeaderOverrides: profiles[0].configurationHeaderOverrides ? profiles[0].configurationHeaderOverrides : {},
175164
175317
  adminClientId: profiles[0].adminClientId ? profiles[0].adminClientId : null,
175165
175318
  adminClientRedirectUri: profiles[0].adminClientRedirectUri ? profiles[0].adminClientRedirectUri : null,
175166
175319
  svcacctName: profiles[0].svcacctName ? profiles[0].svcacctName : null,
@@ -175169,6 +175322,10 @@ Specify a sub-string uniquely identifying a single connection profile host URL.`
175169
175322
  svcacctScope: profiles[0].svcacctScope ? profiles[0].svcacctScope : null,
175170
175323
  amsterPrivateKey: profiles[0].encodedAmsterPrivateKey ? await dataProtection.decrypt(profiles[0].encodedAmsterPrivateKey) : null
175171
175324
  };
175325
+ debugMessage({
175326
+ message: `ConnectionProfileOps.getConnectionProfileByHost: retrieved connection profile for host '${host}': ${JSON.stringify(connectionProfile, null, 2)}`,
175327
+ state: state2
175328
+ });
175172
175329
  return connectionProfile;
175173
175330
  } catch (error2) {
175174
175331
  throw new FrodoError(`Error decrypting connection profile`, error2);
@@ -175200,8 +175357,21 @@ async function loadConnectionProfileByHost({
175200
175357
  if (conn.authenticationService && !state2.getAuthenticationService()) {
175201
175358
  state2.setAuthenticationService(conn.authenticationService);
175202
175359
  }
175203
- if (conn.authenticationHeaderOverrides && !state2.getAuthenticationHeaderOverrides()) {
175204
- state2.setAuthenticationHeaderOverrides(conn.authenticationHeaderOverrides);
175360
+ if (conn.authenticationHeaderOverrides) {
175361
+ state2.setAuthenticationHeaderOverrides(
175362
+ mergeDeep(
175363
+ state2.getAuthenticationHeaderOverrides(),
175364
+ conn.authenticationHeaderOverrides
175365
+ )
175366
+ );
175367
+ }
175368
+ if (conn.configurationHeaderOverrides) {
175369
+ state2.setConfigurationHeaderOverrides(
175370
+ mergeDeep(
175371
+ state2.getConfigurationHeaderOverrides(),
175372
+ conn.configurationHeaderOverrides
175373
+ )
175374
+ );
175205
175375
  }
175206
175376
  state2.setServiceAccountId(conn.svcacctId);
175207
175377
  state2.setServiceAccountJwk(conn.svcacctJwk);
@@ -175349,6 +175519,19 @@ async function saveConnectionProfile({
175349
175519
  state: state2
175350
175520
  });
175351
175521
  }
175522
+ if (state2.getConfigurationHeaderOverrides() && Object.entries(state2.getConfigurationHeaderOverrides()).length) {
175523
+ profile.configurationHeaderOverrides = state2.getConfigurationHeaderOverrides();
175524
+ printMessage({
175525
+ message: "Advanced setting: Configuration Header Overrides: ",
175526
+ type: "info",
175527
+ state: state2
175528
+ });
175529
+ printMessage({
175530
+ message: state2.getConfigurationHeaderOverrides(),
175531
+ type: "info",
175532
+ state: state2
175533
+ });
175534
+ }
175352
175535
  delete profile.tenant;
175353
175536
  profiles[state2.getHost()] = profile;
175354
175537
  const orderedProfiles = Object.keys(profiles).sort().reduce((obj, key) => {
@@ -175551,7 +175734,7 @@ async function getSessionInfo({
175551
175734
  state2.getHost(),
175552
175735
  getCurrentRealmPath(state2)
175553
175736
  );
175554
- const { data: data2 } = await generateAmApi({
175737
+ const { data: data2 } = await generateAmAuthApi({
175555
175738
  resource: getApiConfig15(),
175556
175739
  state: state2
175557
175740
  }).post(
@@ -176238,7 +176421,8 @@ var CLOUD_ADMIN_DEFAULT_SCOPES = [
176238
176421
  s3.PromotionScope,
176239
176422
  s3.ReleaseFullScope,
176240
176423
  s3.SSOCookieFullScope,
176241
- s3.ProxyConnectFullScope
176424
+ s3.ProxyConnectFullScope,
176425
+ s3.WSFedAdminScope
176242
176426
  ];
176243
176427
  var FORGEOPS_ADMIN_DEFAULT_SCOPES = [s3.IdmFullScope, s3.OpenIdScope];
176244
176428
  var forgeopsAdminScopes = FORGEOPS_ADMIN_DEFAULT_SCOPES.join(" ");
@@ -212385,7 +212569,12 @@ function setup120() {
212385
212569
  ).addOption(
212386
212570
  new Option(
212387
212571
  "--authentication-header-overrides [headers]",
212388
- 'Map of headers: {"host":"am.example.com:8081"}.'
212572
+ 'Map of headers: {"host":"am.example.com:8081"}. These headers are sent with all requests and can be used to override default behavior, for example to set a custom host header for Proxy Connect-protected PingOne Advanced Identity Cloud environments.'
212573
+ )
212574
+ ).addOption(
212575
+ new Option(
212576
+ "--configuration-header-overrides [headers]",
212577
+ 'Map of headers: {"X-Custom-Configuration":"critical"}. These headers are sent with all configuration requests and can be used to override default behavior, for example to set a custom configuration header for mutable PingOne Advanced Identity Cloud environments.'
212389
212578
  )
212390
212579
  ).addOption(
212391
212580
  new Option("--alias [name]", "Alias name for this connection profile.")
@@ -212408,6 +212597,10 @@ function setup120() {
212408
212597
  ` + ` $ frodo conn save --authentication-header-overrides '{"MY-SECRET-HEADER": "proxyconnect secret header value"}' ${amBaseUrl} ${username} '${password}'
212409
212598
  `["brightCyan"] + ` Update an existing connection profile with a custom header override for a freshly Proxy Connect-protected PingOne Advanced Identity Cloud environment:
212410
212599
  ` + ` $ frodo conn save --authentication-header-overrides '{"MY-SECRET-HEADER": "proxyconnect secret header value"}' ${connId}
212600
+ `["brightCyan"] + ` Save a connection profile for a mutable PingOne Advanced Identity Cloud environment:
212601
+ ` + ` $ frodo conn save --configuration-header-overrides '{"X-Configuration-Type": "mutable"}' ${amBaseUrl} ${username} '${password}'
212602
+ `["brightCyan"] + ` Update an existing connection profile with a configuration header override for a freshly mutable PingOne Advanced Identity Cloud environment:
212603
+ ` + ` $ frodo conn save --configuration-header-overrides '{"X-Configuration-Type": "mutable"}' ${connId}
212411
212604
  `["brightCyan"] + ` Update an existing connection profile to use Amster private key credentials with a custom Amster journey (PingAM classic deployments only):
212412
212605
  ` + ` $ frodo conn save --private-key ${amsterPrivateKey} --authentication-service ${customAmsterService} ${classicConnId}
212413
212606
  `["brightCyan"]
@@ -212431,6 +212624,11 @@ function setup120() {
212431
212624
  JSON.parse(options.authenticationHeaderOverrides)
212432
212625
  );
212433
212626
  }
212627
+ if (options.configurationHeaderOverrides) {
212628
+ state.setConfigurationHeaderOverrides(
212629
+ JSON.parse(options.configurationHeaderOverrides)
212630
+ );
212631
+ }
212434
212632
  const needAmsterLogin = !!options.privateKey;
212435
212633
  const needSa = options.sa && !state.getServiceAccountId() && !state.getServiceAccountJwk();
212436
212634
  const needLogApiKey = options.logApi && !state.getLogApiKey() && !state.getLogApiSecret() && needSa;
@@ -226581,7 +226779,7 @@ var compareVersions = (v12, v2) => {
226581
226779
  // package.json
226582
226780
  var package_default2 = {
226583
226781
  name: "@rockcarver/frodo-cli",
226584
- version: "4.0.0-10",
226782
+ version: "4.0.0-12",
226585
226783
  type: "module",
226586
226784
  description: "A command line interface to manage ForgeRock Identity Cloud tenants, ForgeOps deployments, and classic deployments.",
226587
226785
  keywords: [
@@ -226676,7 +226874,7 @@ var package_default2 = {
226676
226874
  ]
226677
226875
  },
226678
226876
  devDependencies: {
226679
- "@rockcarver/frodo-lib": "4.0.0-10",
226877
+ "@rockcarver/frodo-lib": "4.0.0-12",
226680
226878
  "@types/colors": "^1.2.1",
226681
226879
  "@types/fs-extra": "^11.0.1",
226682
226880
  "@types/jest": "^29.2.3",