diff --git a/src/cli/config-manager/config-manager-pull/config-manager-pull-test.ts b/src/cli/config-manager/config-manager-pull/config-manager-pull-test.ts deleted file mode 100644 index 1b468deb3..000000000 --- a/src/cli/config-manager/config-manager-pull/config-manager-pull-test.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { frodo } from '@rockcarver/frodo-lib'; - -import { getTokens } from '../../../ops/AuthenticateOps'; -import { printMessage, verboseMessage } from '../../../utils/Console'; -import { FrodoCommand } from '../../FrodoCommand'; - -const { CLOUD_DEPLOYMENT_TYPE_KEY, FORGEOPS_DEPLOYMENT_TYPE_KEY } = - frodo.utils.constants; - -const deploymentTypes = [ - CLOUD_DEPLOYMENT_TYPE_KEY, - FORGEOPS_DEPLOYMENT_TYPE_KEY, -]; - -export default function setup() { - const program = new FrodoCommand( - 'frodo config-manager pull test', - [], - deploymentTypes - ); - - program - .description('Test connection and authentication.') - .action(async (host, realm, user, password, options, command) => { - command.handleDefaultArgsAndOpts( - host, - realm, - user, - password, - options, - command - ); - - if (await getTokens(false, true, deploymentTypes)) { - verboseMessage('Test connection and authentication'); - printMessage('Authenticated successfully'); - } - // unrecognized combination of options or no options - else { - printMessage( - `Error getting tokens from the host: ${host}. Make sure to connect to the host using frodo conn save command.`, - 'error' - ); - program.help(); - process.exitCode = 1; - } - }); - - return program; -} diff --git a/src/cli/config-manager/config-manager-pull/config-manager-pull.ts b/src/cli/config-manager/config-manager-pull/config-manager-pull.ts index cc5701a31..7b4317db6 100644 --- a/src/cli/config-manager/config-manager-pull/config-manager-pull.ts +++ b/src/cli/config-manager/config-manager-pull/config-manager-pull.ts @@ -33,7 +33,7 @@ import Secrets from './config-manager-pull-secrets'; import ServiceObjects from './config-manager-pull-service-objects'; import Services from './config-manager-pull-services'; import Terms from './config-manager-pull-terms-and-conditions'; -import Test from './config-manager-pull-test'; +import Test from '../../conn/conn-test'; import Themes from './config-manager-pull-themes'; import UiConfig from './config-manager-pull-uiConfig'; import Variables from './config-manager-pull-variables'; diff --git a/src/cli/config-manager/config-manager-push/config-manager-push.ts b/src/cli/config-manager/config-manager-push/config-manager-push.ts index 36376bfc2..5c97f5ab4 100644 --- a/src/cli/config-manager/config-manager-push/config-manager-push.ts +++ b/src/cli/config-manager/config-manager-push/config-manager-push.ts @@ -24,6 +24,7 @@ import Schedules from './config-manager-push-schedules'; import SecretMappings from './config-manager-push-secret-mappings'; import ServiceObjects from './config-manager-push-service-objects'; import TermsAndConditions from './config-manager-push-terms-and-conditions'; +import Test from '../../conn/conn-test'; import Themes from './config-manager-push-themes'; import UiConfig from './config-manager-push-ui-config'; @@ -57,6 +58,7 @@ export default function setup() { program.addCommand(CustomNodes().name('custom-nodes')); program.addCommand(CSP().name('csp')); program.addCommand(Restart().name('restart')); + program.addCommand(Test().name('test')); program.addCommand(Journeys().name('journeys')); return program; diff --git a/src/cli/conn/conn-test.ts b/src/cli/conn/conn-test.ts new file mode 100644 index 000000000..5c1af6cf8 --- /dev/null +++ b/src/cli/conn/conn-test.ts @@ -0,0 +1,26 @@ +import { getTokens } from '../../ops/AuthenticateOps'; +import { printMessage, verboseMessage } from '../../utils/Console'; +import { FrodoCommand } from '../FrodoCommand'; + +export default function setup() { + const program = new FrodoCommand('frodo conn test'); + program + .description('Test connection and authentication.') + .action(async (host, realm, user, password, options, command) => { + command.handleDefaultArgsAndOpts( + host, + realm, + user, + password, + options, + command + ); + verboseMessage('Test connection and authentication'); + if (await getTokens()) { + printMessage('Connected and authenticated successfully'); + } else { + process.exit(1); + } + }); + return program; +} diff --git a/src/cli/conn/conn.ts b/src/cli/conn/conn.ts index 30bc8527f..c07007f27 100644 --- a/src/cli/conn/conn.ts +++ b/src/cli/conn/conn.ts @@ -4,6 +4,7 @@ import DeleteCmd from './conn-delete.js'; import DescribeCmd from './conn-describe.js'; import ListCmd from './conn-list.js'; import SaveCmd from './conn-save.js'; +import TestCmd from './conn-test.js'; export default function setup() { const program = new FrodoStubCommand('conn') @@ -22,5 +23,7 @@ export default function setup() { program.addCommand(ListCmd().name('list')); + program.addCommand(TestCmd().name('test')); + return program; } diff --git a/test/client_cli/en/__snapshots__/config-manager-push-test.test.js.snap b/test/client_cli/en/__snapshots__/config-manager-push-test.test.js.snap new file mode 100644 index 000000000..c42faf68f --- /dev/null +++ b/test/client_cli/en/__snapshots__/config-manager-push-test.test.js.snap @@ -0,0 +1,29 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`CLI help interface for 'test' should be expected english 1`] = ` +"Usage: frodo config-manager push test [options] [host] [realm] [username] [password] + +[Experimental] Test connection and authentication. + +Arguments: + host AM base URL, e.g.: https://cdk.iam.example.com/am. To use a + connection profile, just specify a unique substring or + alias. + realm Realm. Specify realm as '/' for the root realm or 'realm' or + '/parent/child' otherwise. (default: "alpha" for Identity + Cloud tenants, "/" otherwise.) + username Username to login with. Must be an admin user with + appropriate rights to manage authentication journeys/trees. + If given without a password, and it matches the username + already stored in the connection profile for the target + host, frodo uses that profile's stored password instead of + requiring it on the command line. + password Password. + +Options: + -h, --help Help + -hh, --help-more Help with all options. + -hhh, --help-all Help with all options, environment variables, and usage + examples. +" +`; diff --git a/test/client_cli/en/config-manager-push-test.test.js b/test/client_cli/en/config-manager-push-test.test.js new file mode 100644 index 000000000..f3c2c56a8 --- /dev/null +++ b/test/client_cli/en/config-manager-push-test.test.js @@ -0,0 +1,11 @@ +import cp from 'child_process'; +import { promisify } from 'util'; + +const exec = promisify(cp.exec); +const CMD = 'frodo config-manager push test --help'; +const { stdout } = await exec(CMD); + +test("CLI help interface for 'test' should be expected english", async () => { + expect(stdout).toMatchSnapshot(); +}); + diff --git a/test/e2e/__snapshots__/config-manager-push-test.e2e.test.js.snap b/test/e2e/__snapshots__/config-manager-push-test.e2e.test.js.snap new file mode 100644 index 000000000..fc72ba41b --- /dev/null +++ b/test/e2e/__snapshots__/config-manager-push-test.e2e.test.js.snap @@ -0,0 +1,9 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`frodo config-manager push "frodo config-manager push test": should receive access tokens" 1`] = `""`; + +exports[`frodo config-manager push "frodo config-manager push test": should receive access tokens" 2`] = ` +"Experimental feature in use: 'frodo config-manager push test'. This feature may change without notice. +Authenticated successfully +" +`; diff --git a/test/e2e/config-manager-push-test.e2e.test.js b/test/e2e/config-manager-push-test.e2e.test.js new file mode 100644 index 000000000..39985e9ed --- /dev/null +++ b/test/e2e/config-manager-push-test.e2e.test.js @@ -0,0 +1,73 @@ +/** + * Follow this process to write e2e tests for the CLI project: + * + * 1. Test if all the necessary mocks for your tests already exist. + * In mock mode, run the command you want to test with the same arguments + * and parameters exactly as you want to test it, for example: + * + * $ FRODO_MOCK=1 frodo conn save https://openam-frodo-dev.forgeblocks.com/am volker.scheuber@forgerock.com Sup3rS3cr3t! + * + * If your command completes without errors and with the expected results, + * all the required mocks already exist and you are good to write your + * test and skip to step #4. + * + * If, however, your command fails and you see errors like the one below, + * you know you need to record the mock responses first: + * + * [Polly] [adapter:node-http] Recording for the following request is not found and `recordIfMissing` is `false`. + * + * 2. Record mock responses for your exact command. + * In mock record mode, run the command you want to test with the same arguments + * and parameters exactly as you want to test it, for example: + * + * $ FRODO_MOCK=record frodo conn save https://openam-frodo-dev.forgeblocks.com/am volker.scheuber@forgerock.com Sup3rS3cr3t! + * + * Wait until you see all the Polly instances (mock recording adapters) have + * shutdown before you try to run step #1 again. + * Messages like these indicate mock recording adapters shutting down: + * + * Polly instance 'conn/4' stopping in 3s... + * Polly instance 'conn/4' stopping in 2s... + * Polly instance 'conn/save/3' stopping in 3s... + * Polly instance 'conn/4' stopping in 1s... + * Polly instance 'conn/save/3' stopping in 2s... + * Polly instance 'conn/4' stopped. + * Polly instance 'conn/save/3' stopping in 1s... + * Polly instance 'conn/save/3' stopped. + * + * 3. Validate your freshly recorded mock responses are complete and working. + * Re-run the exact command you want to test in mock mode (see step #1). + * + * 4. Write your test. + * Make sure to use the exact command including number of arguments and params. + * + * 5. Commit both your test and your new recordings to the repository. + * Your tests are likely going to reside outside the frodo-lib project but + * the recordings must be committed to the frodo-lib project. + */ + +/* +FRODO_MOCK=record FRODO_NO_CACHE=1 FRODO_HOST=https://openam-frodo-dev.forgeblocks.com/am frodo config-manager push test + +*/ + + +import { getEnv } from './utils/TestUtils'; +import { connection as c } from './utils/TestConfig'; +import cp from 'child_process'; +import { promisify } from 'util'; + +process.env['FRODO_MOCK'] = '1'; +process.env['FRODO_CONNECTION_PROFILES_PATH'] = + './test/e2e/env/Connections.json'; +const env = getEnv(c); +const exec = promisify(cp.exec); + +describe('frodo config-manager push', () => { + test('"frodo config-manager push test": should receive access tokens"', async () => { + const CMD = `frodo config-manager push test`; + const output = await exec(CMD, env); + expect(output.stdout).toMatchSnapshot(); + expect(output.stderr).toMatchSnapshot(); + }); +}); \ No newline at end of file diff --git a/test/e2e/mocks/config-manager_4167095917/push_2272264157/test_2949673445/0_890022063/am_1076162899/recording.har b/test/e2e/mocks/config-manager_4167095917/push_2272264157/test_2949673445/0_890022063/am_1076162899/recording.har new file mode 100644 index 000000000..54d2c1ef3 --- /dev/null +++ b/test/e2e/mocks/config-manager_4167095917/push_2272264157/test_2949673445/0_890022063/am_1076162899/recording.har @@ -0,0 +1,312 @@ +{ + "log": { + "_recordingName": "config-manager/push/test/0/am", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.6" + }, + "entries": [ + { + "_id": "ccd7a5defd0fdeaa986a2b54642d911a", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "name": "accept", + "value": "application/json, text/plain, */*" + }, + { + "name": "content-type", + "value": "application/json" + }, + { + "name": "user-agent", + "value": "" + }, + { + "name": "x-forgerock-transactionid", + "value": "" + }, + { + "name": "accept-api-version", + "value": "resource=1.1" + }, + { + "name": "accept-encoding", + "value": "gzip, compress, deflate, br" + }, + { + "name": "host", + "value": "openam-frodo-dev.forgeblocks.com" + } + ], + "headersSize": 385, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://openam-frodo-dev.forgeblocks.com/am/json/serverinfo/*" + }, + "response": { + "bodySize": 636, + "content": { + "mimeType": "application/json;charset=UTF-8", + "size": 636, + "text": "{\"_id\":\"*\",\"_rev\":\"-660094397\",\"domains\":[],\"protectedUserAttributes\":[\"telephoneNumber\",\"mail\"],\"cookieName\":\"6ac6499e9da2071\",\"secureCookie\":true,\"forgotPassword\":\"false\",\"forgotUsername\":\"false\",\"kbaEnabled\":\"false\",\"selfRegistration\":\"false\",\"lang\":\"en-US\",\"successfulUserRegistrationDestination\":\"default\",\"socialImplementations\":[],\"referralsEnabled\":\"false\",\"zeroPageLogin\":{\"enabled\":false,\"refererWhitelist\":[],\"allowedWithoutReferer\":true},\"realm\":\"/\",\"xuiUserSessionValidationEnabled\":true,\"fileBasedConfiguration\":true,\"userIdAttributes\":[],\"cloudOnlyFeaturesEnabled\":true,\"oauth2AIAgentsEnabled\":true,\"cdkDeployment\":false}" + }, + "cookies": [], + "headers": [ + { + "name": "content-security-policy", + "value": "connect-src 'self' https://*.googletagmanager.com https://*.google-analytics.com https://cdn.forgerock.com; form-action 'self' https://*.pingidentity.com; frame-ancestors 'self' https://*.pingidentity.com; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://*.googletagmanager.com https://*.google-analytics.com; script-src-elem 'self' 'unsafe-inline' https://*.googletagmanager.com https://*.google-analytics.com, default-src 'none';frame-ancestors 'none';sandbox" + }, + { + "name": "content-security-policy-report-only", + "value": "frame-ancestors 'self'; script-src 'self' 'unsafe-eval' 'unsafe-inline'" + }, + { + "name": "x-content-type-options", + "value": "nosniff" + }, + { + "name": "cache-control", + "value": "no-store" + }, + { + "name": "content-api-version", + "value": "resource=1.1" + }, + { + "name": "cross-origin-opener-policy", + "value": "same-origin" + }, + { + "name": "cross-origin-resource-policy", + "value": "same-origin" + }, + { + "name": "etag", + "value": "" + }, + { + "name": "expires", + "value": "0" + }, + { + "name": "pragma", + "value": "no-cache" + }, + { + "name": "x-frame-options", + "value": "DENY" + }, + { + "name": "content-type", + "value": "application/json;charset=UTF-8" + }, + { + "name": "content-length", + "value": "636" + }, + { + "name": "date", + "value": "" + }, + { + "name": "x-forgerock-transactionid", + "value": "" + }, + { + "name": "strict-transport-security", + "value": "max-age=31536000; includeSubDomains; preload;" + }, + { + "name": "x-robots-tag", + "value": "none" + }, + { + "name": "via", + "value": "" + }, + { + "name": "alt-svc", + "value": "" + } + ], + "headersSize": 1175, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-08-18T21:10:36.005Z", + "time": 191, + "timings": { + "blocked": -1, + "connect": -1, + "dns": -1, + "receive": 0, + "send": 0, + "ssl": -1, + "wait": 191 + } + }, + { + "_id": "6125d0328ad0dcaee55f73fd8b22ca14", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "name": "accept", + "value": "application/json, text/plain, */*" + }, + { + "name": "content-type", + "value": "application/json" + }, + { + "name": "user-agent", + "value": "" + }, + { + "name": "x-forgerock-transactionid", + "value": "" + }, + { + "name": "accept-api-version", + "value": "resource=1.0" + }, + { + "name": "authorization", + "value": "Bearer " + }, + { + "name": "accept-encoding", + "value": "gzip, compress, deflate, br" + }, + { + "name": "host", + "value": "openam-frodo-dev.forgeblocks.com" + } + ], + "headersSize": 1956, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://openam-frodo-dev.forgeblocks.com/am/json/serverinfo/version" + }, + "response": { + "bodySize": 276, + "content": { + "mimeType": "application/json;charset=UTF-8", + "size": 276, + "text": "{\"_id\":\"version\",\"_rev\":\"682709768\",\"version\":\"9.0.0-SNAPSHOT\",\"fullVersion\":\"ForgeRock Access Management 9.0.0-SNAPSHOT Build 1e6c015f8efa612ddc1fca2905bac0a4425e6ea0 (2026-August-14 17:23)\",\"revision\":\"1e6c015f8efa612ddc1fca2905bac0a4425e6ea0\",\"date\":\"2026-August-14 17:23\"}" + }, + "cookies": [], + "headers": [ + { + "name": "x-frame-options", + "value": "DENY" + }, + { + "name": "content-security-policy", + "value": "connect-src 'self' https://*.googletagmanager.com https://*.google-analytics.com https://cdn.forgerock.com; form-action 'self' https://*.pingidentity.com; frame-ancestors 'self' https://*.pingidentity.com; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://*.googletagmanager.com https://*.google-analytics.com; script-src-elem 'self' 'unsafe-inline' https://*.googletagmanager.com https://*.google-analytics.com, default-src 'none';frame-ancestors 'none';sandbox" + }, + { + "name": "content-security-policy-report-only", + "value": "frame-ancestors 'self'; script-src 'self' 'unsafe-eval' 'unsafe-inline'" + }, + { + "name": "x-content-type-options", + "value": "nosniff" + }, + { + "name": "cache-control", + "value": "no-store" + }, + { + "name": "content-api-version", + "value": "resource=1.0" + }, + { + "name": "cross-origin-opener-policy", + "value": "same-origin" + }, + { + "name": "cross-origin-resource-policy", + "value": "same-origin" + }, + { + "name": "etag", + "value": "" + }, + { + "name": "expires", + "value": "0" + }, + { + "name": "pragma", + "value": "no-cache" + }, + { + "name": "content-type", + "value": "application/json;charset=UTF-8" + }, + { + "name": "content-length", + "value": "276" + }, + { + "name": "date", + "value": "" + }, + { + "name": "x-forgerock-transactionid", + "value": "" + }, + { + "name": "strict-transport-security", + "value": "max-age=31536000; includeSubDomains; preload;" + }, + { + "name": "x-robots-tag", + "value": "none" + }, + { + "name": "via", + "value": "" + }, + { + "name": "alt-svc", + "value": "" + } + ], + "headersSize": 1174, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-08-18T21:10:36.381Z", + "time": 148, + "timings": { + "blocked": -1, + "connect": -1, + "dns": -1, + "receive": 0, + "send": 0, + "ssl": -1, + "wait": 148 + } + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/test/e2e/mocks/config-manager_4167095917/push_2272264157/test_2949673445/0_890022063/environment_1072573434/recording.har b/test/e2e/mocks/config-manager_4167095917/push_2272264157/test_2949673445/0_890022063/environment_1072573434/recording.har new file mode 100644 index 000000000..1a8430028 --- /dev/null +++ b/test/e2e/mocks/config-manager_4167095917/push_2272264157/test_2949673445/0_890022063/environment_1072573434/recording.har @@ -0,0 +1,125 @@ +{ + "log": { + "_recordingName": "config-manager/push/test/0/environment", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.6" + }, + "entries": [ + { + "_id": "ccc7ec61c2094114d7917814bb19b83b", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "name": "accept", + "value": "application/json, text/plain, */*" + }, + { + "name": "content-type", + "value": "application/json" + }, + { + "name": "user-agent", + "value": "" + }, + { + "name": "accept-api-version", + "value": "protocol=1.0,resource=1.0" + }, + { + "name": "authorization", + "value": "Bearer " + }, + { + "name": "accept-encoding", + "value": "gzip, compress, deflate, br" + }, + { + "name": "host", + "value": "openam-frodo-dev.forgeblocks.com" + } + ], + "headersSize": 1907, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://openam-frodo-dev.forgeblocks.com/environment/scopes/service-accounts" + }, + "response": { + "bodySize": 1991, + "content": { + "mimeType": "application/json; charset=utf-8", + "size": 1991, + "text": "[{\"scope\":\"fr:am:*\",\"description\":\"All Access Management APIs\"},{\"scope\":\"fr:idc:analytics:*\",\"description\":\"All Analytics APIs\"},{\"scope\":\"fr:idc:certificate:*\",\"description\":\"All TLS certificate APIs\",\"childScopes\":[{\"scope\":\"fr:idc:certificate:read\",\"description\":\"Read TLS certificates\"}]},{\"scope\":\"fr:idc:content-security-policy:*\",\"description\":\"All content security policy APIs\",\"childScopes\":[{\"scope\":\"fr:idc:content-security-policy:read\",\"description\":\"Read content security policy\"}]},{\"scope\":\"fr:idc:cookie-domain:*\",\"description\":\"All cookie domain APIs\",\"childScopes\":[{\"scope\":\"fr:idc:cookie-domain:read\",\"description\":\"Read cookie domains\"}]},{\"scope\":\"fr:idc:custom-domain:*\",\"description\":\"All custom domain APIs\",\"childScopes\":[{\"scope\":\"fr:idc:custom-domain:read\",\"description\":\"Read custom domains\"}]},{\"scope\":\"fr:idc:dataset:*\",\"description\":\"All dataset deletion APIs\",\"childScopes\":[{\"scope\":\"fr:idc:dataset:read\",\"description\":\"Read dataset deletions\"}]},{\"scope\":\"fr:idc:esv:*\",\"description\":\"All ESV APIs\",\"childScopes\":[{\"scope\":\"fr:idc:esv:read\",\"description\":\"Read ESVs, excluding values of secrets\"},{\"scope\":\"fr:idc:esv:update\",\"description\":\"Create, modify, and delete ESVs\"},{\"scope\":\"fr:idc:esv:restart\",\"description\":\"Restart workloads that consume ESVs\"}]},{\"scope\":\"fr:idc:promotion:*\",\"description\":\"All configuration promotion APIs\",\"childScopes\":[{\"scope\":\"fr:idc:promotion:read\",\"description\":\"Read configuration promotion\"}]},{\"scope\":\"fr:idc:release:*\",\"description\":\"All product release APIs\",\"childScopes\":[{\"scope\":\"fr:idc:release:read\",\"description\":\"Read product release\"}]},{\"scope\":\"fr:idc:sso-cookie:*\",\"description\":\"All SSO cookie APIs\",\"childScopes\":[{\"scope\":\"fr:idc:sso-cookie:read\",\"description\":\"Read SSO cookie\"}]},{\"scope\":\"fr:idc:telemetry:*\",\"description\":\"All telemetry APIs\",\"childScopes\":[{\"scope\":\"fr:idc:telemetry:read\",\"description\":\"Read telemetry\"}]},{\"scope\":\"fr:idm:*\",\"description\":\"All Identity Management APIs\"}]" + }, + "cookies": [], + "headers": [ + { + "name": "x-frame-options", + "value": "SAMEORIGIN" + }, + { + "name": "content-type", + "value": "application/json; charset=utf-8" + }, + { + "name": "content-length", + "value": "1991" + }, + { + "name": "etag", + "value": "" + }, + { + "name": "date", + "value": "" + }, + { + "name": "x-forgerock-transactionid", + "value": "" + }, + { + "name": "strict-transport-security", + "value": "max-age=31536000; includeSubDomains; preload;" + }, + { + "name": "x-robots-tag", + "value": "none" + }, + { + "name": "via", + "value": "" + }, + { + "name": "alt-svc", + "value": "" + } + ], + "headersSize": 388, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-08-18T21:10:36.536Z", + "time": 108, + "timings": { + "blocked": -1, + "connect": -1, + "dns": -1, + "receive": 0, + "send": 0, + "ssl": -1, + "wait": 108 + } + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/test/e2e/mocks/config-manager_4167095917/push_2272264157/test_2949673445/0_890022063/oauth2_393036114/recording.har b/test/e2e/mocks/config-manager_4167095917/push_2272264157/test_2949673445/0_890022063/oauth2_393036114/recording.har new file mode 100644 index 000000000..b9f0f748f --- /dev/null +++ b/test/e2e/mocks/config-manager_4167095917/push_2272264157/test_2949673445/0_890022063/oauth2_393036114/recording.har @@ -0,0 +1,146 @@ +{ + "log": { + "_recordingName": "config-manager/push/test/0/oauth2", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.6" + }, + "entries": [ + { + "_id": "ff75519a93ccab829f8ee8cf5e92b49f", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 1349, + "cookies": [], + "headers": [ + { + "name": "accept", + "value": "application/json, text/plain, */*" + }, + { + "name": "content-type", + "value": "application/x-www-form-urlencoded" + }, + { + "name": "user-agent", + "value": "" + }, + { + "name": "x-forgerock-transactionid", + "value": "" + }, + { + "name": "accept-api-version", + "value": "protocol=2.1,resource=1.0" + }, + { + "name": "content-length", + "value": "1349" + }, + { + "name": "accept-encoding", + "value": "gzip, compress, deflate, br" + }, + { + "name": "host", + "value": "openam-frodo-dev.forgeblocks.com" + } + ], + "headersSize": 440, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/x-www-form-urlencoded", + "params": [], + "text": "assertion=&client_id=service-account&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer&scope=fr:am:* fr:idc:esv:* fr:idc:analytics:* fr:idc:telemetry:* fr:idc:custom-domain:* fr:idc:release:* fr:idc:sso-cookie:* fr:idc:content-security-policy:* fr:idc:certificate:* fr:idm:* fr:idc:dataset:* fr:idc:cookie-domain:* fr:idc:promotion:*" + }, + "queryString": [], + "url": "https://openam-frodo-dev.forgeblocks.com/am/oauth2/access_token" + }, + "response": { + "bodySize": 1850, + "content": { + "mimeType": "application/json;charset=UTF-8", + "size": 1850, + "text": "{\"access_token\":\"\",\"scope\":\"fr:am:* fr:idc:esv:* fr:idc:analytics:* fr:idc:telemetry:* fr:idc:custom-domain:* fr:idc:release:* fr:idc:sso-cookie:* fr:idc:content-security-policy:* fr:idc:certificate:* fr:idm:* fr:idc:dataset:* fr:idc:cookie-domain:* fr:idc:promotion:*\",\"token_type\":\"Bearer\",\"expires_in\":899}" + }, + "cookies": [], + "headers": [ + { + "name": "content-security-policy", + "value": "connect-src 'self' https://*.googletagmanager.com https://*.google-analytics.com https://cdn.forgerock.com; form-action 'self' https://*.pingidentity.com; frame-ancestors 'self' https://*.pingidentity.com; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://*.googletagmanager.com https://*.google-analytics.com; script-src-elem 'self' 'unsafe-inline' https://*.googletagmanager.com https://*.google-analytics.com" + }, + { + "name": "content-security-policy-report-only", + "value": "frame-ancestors 'self'; script-src 'self' 'unsafe-eval' 'unsafe-inline'" + }, + { + "name": "x-content-type-options", + "value": "nosniff" + }, + { + "name": "cache-control", + "value": "no-store" + }, + { + "name": "pragma", + "value": "no-cache" + }, + { + "name": "content-type", + "value": "application/json;charset=UTF-8" + }, + { + "name": "content-length", + "value": "1850" + }, + { + "name": "date", + "value": "" + }, + { + "name": "x-forgerock-transactionid", + "value": "" + }, + { + "name": "strict-transport-security", + "value": "max-age=31536000; includeSubDomains; preload;" + }, + { + "name": "x-robots-tag", + "value": "none" + }, + { + "name": "via", + "value": "" + }, + { + "name": "alt-svc", + "value": "" + } + ], + "headersSize": 951, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-08-18T21:10:36.210Z", + "time": 167, + "timings": { + "blocked": -1, + "connect": -1, + "dns": -1, + "receive": 0, + "send": 0, + "ssl": -1, + "wait": 167 + } + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/test/e2e/mocks/config-manager_4167095917/push_2272264157/test_2949673445/0_890022063/openidm_3290118515/recording.har b/test/e2e/mocks/config-manager_4167095917/push_2272264157/test_2949673445/0_890022063/openidm_3290118515/recording.har new file mode 100644 index 000000000..3e9042e0e --- /dev/null +++ b/test/e2e/mocks/config-manager_4167095917/push_2272264157/test_2949673445/0_890022063/openidm_3290118515/recording.har @@ -0,0 +1,310 @@ +{ + "log": { + "_recordingName": "config-manager/push/test/0/openidm", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.6" + }, + "entries": [ + { + "_id": "9cb8561357870863838a9948da32d1e8", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "name": "accept", + "value": "application/json, text/plain, */*" + }, + { + "name": "content-type", + "value": "application/json" + }, + { + "name": "user-agent", + "value": "" + }, + { + "name": "x-forgerock-transactionid", + "value": "" + }, + { + "name": "authorization", + "value": "Bearer " + }, + { + "name": "accept-encoding", + "value": "gzip, compress, deflate, br" + }, + { + "name": "host", + "value": "openam-frodo-dev.forgeblocks.com" + } + ], + "headersSize": 1968, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [ + { + "name": "_fields", + "value": "*" + } + ], + "url": "https://openam-frodo-dev.forgeblocks.com/openidm/managed/svcacct/a4438bd2-3e7f-4924-b422-46d5cb049b21?_fields=%2A" + }, + "response": { + "bodySize": 1394, + "content": { + "mimeType": "application/json;charset=utf-8", + "size": 1394, + "text": "{\"_id\":\"a4438bd2-3e7f-4924-b422-46d5cb049b21\",\"_rev\":\"fe92e226-481b-4208-a6ef-5b8378e8d937-41244\",\"accountStatus\":\"active\",\"name\":\"Frodo-SA-1784660925315\",\"description\":\"phales@trivir.com's Frodo Service Account\",\"scopes\":[\"fr:am:*\",\"fr:idc:analytics:*\",\"fr:idc:certificate:*\",\"fr:idc:content-security-policy:*\",\"fr:idc:cookie-domain:*\",\"fr:idc:custom-domain:*\",\"fr:idc:dataset:*\",\"fr:idc:esv:*\",\"fr:idm:*\",\"fr:idc:promotion:*\",\"fr:idc:release:*\",\"fr:idc:sso-cookie:*\",\"fr:idc:telemetry:*\"],\"jwks\":\"{\\\"keys\\\":[{\\\"kty\\\":\\\"RSA\\\",\\\"kid\\\":\\\"8GP2_8kFC4G22JXxDAz4RX0ZfNB7LHTgMcrCcpRLKtU\\\",\\\"alg\\\":\\\"RS256\\\",\\\"e\\\":\\\"AQAB\\\",\\\"n\\\":\\\"5mHyhvq1p_5h8BF8AYjZdx8L812q0ddyNlM9Cfy-upkOAO1Bx5SI8X8WkoHX2r90INRBCIPh5sqOm_vUZIE4fdzX54Bsa35V3z9S8JcHAte0uyM3SkFP3bYwzV3iRDgg5-naUqRPSoaORsj-SxeT3o8n04kuvg9MwwIOWuOx0fKtEQdJXTzeiAhRbUEQUYGlDdAC6Gz-L16OMgLWUhX-eiLHGjarm6wq-brnrfdDZqJ2XfAeZ04QIFpEl7kOh1Mhj7MZMx-LZy7itR7xG1nd_nE-ZP6-O_3mgWxWxISP-3AXjD1MOPl5z7c_T89TYIAM8oHSf-1fkNkWgwA8G0frdh2EKeOFexKGjPQO3aNPeYWBaGJ1NQHij-RmtXstHX3-qiy32NT2sheMgNcSfmlPQqAEhU3Md45JUFyBacgbJEYq6ygQUSvyNGAeQVEMJ8VBWa6jvuqKXGYVIaNvn-7CWYDhJBKHJXtqfhXndGCBf_6VMqpWfEBB2awzpep0knZTKggZp-ppDJAjrm_RntFEgEIOoc69CekpU9oNV9cFFL6nl3oPNq1Qw1tkjtpJSbLwQAYNyo1qy1Z95xWt4TcOe7EvlSRMOUuREUYc0IUOJfvXeJbSe0BcWUXG_7Vi8W3jyjTZIt9KrATt6jx09EbtzzgVfk2IJhWmPd0H3Y-Rohc\\\"}]}\",\"maxCachingTime\":\"15\",\"maxIdleTime\":\"15\",\"maxSessionTime\":\"15\",\"quotaLimit\":\"5\"}" + }, + "cookies": [], + "headers": [ + { + "name": "date", + "value": "" + }, + { + "name": "vary", + "value": "Origin" + }, + { + "name": "cache-control", + "value": "no-store" + }, + { + "name": "content-security-policy", + "value": "default-src 'none';frame-ancestors 'none';sandbox" + }, + { + "name": "content-type", + "value": "application/json;charset=utf-8" + }, + { + "name": "cross-origin-opener-policy", + "value": "same-origin" + }, + { + "name": "cross-origin-resource-policy", + "value": "same-origin" + }, + { + "name": "etag", + "value": "" + }, + { + "name": "expires", + "value": "0" + }, + { + "name": "pragma", + "value": "no-cache" + }, + { + "name": "x-content-type-options", + "value": "nosniff" + }, + { + "name": "x-frame-options", + "value": "DENY" + }, + { + "name": "content-length", + "value": "1394" + }, + { + "name": "x-forgerock-transactionid", + "value": "" + }, + { + "name": "strict-transport-security", + "value": "max-age=31536000; includeSubDomains; preload;" + }, + { + "name": "x-robots-tag", + "value": "none" + }, + { + "name": "via", + "value": "" + }, + { + "name": "alt-svc", + "value": "" + } + ], + "headersSize": 683, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-08-18T21:10:36.450Z", + "time": 167, + "timings": { + "blocked": -1, + "connect": -1, + "dns": -1, + "receive": 0, + "send": 0, + "ssl": -1, + "wait": 167 + } + }, + { + "_id": "9cb8561357870863838a9948da32d1e8", + "_order": 1, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "name": "accept", + "value": "application/json, text/plain, */*" + }, + { + "name": "content-type", + "value": "application/json" + }, + { + "name": "user-agent", + "value": "" + }, + { + "name": "x-forgerock-transactionid", + "value": "" + }, + { + "name": "authorization", + "value": "Bearer " + }, + { + "name": "accept-encoding", + "value": "gzip, compress, deflate, br" + }, + { + "name": "host", + "value": "openam-frodo-dev.forgeblocks.com" + } + ], + "headersSize": 1968, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [ + { + "name": "_fields", + "value": "*" + } + ], + "url": "https://openam-frodo-dev.forgeblocks.com/openidm/managed/svcacct/a4438bd2-3e7f-4924-b422-46d5cb049b21?_fields=%2A" + }, + "response": { + "bodySize": 1394, + "content": { + "mimeType": "application/json;charset=utf-8", + "size": 1394, + "text": "{\"_id\":\"a4438bd2-3e7f-4924-b422-46d5cb049b21\",\"_rev\":\"fe92e226-481b-4208-a6ef-5b8378e8d937-41244\",\"accountStatus\":\"active\",\"name\":\"Frodo-SA-1784660925315\",\"description\":\"phales@trivir.com's Frodo Service Account\",\"scopes\":[\"fr:am:*\",\"fr:idc:analytics:*\",\"fr:idc:certificate:*\",\"fr:idc:content-security-policy:*\",\"fr:idc:cookie-domain:*\",\"fr:idc:custom-domain:*\",\"fr:idc:dataset:*\",\"fr:idc:esv:*\",\"fr:idm:*\",\"fr:idc:promotion:*\",\"fr:idc:release:*\",\"fr:idc:sso-cookie:*\",\"fr:idc:telemetry:*\"],\"jwks\":\"{\\\"keys\\\":[{\\\"kty\\\":\\\"RSA\\\",\\\"kid\\\":\\\"8GP2_8kFC4G22JXxDAz4RX0ZfNB7LHTgMcrCcpRLKtU\\\",\\\"alg\\\":\\\"RS256\\\",\\\"e\\\":\\\"AQAB\\\",\\\"n\\\":\\\"5mHyhvq1p_5h8BF8AYjZdx8L812q0ddyNlM9Cfy-upkOAO1Bx5SI8X8WkoHX2r90INRBCIPh5sqOm_vUZIE4fdzX54Bsa35V3z9S8JcHAte0uyM3SkFP3bYwzV3iRDgg5-naUqRPSoaORsj-SxeT3o8n04kuvg9MwwIOWuOx0fKtEQdJXTzeiAhRbUEQUYGlDdAC6Gz-L16OMgLWUhX-eiLHGjarm6wq-brnrfdDZqJ2XfAeZ04QIFpEl7kOh1Mhj7MZMx-LZy7itR7xG1nd_nE-ZP6-O_3mgWxWxISP-3AXjD1MOPl5z7c_T89TYIAM8oHSf-1fkNkWgwA8G0frdh2EKeOFexKGjPQO3aNPeYWBaGJ1NQHij-RmtXstHX3-qiy32NT2sheMgNcSfmlPQqAEhU3Md45JUFyBacgbJEYq6ygQUSvyNGAeQVEMJ8VBWa6jvuqKXGYVIaNvn-7CWYDhJBKHJXtqfhXndGCBf_6VMqpWfEBB2awzpep0knZTKggZp-ppDJAjrm_RntFEgEIOoc69CekpU9oNV9cFFL6nl3oPNq1Qw1tkjtpJSbLwQAYNyo1qy1Z95xWt4TcOe7EvlSRMOUuREUYc0IUOJfvXeJbSe0BcWUXG_7Vi8W3jyjTZIt9KrATt6jx09EbtzzgVfk2IJhWmPd0H3Y-Rohc\\\"}]}\",\"maxCachingTime\":\"15\",\"maxIdleTime\":\"15\",\"maxSessionTime\":\"15\",\"quotaLimit\":\"5\"}" + }, + "cookies": [], + "headers": [ + { + "name": "date", + "value": "" + }, + { + "name": "vary", + "value": "Origin" + }, + { + "name": "cache-control", + "value": "no-store" + }, + { + "name": "content-security-policy", + "value": "default-src 'none';frame-ancestors 'none';sandbox" + }, + { + "name": "content-type", + "value": "application/json;charset=utf-8" + }, + { + "name": "cross-origin-opener-policy", + "value": "same-origin" + }, + { + "name": "cross-origin-resource-policy", + "value": "same-origin" + }, + { + "name": "etag", + "value": "" + }, + { + "name": "expires", + "value": "0" + }, + { + "name": "pragma", + "value": "no-cache" + }, + { + "name": "x-content-type-options", + "value": "nosniff" + }, + { + "name": "x-frame-options", + "value": "DENY" + }, + { + "name": "content-length", + "value": "1394" + }, + { + "name": "x-forgerock-transactionid", + "value": "" + }, + { + "name": "strict-transport-security", + "value": "max-age=31536000; includeSubDomains; preload;" + }, + { + "name": "x-robots-tag", + "value": "none" + }, + { + "name": "via", + "value": "" + }, + { + "name": "alt-svc", + "value": "" + } + ], + "headersSize": 658, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-08-18T21:10:36.651Z", + "time": 104, + "timings": { + "blocked": -1, + "connect": -1, + "dns": -1, + "receive": 0, + "send": 0, + "ssl": -1, + "wait": 104 + } + } + ], + "pages": [], + "version": "1.2" + } +}