@rockcarver/frodo-cli 2.0.5 → 2.0.6-0
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 +32 -1
- package/dist/app.cjs +289 -174
- package/dist/app.cjs.map +1 -1
- package/package.json +2 -2
package/dist/app.cjs
CHANGED
|
@@ -46765,7 +46765,7 @@ var require_inquirer_autocomplete_prompt = _chunkMPPKDFVIcjs.__commonJS.call(voi
|
|
|
46765
46765
|
// src/app.ts
|
|
46766
46766
|
_chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
|
|
46767
46767
|
|
|
46768
|
-
// node_modules/@rockcarver/frodo-lib/dist/
|
|
46768
|
+
// node_modules/@rockcarver/frodo-lib/dist/index.mjs
|
|
46769
46769
|
_chunkMPPKDFVIcjs.init_cjs_shims.call(void 0, );
|
|
46770
46770
|
var _crypto3 = require('crypto'); var _crypto4 = _interopRequireDefault(_crypto3);
|
|
46771
46771
|
|
|
@@ -123541,16 +123541,16 @@ function stringify(obj) {
|
|
|
123541
123541
|
}
|
|
123542
123542
|
var package_default = {
|
|
123543
123543
|
name: "@rockcarver/frodo-lib",
|
|
123544
|
-
version: "2.1.0",
|
|
123544
|
+
version: "2.1.2-0",
|
|
123545
123545
|
type: "commonjs",
|
|
123546
123546
|
main: "./dist/index.js",
|
|
123547
|
-
module: "./dist/
|
|
123547
|
+
module: "./dist/index.mjs",
|
|
123548
123548
|
types: "./dist/index.d.ts",
|
|
123549
123549
|
exports: {
|
|
123550
123550
|
".": {
|
|
123551
123551
|
require: "./dist/index.js",
|
|
123552
|
-
import: "./dist/
|
|
123553
|
-
default: "./dist/
|
|
123552
|
+
import: "./dist/index.mjs",
|
|
123553
|
+
default: "./dist/index.mjs"
|
|
123554
123554
|
}
|
|
123555
123555
|
},
|
|
123556
123556
|
scripts: {
|
|
@@ -123710,6 +123710,12 @@ var State_default = (initialState) => {
|
|
|
123710
123710
|
getHost() {
|
|
123711
123711
|
return state2.host || process.env.FRODO_HOST;
|
|
123712
123712
|
},
|
|
123713
|
+
setIdmHost(host2) {
|
|
123714
|
+
state2.idmHost = host2;
|
|
123715
|
+
},
|
|
123716
|
+
getIdmHost() {
|
|
123717
|
+
return state2.idmHost || process.env.FRODO_IDM_HOST;
|
|
123718
|
+
},
|
|
123713
123719
|
setUsername(username2) {
|
|
123714
123720
|
state2.username = username2;
|
|
123715
123721
|
},
|
|
@@ -123734,6 +123740,18 @@ var State_default = (initialState) => {
|
|
|
123734
123740
|
getDeploymentType() {
|
|
123735
123741
|
return state2.deploymentType;
|
|
123736
123742
|
},
|
|
123743
|
+
setAdminClientId(clientId) {
|
|
123744
|
+
state2.adminClientId = clientId;
|
|
123745
|
+
},
|
|
123746
|
+
getAdminClientId() {
|
|
123747
|
+
return state2.adminClientId || process.env.FRODO_LOGIN_CLIENT_ID;
|
|
123748
|
+
},
|
|
123749
|
+
setAdminClientRedirectUri(redirectUri) {
|
|
123750
|
+
state2.adminClientRedirectUri = redirectUri;
|
|
123751
|
+
},
|
|
123752
|
+
getAdminClientRedirectUri() {
|
|
123753
|
+
return state2.adminClientRedirectUri || process.env.FRODO_LOGIN_REDIRECT_URI;
|
|
123754
|
+
},
|
|
123737
123755
|
setAllowInsecureConnection(allowInsecureConnection) {
|
|
123738
123756
|
state2.allowInsecureConnection = allowInsecureConnection;
|
|
123739
123757
|
},
|
|
@@ -141383,7 +141401,7 @@ async function deleteRealm({
|
|
|
141383
141401
|
}) {
|
|
141384
141402
|
const urlString = _util2.default.format(
|
|
141385
141403
|
realmURLTemplate,
|
|
141386
|
-
|
|
141404
|
+
getHostOnlyUrl(state2.getHost()),
|
|
141387
141405
|
realmId
|
|
141388
141406
|
);
|
|
141389
141407
|
const { data: data2 } = await generateAmApi({
|
|
@@ -141647,8 +141665,15 @@ var ForgeRockUtils_default = (state2) => {
|
|
|
141647
141665
|
getRealmName(realm2) {
|
|
141648
141666
|
return getRealmName(realm2);
|
|
141649
141667
|
},
|
|
141668
|
+
getHostUrl(url5) {
|
|
141669
|
+
return getHostOnlyUrl(url5);
|
|
141670
|
+
},
|
|
141671
|
+
getIdmBaseUrl() {
|
|
141672
|
+
return getIdmBaseUrl(state2);
|
|
141673
|
+
},
|
|
141674
|
+
// deprecated
|
|
141650
141675
|
getHostBaseUrl(url5) {
|
|
141651
|
-
return
|
|
141676
|
+
return getHostOnlyUrl(url5);
|
|
141652
141677
|
}
|
|
141653
141678
|
};
|
|
141654
141679
|
};
|
|
@@ -141721,10 +141746,16 @@ function getRealmName(realm2) {
|
|
|
141721
141746
|
}
|
|
141722
141747
|
return realmName;
|
|
141723
141748
|
}
|
|
141724
|
-
function
|
|
141749
|
+
function getHostOnlyUrl(url5) {
|
|
141725
141750
|
const parsedUrl = new URL(url5);
|
|
141726
141751
|
return `${parsedUrl.protocol}//${parsedUrl.host}`;
|
|
141727
141752
|
}
|
|
141753
|
+
function getIdmBaseUrl(state2) {
|
|
141754
|
+
if (state2.getIdmHost()) {
|
|
141755
|
+
return state2.getIdmHost();
|
|
141756
|
+
}
|
|
141757
|
+
return `${getHostOnlyUrl(state2.getHost())}/openidm`;
|
|
141758
|
+
}
|
|
141728
141759
|
var authenticateUrlTemplate = "%s/json%s/authenticate";
|
|
141729
141760
|
var authenticateWithServiceUrlTemplate = `${authenticateUrlTemplate}?authIndexType=service&authIndexValue=%s`;
|
|
141730
141761
|
var apiVersion2 = "resource=2.0, protocol=1.0";
|
|
@@ -141771,7 +141802,7 @@ async function getSecrets({
|
|
|
141771
141802
|
}) {
|
|
141772
141803
|
const urlString = _util2.default.format(
|
|
141773
141804
|
secretsListURLTemplate,
|
|
141774
|
-
|
|
141805
|
+
getHostOnlyUrl(state2.getHost())
|
|
141775
141806
|
);
|
|
141776
141807
|
const { data: data2 } = await generateEnvApi({
|
|
141777
141808
|
resource: getApiConfig3(),
|
|
@@ -141787,7 +141818,7 @@ async function getSecret({
|
|
|
141787
141818
|
}) {
|
|
141788
141819
|
const urlString = _util2.default.format(
|
|
141789
141820
|
secretURLTemplate,
|
|
141790
|
-
|
|
141821
|
+
getHostOnlyUrl(state2.getHost()),
|
|
141791
141822
|
secretId
|
|
141792
141823
|
);
|
|
141793
141824
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -141814,7 +141845,7 @@ async function putSecret({
|
|
|
141814
141845
|
};
|
|
141815
141846
|
const urlString = _util2.default.format(
|
|
141816
141847
|
secretURLTemplate,
|
|
141817
|
-
|
|
141848
|
+
getHostOnlyUrl(state2.getHost()),
|
|
141818
141849
|
secretId
|
|
141819
141850
|
);
|
|
141820
141851
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -141832,7 +141863,7 @@ async function setSecretDescription({
|
|
|
141832
141863
|
}) {
|
|
141833
141864
|
const urlString = _util2.default.format(
|
|
141834
141865
|
secretSetDescriptionURLTemplate,
|
|
141835
|
-
|
|
141866
|
+
getHostOnlyUrl(state2.getHost()),
|
|
141836
141867
|
secretId
|
|
141837
141868
|
);
|
|
141838
141869
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -141847,7 +141878,7 @@ async function deleteSecret({
|
|
|
141847
141878
|
}) {
|
|
141848
141879
|
const urlString = _util2.default.format(
|
|
141849
141880
|
secretURLTemplate,
|
|
141850
|
-
|
|
141881
|
+
getHostOnlyUrl(state2.getHost()),
|
|
141851
141882
|
secretId
|
|
141852
141883
|
);
|
|
141853
141884
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -141864,7 +141895,7 @@ async function getSecretVersions({
|
|
|
141864
141895
|
}) {
|
|
141865
141896
|
const urlString = _util2.default.format(
|
|
141866
141897
|
secretListVersionsURLTemplate,
|
|
141867
|
-
|
|
141898
|
+
getHostOnlyUrl(state2.getHost()),
|
|
141868
141899
|
secretId
|
|
141869
141900
|
);
|
|
141870
141901
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -141882,7 +141913,7 @@ async function createNewVersionOfSecret({
|
|
|
141882
141913
|
}) {
|
|
141883
141914
|
const urlString = _util2.default.format(
|
|
141884
141915
|
secretCreateNewVersionURLTemplate,
|
|
141885
|
-
|
|
141916
|
+
getHostOnlyUrl(state2.getHost()),
|
|
141886
141917
|
secretId
|
|
141887
141918
|
);
|
|
141888
141919
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -141898,7 +141929,7 @@ async function getVersionOfSecret({
|
|
|
141898
141929
|
}) {
|
|
141899
141930
|
const urlString = _util2.default.format(
|
|
141900
141931
|
secretGetVersionURLTemplate,
|
|
141901
|
-
|
|
141932
|
+
getHostOnlyUrl(state2.getHost()),
|
|
141902
141933
|
secretId,
|
|
141903
141934
|
version3
|
|
141904
141935
|
);
|
|
@@ -141918,7 +141949,7 @@ async function setStatusOfVersionOfSecret({
|
|
|
141918
141949
|
}) {
|
|
141919
141950
|
const urlString = _util2.default.format(
|
|
141920
141951
|
secretVersionStatusURLTemplate,
|
|
141921
|
-
|
|
141952
|
+
getHostOnlyUrl(state2.getHost()),
|
|
141922
141953
|
secretId,
|
|
141923
141954
|
version3
|
|
141924
141955
|
);
|
|
@@ -141935,7 +141966,7 @@ async function deleteVersionOfSecret({
|
|
|
141935
141966
|
}) {
|
|
141936
141967
|
const urlString = _util2.default.format(
|
|
141937
141968
|
secretGetVersionURLTemplate,
|
|
141938
|
-
|
|
141969
|
+
getHostOnlyUrl(state2.getHost()),
|
|
141939
141970
|
secretId,
|
|
141940
141971
|
version3
|
|
141941
141972
|
);
|
|
@@ -141947,16 +141978,13 @@ async function deleteVersionOfSecret({
|
|
|
141947
141978
|
});
|
|
141948
141979
|
return data2;
|
|
141949
141980
|
}
|
|
141950
|
-
var idmAllConfigURLTemplate = "%s/
|
|
141951
|
-
var idmConfigURLTemplate = "%s/
|
|
141952
|
-
var idmConfigEntityQueryTemplate = "%s/
|
|
141981
|
+
var idmAllConfigURLTemplate = "%s/config";
|
|
141982
|
+
var idmConfigURLTemplate = "%s/config/%s";
|
|
141983
|
+
var idmConfigEntityQueryTemplate = "%s/config?_queryFilter=%s";
|
|
141953
141984
|
async function getConfigStubs({
|
|
141954
141985
|
state: state2
|
|
141955
141986
|
}) {
|
|
141956
|
-
const urlString = _util2.default.format(
|
|
141957
|
-
idmAllConfigURLTemplate,
|
|
141958
|
-
getHostBaseUrl(state2.getHost())
|
|
141959
|
-
);
|
|
141987
|
+
const urlString = _util2.default.format(idmAllConfigURLTemplate, getIdmBaseUrl(state2));
|
|
141960
141988
|
const { data: data2 } = await generateIdmApi({ state: state2 }).get(urlString);
|
|
141961
141989
|
return data2;
|
|
141962
141990
|
}
|
|
@@ -141965,7 +141993,7 @@ async function getConfigEntities({
|
|
|
141965
141993
|
}) {
|
|
141966
141994
|
const urlString = _util2.default.format(
|
|
141967
141995
|
idmConfigEntityQueryTemplate,
|
|
141968
|
-
|
|
141996
|
+
getIdmBaseUrl(state2),
|
|
141969
141997
|
"true"
|
|
141970
141998
|
);
|
|
141971
141999
|
const { data: data2 } = await generateIdmApi({ state: state2 }).get(urlString);
|
|
@@ -141977,7 +142005,7 @@ async function getConfigEntitiesByType({
|
|
|
141977
142005
|
}) {
|
|
141978
142006
|
const urlString = _util2.default.format(
|
|
141979
142007
|
idmConfigEntityQueryTemplate,
|
|
141980
|
-
|
|
142008
|
+
getIdmBaseUrl(state2),
|
|
141981
142009
|
encodeURIComponent(`_id sw '${type}'`)
|
|
141982
142010
|
);
|
|
141983
142011
|
const { data: data2 } = await generateIdmApi({ state: state2 }).get(urlString);
|
|
@@ -141989,7 +142017,7 @@ async function getConfigEntity({
|
|
|
141989
142017
|
}) {
|
|
141990
142018
|
const urlString = _util2.default.format(
|
|
141991
142019
|
idmConfigURLTemplate,
|
|
141992
|
-
|
|
142020
|
+
getIdmBaseUrl(state2),
|
|
141993
142021
|
entityId
|
|
141994
142022
|
);
|
|
141995
142023
|
const { data: data2 } = await generateIdmApi({ state: state2 }).get(urlString);
|
|
@@ -142003,7 +142031,7 @@ async function putConfigEntity({
|
|
|
142003
142031
|
}) {
|
|
142004
142032
|
const urlString = _util2.default.format(
|
|
142005
142033
|
idmConfigURLTemplate,
|
|
142006
|
-
|
|
142034
|
+
getIdmBaseUrl(state2),
|
|
142007
142035
|
wait ? `${entityId}?waitForCompletion=true` : entityId
|
|
142008
142036
|
);
|
|
142009
142037
|
const { data: data2 } = await generateIdmApi({ state: state2 }).put(urlString, entityData);
|
|
@@ -142015,7 +142043,7 @@ async function deleteConfigEntity({
|
|
|
142015
142043
|
}) {
|
|
142016
142044
|
const urlString = _util2.default.format(
|
|
142017
142045
|
idmConfigURLTemplate,
|
|
142018
|
-
|
|
142046
|
+
getIdmBaseUrl(state2),
|
|
142019
142047
|
entityId
|
|
142020
142048
|
);
|
|
142021
142049
|
const { data: data2 } = await generateIdmApi({ state: state2 }).delete(urlString, {
|
|
@@ -144516,10 +144544,10 @@ async function importOAuth2TrustedJwtIssuers({
|
|
|
144516
144544
|
}
|
|
144517
144545
|
return response2;
|
|
144518
144546
|
}
|
|
144519
|
-
var createManagedObjectURLTemplate = "%s/
|
|
144520
|
-
var managedObjectByIdURLTemplate = "%s/
|
|
144521
|
-
var queryAllManagedObjectURLTemplate = `%s/
|
|
144522
|
-
var queryManagedObjectURLTemplate = `%s/
|
|
144547
|
+
var createManagedObjectURLTemplate = "%s/managed/%s?_action=create";
|
|
144548
|
+
var managedObjectByIdURLTemplate = "%s/managed/%s/%s";
|
|
144549
|
+
var queryAllManagedObjectURLTemplate = `%s/managed/%s?_queryFilter=true&_pageSize=%s`;
|
|
144550
|
+
var queryManagedObjectURLTemplate = `%s/managed/%s?_queryFilter=%s&_pageSize=%s`;
|
|
144523
144551
|
var DEFAULT_PAGE_SIZE = 1e3;
|
|
144524
144552
|
async function getManagedObject({
|
|
144525
144553
|
type,
|
|
@@ -144530,7 +144558,7 @@ async function getManagedObject({
|
|
|
144530
144558
|
const fieldsParam = `_fields=${fields.join(",")}`;
|
|
144531
144559
|
const urlString = _util2.default.format(
|
|
144532
144560
|
`${managedObjectByIdURLTemplate}?${fieldsParam}`,
|
|
144533
|
-
|
|
144561
|
+
getIdmBaseUrl(state2),
|
|
144534
144562
|
type,
|
|
144535
144563
|
id7
|
|
144536
144564
|
);
|
|
@@ -144546,7 +144574,7 @@ async function createManagedObject({
|
|
|
144546
144574
|
}) {
|
|
144547
144575
|
const urlString = _util2.default.format(
|
|
144548
144576
|
createManagedObjectURLTemplate,
|
|
144549
|
-
|
|
144577
|
+
getIdmBaseUrl(state2),
|
|
144550
144578
|
moType2
|
|
144551
144579
|
);
|
|
144552
144580
|
const { data: data2 } = await generateIdmApi({ requestOverride: {}, state: state2 }).post(
|
|
@@ -144564,7 +144592,7 @@ async function putManagedObject({
|
|
|
144564
144592
|
}) {
|
|
144565
144593
|
const urlString = _util2.default.format(
|
|
144566
144594
|
managedObjectByIdURLTemplate,
|
|
144567
|
-
|
|
144595
|
+
getIdmBaseUrl(state2),
|
|
144568
144596
|
type,
|
|
144569
144597
|
id7
|
|
144570
144598
|
);
|
|
@@ -144584,7 +144612,7 @@ async function patchManagedObject({
|
|
|
144584
144612
|
}) {
|
|
144585
144613
|
const urlString = _util2.default.format(
|
|
144586
144614
|
managedObjectByIdURLTemplate,
|
|
144587
|
-
|
|
144615
|
+
getIdmBaseUrl(state2),
|
|
144588
144616
|
type,
|
|
144589
144617
|
id7
|
|
144590
144618
|
);
|
|
@@ -144608,7 +144636,7 @@ async function queryManagedObjects({
|
|
|
144608
144636
|
pageCookie ? `${queryManagedObjectURLTemplate}&${fieldsParam}&_pagedResultsCookie=${encodeURIComponent(
|
|
144609
144637
|
pageCookie
|
|
144610
144638
|
)}` : `${queryManagedObjectURLTemplate}&${fieldsParam}`,
|
|
144611
|
-
|
|
144639
|
+
getIdmBaseUrl(state2),
|
|
144612
144640
|
type,
|
|
144613
144641
|
encodeURIComponent(filter2),
|
|
144614
144642
|
pageSize
|
|
@@ -144631,7 +144659,7 @@ async function queryAllManagedObjectsByType({
|
|
|
144631
144659
|
)}` : `${queryAllManagedObjectURLTemplate}${fieldsParam}`;
|
|
144632
144660
|
const urlString = _util2.default.format(
|
|
144633
144661
|
urlTemplate,
|
|
144634
|
-
|
|
144662
|
+
getIdmBaseUrl(state2),
|
|
144635
144663
|
type,
|
|
144636
144664
|
pageSize
|
|
144637
144665
|
);
|
|
@@ -144645,7 +144673,7 @@ async function deleteManagedObject({
|
|
|
144645
144673
|
}) {
|
|
144646
144674
|
const urlString = _util2.default.format(
|
|
144647
144675
|
managedObjectByIdURLTemplate,
|
|
144648
|
-
|
|
144676
|
+
getIdmBaseUrl(state2),
|
|
144649
144677
|
type,
|
|
144650
144678
|
id7
|
|
144651
144679
|
);
|
|
@@ -149982,20 +150010,20 @@ ${providers.map((it) => it.split("|")[0]).join("\n")}.`,
|
|
|
149982
150010
|
throw new FrodoError(`Error importing circles of trust`, error2);
|
|
149983
150011
|
}
|
|
149984
150012
|
}
|
|
149985
|
-
var systemActionsUrlTemplate = "%s/
|
|
149986
|
-
var systemTestUrlTemplate = "%s/
|
|
149987
|
-
var systemObjectActionsUrlTemplate = "%s/
|
|
149988
|
-
var systemRunScriptUrlTemplate = "%s/
|
|
149989
|
-
var systemQueryAllUrlTemplate = "%s/
|
|
149990
|
-
var systemQueryByFilterUrlTemplate = "%s/
|
|
149991
|
-
var systemObjectUrlTemplate = "%s/
|
|
150013
|
+
var systemActionsUrlTemplate = "%s/system?_action=%s";
|
|
150014
|
+
var systemTestUrlTemplate = "%s/system/%s?_action=test";
|
|
150015
|
+
var systemObjectActionsUrlTemplate = "%s/system/%s/%s?_action=%s";
|
|
150016
|
+
var systemRunScriptUrlTemplate = "%s/system/%s?_action=script&scriptId=%s&scriptExecuteMode=resource";
|
|
150017
|
+
var systemQueryAllUrlTemplate = "%s/system/%s/%s?_queryId=query-all-ids";
|
|
150018
|
+
var systemQueryByFilterUrlTemplate = "%s/system/%s/%s?_queryFilter=%s";
|
|
150019
|
+
var systemObjectUrlTemplate = "%s/system/%s/%s/%s";
|
|
149992
150020
|
var DEFAULT_PAGE_SIZE2 = 1e3;
|
|
149993
150021
|
async function testConnectorServers({
|
|
149994
150022
|
state: state2
|
|
149995
150023
|
}) {
|
|
149996
150024
|
const urlString = _util2.default.format(
|
|
149997
150025
|
systemActionsUrlTemplate,
|
|
149998
|
-
|
|
150026
|
+
getIdmBaseUrl(state2),
|
|
149999
150027
|
"testConnectorServers"
|
|
150000
150028
|
);
|
|
150001
150029
|
const { data: data2 } = await generateIdmApi({ state: state2, requestOverride: {} }).post(
|
|
@@ -150008,7 +150036,7 @@ async function readAvailableSystems({
|
|
|
150008
150036
|
}) {
|
|
150009
150037
|
const urlString = _util2.default.format(
|
|
150010
150038
|
systemActionsUrlTemplate,
|
|
150011
|
-
|
|
150039
|
+
getIdmBaseUrl(state2),
|
|
150012
150040
|
"test"
|
|
150013
150041
|
);
|
|
150014
150042
|
const { data: data2 } = await generateIdmApi({ requestOverride: {}, state: state2 }).post(
|
|
@@ -150022,7 +150050,7 @@ async function readSystemStatus({
|
|
|
150022
150050
|
}) {
|
|
150023
150051
|
const urlString = _util2.default.format(
|
|
150024
150052
|
systemTestUrlTemplate,
|
|
150025
|
-
|
|
150053
|
+
getIdmBaseUrl(state2),
|
|
150026
150054
|
systemName
|
|
150027
150055
|
);
|
|
150028
150056
|
const { data: data2 } = await generateIdmApi({ requestOverride: {}, state: state2 }).post(
|
|
@@ -150039,7 +150067,7 @@ async function authenticateSystemObject({
|
|
|
150039
150067
|
}) {
|
|
150040
150068
|
const urlString = _util2.default.format(
|
|
150041
150069
|
systemObjectActionsUrlTemplate,
|
|
150042
|
-
|
|
150070
|
+
getIdmBaseUrl(state2),
|
|
150043
150071
|
systemName,
|
|
150044
150072
|
systemObjectType,
|
|
150045
150073
|
"authenticate"
|
|
@@ -150057,7 +150085,7 @@ async function runSystemScript({
|
|
|
150057
150085
|
}) {
|
|
150058
150086
|
const urlString = _util2.default.format(
|
|
150059
150087
|
systemRunScriptUrlTemplate,
|
|
150060
|
-
|
|
150088
|
+
getIdmBaseUrl(state2),
|
|
150061
150089
|
systemName,
|
|
150062
150090
|
scriptName
|
|
150063
150091
|
);
|
|
@@ -150077,7 +150105,7 @@ async function queryAllSystemObjectIds({
|
|
|
150077
150105
|
const urlTemplate = pageCookie ? `${systemQueryAllUrlTemplate}${pagingParams}&_pagedResultsCookie=${pageCookie}` : `${systemQueryAllUrlTemplate}${pagingParams}`;
|
|
150078
150106
|
const urlString = _util2.default.format(
|
|
150079
150107
|
urlTemplate,
|
|
150080
|
-
|
|
150108
|
+
getIdmBaseUrl(state2),
|
|
150081
150109
|
systemName,
|
|
150082
150110
|
systemObjectType
|
|
150083
150111
|
);
|
|
@@ -150098,7 +150126,7 @@ async function querySystemObjects({
|
|
|
150098
150126
|
const urlTemplate = pageCookie ? `${systemQueryByFilterUrlTemplate}${pagingParams}${fieldsParam}&_pagedResultsCookie=${pageCookie}` : `${systemQueryByFilterUrlTemplate}${pagingParams}${fieldsParam}`;
|
|
150099
150127
|
const urlString = _util2.default.format(
|
|
150100
150128
|
urlTemplate,
|
|
150101
|
-
|
|
150129
|
+
getIdmBaseUrl(state2),
|
|
150102
150130
|
systemName,
|
|
150103
150131
|
systemObjectType,
|
|
150104
150132
|
decodeURIComponent(filter2) === filter2 ? encodeURIComponent(filter2) : filter2
|
|
@@ -150118,7 +150146,7 @@ async function getSystemObject({
|
|
|
150118
150146
|
const fieldsParam = `_fields=${fields.join(",")}`;
|
|
150119
150147
|
const urlString = _util2.default.format(
|
|
150120
150148
|
`${systemObjectUrlTemplate}?${fieldsParam}`,
|
|
150121
|
-
|
|
150149
|
+
getIdmBaseUrl(state2),
|
|
150122
150150
|
systemName,
|
|
150123
150151
|
systemObjectType,
|
|
150124
150152
|
systemObjectId
|
|
@@ -150136,7 +150164,7 @@ async function createSystemObject({
|
|
|
150136
150164
|
}) {
|
|
150137
150165
|
const urlString = _util2.default.format(
|
|
150138
150166
|
systemObjectActionsUrlTemplate,
|
|
150139
|
-
|
|
150167
|
+
getIdmBaseUrl(state2),
|
|
150140
150168
|
systemName,
|
|
150141
150169
|
systemObjectType,
|
|
150142
150170
|
"create"
|
|
@@ -150157,7 +150185,7 @@ async function putSystemObject({
|
|
|
150157
150185
|
}) {
|
|
150158
150186
|
const urlString = _util2.default.format(
|
|
150159
150187
|
systemObjectUrlTemplate,
|
|
150160
|
-
|
|
150188
|
+
getIdmBaseUrl(state2),
|
|
150161
150189
|
systemName,
|
|
150162
150190
|
systemObjectType,
|
|
150163
150191
|
systemObjectId
|
|
@@ -150178,7 +150206,7 @@ async function patchSystemObject({
|
|
|
150178
150206
|
}) {
|
|
150179
150207
|
const urlString = _util2.default.format(
|
|
150180
150208
|
systemObjectUrlTemplate,
|
|
150181
|
-
|
|
150209
|
+
getIdmBaseUrl(state2),
|
|
150182
150210
|
systemName,
|
|
150183
150211
|
systemObjectType,
|
|
150184
150212
|
systemObjectId
|
|
@@ -150197,7 +150225,7 @@ async function deleteSystemObject({
|
|
|
150197
150225
|
}) {
|
|
150198
150226
|
const urlString = _util2.default.format(
|
|
150199
150227
|
systemObjectUrlTemplate,
|
|
150200
|
-
|
|
150228
|
+
getIdmBaseUrl(state2),
|
|
150201
150229
|
systemName,
|
|
150202
150230
|
systemObjectType,
|
|
150203
150231
|
systemObjectId
|
|
@@ -153207,7 +153235,7 @@ var getApiConfig12 = () => ({
|
|
|
153207
153235
|
async function getFeatures({ state: state2 }) {
|
|
153208
153236
|
const urlString = _util2.default.format(
|
|
153209
153237
|
envInfoURLTemplate,
|
|
153210
|
-
|
|
153238
|
+
getHostOnlyUrl(state2.getHost())
|
|
153211
153239
|
);
|
|
153212
153240
|
const { data: data2 } = await generateAmApi({ resource: getApiConfig12(), state: state2 }).get(
|
|
153213
153241
|
urlString,
|
|
@@ -153512,6 +153540,12 @@ var ConnectionProfileOps_default = (state2) => {
|
|
|
153512
153540
|
async getConnectionProfile() {
|
|
153513
153541
|
return getConnectionProfile({ state: state2 });
|
|
153514
153542
|
},
|
|
153543
|
+
async loadConnectionProfileByHost(host2) {
|
|
153544
|
+
return loadConnectionProfileByHost({ host: host2, state: state2 });
|
|
153545
|
+
},
|
|
153546
|
+
async loadConnectionProfile() {
|
|
153547
|
+
return loadConnectionProfile({ state: state2 });
|
|
153548
|
+
},
|
|
153515
153549
|
async saveConnectionProfile(host2) {
|
|
153516
153550
|
return saveConnectionProfile({ host: host2, state: state2 });
|
|
153517
153551
|
},
|
|
@@ -153680,6 +153714,7 @@ Specify a sub-string uniquely identifying a single connection profile host URL.`
|
|
|
153680
153714
|
}
|
|
153681
153715
|
return {
|
|
153682
153716
|
tenant: profiles[0].tenant,
|
|
153717
|
+
idmHost: profiles[0].idmHost ? profiles[0].idmHost : null,
|
|
153683
153718
|
allowInsecureConnection: profiles[0].allowInsecureConnection,
|
|
153684
153719
|
deploymentType: profiles[0].deploymentType,
|
|
153685
153720
|
username: profiles[0].username ? profiles[0].username : null,
|
|
@@ -153688,6 +153723,8 @@ Specify a sub-string uniquely identifying a single connection profile host URL.`
|
|
|
153688
153723
|
logApiSecret: profiles[0].encodedLogApiSecret ? await dataProtection.decrypt(profiles[0].encodedLogApiSecret) : null,
|
|
153689
153724
|
authenticationService: profiles[0].authenticationService ? profiles[0].authenticationService : null,
|
|
153690
153725
|
authenticationHeaderOverrides: profiles[0].authenticationHeaderOverrides ? profiles[0].authenticationHeaderOverrides : {},
|
|
153726
|
+
adminClientId: profiles[0].adminClientId ? profiles[0].adminClientId : null,
|
|
153727
|
+
adminClientRedirectUri: profiles[0].adminClientRedirectUri ? profiles[0].adminClientRedirectUri : null,
|
|
153691
153728
|
svcacctName: profiles[0].svcacctName ? profiles[0].svcacctName : null,
|
|
153692
153729
|
svcacctId: profiles[0].svcacctId ? profiles[0].svcacctId : null,
|
|
153693
153730
|
svcacctJwk: profiles[0].encodedSvcacctJwk ? await dataProtection.decrypt(profiles[0].encodedSvcacctJwk) : null,
|
|
@@ -153699,6 +153736,33 @@ async function getConnectionProfile({
|
|
|
153699
153736
|
}) {
|
|
153700
153737
|
return getConnectionProfileByHost({ host: state2.getHost(), state: state2 });
|
|
153701
153738
|
}
|
|
153739
|
+
async function loadConnectionProfileByHost({
|
|
153740
|
+
host: host2,
|
|
153741
|
+
state: state2
|
|
153742
|
+
}) {
|
|
153743
|
+
const conn = await getConnectionProfileByHost({ host: host2, state: state2 });
|
|
153744
|
+
state2.setHost(conn.tenant);
|
|
153745
|
+
state2.setIdmHost(state2.getIdmHost() || conn.idmHost);
|
|
153746
|
+
state2.setAllowInsecureConnection(conn.allowInsecureConnection);
|
|
153747
|
+
state2.setDeploymentType(state2.getDeploymentType() || conn.deploymentType);
|
|
153748
|
+
state2.setAdminClientId(state2.getAdminClientId() || conn.adminClientId);
|
|
153749
|
+
state2.setAdminClientRedirectUri(
|
|
153750
|
+
state2.getAdminClientRedirectUri() || conn.adminClientRedirectUri
|
|
153751
|
+
);
|
|
153752
|
+
state2.setUsername(conn.username);
|
|
153753
|
+
state2.setPassword(conn.password);
|
|
153754
|
+
state2.setAuthenticationService(conn.authenticationService);
|
|
153755
|
+
state2.setAuthenticationHeaderOverrides(conn.authenticationHeaderOverrides);
|
|
153756
|
+
state2.setServiceAccountId(conn.svcacctId);
|
|
153757
|
+
state2.setServiceAccountJwk(conn.svcacctJwk);
|
|
153758
|
+
state2.setServiceAccountScope(conn.svcacctScope);
|
|
153759
|
+
return true;
|
|
153760
|
+
}
|
|
153761
|
+
async function loadConnectionProfile({
|
|
153762
|
+
state: state2
|
|
153763
|
+
}) {
|
|
153764
|
+
return loadConnectionProfileByHost({ host: state2.getHost(), state: state2 });
|
|
153765
|
+
}
|
|
153702
153766
|
async function saveConnectionProfile({
|
|
153703
153767
|
host: host2,
|
|
153704
153768
|
state: state2
|
|
@@ -153752,10 +153816,15 @@ async function saveConnectionProfile({
|
|
|
153752
153816
|
state: state2
|
|
153753
153817
|
});
|
|
153754
153818
|
}
|
|
153819
|
+
if (state2.getIdmHost()) profile.idmHost = state2.getIdmHost();
|
|
153755
153820
|
if (state2.getAllowInsecureConnection())
|
|
153756
153821
|
profile.allowInsecureConnection = state2.getAllowInsecureConnection();
|
|
153757
153822
|
if (state2.getDeploymentType())
|
|
153758
153823
|
profile.deploymentType = state2.getDeploymentType();
|
|
153824
|
+
if (state2.getAdminClientId())
|
|
153825
|
+
profile.adminClientId = state2.getAdminClientId();
|
|
153826
|
+
if (state2.getAdminClientRedirectUri())
|
|
153827
|
+
profile.adminClientRedirectUri = state2.getAdminClientRedirectUri();
|
|
153759
153828
|
if (state2.getUsername()) profile.username = state2.getUsername();
|
|
153760
153829
|
if (state2.getPassword())
|
|
153761
153830
|
profile.encodedPassword = await dataProtection.encrypt(
|
|
@@ -154721,32 +154790,54 @@ function determineDefaultRealm(state2) {
|
|
|
154721
154790
|
}
|
|
154722
154791
|
}
|
|
154723
154792
|
async function determineDeploymentType(state2) {
|
|
154793
|
+
debugMessage({
|
|
154794
|
+
message: `AuthenticateOps.determineDeploymentType: start`,
|
|
154795
|
+
state: state2
|
|
154796
|
+
});
|
|
154724
154797
|
const cookieValue = state2.getCookieValue();
|
|
154725
154798
|
let deploymentType = state2.getDeploymentType();
|
|
154726
154799
|
switch (deploymentType) {
|
|
154727
154800
|
case Constants_default.CLOUD_DEPLOYMENT_TYPE_KEY:
|
|
154801
|
+
adminClientId = state2.getAdminClientId() || fidcClientId;
|
|
154802
|
+
debugMessage({
|
|
154803
|
+
message: `AuthenticateOps.determineDeploymentType: end [type=${deploymentType}]`,
|
|
154804
|
+
state: state2
|
|
154805
|
+
});
|
|
154728
154806
|
return deploymentType;
|
|
154729
154807
|
case Constants_default.FORGEOPS_DEPLOYMENT_TYPE_KEY:
|
|
154730
|
-
adminClientId = forgeopsClientId;
|
|
154808
|
+
adminClientId = state2.getAdminClientId() || forgeopsClientId;
|
|
154809
|
+
debugMessage({
|
|
154810
|
+
message: `AuthenticateOps.determineDeploymentType: end [type=${deploymentType}]`,
|
|
154811
|
+
state: state2
|
|
154812
|
+
});
|
|
154731
154813
|
return deploymentType;
|
|
154732
154814
|
case Constants_default.CLASSIC_DEPLOYMENT_TYPE_KEY:
|
|
154815
|
+
debugMessage({
|
|
154816
|
+
message: `AuthenticateOps.determineDeploymentType: end [type=${deploymentType}]`,
|
|
154817
|
+
state: state2
|
|
154818
|
+
});
|
|
154733
154819
|
return deploymentType;
|
|
154734
154820
|
default: {
|
|
154735
|
-
if (state2.getUseBearerTokenForAmApis())
|
|
154821
|
+
if (state2.getUseBearerTokenForAmApis()) {
|
|
154822
|
+
debugMessage({
|
|
154823
|
+
message: `AuthenticateOps.determineDeploymentType: end [type=${Constants_default.CLOUD_DEPLOYMENT_TYPE_KEY}]`,
|
|
154824
|
+
state: state2
|
|
154825
|
+
});
|
|
154736
154826
|
return Constants_default.CLOUD_DEPLOYMENT_TYPE_KEY;
|
|
154827
|
+
}
|
|
154737
154828
|
const verifier = encodeBase64Url(_crypto3.randomBytes.call(void 0, 32));
|
|
154738
154829
|
const challenge = encodeBase64Url(
|
|
154739
154830
|
_crypto3.createHash.call(void 0, "sha256").update(verifier).digest()
|
|
154740
154831
|
);
|
|
154741
154832
|
const challengeMethod = "S256";
|
|
154742
|
-
const
|
|
154833
|
+
const redirectUri = _url2.default.resolve(state2.getHost(), redirectUrlTemplate);
|
|
154743
154834
|
const config = {
|
|
154744
154835
|
maxRedirects: 0,
|
|
154745
154836
|
headers: {
|
|
154746
154837
|
[state2.getCookieName()]: state2.getCookieValue()
|
|
154747
154838
|
}
|
|
154748
154839
|
};
|
|
154749
|
-
let bodyFormData = `redirect_uri=${
|
|
154840
|
+
let bodyFormData = `redirect_uri=${redirectUri}&scope=${cloudAdminScopes}&response_type=code&client_id=${fidcClientId}&csrf=${cookieValue}&decision=allow&code_challenge=${challenge}&code_challenge_method=${challengeMethod}`;
|
|
154750
154841
|
deploymentType = Constants_default.CLASSIC_DEPLOYMENT_TYPE_KEY;
|
|
154751
154842
|
try {
|
|
154752
154843
|
await authorize2({
|
|
@@ -154764,7 +154855,7 @@ async function determineDeploymentType(state2) {
|
|
|
154764
154855
|
deploymentType = Constants_default.CLOUD_DEPLOYMENT_TYPE_KEY;
|
|
154765
154856
|
} else {
|
|
154766
154857
|
try {
|
|
154767
|
-
bodyFormData = `redirect_uri=${
|
|
154858
|
+
bodyFormData = `redirect_uri=${redirectUri}&scope=${forgeopsAdminScopes}&response_type=code&client_id=${forgeopsClientId}&csrf=${state2.getCookieValue()}&decision=allow&code_challenge=${challenge}&code_challenge_method=${challengeMethod}`;
|
|
154768
154859
|
await authorize2({
|
|
154769
154860
|
amBaseUrl: state2.getHost(),
|
|
154770
154861
|
data: bodyFormData,
|
|
@@ -154773,7 +154864,7 @@ async function determineDeploymentType(state2) {
|
|
|
154773
154864
|
});
|
|
154774
154865
|
} catch (ex) {
|
|
154775
154866
|
if (_optionalChain([ex, 'access', _114 => _114.response, 'optionalAccess', _115 => _115.status]) === 302 && _optionalChain([ex, 'access', _116 => _116.response, 'access', _117 => _117.headers, 'optionalAccess', _118 => _118.location, 'optionalAccess', _119 => _119.indexOf, 'call', _120 => _120("code=")]) > -1) {
|
|
154776
|
-
adminClientId = forgeopsClientId;
|
|
154867
|
+
adminClientId = state2.getAdminClientId() || forgeopsClientId;
|
|
154777
154868
|
verboseMessage({
|
|
154778
154869
|
message: `ForgeOps deployment`["brightCyan"] + ` detected.`,
|
|
154779
154870
|
state: state2
|
|
@@ -154788,6 +154879,10 @@ async function determineDeploymentType(state2) {
|
|
|
154788
154879
|
}
|
|
154789
154880
|
}
|
|
154790
154881
|
}
|
|
154882
|
+
debugMessage({
|
|
154883
|
+
message: `AuthenticateOps.determineDeploymentType: end [type=${deploymentType}]`,
|
|
154884
|
+
state: state2
|
|
154885
|
+
});
|
|
154791
154886
|
return deploymentType;
|
|
154792
154887
|
}
|
|
154793
154888
|
}
|
|
@@ -154897,9 +154992,9 @@ async function getUserSessionToken(otpCallback, state2) {
|
|
|
154897
154992
|
});
|
|
154898
154993
|
return token;
|
|
154899
154994
|
}
|
|
154900
|
-
async function getAuthCode(
|
|
154995
|
+
async function getAuthCode(redirectUri, codeChallenge, codeChallengeMethod, state2) {
|
|
154901
154996
|
try {
|
|
154902
|
-
const bodyFormData = `redirect_uri=${
|
|
154997
|
+
const bodyFormData = `redirect_uri=${redirectUri}&scope=${state2.getDeploymentType() === Constants_default.CLOUD_DEPLOYMENT_TYPE_KEY ? cloudAdminScopes : forgeopsAdminScopes}&response_type=code&client_id=${adminClientId}&csrf=${state2.getCookieValue()}&decision=allow&code_challenge=${codeChallenge}&code_challenge_method=${codeChallengeMethod}`;
|
|
154903
154998
|
const config = {
|
|
154904
154999
|
headers: {
|
|
154905
155000
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
@@ -154943,9 +155038,12 @@ async function getFreshUserBearerToken({
|
|
|
154943
155038
|
_crypto3.createHash.call(void 0, "sha256").update(verifier).digest()
|
|
154944
155039
|
);
|
|
154945
155040
|
const challengeMethod = "S256";
|
|
154946
|
-
const
|
|
155041
|
+
const redirectUri = _url2.default.resolve(
|
|
155042
|
+
state2.getHost(),
|
|
155043
|
+
state2.getAdminClientRedirectUri() || redirectUrlTemplate
|
|
155044
|
+
);
|
|
154947
155045
|
const authCode = await getAuthCode(
|
|
154948
|
-
|
|
155046
|
+
redirectUri,
|
|
154949
155047
|
challenge,
|
|
154950
155048
|
challengeMethod,
|
|
154951
155049
|
state2
|
|
@@ -154958,7 +155056,7 @@ async function getFreshUserBearerToken({
|
|
|
154958
155056
|
password: adminClientPassword
|
|
154959
155057
|
}
|
|
154960
155058
|
};
|
|
154961
|
-
const bodyFormData = `redirect_uri=${
|
|
155059
|
+
const bodyFormData = `redirect_uri=${redirectUri}&grant_type=authorization_code&code=${authCode}&code_verifier=${verifier}`;
|
|
154962
155060
|
response2 = await accessToken2({
|
|
154963
155061
|
amBaseUrl: state2.getHost(),
|
|
154964
155062
|
data: bodyFormData,
|
|
@@ -154966,7 +155064,7 @@ async function getFreshUserBearerToken({
|
|
|
154966
155064
|
state: state2
|
|
154967
155065
|
});
|
|
154968
155066
|
} else {
|
|
154969
|
-
const bodyFormData = `client_id=${adminClientId}&redirect_uri=${
|
|
155067
|
+
const bodyFormData = `client_id=${adminClientId}&redirect_uri=${redirectUri}&grant_type=authorization_code&code=${authCode}&code_verifier=${verifier}`;
|
|
154970
155068
|
response2 = await accessToken2({
|
|
154971
155069
|
amBaseUrl: state2.getHost(),
|
|
154972
155070
|
data: bodyFormData,
|
|
@@ -155221,20 +155319,7 @@ async function getTokens({
|
|
|
155221
155319
|
let usingConnectionProfile = false;
|
|
155222
155320
|
try {
|
|
155223
155321
|
if (state2.getUsername() == null && state2.getPassword() == null && !state2.getServiceAccountId() && !state2.getServiceAccountJwk()) {
|
|
155224
|
-
|
|
155225
|
-
usingConnectionProfile = true;
|
|
155226
|
-
state2.setHost(conn.tenant);
|
|
155227
|
-
state2.setAllowInsecureConnection(conn.allowInsecureConnection);
|
|
155228
|
-
state2.setDeploymentType(conn.deploymentType);
|
|
155229
|
-
state2.setUsername(conn.username);
|
|
155230
|
-
state2.setPassword(conn.password);
|
|
155231
|
-
state2.setAuthenticationService(conn.authenticationService);
|
|
155232
|
-
state2.setAuthenticationHeaderOverrides(
|
|
155233
|
-
conn.authenticationHeaderOverrides
|
|
155234
|
-
);
|
|
155235
|
-
state2.setServiceAccountId(conn.svcacctId);
|
|
155236
|
-
state2.setServiceAccountJwk(conn.svcacctJwk);
|
|
155237
|
-
state2.setServiceAccountScope(conn.svcacctScope);
|
|
155322
|
+
usingConnectionProfile = await loadConnectionProfile({ state: state2 });
|
|
155238
155323
|
if (state2.getDeploymentType() && !types.includes(state2.getDeploymentType())) {
|
|
155239
155324
|
throw new FrodoError(
|
|
155240
155325
|
`Unsupported deployment type '${state2.getDeploymentType()}'`
|
|
@@ -155253,14 +155338,14 @@ async function getTokens({
|
|
|
155253
155338
|
}
|
|
155254
155339
|
}
|
|
155255
155340
|
state2.setCookieName(await determineCookieName(state2));
|
|
155256
|
-
if (!forceLoginAsUser && state2.getServiceAccountId() && state2.getServiceAccountJwk()) {
|
|
155341
|
+
if (!forceLoginAsUser && (state2.getDeploymentType() === Constants_default.CLOUD_DEPLOYMENT_TYPE_KEY || state2.getDeploymentType() === void 0) && state2.getServiceAccountId() && state2.getServiceAccountJwk()) {
|
|
155257
155342
|
debugMessage({
|
|
155258
155343
|
message: `AuthenticateOps.getTokens: Authenticating with service account ${state2.getServiceAccountId()}`,
|
|
155259
155344
|
state: state2
|
|
155260
155345
|
});
|
|
155261
155346
|
try {
|
|
155262
155347
|
const token = await getSaBearerToken({ state: state2 });
|
|
155263
|
-
state2.setBearerTokenMeta(token);
|
|
155348
|
+
if (token) state2.setBearerTokenMeta(token);
|
|
155264
155349
|
if (usingConnectionProfile && !token.from_cache) {
|
|
155265
155350
|
saveConnectionProfile({ host: state2.getHost(), state: state2 });
|
|
155266
155351
|
}
|
|
@@ -155281,6 +155366,9 @@ async function getTokens({
|
|
|
155281
155366
|
});
|
|
155282
155367
|
const token = await getUserSessionToken(callbackHandler, state2);
|
|
155283
155368
|
if (token) state2.setUserSessionTokenMeta(token);
|
|
155369
|
+
if (usingConnectionProfile && !token.from_cache) {
|
|
155370
|
+
saveConnectionProfile({ host: state2.getHost(), state: state2 });
|
|
155371
|
+
}
|
|
155284
155372
|
await determineDeploymentTypeAndDefaultRealmAndVersion(state2);
|
|
155285
155373
|
if (state2.getDeploymentType() && !types.includes(state2.getDeploymentType())) {
|
|
155286
155374
|
throw new FrodoError(
|
|
@@ -155957,7 +156045,7 @@ async function getCertificates({
|
|
|
155957
156045
|
}) {
|
|
155958
156046
|
const urlString = _util2.default.format(
|
|
155959
156047
|
certificatesURLTemplate,
|
|
155960
|
-
|
|
156048
|
+
getHostOnlyUrl(state2.getHost())
|
|
155961
156049
|
);
|
|
155962
156050
|
const { data: data2 } = await generateEnvApi({
|
|
155963
156051
|
resource: getApiConfig16(),
|
|
@@ -155975,7 +156063,7 @@ async function createCertificate({
|
|
|
155975
156063
|
}) {
|
|
155976
156064
|
const urlString = _util2.default.format(
|
|
155977
156065
|
certificatesURLTemplate,
|
|
155978
|
-
|
|
156066
|
+
getHostOnlyUrl(state2.getHost())
|
|
155979
156067
|
);
|
|
155980
156068
|
const { data: data2 } = await generateEnvApi({
|
|
155981
156069
|
resource: getApiConfig16(),
|
|
@@ -155993,7 +156081,7 @@ async function deleteCertificate({
|
|
|
155993
156081
|
}) {
|
|
155994
156082
|
const urlString = _util2.default.format(
|
|
155995
156083
|
certificateByIdURLTemplate,
|
|
155996
|
-
|
|
156084
|
+
getHostOnlyUrl(state2.getHost()),
|
|
155997
156085
|
certificateId
|
|
155998
156086
|
);
|
|
155999
156087
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -156010,7 +156098,7 @@ async function getCertificate({
|
|
|
156010
156098
|
}) {
|
|
156011
156099
|
const urlString = _util2.default.format(
|
|
156012
156100
|
certificateByIdURLTemplate,
|
|
156013
|
-
|
|
156101
|
+
getHostOnlyUrl(state2.getHost()),
|
|
156014
156102
|
certificateId
|
|
156015
156103
|
);
|
|
156016
156104
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -156028,7 +156116,7 @@ async function updateCertificate({
|
|
|
156028
156116
|
}) {
|
|
156029
156117
|
const urlString = _util2.default.format(
|
|
156030
156118
|
certificateByIdURLTemplate,
|
|
156031
|
-
|
|
156119
|
+
getHostOnlyUrl(state2.getHost()),
|
|
156032
156120
|
certificateId
|
|
156033
156121
|
);
|
|
156034
156122
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -156485,7 +156573,7 @@ async function getEnforcedContentSecurityPolicy({
|
|
|
156485
156573
|
}) {
|
|
156486
156574
|
const urlString = _util2.default.format(
|
|
156487
156575
|
enforcedPolicyURLTemplate,
|
|
156488
|
-
|
|
156576
|
+
getHostOnlyUrl(state2.getHost())
|
|
156489
156577
|
);
|
|
156490
156578
|
const { data: data2 } = await generateEnvApi({
|
|
156491
156579
|
resource: getApiConfig17(),
|
|
@@ -156501,7 +156589,7 @@ async function setEnforcedContentSecurityPolicy({
|
|
|
156501
156589
|
}) {
|
|
156502
156590
|
const urlString = _util2.default.format(
|
|
156503
156591
|
enforcedPolicyURLTemplate,
|
|
156504
|
-
|
|
156592
|
+
getHostOnlyUrl(state2.getHost())
|
|
156505
156593
|
);
|
|
156506
156594
|
const { data: data2 } = await generateEnvApi({
|
|
156507
156595
|
resource: getApiConfig17(),
|
|
@@ -156514,7 +156602,7 @@ async function getReportOnlyContentSecurityPolicy({
|
|
|
156514
156602
|
}) {
|
|
156515
156603
|
const urlString = _util2.default.format(
|
|
156516
156604
|
reportOnlyPolicyURLTemplate,
|
|
156517
|
-
|
|
156605
|
+
getHostOnlyUrl(state2.getHost())
|
|
156518
156606
|
);
|
|
156519
156607
|
const { data: data2 } = await generateEnvApi({
|
|
156520
156608
|
resource: getApiConfig17(),
|
|
@@ -156530,7 +156618,7 @@ async function setReportOnlyContentSecurityPolicy({
|
|
|
156530
156618
|
}) {
|
|
156531
156619
|
const urlString = _util2.default.format(
|
|
156532
156620
|
reportOnlyPolicyURLTemplate,
|
|
156533
|
-
|
|
156621
|
+
getHostOnlyUrl(state2.getHost())
|
|
156534
156622
|
);
|
|
156535
156623
|
const { data: data2 } = await generateEnvApi({
|
|
156536
156624
|
resource: getApiConfig17(),
|
|
@@ -156620,7 +156708,7 @@ async function getCookieDomains({
|
|
|
156620
156708
|
}) {
|
|
156621
156709
|
const urlString = _util2.default.format(
|
|
156622
156710
|
cookieDomainsURLTemplate,
|
|
156623
|
-
|
|
156711
|
+
getHostOnlyUrl(state2.getHost())
|
|
156624
156712
|
);
|
|
156625
156713
|
const { data: data2 } = await generateEnvApi({
|
|
156626
156714
|
resource: getApiConfig18(),
|
|
@@ -156636,7 +156724,7 @@ async function setCookieDomains({
|
|
|
156636
156724
|
}) {
|
|
156637
156725
|
const urlString = _util2.default.format(
|
|
156638
156726
|
cookieDomainsURLTemplate,
|
|
156639
|
-
|
|
156727
|
+
getHostOnlyUrl(state2.getHost())
|
|
156640
156728
|
);
|
|
156641
156729
|
const { data: data2 } = await generateEnvApi({
|
|
156642
156730
|
resource: getApiConfig18(),
|
|
@@ -156688,7 +156776,7 @@ async function getCSRs({
|
|
|
156688
156776
|
}) {
|
|
156689
156777
|
const urlString = _util2.default.format(
|
|
156690
156778
|
csrsURLTemplate,
|
|
156691
|
-
|
|
156779
|
+
getHostOnlyUrl(state2.getHost())
|
|
156692
156780
|
);
|
|
156693
156781
|
const { data: data2 } = await generateEnvApi({
|
|
156694
156782
|
resource: getApiConfig19(),
|
|
@@ -156704,7 +156792,7 @@ async function createCSR({
|
|
|
156704
156792
|
}) {
|
|
156705
156793
|
const urlString = _util2.default.format(
|
|
156706
156794
|
csrsURLTemplate,
|
|
156707
|
-
|
|
156795
|
+
getHostOnlyUrl(state2.getHost())
|
|
156708
156796
|
);
|
|
156709
156797
|
const { data: data2 } = await generateEnvApi({
|
|
156710
156798
|
resource: getApiConfig19(),
|
|
@@ -156718,7 +156806,7 @@ async function deleteCSR({
|
|
|
156718
156806
|
}) {
|
|
156719
156807
|
const urlString = _util2.default.format(
|
|
156720
156808
|
csrByIdURLTemplate,
|
|
156721
|
-
|
|
156809
|
+
getHostOnlyUrl(state2.getHost()),
|
|
156722
156810
|
csrId
|
|
156723
156811
|
);
|
|
156724
156812
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -156735,7 +156823,7 @@ async function getCSR({
|
|
|
156735
156823
|
}) {
|
|
156736
156824
|
const urlString = _util2.default.format(
|
|
156737
156825
|
csrByIdURLTemplate,
|
|
156738
|
-
|
|
156826
|
+
getHostOnlyUrl(state2.getHost()),
|
|
156739
156827
|
csrId
|
|
156740
156828
|
);
|
|
156741
156829
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -156753,7 +156841,7 @@ async function updateCSR({
|
|
|
156753
156841
|
}) {
|
|
156754
156842
|
const urlString = _util2.default.format(
|
|
156755
156843
|
csrByIdURLTemplate,
|
|
156756
|
-
|
|
156844
|
+
getHostOnlyUrl(state2.getHost()),
|
|
156757
156845
|
csrId
|
|
156758
156846
|
);
|
|
156759
156847
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -156924,7 +157012,7 @@ async function verifyCNAME({
|
|
|
156924
157012
|
}) {
|
|
156925
157013
|
const urlString = _util2.default.format(
|
|
156926
157014
|
verifyCNAMEURLTemplate,
|
|
156927
|
-
|
|
157015
|
+
getHostOnlyUrl(state2.getHost())
|
|
156928
157016
|
);
|
|
156929
157017
|
const { data: data2 } = await generateEnvApi({
|
|
156930
157018
|
resource: getApiConfig20(),
|
|
@@ -156937,7 +157025,7 @@ async function getCustomDomains({
|
|
|
156937
157025
|
}) {
|
|
156938
157026
|
const urlString = _util2.default.format(
|
|
156939
157027
|
customDomainsURLTemplate,
|
|
156940
|
-
|
|
157028
|
+
getHostOnlyUrl(state2.getHost()),
|
|
156941
157029
|
getCurrentRealmName(state2)
|
|
156942
157030
|
);
|
|
156943
157031
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -156954,7 +157042,7 @@ async function setCustomDomains({
|
|
|
156954
157042
|
}) {
|
|
156955
157043
|
const urlString = _util2.default.format(
|
|
156956
157044
|
customDomainsURLTemplate,
|
|
156957
|
-
|
|
157045
|
+
getHostOnlyUrl(state2.getHost()),
|
|
156958
157046
|
getCurrentRealmName(state2)
|
|
156959
157047
|
);
|
|
156960
157048
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -157027,7 +157115,7 @@ async function getFederationEnforcement({
|
|
|
157027
157115
|
}) {
|
|
157028
157116
|
const urlString = _util2.default.format(
|
|
157029
157117
|
federationEnforcementURLTemplate,
|
|
157030
|
-
|
|
157118
|
+
getHostOnlyUrl(state2.getHost())
|
|
157031
157119
|
);
|
|
157032
157120
|
const { data: data2 } = await generateEnvApi({
|
|
157033
157121
|
resource: getApiConfig21(),
|
|
@@ -157043,7 +157131,7 @@ async function setFederationEnforcement({
|
|
|
157043
157131
|
}) {
|
|
157044
157132
|
const urlString = _util2.default.format(
|
|
157045
157133
|
federationEnforcementURLTemplate,
|
|
157046
|
-
|
|
157134
|
+
getHostOnlyUrl(state2.getHost())
|
|
157047
157135
|
);
|
|
157048
157136
|
const { data: data2 } = await generateEnvApi({
|
|
157049
157137
|
resource: getApiConfig21(),
|
|
@@ -157130,7 +157218,7 @@ async function lockEnvironment({
|
|
|
157130
157218
|
}) {
|
|
157131
157219
|
const urlString = _util2.default.format(
|
|
157132
157220
|
lockEnvURLTemplate,
|
|
157133
|
-
|
|
157221
|
+
getHostOnlyUrl(state2.getHost())
|
|
157134
157222
|
);
|
|
157135
157223
|
const { data: data2 } = await generateEnvApi({
|
|
157136
157224
|
resource: getApiConfig22(),
|
|
@@ -157144,7 +157232,7 @@ async function unlockEnvironment({
|
|
|
157144
157232
|
}) {
|
|
157145
157233
|
const urlString = _util2.default.format(
|
|
157146
157234
|
unlockEnvByIdURLTemplate,
|
|
157147
|
-
|
|
157235
|
+
getHostOnlyUrl(state2.getHost()),
|
|
157148
157236
|
promotionId
|
|
157149
157237
|
);
|
|
157150
157238
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -157160,7 +157248,7 @@ async function getLockStatus({
|
|
|
157160
157248
|
}) {
|
|
157161
157249
|
const urlString = _util2.default.format(
|
|
157162
157250
|
lockStatusURLTemplate,
|
|
157163
|
-
|
|
157251
|
+
getHostOnlyUrl(state2.getHost())
|
|
157164
157252
|
);
|
|
157165
157253
|
const { data: data2 } = await generateEnvApi({
|
|
157166
157254
|
resource: getApiConfig22(),
|
|
@@ -157176,7 +157264,7 @@ async function promoteConfiguration({
|
|
|
157176
157264
|
}) {
|
|
157177
157265
|
const urlString = _util2.default.format(
|
|
157178
157266
|
lockEnvURLTemplate,
|
|
157179
|
-
|
|
157267
|
+
getHostOnlyUrl(state2.getHost())
|
|
157180
157268
|
);
|
|
157181
157269
|
const { data: data2 } = await generateEnvApi({
|
|
157182
157270
|
resource: getApiConfig22(),
|
|
@@ -157189,7 +157277,7 @@ async function getPromotionStatus({
|
|
|
157189
157277
|
}) {
|
|
157190
157278
|
const urlString = _util2.default.format(
|
|
157191
157279
|
promoteEnvURLTemplate,
|
|
157192
|
-
|
|
157280
|
+
getHostOnlyUrl(state2.getHost())
|
|
157193
157281
|
);
|
|
157194
157282
|
const { data: data2 } = await generateEnvApi({
|
|
157195
157283
|
resource: getApiConfig22(),
|
|
@@ -157204,7 +157292,7 @@ async function getLastPromotionReport({
|
|
|
157204
157292
|
}) {
|
|
157205
157293
|
const urlString = _util2.default.format(
|
|
157206
157294
|
reportURLTemplate,
|
|
157207
|
-
|
|
157295
|
+
getHostOnlyUrl(state2.getHost())
|
|
157208
157296
|
);
|
|
157209
157297
|
const { data: data2 } = await generateEnvApi({
|
|
157210
157298
|
resource: getApiConfig22(),
|
|
@@ -157220,7 +157308,7 @@ async function getPromotionReport({
|
|
|
157220
157308
|
}) {
|
|
157221
157309
|
const urlString = _util2.default.format(
|
|
157222
157310
|
reportByIdURLTemplate,
|
|
157223
|
-
|
|
157311
|
+
getHostOnlyUrl(state2.getHost()),
|
|
157224
157312
|
reportId
|
|
157225
157313
|
);
|
|
157226
157314
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -157236,7 +157324,7 @@ async function getProvisionalPromotionReport({
|
|
|
157236
157324
|
}) {
|
|
157237
157325
|
const urlString = _util2.default.format(
|
|
157238
157326
|
provisionalPromotionReportURLTemplate,
|
|
157239
|
-
|
|
157327
|
+
getHostOnlyUrl(state2.getHost())
|
|
157240
157328
|
);
|
|
157241
157329
|
const { data: data2 } = await generateEnvApi({
|
|
157242
157330
|
resource: getApiConfig22(),
|
|
@@ -157251,7 +157339,7 @@ async function getProvisionalRollbackReport({
|
|
|
157251
157339
|
}) {
|
|
157252
157340
|
const urlString = _util2.default.format(
|
|
157253
157341
|
provisionalRollbackReportURLTemplate,
|
|
157254
|
-
|
|
157342
|
+
getHostOnlyUrl(state2.getHost())
|
|
157255
157343
|
);
|
|
157256
157344
|
const { data: data2 } = await generateEnvApi({
|
|
157257
157345
|
resource: getApiConfig22(),
|
|
@@ -157266,7 +157354,7 @@ async function getPromotionReports({
|
|
|
157266
157354
|
}) {
|
|
157267
157355
|
const urlString = _util2.default.format(
|
|
157268
157356
|
reportsURLTemplate,
|
|
157269
|
-
|
|
157357
|
+
getHostOnlyUrl(state2.getHost())
|
|
157270
157358
|
);
|
|
157271
157359
|
const { data: data2 } = await generateEnvApi({
|
|
157272
157360
|
resource: getApiConfig22(),
|
|
@@ -157282,7 +157370,7 @@ async function rollbackPromotion({
|
|
|
157282
157370
|
}) {
|
|
157283
157371
|
const urlString = _util2.default.format(
|
|
157284
157372
|
rollbackURLTemplate,
|
|
157285
|
-
|
|
157373
|
+
getHostOnlyUrl(state2.getHost())
|
|
157286
157374
|
);
|
|
157287
157375
|
const { data: data2 } = await generateEnvApi({
|
|
157288
157376
|
resource: getApiConfig22(),
|
|
@@ -157456,7 +157544,7 @@ async function getRelease({
|
|
|
157456
157544
|
}) {
|
|
157457
157545
|
const urlString = _util2.default.format(
|
|
157458
157546
|
releaseURLTemplate,
|
|
157459
|
-
|
|
157547
|
+
getHostOnlyUrl(state2.getHost())
|
|
157460
157548
|
);
|
|
157461
157549
|
const { data: data2 } = await generateEnvApi({
|
|
157462
157550
|
resource: getApiConfig23(),
|
|
@@ -157499,7 +157587,7 @@ async function getSSOCookieConfig({
|
|
|
157499
157587
|
}) {
|
|
157500
157588
|
const urlString = _util2.default.format(
|
|
157501
157589
|
ssoCookieConfigURLTemplate,
|
|
157502
|
-
|
|
157590
|
+
getHostOnlyUrl(state2.getHost())
|
|
157503
157591
|
);
|
|
157504
157592
|
const { data: data2 } = await generateEnvApi({
|
|
157505
157593
|
resource: getApiConfig24(),
|
|
@@ -157514,7 +157602,7 @@ async function resetSSOCookieConfig({
|
|
|
157514
157602
|
}) {
|
|
157515
157603
|
const urlString = _util2.default.format(
|
|
157516
157604
|
resetSsoCookieConfigURLTemplate,
|
|
157517
|
-
|
|
157605
|
+
getHostOnlyUrl(state2.getHost())
|
|
157518
157606
|
);
|
|
157519
157607
|
const { data: data2 } = await generateEnvApi({
|
|
157520
157608
|
resource: getApiConfig24(),
|
|
@@ -157528,7 +157616,7 @@ async function setSSOCookieConfig({
|
|
|
157528
157616
|
}) {
|
|
157529
157617
|
const urlString = _util2.default.format(
|
|
157530
157618
|
ssoCookieConfigURLTemplate,
|
|
157531
|
-
|
|
157619
|
+
getHostOnlyUrl(state2.getHost())
|
|
157532
157620
|
);
|
|
157533
157621
|
const { data: data2 } = await generateEnvApi({
|
|
157534
157622
|
resource: getApiConfig24(),
|
|
@@ -157592,7 +157680,7 @@ async function getEsvCount({
|
|
|
157592
157680
|
}) {
|
|
157593
157681
|
const urlString = _util2.default.format(
|
|
157594
157682
|
countOfESVsURLTemplate,
|
|
157595
|
-
|
|
157683
|
+
getHostOnlyUrl(state2.getHost())
|
|
157596
157684
|
);
|
|
157597
157685
|
const { data: data2 } = await generateEnvApi({
|
|
157598
157686
|
resource: getApiConfig25(),
|
|
@@ -157631,7 +157719,7 @@ async function getLogApiKey({
|
|
|
157631
157719
|
}) {
|
|
157632
157720
|
const urlString = _util2.default.format(
|
|
157633
157721
|
logsAPIKeyURLTemplate,
|
|
157634
|
-
|
|
157722
|
+
getHostOnlyUrl(state2.getHost()),
|
|
157635
157723
|
keyId
|
|
157636
157724
|
);
|
|
157637
157725
|
const { data: data2 } = await generateLogKeysApi({ state: state2 }).get(urlString);
|
|
@@ -157642,7 +157730,7 @@ async function getLogApiKeys({
|
|
|
157642
157730
|
}) {
|
|
157643
157731
|
const urlString = _util2.default.format(
|
|
157644
157732
|
logsGetAPIKeysURLTemplate,
|
|
157645
|
-
|
|
157733
|
+
getHostOnlyUrl(state2.getHost())
|
|
157646
157734
|
);
|
|
157647
157735
|
const { data: data2 } = await generateLogKeysApi({ state: state2 }).get(urlString);
|
|
157648
157736
|
return data2;
|
|
@@ -157652,7 +157740,7 @@ async function getSources({
|
|
|
157652
157740
|
}) {
|
|
157653
157741
|
const urlString = _util2.default.format(
|
|
157654
157742
|
logsSourcesURLTemplate,
|
|
157655
|
-
|
|
157743
|
+
getHostOnlyUrl(state2.getHost())
|
|
157656
157744
|
);
|
|
157657
157745
|
const { data: data2 } = await generateLogApi({ state: state2 }).get(urlString);
|
|
157658
157746
|
return data2;
|
|
@@ -157671,7 +157759,7 @@ async function isLogApiKeyValid({
|
|
|
157671
157759
|
};
|
|
157672
157760
|
const urlString = _util2.default.format(
|
|
157673
157761
|
logsSourcesURLTemplate,
|
|
157674
|
-
|
|
157762
|
+
getHostOnlyUrl(state2.getHost())
|
|
157675
157763
|
);
|
|
157676
157764
|
await generateLogApi({ requestOverride, state: state2 }).get(urlString);
|
|
157677
157765
|
return true;
|
|
@@ -157685,7 +157773,7 @@ async function createLogApiKey({
|
|
|
157685
157773
|
}) {
|
|
157686
157774
|
const urlString = _util2.default.format(
|
|
157687
157775
|
logsCreateAPIKeyAndSecretURLTemplate,
|
|
157688
|
-
|
|
157776
|
+
getHostOnlyUrl(state2.getHost())
|
|
157689
157777
|
);
|
|
157690
157778
|
const { data: data2 } = await generateLogKeysApi({ state: state2 }).post(urlString, {
|
|
157691
157779
|
name: keyName
|
|
@@ -157698,7 +157786,7 @@ async function deleteLogApiKey({
|
|
|
157698
157786
|
}) {
|
|
157699
157787
|
const urlString = _util2.default.format(
|
|
157700
157788
|
logsAPIKeyURLTemplate,
|
|
157701
|
-
|
|
157789
|
+
getHostOnlyUrl(state2.getHost()),
|
|
157702
157790
|
keyId
|
|
157703
157791
|
);
|
|
157704
157792
|
const { data: data2 } = await generateLogKeysApi({ state: state2 }).delete(urlString, {
|
|
@@ -157713,7 +157801,7 @@ async function tail({
|
|
|
157713
157801
|
}) {
|
|
157714
157802
|
let urlString = _util2.default.format(
|
|
157715
157803
|
logsTailURLTemplate,
|
|
157716
|
-
|
|
157804
|
+
getHostOnlyUrl(state2.getHost()),
|
|
157717
157805
|
encodeURIComponent(source)
|
|
157718
157806
|
);
|
|
157719
157807
|
if (cookie) {
|
|
@@ -157731,7 +157819,7 @@ async function fetch2({
|
|
|
157731
157819
|
}) {
|
|
157732
157820
|
let urlString = _util2.default.format(
|
|
157733
157821
|
logsFetchURLTemplate,
|
|
157734
|
-
|
|
157822
|
+
getHostOnlyUrl(state2.getHost()),
|
|
157735
157823
|
encodeURIComponent(source),
|
|
157736
157824
|
startTs,
|
|
157737
157825
|
endTs
|
|
@@ -158108,14 +158196,14 @@ async function fetch3({
|
|
|
158108
158196
|
throw new FrodoError(`Error fetching logs`, error2);
|
|
158109
158197
|
}
|
|
158110
158198
|
}
|
|
158111
|
-
var scriptActionsUrlTemplate = "%s/
|
|
158199
|
+
var scriptActionsUrlTemplate = "%s/script?_action=%s";
|
|
158112
158200
|
async function compileScript({
|
|
158113
158201
|
script,
|
|
158114
158202
|
state: state2
|
|
158115
158203
|
}) {
|
|
158116
158204
|
const urlString = _util2.default.format(
|
|
158117
158205
|
scriptActionsUrlTemplate,
|
|
158118
|
-
|
|
158206
|
+
getIdmBaseUrl(state2),
|
|
158119
158207
|
"compile"
|
|
158120
158208
|
);
|
|
158121
158209
|
const postData = {
|
|
@@ -158135,7 +158223,7 @@ async function evaluateScript({
|
|
|
158135
158223
|
}) {
|
|
158136
158224
|
const urlString = _util2.default.format(
|
|
158137
158225
|
scriptActionsUrlTemplate,
|
|
158138
|
-
|
|
158226
|
+
getIdmBaseUrl(state2),
|
|
158139
158227
|
"eval"
|
|
158140
158228
|
);
|
|
158141
158229
|
const postData = {
|
|
@@ -159055,7 +159143,7 @@ async function getStatus({
|
|
|
159055
159143
|
}) {
|
|
159056
159144
|
const urlString = _util2.default.format(
|
|
159057
159145
|
startupURLTemplate,
|
|
159058
|
-
|
|
159146
|
+
getHostOnlyUrl(state2.getHost())
|
|
159059
159147
|
);
|
|
159060
159148
|
const { data: data2 } = await generateEnvApi({
|
|
159061
159149
|
resource: getApiConfig26(),
|
|
@@ -159072,7 +159160,7 @@ async function initiateRestart({
|
|
|
159072
159160
|
if (restartStatus === "ready") {
|
|
159073
159161
|
const urlString = _util2.default.format(
|
|
159074
159162
|
startupInitiateRestartURLTemplate,
|
|
159075
|
-
|
|
159163
|
+
getHostOnlyUrl(state2.getHost())
|
|
159076
159164
|
);
|
|
159077
159165
|
const { data: data2 } = await generateEnvApi({
|
|
159078
159166
|
resource: getApiConfig26(),
|
|
@@ -159098,7 +159186,7 @@ async function getVariables({
|
|
|
159098
159186
|
}) {
|
|
159099
159187
|
const urlString = _util2.default.format(
|
|
159100
159188
|
variablesListURLTemplate,
|
|
159101
|
-
|
|
159189
|
+
getHostOnlyUrl(state2.getHost())
|
|
159102
159190
|
);
|
|
159103
159191
|
const { data: data2 } = await generateEnvApi({
|
|
159104
159192
|
resource: getApiConfig27(),
|
|
@@ -159114,7 +159202,7 @@ async function getVariable({
|
|
|
159114
159202
|
}) {
|
|
159115
159203
|
const urlString = _util2.default.format(
|
|
159116
159204
|
variableURLTemplate,
|
|
159117
|
-
|
|
159205
|
+
getHostOnlyUrl(state2.getHost()),
|
|
159118
159206
|
variableId
|
|
159119
159207
|
);
|
|
159120
159208
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -159139,7 +159227,7 @@ async function putVariable({
|
|
|
159139
159227
|
};
|
|
159140
159228
|
const urlString = _util2.default.format(
|
|
159141
159229
|
variableURLTemplate,
|
|
159142
|
-
|
|
159230
|
+
getHostOnlyUrl(state2.getHost()),
|
|
159143
159231
|
variableId
|
|
159144
159232
|
);
|
|
159145
159233
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -159157,7 +159245,7 @@ async function setVariableDescription({
|
|
|
159157
159245
|
}) {
|
|
159158
159246
|
const urlString = _util2.default.format(
|
|
159159
159247
|
variableSetDescriptionURLTemplate,
|
|
159160
|
-
|
|
159248
|
+
getHostOnlyUrl(state2.getHost()),
|
|
159161
159249
|
variableId
|
|
159162
159250
|
);
|
|
159163
159251
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -159172,7 +159260,7 @@ async function deleteVariable({
|
|
|
159172
159260
|
}) {
|
|
159173
159261
|
const urlString = _util2.default.format(
|
|
159174
159262
|
variableURLTemplate,
|
|
159175
|
-
|
|
159263
|
+
getHostOnlyUrl(state2.getHost()),
|
|
159176
159264
|
variableId
|
|
159177
159265
|
);
|
|
159178
159266
|
const { data: data2 } = await generateEnvApi({
|
|
@@ -167288,7 +167376,7 @@ async function getEnvInfo({
|
|
|
167288
167376
|
}) {
|
|
167289
167377
|
const urlString = _util2.default.format(
|
|
167290
167378
|
envInfoURLTemplate2,
|
|
167291
|
-
|
|
167379
|
+
getHostOnlyUrl(state2.getHost())
|
|
167292
167380
|
);
|
|
167293
167381
|
const { data: data2 } = await generateAmApi({
|
|
167294
167382
|
resource: getApiConfig33(),
|
|
@@ -167358,18 +167446,15 @@ async function getInfo(state2) {
|
|
|
167358
167446
|
}
|
|
167359
167447
|
var apiVersion35 = "resource=1.0";
|
|
167360
167448
|
var apiConfig = { headers: { "Accept-API-Version": apiVersion35 } };
|
|
167361
|
-
var reconUrlTemplate = "%s/
|
|
167362
|
-
var reconByIdUrlTemplate = "%s/
|
|
167363
|
-
var startReconUrlTemplate = "%s/
|
|
167364
|
-
var startReconByIdUrlTemplate = "%s/
|
|
167365
|
-
var cancelReconUrlTemplate = "%s/
|
|
167449
|
+
var reconUrlTemplate = "%s/recon";
|
|
167450
|
+
var reconByIdUrlTemplate = "%s/recon/%s";
|
|
167451
|
+
var startReconUrlTemplate = "%s/recon?_action=recon&mapping=%s";
|
|
167452
|
+
var startReconByIdUrlTemplate = "%s/recon?_action=reconById&mapping=%s&id=%s";
|
|
167453
|
+
var cancelReconUrlTemplate = "%s/recon/%s?_action=cancel";
|
|
167366
167454
|
async function getRecons({
|
|
167367
167455
|
state: state2
|
|
167368
167456
|
}) {
|
|
167369
|
-
const urlString = _util2.default.format(
|
|
167370
|
-
reconUrlTemplate,
|
|
167371
|
-
getHostBaseUrl(state2.getHost())
|
|
167372
|
-
);
|
|
167457
|
+
const urlString = _util2.default.format(reconUrlTemplate, getIdmBaseUrl(state2));
|
|
167373
167458
|
const { data: data2 } = await generateIdmApi({
|
|
167374
167459
|
requestOverride: apiConfig,
|
|
167375
167460
|
state: state2
|
|
@@ -167382,7 +167467,7 @@ async function getRecon({
|
|
|
167382
167467
|
}) {
|
|
167383
167468
|
const urlString = _util2.default.format(
|
|
167384
167469
|
reconByIdUrlTemplate,
|
|
167385
|
-
|
|
167470
|
+
getIdmBaseUrl(state2),
|
|
167386
167471
|
reconId
|
|
167387
167472
|
);
|
|
167388
167473
|
const { data: data2 } = await generateIdmApi({
|
|
@@ -167397,7 +167482,7 @@ async function startRecon({
|
|
|
167397
167482
|
}) {
|
|
167398
167483
|
const urlString = _util2.default.format(
|
|
167399
167484
|
startReconUrlTemplate,
|
|
167400
|
-
|
|
167485
|
+
getIdmBaseUrl(state2),
|
|
167401
167486
|
mappingName
|
|
167402
167487
|
);
|
|
167403
167488
|
const { data: data2 } = await generateIdmApi({
|
|
@@ -167413,7 +167498,7 @@ async function startReconById({
|
|
|
167413
167498
|
}) {
|
|
167414
167499
|
const urlString = _util2.default.format(
|
|
167415
167500
|
startReconByIdUrlTemplate,
|
|
167416
|
-
|
|
167501
|
+
getIdmBaseUrl(state2),
|
|
167417
167502
|
mappingName,
|
|
167418
167503
|
objectId
|
|
167419
167504
|
);
|
|
@@ -167429,7 +167514,7 @@ async function cancelRecon({
|
|
|
167429
167514
|
}) {
|
|
167430
167515
|
const urlString = _util2.default.format(
|
|
167431
167516
|
cancelReconUrlTemplate,
|
|
167432
|
-
|
|
167517
|
+
getIdmBaseUrl(state2),
|
|
167433
167518
|
reconId
|
|
167434
167519
|
);
|
|
167435
167520
|
const { data: data2 } = await generateIdmApi({
|
|
@@ -168157,7 +168242,7 @@ function createObjectTable(object, keyMap = {}) {
|
|
|
168157
168242
|
var { DEFAULT_REALM_KEY: DEFAULT_REALM_KEY2, DEPLOYMENT_TYPES: DEPLOYMENT_TYPES2 } = frodo.utils.constants;
|
|
168158
168243
|
var hostArgument = new Argument(
|
|
168159
168244
|
"[host]",
|
|
168160
|
-
"
|
|
168245
|
+
"AM base URL, e.g.: https://cdk.iam.example.com/am. To use a connection profile, just specify a unique substring."
|
|
168161
168246
|
);
|
|
168162
168247
|
var realmArgument = new Argument(
|
|
168163
168248
|
"[realm]",
|
|
@@ -168172,6 +168257,18 @@ var usernameArgument = new Argument(
|
|
|
168172
168257
|
"Username to login with. Must be an admin user with appropriate rights to manage authentication journeys/trees."
|
|
168173
168258
|
);
|
|
168174
168259
|
var passwordArgument = new Argument("[password]", "Password.");
|
|
168260
|
+
var idmHostOption = new Option(
|
|
168261
|
+
"--idm-host <idm-host>",
|
|
168262
|
+
'IDM base URL, e.g.: https://cdk.idm.example.com/myidm. Use only if your IDM installation resides in a different domain and/or if the base path differs from the default "/openidm".'
|
|
168263
|
+
);
|
|
168264
|
+
var loginClientId = new Option(
|
|
168265
|
+
"--login-client-id <client-id>",
|
|
168266
|
+
'Specify a custom OAuth2 client id to use a your own oauth2 client for IDM API calls in deployments of type "cloud" or "forgeops". Your custom client must be configured as a public client and allow the authorization code grant using the "openid fr:idm:*" scope. Use the "--redirect-uri" parameter if you have configured a custom redirect uri (default: "<host>/platform/appAuthHelperRedirect.html").'
|
|
168267
|
+
);
|
|
168268
|
+
var loginRedirectUri = new Option(
|
|
168269
|
+
"--login-redirect-uri <redirect-uri>",
|
|
168270
|
+
'Specify a custom redirect URI to use with your custom OAuth2 client (efault: "<host>/platform/appAuthHelperRedirect.html").'
|
|
168271
|
+
);
|
|
168175
168272
|
var serviceAccountIdOption = new Option(
|
|
168176
168273
|
"--sa-id <sa-id>",
|
|
168177
168274
|
"Service account id."
|
|
@@ -168216,6 +168313,9 @@ var defaultArgs = [
|
|
|
168216
168313
|
passwordArgument
|
|
168217
168314
|
];
|
|
168218
168315
|
var defaultOpts = [
|
|
168316
|
+
idmHostOption,
|
|
168317
|
+
loginClientId,
|
|
168318
|
+
loginRedirectUri,
|
|
168219
168319
|
serviceAccountIdOption,
|
|
168220
168320
|
serviceAccountJwkFileOption,
|
|
168221
168321
|
deploymentOption,
|
|
@@ -168232,6 +168332,9 @@ var stateMap = {
|
|
|
168232
168332
|
[realmArgument.name()]: (realm2) => state.setRealm(realm2),
|
|
168233
168333
|
[usernameArgument.name()]: (username2) => state.setUsername(username2),
|
|
168234
168334
|
[passwordArgument.name()]: (password3) => state.setPassword(password3),
|
|
168335
|
+
[idmHostOption.attributeName()]: (idmHost) => state.setIdmHost(idmHost),
|
|
168336
|
+
[loginClientId.attributeName()]: (clientId) => state.setAdminClientId(clientId),
|
|
168337
|
+
[loginRedirectUri.attributeName()]: (redirectUri) => state.setAdminClientRedirectUri(redirectUri),
|
|
168235
168338
|
[serviceAccountIdOption.attributeName()]: (saId2) => state.setServiceAccountId(saId2),
|
|
168236
168339
|
[serviceAccountJwkFileOption.attributeName()]: (file) => {
|
|
168237
168340
|
try {
|
|
@@ -168323,18 +168426,21 @@ var FrodoCommand = class extends FrodoStubCommand {
|
|
|
168323
168426
|
"after",
|
|
168324
168427
|
`
|
|
168325
168428
|
Environment Variables:
|
|
168326
|
-
FRODO_HOST:
|
|
168327
|
-
|
|
168328
|
-
|
|
168329
|
-
|
|
168330
|
-
|
|
168331
|
-
|
|
168429
|
+
FRODO_HOST: AM base URL. Overridden by 'host' argument.
|
|
168430
|
+
FRODO_IDM_HOST: IDM base URL. Overridden by '--idm-host' option.
|
|
168431
|
+
FRODO_REALM: Realm. Overridden by 'realm' argument.
|
|
168432
|
+
FRODO_USERNAME: Username. Overridden by 'username' argument.
|
|
168433
|
+
FRODO_PASSWORD: Password. Overridden by 'password' argument.
|
|
168434
|
+
FRODO_LOGIN_CLIENT_ID: OAuth2 client id for IDM API calls. Overridden by '--login-client-id' option.
|
|
168435
|
+
FRODO_LOGIN_REDIRECT_URI: Redirect Uri for custom OAuth2 client id. Overridden by '--login-redirect-uri' option.
|
|
168436
|
+
FRODO_SA_ID: Service account uuid. Overridden by '--sa-id' option.
|
|
168437
|
+
FRODO_SA_JWK: Service account JWK. Overridden by '--sa-jwk-file' option but takes the actual JWK as a value, not a file name.
|
|
168332
168438
|
FRODO_NO_CACHE: Disable token cache. Same as '--no-cache' option.
|
|
168333
168439
|
FRODO_TOKEN_CACHE_PATH: Use this token cache file instead of '~/.frodo/TokenCache.json'.
|
|
168334
|
-
` + ("frodo conn save" === this.name() ? ` FRODO_LOG_KEY: Log API key.
|
|
168335
|
-
FRODO_LOG_SECRET: Log API secret.
|
|
168336
|
-
` : ``) + (this.name().startsWith("frodo log") ? ` FRODO_LOG_KEY: Log API key.
|
|
168337
|
-
FRODO_LOG_SECRET: Log API secret.
|
|
168440
|
+
` + ("frodo conn save" === this.name() ? ` FRODO_LOG_KEY: Log API key. Overridden by '--log-api-key' option.
|
|
168441
|
+
FRODO_LOG_SECRET: Log API secret. Overridden by '--log-api-secret' option.
|
|
168442
|
+
` : ``) + (this.name().startsWith("frodo log") ? ` FRODO_LOG_KEY: Log API key. Overridden by 'username' argument.
|
|
168443
|
+
FRODO_LOG_SECRET: Log API secret. Overridden by 'password' argument.
|
|
168338
168444
|
` : ``) + ` FRODO_CONNECTION_PROFILES_PATH: Use this connection profiles file instead of '~/.frodo/Connections.json'.
|
|
168339
168445
|
FRODO_AUTHENTICATION_SERVICE: Name of a login journey to use.
|
|
168340
168446
|
FRODO_DEBUG: Set to any value to enable debug output. Same as '--debug'.
|
|
@@ -178707,12 +178813,21 @@ async function describeConnectionProfile(host2, showSecrets) {
|
|
|
178707
178813
|
if (profile.logApiSecret) profile.logApiSecret = present;
|
|
178708
178814
|
if (profile.svcacctJwk) profile["svcacctJwk"] = present;
|
|
178709
178815
|
}
|
|
178816
|
+
if (!profile.idmHost) {
|
|
178817
|
+
delete profile.idmHost;
|
|
178818
|
+
}
|
|
178710
178819
|
if (profile.allowInsecureConnection === void 0) {
|
|
178711
178820
|
delete profile.allowInsecureConnection;
|
|
178712
178821
|
}
|
|
178713
178822
|
if (!profile.deploymentType) {
|
|
178714
178823
|
delete profile.deploymentType;
|
|
178715
178824
|
}
|
|
178825
|
+
if (!profile.adminClientId) {
|
|
178826
|
+
delete profile.adminClientId;
|
|
178827
|
+
}
|
|
178828
|
+
if (!profile.adminClientRedirectUri) {
|
|
178829
|
+
delete profile.adminClientRedirectUri;
|
|
178830
|
+
}
|
|
178716
178831
|
if (!profile.username) {
|
|
178717
178832
|
delete profile.username;
|
|
178718
178833
|
delete profile.password;
|
|
@@ -188164,9 +188279,9 @@ function setup175() {
|
|
|
188164
188279
|
Launch a frodo shell using explicit login parameters:
|
|
188165
188280
|
` + ` $ frodo shell ${amBaseUrl} ${username} '${password2}'
|
|
188166
188281
|
`["brightCyan"] + ` Launch a frodo shell using a connection profile (identified by the full AM base URL):
|
|
188167
|
-
` + ` $ frodo shell ${amBaseUrl}
|
|
188282
|
+
` + ` $ frodo shell ${amBaseUrl}
|
|
188168
188283
|
`["brightCyan"] + ` Launch a frodo shell using a connection profile (identified by a unique substring of the AM base URL):
|
|
188169
|
-
` + ` $ frodo shell ${connId}
|
|
188284
|
+
` + ` $ frodo shell ${connId}
|
|
188170
188285
|
`["brightCyan"]
|
|
188171
188286
|
).action(async (host, realm, user, password, options, command) => {
|
|
188172
188287
|
command.handleDefaultArgsAndOpts(
|
|
@@ -188567,7 +188682,7 @@ var compareVersions = (v12, v2) => {
|
|
|
188567
188682
|
// package.json
|
|
188568
188683
|
var package_default2 = {
|
|
188569
188684
|
name: "@rockcarver/frodo-cli",
|
|
188570
|
-
version: "2.0.
|
|
188685
|
+
version: "2.0.6-0",
|
|
188571
188686
|
type: "module",
|
|
188572
188687
|
description: "A command line interface to manage ForgeRock Identity Cloud tenants, ForgeOps deployments, and classic deployments.",
|
|
188573
188688
|
keywords: [
|
|
@@ -188681,7 +188796,7 @@ var package_default2 = {
|
|
|
188681
188796
|
]
|
|
188682
188797
|
},
|
|
188683
188798
|
devDependencies: {
|
|
188684
|
-
"@rockcarver/frodo-lib": "2.1.0",
|
|
188799
|
+
"@rockcarver/frodo-lib": "2.1.2-0",
|
|
188685
188800
|
"@types/colors": "^1.2.1",
|
|
188686
188801
|
"@types/fs-extra": "^11.0.1",
|
|
188687
188802
|
"@types/jest": "^29.2.3",
|
|
@@ -188978,7 +189093,7 @@ tmp/lib/tmp.js:
|
|
|
188978
189093
|
* MIT Licensed
|
|
188979
189094
|
*)
|
|
188980
189095
|
|
|
188981
|
-
@rockcarver/frodo-lib/dist/
|
|
189096
|
+
@rockcarver/frodo-lib/dist/index.mjs:
|
|
188982
189097
|
(*! Bundled license information:
|
|
188983
189098
|
|
|
188984
189099
|
humanize-ms/index.js:
|