From eef007ec56f51678d97e1cc419e28070c9bb4a4f Mon Sep 17 00:00:00 2001 From: Chris Parker Date: Mon, 9 Dec 2024 09:29:18 -0700 Subject: [PATCH 1/2] add new option to separate managed objects into individual files --- src/cli/config/config-export.ts | 7 ++ src/cli/idm/idm-export.ts | 8 +++ src/ops/ConfigOps.ts | 19 ++++- src/ops/IdmOps.ts | 119 +++++++++++++++++++++++++++++++- src/utils/Config.ts | 9 ++- 5 files changed, 157 insertions(+), 5 deletions(-) diff --git a/src/cli/config/config-export.ts b/src/cli/config/config-export.ts index a899c75c6..30516f647 100644 --- a/src/cli/config/config-export.ts +++ b/src/cli/config/config-export.ts @@ -67,6 +67,12 @@ export default function setup() { 'Export sync.idm.json mappings separately in their own directory. Ignored with -a.' ) ) + .addOption( + new Option( + '-o, --separate-objects', + 'Export managed.idm.json objects separately in their own directory. Ignored with -a.' + ) + ) .addOption( new Option( '--include-active-values', @@ -145,6 +151,7 @@ export default function setup() { const outcome = await exportEverythingToFiles( options.extract, options.separateMappings, + options.separateObjects, options.metadata, { useStringArrays: options.useStringArrays, diff --git a/src/cli/idm/idm-export.ts b/src/cli/idm/idm-export.ts index 8dd61dbf9..1ed3ced81 100644 --- a/src/cli/idm/idm-export.ts +++ b/src/cli/idm/idm-export.ts @@ -55,6 +55,12 @@ export default function setup() { 'Export sync.idm.json mappings separately in their own directory. Ignored with -a.' ) ) + .addOption( + new Option( + '-o, --separate-objects', + 'Export managed.idm.json objects separately in their own directory. Ignored with -a.' + ) + ) .addOption( new Option( '-N, --no-metadata', @@ -95,6 +101,7 @@ export default function setup() { options.file, options.envFile, options.separateMappings, + options.separateObjects, options.metadata ); if (!outcome) process.exitCode = 1; @@ -136,6 +143,7 @@ export default function setup() { options.entitiesFile, options.envFile, options.separateMappings, + options.separateObjects, options.metadata ); if (!outcome) process.exitCode = 1; diff --git a/src/ops/ConfigOps.ts b/src/ops/ConfigOps.ts index c67372af5..aca2a1e9c 100644 --- a/src/ops/ConfigOps.ts +++ b/src/ops/ConfigOps.ts @@ -17,6 +17,7 @@ import { } from '../utils/Config'; import { cleanupProgressIndicators, printError } from '../utils/Console'; import { saveServersToFiles } from './classic/ServerOps'; +import { ManagedSkeleton, writeManagedJsonToDirectory } from './IdmOps'; import { writeSyncJsonToDirectory } from './MappingOps'; import { extractScriptsToFiles } from './ScriptOps'; @@ -72,6 +73,7 @@ export async function exportEverythingToFile( * Export everything to separate files * @param {boolean} extract Extracts the scripts from the exports into separate files if true * @param {boolean} separateMappings separate sync.idm.json mappings if true, otherwise keep them in a single file + * @param {boolean} separateObjects separate managed.idm.json objects if true, otherwise keep them in a single file * @param {boolean} includeMeta true to include metadata, false otherwise. Default: true * @param {FullExportOptions} options export options * @return {Promise} a promise that resolves to true if successful, false otherwise @@ -79,6 +81,7 @@ export async function exportEverythingToFile( export async function exportEverythingToFiles( extract: boolean = false, separateMappings: boolean = false, + separateObjects: boolean = false, includeMeta: boolean = true, options: FullExportOptions = { useStringArrays: true, @@ -106,7 +109,8 @@ export async function exportEverythingToFiles( `${baseDirectory}/global`, includeMeta, extract, - separateMappings + separateMappings, + separateObjects ) ); Object.entries(exportData.realm).forEach(([realm, data]: [string, any]) => @@ -118,7 +122,8 @@ export async function exportEverythingToFiles( `${baseDirectory}/realm/${realm}`, includeMeta, extract, - separateMappings + separateMappings, + separateObjects ) ) ); @@ -141,6 +146,7 @@ export async function exportEverythingToFiles( * @param {boolean} includeMeta true to include metadata, false otherwise. Default: true * @param {boolean} extract Extracts the scripts from the exports into separate files if true * @param {boolean} separateMappings separate sync.idm.json mappings if true, otherwise keep them in a single file + * @param {boolean} separateObjects separate managed.idm.json objects if true, otherwise keep them in a single file */ function exportItem( exportData, @@ -149,7 +155,8 @@ function exportItem( baseDirectory, includeMeta, extract, - separateMappings = false + separateMappings = false, + separateObjects = false ) { if (!obj || !Object.keys(obj).length) { return; @@ -253,6 +260,12 @@ function exportItem( `${baseDirectory.substring(getWorkingDirectory(false).length + 1)}/${fileType}/sync`, includeMeta ); + } else if (separateObjects && id === 'managed') { + writeManagedJsonToDirectory( + value as ManagedSkeleton, + `${baseDirectory.substring(getWorkingDirectory(false).length + 1)}/${fileType}/managed`, + includeMeta + ); } else { const filename = `${id}.idm.json`; if (filename.includes('/')) { diff --git a/src/ops/IdmOps.ts b/src/ops/IdmOps.ts index fd7d40596..7894ffcb9 100644 --- a/src/ops/IdmOps.ts +++ b/src/ops/IdmOps.ts @@ -6,6 +6,7 @@ import fs from 'fs'; import path from 'path'; import propertiesReader from 'properties-reader'; +import { extractDataToFile, getExtractedJsonData } from '../utils/Config'; import { createProgressIndicator, printError, @@ -77,12 +78,21 @@ export async function listAllConfigEntities(): Promise { return false; } +type ObjectSkeleton = IdObjectSkeletonInterface & { + name: string; +}; + +export type ManagedSkeleton = IdObjectSkeletonInterface & { + objects: ObjectSkeleton[]; +}; + /** * Export an IDM configuration object. * @param {string} id the desired configuration object * @param {string} file optional export file name (or directory name if exporting mappings separately) * @param {string} envFile File that defines environment specific variables for replacement during configuration export/import * @param {boolean} separateMappings separate sync.idm.json mappings if true (and id is "sync"), otherwise keep them in a single file + * @param {boolean} separateObjects separate managed.idm.json objects if true (and id is "managed"), otherwise keep them in a single file * @param {boolean} includeMeta true to include metadata, false otherwise. Default: true * @return {Promise} a promise that resolves to true if successful, false otherwise */ @@ -91,6 +101,7 @@ export async function exportConfigEntityToFile( file?: string, envFile?: string, separateMappings: boolean = false, + separateObjects: boolean = false, includeMeta: boolean = true ): Promise { try { @@ -107,6 +118,14 @@ export async function exportConfigEntityToFile( ); return true; } + if (separateObjects && id === 'managed') { + writeManagedJsonToDirectory( + exportData.idm[id] as ManagedSkeleton, + file, + includeMeta + ); + return true; + } let fileName = file; if (!fileName) { fileName = getTypedFilename(`${id}`, 'idm'); @@ -156,12 +175,14 @@ export async function exportAllConfigEntitiesToFile( * @param {string} entitiesFile JSON file that specifies the config entities to export/import * @param {string} envFile File that defines environment specific variables for replacement during configuration export/import * @param {boolean} separateMappings separate sync.idm.json mappings if true, otherwise keep them in a single file + * @param {boolean} separateObjects separate managed.idm.json objects if true, otherwise keep them in a single file * @return {Promise} a promise that resolves to true if successful, false otherwise */ export async function exportAllConfigEntitiesToFiles( entitiesFile?: string, envFile?: string, separateMappings: boolean = false, + separateObjects: boolean = false, includeMeta: boolean = true ): Promise { const errors: Error[] = []; @@ -177,6 +198,14 @@ export async function exportAllConfigEntitiesToFiles( writeSyncJsonToDirectory(obj as SyncSkeleton, 'sync', includeMeta); continue; } + if (separateObjects && id === 'managed') { + writeManagedJsonToDirectory( + obj as ManagedSkeleton, + 'managed', + includeMeta + ); + continue; + } saveToFile( 'idm', obj, @@ -232,6 +261,14 @@ export async function importConfigEntityByIdFromFile( }, ]); importData = { idm: { sync: syncData } }; + } else if (entityId === 'managed') { + const managedData = getManagedObjectsFromFiles([ + { + content: fileData, + path: `${filePath.substring(0, filePath.lastIndexOf('/'))}/managed.idm.json`, + }, + ]); + importData = { idm: { managed: managedData } }; } else { importData = JSON.parse(fileData); } @@ -292,6 +329,14 @@ export async function importFirstConfigEntityFromFile( }, ]); } + if (entityId === 'managed') { + importData.idm.managed = getManagedObjectsFromFiles([ + { + content: fileData, + path: `${filePath.substring(0, filePath.lastIndexOf('/'))}/managed.idm.json`, + }, + ]); + } const options = getIdmImportExportOptions(undefined, envFile); @@ -434,9 +479,13 @@ export async function getIdmImportDataFromIdmDirectory( ); // Process sync mapping file(s) importData.idm.sync = getLegacyMappingsFromFiles(idmConfigFiles); + importData.idm.managed = getManagedObjectsFromFiles(idmConfigFiles); // Process other files for (const f of idmConfigFiles.filter( - (f) => !f.path.endsWith('sync.idm.json') && f.path.endsWith('.idm.json') + (f) => + !f.path.endsWith('sync.idm.json') && + !f.path.endsWith('managed.idm.json') && + f.path.endsWith('.idm.json') )) { const entities = Object.values( JSON.parse(f.content).idm @@ -483,3 +532,71 @@ function getIdmImportExportOptions( envReplaceParams, }; } + +/** + * Helper that writes mappings in a managed.idm.json config entity to a directory + * @param managed The managed.idm.json config entity + * @param directory The directory to save the mappings + */ +export function writeManagedJsonToDirectory( + managed: ManagedSkeleton, + directory: string = 'managed', + includeMeta: boolean = true +) { + const objectPaths = []; + for (const object of managed.objects) { + const fileName = getTypedFilename(object.name, 'managed'); + objectPaths.push(extractDataToFile(object, fileName, directory)); + } + managed.objects = objectPaths; + saveToFile( + 'idm', + managed, + '_id', + getFilePath(`${directory}/managed.idm.json`, true), + includeMeta + ); +} + +/** + * Helper that returns the managed.idm.json object containing all the mappings in it by looking through the files + * + * @param files the files to get managed.idm.json object from + * @returns the managed.idm.json object + */ +export function getManagedObjectsFromFiles( + files: { path: string; content: string }[] +): ManagedSkeleton { + const managedFiles = files.filter((f) => + f.path.endsWith('/managed.idm.json') + ); + if (managedFiles.length > 1) { + throw new FrodoError( + 'Multiple managed.idm.json files found in idm directory' + ); + } + const managed = { + _id: 'managed', + objects: [], + }; + if (managedFiles.length === 1) { + const jsonData = JSON.parse(managedFiles[0].content); + const managedData = jsonData.managed + ? jsonData.managed + : jsonData.idm.managed; + const managedJsonDir = managedFiles[0].path.substring( + 0, + managedFiles[0].path.indexOf('/managed.idm.json') + ); + if (managedData.objects) { + for (const object of managedData.objects) { + if (typeof object === 'string') { + managed.objects.push(getExtractedJsonData(object, managedJsonDir)); + } else { + managed.objects.push(object); + } + } + } + } + return managed; +} diff --git a/src/utils/Config.ts b/src/utils/Config.ts index d84e8a54c..c5eca62e5 100644 --- a/src/utils/Config.ts +++ b/src/utils/Config.ts @@ -9,6 +9,7 @@ import fs from 'fs'; import os from 'os'; import { readServersFromFiles } from '../ops/classic/ServerOps'; +import { getManagedObjectsFromFiles } from '../ops/IdmOps'; import { getLegacyMappingsFromFiles } from '../ops/MappingOps'; import { getScriptExportByScriptFile } from '../ops/ScriptOps'; import { printMessage } from './Console'; @@ -159,7 +160,9 @@ export async function getConfig( !f.path.endsWith('.script.json') && !f.path.endsWith('.server.json') && !f.path.endsWith('/sync.idm.json') && - !f.path.endsWith('sync.json') + !f.path.endsWith('sync.json') && + !f.path.endsWith('/managed.idm.json') && + !f.path.endsWith('managed.json') ); // Handle all other json files for (const f of allOtherFiles) { @@ -183,6 +186,10 @@ export async function getConfig( if (sync.mappings.length > 0) { (exportConfig as FullGlobalExportInterface).sync = sync; } + const managed = await getManagedObjectsFromFiles(jsonFiles); + if (managed.objects.length > 0) { + (exportConfig as FullGlobalExportInterface).idm.managed = managed; + } // Handle saml files if ( samlFiles.length > 0 && From 5e7130231a19b5818488a51413652327ce6d6bc0 Mon Sep 17 00:00:00 2001 From: Chris Parker Date: Mon, 9 Dec 2024 09:29:55 -0700 Subject: [PATCH 2/2] update tests --- .../__snapshots__/config-export.test.js.snap | 3 + .../en/__snapshots__/idm-export.test.js.snap | 3 + .../config-export.e2e.test.js.snap | 78014 ++++++++++++++++ .../__snapshots__/idm-export.e2e.test.js.snap | 16105 ++++ test/e2e/config-export.e2e.test.js | 9 +- .../cloud/global/idm/managed.idm.json | 5677 -- .../managed/alpha_application.managed.json | 275 + .../idm/managed/alpha_assignment.managed.json | 223 + .../idm/managed/alpha_group.managed.json | 123 + .../managed/alpha_organization.managed.json | 345 + .../idm/managed/alpha_role.managed.json | 219 + .../idm/managed/alpha_user.managed.json | 1443 + .../managed/bravo_application.managed.json | 275 + .../idm/managed/bravo_assignment.managed.json | 223 + .../idm/managed/bravo_group.managed.json | 123 + .../managed/bravo_organization.managed.json | 345 + .../idm/managed/bravo_role.managed.json | 219 + .../idm/managed/bravo_user.managed.json | 1443 + .../cloud/global/idm/managed/managed.idm.json | 21 + test/e2e/idm-export.e2e.test.js | 15 +- .../am_1076162899/recording.har | 67462 +++++++++++++ .../environment_1072573434/recording.har | 212 + .../oauth2_393036114/recording.har | 146 + .../openidm_3290118515/recording.har | 10908 +++ .../saml2_3242371462/recording.har | 304 + .../am_1076162899/recording.har | 312 + .../oauth2_393036114/recording.har | 146 + .../openidm_3290118515/recording.har | 10316 ++ 28 files changed, 189226 insertions(+), 5683 deletions(-) delete mode 100644 test/e2e/exports/all-separate/cloud/global/idm/managed.idm.json create mode 100644 test/e2e/exports/all-separate/cloud/global/idm/managed/alpha_application.managed.json create mode 100644 test/e2e/exports/all-separate/cloud/global/idm/managed/alpha_assignment.managed.json create mode 100644 test/e2e/exports/all-separate/cloud/global/idm/managed/alpha_group.managed.json create mode 100644 test/e2e/exports/all-separate/cloud/global/idm/managed/alpha_organization.managed.json create mode 100644 test/e2e/exports/all-separate/cloud/global/idm/managed/alpha_role.managed.json create mode 100644 test/e2e/exports/all-separate/cloud/global/idm/managed/alpha_user.managed.json create mode 100644 test/e2e/exports/all-separate/cloud/global/idm/managed/bravo_application.managed.json create mode 100644 test/e2e/exports/all-separate/cloud/global/idm/managed/bravo_assignment.managed.json create mode 100644 test/e2e/exports/all-separate/cloud/global/idm/managed/bravo_group.managed.json create mode 100644 test/e2e/exports/all-separate/cloud/global/idm/managed/bravo_organization.managed.json create mode 100644 test/e2e/exports/all-separate/cloud/global/idm/managed/bravo_role.managed.json create mode 100644 test/e2e/exports/all-separate/cloud/global/idm/managed/bravo_user.managed.json create mode 100644 test/e2e/exports/all-separate/cloud/global/idm/managed/managed.idm.json create mode 100644 test/e2e/mocks/config_603940551/export_4211608755/0_all-separate_no-metadata_default_directory_use-string-arrays_no-decode_no-coords_extrac_2569379977/am_1076162899/recording.har create mode 100644 test/e2e/mocks/config_603940551/export_4211608755/0_all-separate_no-metadata_default_directory_use-string-arrays_no-decode_no-coords_extrac_2569379977/environment_1072573434/recording.har create mode 100644 test/e2e/mocks/config_603940551/export_4211608755/0_all-separate_no-metadata_default_directory_use-string-arrays_no-decode_no-coords_extrac_2569379977/oauth2_393036114/recording.har create mode 100644 test/e2e/mocks/config_603940551/export_4211608755/0_all-separate_no-metadata_default_directory_use-string-arrays_no-decode_no-coords_extrac_2569379977/openidm_3290118515/recording.har create mode 100644 test/e2e/mocks/config_603940551/export_4211608755/0_all-separate_no-metadata_default_directory_use-string-arrays_no-decode_no-coords_extrac_2569379977/saml2_3242371462/recording.har create mode 100644 test/e2e/mocks/idm_2060434423/export_4211608755/0_all-separate_no-metadata_separate-objects_directory_2904376520/am_1076162899/recording.har create mode 100644 test/e2e/mocks/idm_2060434423/export_4211608755/0_all-separate_no-metadata_separate-objects_directory_2904376520/oauth2_393036114/recording.har create mode 100644 test/e2e/mocks/idm_2060434423/export_4211608755/0_all-separate_no-metadata_separate-objects_directory_2904376520/openidm_3290118515/recording.har diff --git a/test/client_cli/en/__snapshots__/config-export.test.js.snap b/test/client_cli/en/__snapshots__/config-export.test.js.snap index 0027fa6d0..6f647572a 100644 --- a/test/client_cli/en/__snapshots__/config-export.test.js.snap +++ b/test/client_cli/en/__snapshots__/config-export.test.js.snap @@ -93,6 +93,9 @@ Options: positions of the journey/tree nodes. --no-decode Do not include decoded variable value in variable export + -o, --separate-objects Export managed.idm.json objects + separately in their own directory. + Ignored with -a. -s, --separate-mappings Export sync.idm.json mappings separately in their own directory. Ignored with -a. --sa-id Service account id. diff --git a/test/client_cli/en/__snapshots__/idm-export.test.js.snap b/test/client_cli/en/__snapshots__/idm-export.test.js.snap index 6b10bab8e..da40cbe0c 100644 --- a/test/client_cli/en/__snapshots__/idm-export.test.js.snap +++ b/test/client_cli/en/__snapshots__/idm-export.test.js.snap @@ -92,6 +92,9 @@ Options: -N, --no-metadata Does not include metadata in the export file. --no-cache Disable token cache for this operation. + -o, --separate-objects Export managed.idm.json objects + separately in their own directory. + Ignored with -a. -s, --separate-mappings Export sync.idm.json mappings separately in their own directory. Ignored with -a. --sa-id Service account id. diff --git a/test/e2e/__snapshots__/config-export.e2e.test.js.snap b/test/e2e/__snapshots__/config-export.e2e.test.js.snap index 20884724f..c50316d5d 100644 --- a/test/e2e/__snapshots__/config-export.e2e.test.js.snap +++ b/test/e2e/__snapshots__/config-export.e2e.test.js.snap @@ -208444,6 +208444,78020 @@ exports[`frodo config export "frodo config export --all-separate --no-metadata - } `; +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays 1`] = `""`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/emailTemplate/baselineDemoEmailVerification.emailTemplate.json 1`] = ` +{ + "emailTemplate": { + "baselineDemoEmailVerification": { + "_id": "emailTemplate/baselineDemoEmailVerification", + "defaultLocale": "en", + "displayName": "Baseline Demo Email Verification", + "enabled": true, + "from": "security@example.com", + "html": { + "en": "

Email Verification


Hello,

Great to have you on board.



Verify Your Account

Finish the steps of verification for the account by clicking the button below.


Click Here to Verify Your Account

This link will expire in 24 hours.


-- The ForgeRock Team

www.forgerock.com

201 Mission St Suite 2900

San Francisco, CA 94105

support@forgerock.com


If you did not request for this email, please ignore and we won't email you again.

ForgeRock | Privacy Policy

", + }, + "message": { + "en": "

Email Verification


Hello,

Great to have you on board.



Verify Your Account

Finish the steps of verfication for the account by clicking the button below.


Click Here to Verify Your Account

This link will expire in 24 hours.


-- The ForgeRock Team

www.forgerock.com

201 Mission St Suite 2900

San Francisco, CA 94105

support@forgerock.com


If you did not request for this email, please ignore and we won't email you again.

ForgeRock | Privacy Policy

", + }, + "mimeType": "text/html", + "styles": "body { + background-color: #f6f6f6; + color: #455469; + padding: 60px; + text-align: center +} + a { + text-decoration: none; + color: #109cf1; +} + h1 { + font-size: 40px; + text-align: center; +} + h2 { + font-size: 36px; +} + h3 { + font-size: 32px; +} + h4 { + font-size: 28px; +} + h5 { + font-size: 24px; +} + h6 { + font-size: 20px; +} + .content { + background-color: #fff; + border-radius: 4px; + margin: 0 auto; + padding: 48px; + width: 600px +} + .button { + background-color: #109cf1; + border: none; + color: white; + padding: 15px 32px; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 16px; +} + ", + "subject": { + "en": "Please verify your email address", + }, + "templateId": "baselineDemoEmailVerification", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/emailTemplate/baselineDemoMagicLink.emailTemplate.json 1`] = ` +{ + "emailTemplate": { + "baselineDemoMagicLink": { + "_id": "emailTemplate/baselineDemoMagicLink", + "defaultLocale": "en", + "displayName": "Baseline Demo Magic Link", + "enabled": true, + "from": "security@example.com", + "html": { + "en": "

Welcome back


Hello,

You're receiving this email because you requested a link to sign you into your account.



Finish Signing In

This link will expire in 24 hours.


-- The ForgeRock Team

www.forgerock.com

201 Mission St Suite 2900

San Francisco, CA 94105

support@forgerock.com


If you did not request for this email, please ignore and we won't email you again.

ForgeRock | Privacy Policy

", + }, + "message": { + "en": "

Welcome back


Hello,

You're receiving this email because you requested a link to sign you into your account.



Finish Signing In

This link will expire in 24 hours.


-- The ForgeRock Team

www.forgerock.com

201 Mission St Suite 2900

San Francisco, CA 94105

support@forgerock.com


If you did not request for this email, please ignore and we won't email you again.

ForgeRock | Privacy Policy

", + }, + "mimeType": "text/html", + "styles": "body { + background-color: #f6f6f6; + color: #455469; + padding: 60px; + text-align: center +} + a { + text-decoration: none; + color: #109cf1; +} + h1 { + font-size: 40px; + text-align: center; +} + h2 { + font-size: 36px; +} + h3 { + font-size: 32px; +} + h4 { + font-size: 28px; +} + h5 { + font-size: 24px; +} + h6 { + font-size: 20px; +} + .content { + background-color: #fff; + border-radius: 4px; + margin: 0 auto; + padding: 48px; + width: 600px +} + .button { + background-color: #109cf1; + border: none; + color: white; + padding: 15px 32px; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 16px; +} + ", + "subject": { + "en": "Your sign-in link", + }, + "templateId": "baselineDemoMagicLink", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/emailTemplate/deleteTemplate.emailTemplate.json 1`] = ` +{ + "emailTemplate": { + "deleteTemplate": { + "_id": "emailTemplate/deleteTemplate", + "defaultLocale": "en", + "description": "", + "displayName": "deleteTemplate", + "enabled": true, + "from": "", + "html": { + "en": "

alt text

Email Title

Message text lorem ipsum dolor sit amet consectetur adipisicing elit sed do eiusmod tempor.

", + }, + "message": { + "en": "

alt text

Email Title

Message text lorem ipsum dolor sit amet consectetur adipisicing elit sed do eiusmod tempor.

", + }, + "mimeType": "text/html", + "styles": "body { + background-color: #324054; + color: #455469; + padding: 60px; + text-align: center +} + a { + text-decoration: none; + color: #109cf1; +} + .content { + background-color: #fff; + border-radius: 4px; + margin: 0 auto; + padding: 48px; + width: 235px +} +", + "subject": { + "en": "", + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/emailTemplate/forgottenUsername.emailTemplate.json 1`] = ` +{ + "emailTemplate": { + "forgottenUsername": { + "_id": "emailTemplate/forgottenUsername", + "defaultLocale": "en", + "enabled": true, + "from": "", + "html": { + "en": "{{#if object.userName}}

Your username is '{{object.userName}}'.

{{else}}If you received this email in error, please disregard.{{/if}}

Click here to login

", + "fr": "{{#if object.userName}}

Votre nom d'utilisateur est '{{object.userName}}'.

{{else}}Si vous avez reçu cet e-mail par erreur, veuillez ne pas en tenir compte.{{/if}}

Cliquez ici pour vous connecter

", + }, + "message": { + "en": "

{{#if object.userName}}Your username is '{{object.userName}}'.

{{else}}If you received this email in error, please disregard.{{/if}}

Click here to login

", + "fr": "
{{#if object.userName}}

Votre nom d'utilisateur est '{{object.userName}}'.

{{else}}Si vous avez reçu cet e-mail par erreur, veuillez ne pas en tenir compte.{{/if}}

Cliquez ici pour vous connecter

", + }, + "mimeType": "text/html", + "styles": "body{background-color:#324054;color:#5e6d82;padding:60px;text-align:center}a{text-decoration:none;color:#109cf1}.content{background-color:#fff;border-radius:4px;margin:0 auto;padding:48px;width:235px}", + "subject": { + "en": "Account Information - username", + "fr": "Informations sur le compte - nom d'utilisateur", + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/emailTemplate/frEmailUpdated.emailTemplate.json 1`] = ` +{ + "emailTemplate": { + "frEmailUpdated": { + "_id": "emailTemplate/frEmailUpdated", + "defaultLocale": "en", + "enabled": true, + "from": "", + "message": { + "en": "
ForgeRock Logo

Your account email has changed

Your ForgeRock Identity Cloud email has been changed. If you did not request this change, please contact ForgeRock support.

Thanks,
The ForgeRock Team

© 2001-{{ object.currentYear }} ForgeRock Inc®, All Rights Reserved.
201 Mission St Suite 2900, San Francisco, CA 94105
Privacy Policy
", + }, + "mimeType": "text/html", + "subject": { + "en": "Your email has been updated", + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/emailTemplate/frForgotUsername.emailTemplate.json 1`] = ` +{ + "emailTemplate": { + "frForgotUsername": { + "_id": "emailTemplate/frForgotUsername", + "defaultLocale": "en", + "enabled": true, + "from": "", + "message": { + "en": "
ForgeRock Logo

Forgot your username?

Your username is {{ object.userName }}.

Sign In to Your Account

If you didn't request this, please ignore this email.

Thanks,
The ForgeRock Team

© 2001-{{ object.currentYear }} ForgeRock Inc®, All Rights Reserved.
201 Mission St Suite 2900, San Francisco, CA 94105
Privacy Policy
", + }, + "mimeType": "text/html", + "subject": { + "en": "Forgot Username", + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/emailTemplate/frOnboarding.emailTemplate.json 1`] = ` +{ + "emailTemplate": { + "frOnboarding": { + "_id": "emailTemplate/frOnboarding", + "defaultLocale": "en", + "enabled": true, + "from": "", + "message": { + "en": "
ForgeRock Logo

Your account is ready

Your ForgeRock Identity Cloud account is ready. Click the button below to complete registration and access your environment.

Complete Registration

If you did not request this account, please contact ForgeRock support.

Thanks,
The ForgeRock Team

© 2001-{{ object.currentYear }} ForgeRock Inc®, All Rights Reserved.
201 Mission St Suite 2900, San Francisco, CA 94105
Privacy Policy
", + }, + "mimeType": "text/html", + "subject": { + "en": "Complete your ForgeRock Identity Cloud registration", + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/emailTemplate/frPasswordUpdated.emailTemplate.json 1`] = ` +{ + "emailTemplate": { + "frPasswordUpdated": { + "_id": "emailTemplate/frPasswordUpdated", + "defaultLocale": "en", + "enabled": true, + "from": "", + "message": { + "en": "
ForgeRock Logo

Your account password has changed

Your ForgeRock Identity Cloud password has been changed. If you did not request this change, please contact ForgeRock support.

Thanks,
The ForgeRock Team

© 2001-{{ object.currentYear }} ForgeRock Inc®, All Rights Reserved.
201 Mission St Suite 2900, San Francisco, CA 94105
Privacy Policy
", + }, + "mimeType": "text/html", + "subject": { + "en": "Your password has been updated", + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/emailTemplate/frProfileUpdated.emailTemplate.json 1`] = ` +{ + "emailTemplate": { + "frProfileUpdated": { + "_id": "emailTemplate/frProfileUpdated", + "defaultLocale": "en", + "enabled": true, + "from": "", + "message": { + "en": "
ForgeRock Logo

Your account profile has changed

Your ForgeRock Identity Cloud profile has been changed. If you did not request this change, please contact ForgeRock support.

Thanks,
The ForgeRock Team

© 2001-{{ object.currentYear }} ForgeRock Inc®, All Rights Reserved.
201 Mission St Suite 2900, San Francisco, CA 94105
Privacy Policy
", + }, + "mimeType": "text/html", + "subject": { + "en": "Your profile has been updated", + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/emailTemplate/frResetPassword.emailTemplate.json 1`] = ` +{ + "emailTemplate": { + "frResetPassword": { + "_id": "emailTemplate/frResetPassword", + "defaultLocale": "en", + "enabled": true, + "from": "", + "message": { + "en": "
ForgeRock Logo

Reset your password

It seems you have forgotten the password for your ForgeRock Identity Cloud account. Click the button below to reset your password and access your environment.

Reset Password

If you did not request to reset your password, please contact ForgeRock support.

Thanks,
The ForgeRock Team

© 2001-{{ object.currentYear }} ForgeRock Inc®, All Rights Reserved.
201 Mission St Suite 2900, San Francisco, CA 94105
Privacy Policy
", + }, + "mimeType": "text/html", + "subject": { + "en": "Reset your password", + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/emailTemplate/frUsernameUpdated.emailTemplate.json 1`] = ` +{ + "emailTemplate": { + "frUsernameUpdated": { + "_id": "emailTemplate/frUsernameUpdated", + "defaultLocale": "en", + "enabled": true, + "from": "", + "message": { + "en": "
ForgeRock Logo

Your account username has changed

Your ForgeRock Identity Cloud username has been changed. If you did not request this change, please contact ForgeRock support.

Thanks,
The ForgeRock Team

© 2001-{{ object.currentYear }} ForgeRock Inc®, All Rights Reserved.
201 Mission St Suite 2900, San Francisco, CA 94105
Privacy Policy
", + }, + "mimeType": "text/html", + "subject": { + "en": "Your username has been updated", + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/emailTemplate/idv.emailTemplate.json 1`] = ` +{ + "emailTemplate": { + "idv": { + "_id": "emailTemplate/idv", + "defaultLocale": "en", + "description": "Identity Verification Invitation", + "displayName": "idv", + "enabled": true, + "from": "", + "html": { + "en": "

Click the link below to verify your identity:

Verify my identity now

", + "fr": "

Ceci est votre mail d'inscription.

Lien de vérification email

", + }, + "message": { + "en": "

Click the link below to verify your identity:

Verify my identity now

", + "fr": "

Ceci est votre mail d'inscription.

Lien de vérification email

", + }, + "mimeType": "text/html", + "name": "registration", + "styles": "body{background-color:#324054;color:#5e6d82;padding:60px;text-align:center}a{text-decoration:none;color:#109cf1}.content{background-color:#fff;border-radius:4px;margin:0 auto;padding:48px;width:235px}", + "subject": { + "en": "You have been invited to verify your identity", + "fr": "Créer un nouveau compte", + }, + "templateId": "idv", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/emailTemplate/joiner.emailTemplate.json 1`] = ` +{ + "emailTemplate": { + "joiner": { + "_id": "emailTemplate/joiner", + "advancedEditor": true, + "defaultLocale": "en", + "description": "This email will be sent onCreate of user to the external eMail address provided during creation. An OTP will also be sent to Telephone Number provided during creation to validate the user. The user will then be able to set their password and ForgeRock Push Authenticator", + "displayName": "Joiner", + "enabled": true, + "from": ""Encore HR" ", + "html": { + "en": "", + }, + "message": { + "en": " + + +
+

+ +

+

Welcome to Encore {{object.givenName}} {{object.sn}}

+

Please click on the link below to validate your phone number with a One Time Code that will be sent via SMS or called to you depending on your phone type.

+

You will see your UserName and have the ability to set your password that will be used to login to Encore resources.

+

As we believe in enhanced security, you will also be setting up a Push Notification for future use.

+ Click to Join Encore +
+ +", + }, + "mimeType": "text/html", + "styles": "body { + background-color: #324054; + color: #455469; + padding: 60px; + text-align: center +} + a { + text-decoration: none; + color: #109cf1; +} + .content { + background-color: #fff; + border-radius: 4px; + margin: 0 auto; + padding: 48px; + width: 235px +} + ", + "subject": { + "en": "Welcome to Encore!", + }, + "templateId": "joiner", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/emailTemplate/registerPasswordlessDevice.emailTemplate.json 1`] = ` +{ + "emailTemplate": { + "registerPasswordlessDevice": { + "_id": "emailTemplate/registerPasswordlessDevice", + "defaultLocale": "en", + "description": "", + "displayName": "Register Passwordless Device", + "enabled": true, + "from": ""ForgeRock Identity Cloud" ", + "html": { + "en": "

Welcome back

alt text


Hello,

You're receiving this email because you requested a link to register a new passwordless device.



Register New Device

This link will expire in 24 hours.


-- The ForgeRock Team

www.forgerock.com

201 Mission St Suite 2900

San Francisco, CA 94105

support@forgerock.com


If you did not request for this email, please ignore and we won't email you again.

ForgeRock | Privacy Policy

", + }, + "message": { + "en": "

Welcome back

alt text


Hello,

You're receiving this email because you requested a link to register a new passwordless device.



Register New Device

This link will expire in 24 hours.


-- The ForgeRock Team

www.forgerock.com

201 Mission St Suite 2900

San Francisco, CA 94105

support@forgerock.com


If you did not request for this email, please ignore and we won't email you again.

ForgeRock | Privacy Policy

", + }, + "mimeType": "text/html", + "styles": "body { + background-color: #324054; + color: #455469; + padding: 60px; + text-align: center +} + +a { + text-decoration: none; + color: #109cf1; +} + +.content { + background-color: #fff; + border-radius: 4px; + margin: 0 auto; + padding: 48px; + width: 235px +} +", + "subject": { + "en": "Your magic link is here - register new WebAuthN device", + }, + "templateId": "registerPasswordlessDevice", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/emailTemplate/registration.emailTemplate.json 1`] = ` +{ + "emailTemplate": { + "registration": { + "_id": "emailTemplate/registration", + "defaultLocale": "en", + "enabled": true, + "from": "", + "html": { + "en": "

This is your registration email.

Email verification link

", + "fr": "

Ceci est votre mail d'inscription.

Lien de vérification email

", + }, + "message": { + "en": "

This is your registration email.

Email verification link

", + "fr": "

Ceci est votre mail d'inscription.

Lien de vérification email

", + }, + "mimeType": "text/html", + "styles": "body{background-color:#324054;color:#5e6d82;padding:60px;text-align:center}a{text-decoration:none;color:#109cf1}.content{background-color:#fff;border-radius:4px;margin:0 auto;padding:48px;width:235px}", + "subject": { + "en": "Register new account", + "fr": "Créer un nouveau compte", + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/emailTemplate/resetPassword.emailTemplate.json 1`] = ` +{ + "emailTemplate": { + "resetPassword": { + "_id": "emailTemplate/resetPassword", + "defaultLocale": "en", + "enabled": true, + "from": "", + "message": { + "en": "

Click to reset your password

Password reset link

", + "fr": "

Cliquez pour réinitialiser votre mot de passe

Mot de passe lien de réinitialisation

", + }, + "mimeType": "text/html", + "subject": { + "en": "Reset your password", + "fr": "Réinitialisez votre mot de passe", + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/emailTemplate/updatePassword.emailTemplate.json 1`] = ` +{ + "emailTemplate": { + "updatePassword": { + "_id": "emailTemplate/updatePassword", + "defaultLocale": "en", + "enabled": true, + "from": "", + "html": { + "en": "

Verify email to update password

Update password link

", + }, + "message": { + "en": "

Verify email to update password

Update password link

", + }, + "mimeType": "text/html", + "styles": "body{background-color:#324054;color:#5e6d82;padding:60px;text-align:center}a{text-decoration:none;color:#109cf1}.content{background-color:#fff;border-radius:4px;margin:0 auto;padding:48px;width:235px}", + "subject": { + "en": "Update your password", + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/emailTemplate/welcome.emailTemplate.json 1`] = ` +{ + "emailTemplate": { + "welcome": { + "_id": "emailTemplate/welcome", + "defaultLocale": "en", + "enabled": true, + "from": "", + "html": { + "en": "

Welcome. Your username is '{{object.userName}}'.

", + }, + "message": { + "en": "

Welcome. Your username is '{{object.userName}}'.

", + }, + "mimeType": "text/html", + "styles": "body{background-color:#324054;color:#5e6d82;padding:60px;text-align:center}a{text-decoration:none;color:#109cf1}.content{background-color:#fff;border-radius:4px;margin:0 auto;padding:48px;width:235px}", + "subject": { + "en": "Your account has been created", + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/access.idm.json 1`] = ` +{ + "idm": { + "access": { + "_id": "access", + "configs": [ + { + "actions": "*", + "methods": "read", + "pattern": "info/*", + "roles": "*", + }, + { + "actions": "login,logout", + "methods": "read,action", + "pattern": "authentication", + "roles": "*", + }, + { + "actions": "*", + "methods": "read", + "pattern": "config/fidc/*", + "roles": "*", + }, + { + "actions": "*", + "methods": "*", + "pattern": "config/fidc/*", + "roles": "internal/role/openidm-admin", + }, + { + "actions": "*", + "methods": "read", + "pattern": "config/ui/themeconfig", + "roles": "*", + }, + { + "actions": "*", + "methods": "read", + "pattern": "config/ui/themerealm", + "roles": "*", + }, + { + "actions": "*", + "methods": "read", + "pattern": "config/uilocale/*", + "roles": "*", + }, + { + "actions": "*", + "methods": "read", + "pattern": "config/fieldPolicy/*", + "roles": "internal/role/openidm-authorized", + }, + { + "actions": "*", + "methods": "read", + "pattern": "info/uiconfig", + "roles": "*", + }, + { + "actions": "*", + "methods": "read", + "pattern": "config/ui/dashboard", + "roles": "internal/role/openidm-authorized", + }, + { + "actions": "*", + "methods": "query", + "pattern": "info/features", + "roles": "*", + }, + { + "actions": "listPrivileges", + "methods": "action", + "pattern": "privilege", + "roles": "*", + }, + { + "actions": "*", + "methods": "read", + "pattern": "privilege/*", + "roles": "*", + }, + { + "actions": "validate", + "methods": "action", + "pattern": "util/validateQueryFilter", + "roles": "internal/role/openidm-authorized", + }, + { + "actions": "*", + "customAuthz": "checkIfAnyFeatureEnabled('kba')", + "methods": "read", + "pattern": "selfservice/kba", + "roles": "internal/role/openidm-authorized", + }, + { + "actions": "*", + "methods": "read", + "pattern": "schema/*", + "roles": "internal/role/openidm-authorized", + }, + { + "actions": "*", + "methods": "action,query", + "pattern": "consent", + "roles": "internal/role/openidm-authorized", + }, + { + "actions": "*", + "excludePatterns": "repo,repo/*", + "methods": "*", + "pattern": "*", + "roles": "internal/role/openidm-admin", + }, + { + "actions": "", + "methods": "create,read,update,delete,patch,query", + "pattern": "system/*", + "roles": "internal/role/openidm-admin", + }, + { + "actions": "*", + "methods": "script", + "pattern": "system/*", + "roles": "internal/role/openidm-admin", + }, + { + "actions": "test,testConfig,createconfiguration,liveSync,authenticate", + "methods": "action", + "pattern": "system/*", + "roles": "internal/role/openidm-admin", + }, + { + "actions": "*", + "customAuthz": "disallowCommandAction()", + "methods": "*", + "pattern": "repo", + "roles": "internal/role/openidm-admin", + }, + { + "actions": "*", + "customAuthz": "disallowCommandAction()", + "methods": "*", + "pattern": "repo/*", + "roles": "internal/role/openidm-admin", + }, + { + "actions": "command", + "customAuthz": "request.additionalParameters.commandId === 'delete-mapping-links'", + "methods": "action", + "pattern": "repo/link", + "roles": "internal/role/openidm-admin", + }, + { + "methods": "create,read,query,patch", + "pattern": "managed/*", + "roles": "internal/role/platform-provisioning", + }, + { + "methods": "read,query", + "pattern": "internal/role/*", + "roles": "internal/role/platform-provisioning", + }, + { + "actions": "*", + "methods": "create,read,action,update", + "pattern": "profile/*", + "roles": "internal/role/platform-provisioning", + }, + { + "actions": "*", + "methods": "read,action", + "pattern": "policy/*", + "roles": "internal/role/platform-provisioning", + }, + { + "methods": "read", + "pattern": "schema/*", + "roles": "internal/role/platform-provisioning", + }, + { + "actions": "*", + "methods": "action,query", + "pattern": "consent", + "roles": "internal/role/platform-provisioning", + }, + { + "methods": "read", + "pattern": "selfservice/kba", + "roles": "internal/role/platform-provisioning", + }, + { + "methods": "read", + "pattern": "selfservice/terms", + "roles": "internal/role/platform-provisioning", + }, + { + "methods": "read", + "pattern": "identityProviders", + "roles": "internal/role/platform-provisioning", + }, + { + "actions": "sendTemplate", + "methods": "action", + "pattern": "external/email", + "roles": "internal/role/platform-provisioning", + }, + { + "actions": "authenticate", + "methods": "action", + "pattern": "system/*", + "roles": "internal/role/platform-provisioning", + }, + { + "actions": "*", + "methods": "read,action", + "pattern": "policy/*", + "roles": "internal/role/openidm-authorized", + }, + { + "actions": "*", + "methods": "read", + "pattern": "config/ui/*", + "roles": "internal/role/openidm-authorized", + }, + { + "actions": "bind,unbind", + "customAuthz": "ownDataOnly()", + "methods": "read,action,delete", + "pattern": "*", + "roles": "internal/role/openidm-authorized", + }, + { + "actions": "patch", + "customAuthz": "ownDataOnly() && onlyEditableManagedObjectProperties('user', [])", + "methods": "update,patch,action", + "pattern": "*", + "roles": "internal/role/openidm-authorized", + }, + { + "actions": "patch", + "customAuthz": "(request.resourcePath === 'selfservice/user/' + context.security.authorization.id) && onlyEditableManagedObjectProperties('user', [])", + "methods": "patch,action", + "pattern": "selfservice/user/*", + "roles": "internal/role/openidm-authorized", + }, + { + "actions": "patch", + "customAuthz": "isQueryOneOf({'managed/user': ['for-userName']}) && restrictPatchToFields(['password'])", + "methods": "patch,action", + "pattern": "managed/user", + "roles": "internal/role/openidm-cert", + }, + { + "actions": "*", + "customAuthz": "ownRelationshipProperty('_meta', false)", + "methods": "read", + "pattern": "internal/usermeta/*", + "roles": "internal/role/openidm-authorized", + }, + { + "actions": "*", + "customAuthz": "ownRelationshipProperty('_notifications', true)", + "methods": "read,delete", + "pattern": "internal/notification/*", + "roles": "internal/role/openidm-authorized", + }, + { + "actions": "*", + "customAuthz": "ownRelationshipCollection(['_meta','_notifications'])", + "methods": "read,query", + "pattern": "managed/user/*", + "roles": "internal/role/openidm-authorized", + }, + { + "actions": "", + "customAuthz": "ownDataOnly()", + "methods": "read,delete", + "pattern": "managed/alpha_user/*", + "roles": "internal/role/openidm-authorized", + }, + { + "actions": "patch", + "customAuthz": "ownDataOnly() && onlyEditableManagedObjectProperties('alpha_user', [])", + "methods": "update,patch,action", + "pattern": "managed/alpha_user/*", + "roles": "internal/role/openidm-authorized", + }, + { + "actions": "*", + "customAuthz": "ownRelationshipCollection(['_meta','_notifications'])", + "methods": "read,query", + "pattern": "managed/alpha_user/*", + "roles": "internal/role/openidm-authorized", + }, + { + "actions": "", + "customAuthz": "ownDataOnly()", + "methods": "read,delete", + "pattern": "managed/bravo_user/*", + "roles": "internal/role/openidm-authorized", + }, + { + "actions": "patch", + "customAuthz": "ownDataOnly() && onlyEditableManagedObjectProperties('bravo_user', [])", + "methods": "update,patch,action", + "pattern": "managed/bravo_user/*", + "roles": "internal/role/openidm-authorized", + }, + { + "actions": "*", + "customAuthz": "ownRelationshipCollection(['_meta','_notifications'])", + "methods": "read,query", + "pattern": "managed/bravo_user/*", + "roles": "internal/role/openidm-authorized", + }, + { + "actions": "deleteNotificationsForTarget", + "customAuthz": "request.additionalParameters.target === (context.security.authorization.component + '/' + context.security.authorization.id)", + "methods": "action", + "pattern": "notification", + "roles": "internal/role/openidm-authorized", + }, + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/alphaOrgPrivileges.idm.json 1`] = ` +{ + "idm": { + "alphaOrgPrivileges": { + "_id": "alphaOrgPrivileges", + "privileges": [ + { + "accessFlags": [ + { + "attribute": "name", + "readOnly": false, + }, + { + "attribute": "description", + "readOnly": false, + }, + { + "attribute": "owners", + "readOnly": true, + }, + { + "attribute": "admins", + "readOnly": false, + }, + { + "attribute": "members", + "readOnly": false, + }, + { + "attribute": "parent", + "readOnly": false, + }, + { + "attribute": "children", + "readOnly": false, + }, + { + "attribute": "parentIDs", + "readOnly": true, + }, + { + "attribute": "adminIDs", + "readOnly": true, + }, + { + "attribute": "parentAdminIDs", + "readOnly": true, + }, + { + "attribute": "ownerIDs", + "readOnly": true, + }, + { + "attribute": "parentOwnerIDs", + "readOnly": true, + }, + ], + "actions": [], + "filter": "/ownerIDs eq "{{_id}}" or /parentOwnerIDs eq "{{_id}}"", + "name": "owner-view-update-delete-orgs", + "path": "managed/alpha_organization", + "permissions": [ + "VIEW", + "UPDATE", + "DELETE", + ], + }, + { + "accessFlags": [ + { + "attribute": "name", + "readOnly": false, + }, + { + "attribute": "description", + "readOnly": false, + }, + { + "attribute": "owners", + "readOnly": true, + }, + { + "attribute": "admins", + "readOnly": false, + }, + { + "attribute": "members", + "readOnly": false, + }, + { + "attribute": "parent", + "readOnly": false, + }, + { + "attribute": "children", + "readOnly": false, + }, + { + "attribute": "parentIDs", + "readOnly": true, + }, + { + "attribute": "adminIDs", + "readOnly": true, + }, + { + "attribute": "parentAdminIDs", + "readOnly": true, + }, + { + "attribute": "ownerIDs", + "readOnly": true, + }, + { + "attribute": "parentOwnerIDs", + "readOnly": true, + }, + ], + "actions": [], + "filter": "/parent pr", + "name": "owner-create-orgs", + "path": "managed/alpha_organization", + "permissions": [ + "CREATE", + ], + }, + { + "accessFlags": [ + { + "attribute": "userName", + "readOnly": false, + }, + { + "attribute": "password", + "readOnly": false, + }, + { + "attribute": "givenName", + "readOnly": false, + }, + { + "attribute": "sn", + "readOnly": false, + }, + { + "attribute": "mail", + "readOnly": false, + }, + { + "attribute": "description", + "readOnly": false, + }, + { + "attribute": "accountStatus", + "readOnly": false, + }, + { + "attribute": "telephoneNumber", + "readOnly": false, + }, + { + "attribute": "postalAddress", + "readOnly": false, + }, + { + "attribute": "city", + "readOnly": false, + }, + { + "attribute": "postalCode", + "readOnly": false, + }, + { + "attribute": "country", + "readOnly": false, + }, + { + "attribute": "stateProvince", + "readOnly": false, + }, + { + "attribute": "roles", + "readOnly": false, + }, + { + "attribute": "groups", + "readOnly": false, + }, + { + "attribute": "manager", + "readOnly": false, + }, + { + "attribute": "authzRoles", + "readOnly": false, + }, + { + "attribute": "reports", + "readOnly": false, + }, + { + "attribute": "effectiveRoles", + "readOnly": false, + }, + { + "attribute": "effectiveAssignments", + "readOnly": false, + }, + { + "attribute": "effectiveGroups", + "readOnly": false, + }, + { + "attribute": "lastSync", + "readOnly": false, + }, + { + "attribute": "kbaInfo", + "readOnly": false, + }, + { + "attribute": "preferences", + "readOnly": false, + }, + { + "attribute": "consentedMappings", + "readOnly": false, + }, + { + "attribute": "memberOfOrg", + "readOnly": false, + }, + { + "attribute": "adminOfOrg", + "readOnly": false, + }, + { + "attribute": "ownerOfOrg", + "readOnly": true, + }, + { + "attribute": "memberOfOrgIDs", + "readOnly": true, + }, + ], + "actions": [], + "filter": "/memberOfOrgIDs eq "__org_id_placeholder__"", + "name": "owner-view-update-delete-admins-and-members", + "path": "managed/alpha_user", + "permissions": [ + "VIEW", + "DELETE", + "UPDATE", + ], + }, + { + "accessFlags": [ + { + "attribute": "userName", + "readOnly": false, + }, + { + "attribute": "password", + "readOnly": false, + }, + { + "attribute": "givenName", + "readOnly": false, + }, + { + "attribute": "sn", + "readOnly": false, + }, + { + "attribute": "mail", + "readOnly": false, + }, + { + "attribute": "description", + "readOnly": false, + }, + { + "attribute": "accountStatus", + "readOnly": false, + }, + { + "attribute": "telephoneNumber", + "readOnly": false, + }, + { + "attribute": "postalAddress", + "readOnly": false, + }, + { + "attribute": "city", + "readOnly": false, + }, + { + "attribute": "postalCode", + "readOnly": false, + }, + { + "attribute": "country", + "readOnly": false, + }, + { + "attribute": "stateProvince", + "readOnly": false, + }, + { + "attribute": "roles", + "readOnly": false, + }, + { + "attribute": "groups", + "readOnly": false, + }, + { + "attribute": "manager", + "readOnly": false, + }, + { + "attribute": "authzRoles", + "readOnly": false, + }, + { + "attribute": "reports", + "readOnly": false, + }, + { + "attribute": "effectiveRoles", + "readOnly": false, + }, + { + "attribute": "effectiveAssignments", + "readOnly": false, + }, + { + "attribute": "effectiveGroups", + "readOnly": false, + }, + { + "attribute": "lastSync", + "readOnly": false, + }, + { + "attribute": "kbaInfo", + "readOnly": false, + }, + { + "attribute": "preferences", + "readOnly": false, + }, + { + "attribute": "consentedMappings", + "readOnly": false, + }, + { + "attribute": "memberOfOrg", + "readOnly": false, + }, + { + "attribute": "adminOfOrg", + "readOnly": false, + }, + { + "attribute": "ownerOfOrg", + "readOnly": true, + }, + { + "attribute": "memberOfOrgIDs", + "readOnly": true, + }, + ], + "actions": [], + "filter": "/memberOfOrg/0 pr and /adminOfOrg/0 pr and !(/ownerOfOrg pr)", + "name": "owner-create-admins", + "path": "managed/alpha_user", + "permissions": [ + "CREATE", + ], + }, + { + "accessFlags": [ + { + "attribute": "name", + "readOnly": false, + }, + { + "attribute": "description", + "readOnly": false, + }, + { + "attribute": "owners", + "readOnly": true, + }, + { + "attribute": "admins", + "readOnly": true, + }, + { + "attribute": "members", + "readOnly": false, + }, + { + "attribute": "parent", + "readOnly": false, + }, + { + "attribute": "children", + "readOnly": false, + }, + { + "attribute": "parentIDs", + "readOnly": true, + }, + { + "attribute": "adminIDs", + "readOnly": true, + }, + { + "attribute": "parentAdminIDs", + "readOnly": true, + }, + { + "attribute": "ownerIDs", + "readOnly": true, + }, + { + "attribute": "parentOwnerIDs", + "readOnly": true, + }, + ], + "actions": [], + "filter": "/adminIDs eq "{{_id}}" or /parentAdminIDs eq "{{_id}}"", + "name": "admin-view-update-delete-orgs", + "path": "managed/alpha_organization", + "permissions": [ + "VIEW", + "UPDATE", + "DELETE", + ], + }, + { + "accessFlags": [ + { + "attribute": "name", + "readOnly": false, + }, + { + "attribute": "description", + "readOnly": false, + }, + { + "attribute": "owners", + "readOnly": true, + }, + { + "attribute": "admins", + "readOnly": true, + }, + { + "attribute": "members", + "readOnly": false, + }, + { + "attribute": "parent", + "readOnly": false, + }, + { + "attribute": "children", + "readOnly": false, + }, + { + "attribute": "parentIDs", + "readOnly": true, + }, + { + "attribute": "adminIDs", + "readOnly": true, + }, + { + "attribute": "parentAdminIDs", + "readOnly": true, + }, + { + "attribute": "ownerIDs", + "readOnly": true, + }, + { + "attribute": "parentOwnerIDs", + "readOnly": true, + }, + ], + "actions": [], + "filter": "/parent pr", + "name": "admin-create-orgs", + "path": "managed/alpha_organization", + "permissions": [ + "CREATE", + ], + }, + { + "accessFlags": [ + { + "attribute": "userName", + "readOnly": false, + }, + { + "attribute": "password", + "readOnly": false, + }, + { + "attribute": "givenName", + "readOnly": false, + }, + { + "attribute": "sn", + "readOnly": false, + }, + { + "attribute": "mail", + "readOnly": false, + }, + { + "attribute": "description", + "readOnly": false, + }, + { + "attribute": "accountStatus", + "readOnly": false, + }, + { + "attribute": "telephoneNumber", + "readOnly": false, + }, + { + "attribute": "postalAddress", + "readOnly": false, + }, + { + "attribute": "city", + "readOnly": false, + }, + { + "attribute": "postalCode", + "readOnly": false, + }, + { + "attribute": "country", + "readOnly": false, + }, + { + "attribute": "stateProvince", + "readOnly": false, + }, + { + "attribute": "roles", + "readOnly": false, + }, + { + "attribute": "groups", + "readOnly": false, + }, + { + "attribute": "manager", + "readOnly": false, + }, + { + "attribute": "authzRoles", + "readOnly": false, + }, + { + "attribute": "reports", + "readOnly": false, + }, + { + "attribute": "effectiveRoles", + "readOnly": false, + }, + { + "attribute": "effectiveAssignments", + "readOnly": false, + }, + { + "attribute": "effectiveGroups", + "readOnly": false, + }, + { + "attribute": "lastSync", + "readOnly": false, + }, + { + "attribute": "kbaInfo", + "readOnly": false, + }, + { + "attribute": "preferences", + "readOnly": false, + }, + { + "attribute": "consentedMappings", + "readOnly": false, + }, + { + "attribute": "memberOfOrg", + "readOnly": false, + }, + { + "attribute": "adminOfOrg", + "readOnly": true, + }, + { + "attribute": "ownerOfOrg", + "readOnly": true, + }, + { + "attribute": "memberOfOrgIDs", + "readOnly": true, + }, + ], + "actions": [], + "filter": "/memberOfOrgIDs eq "__org_id_placeholder__"", + "name": "admin-view-update-delete-members", + "path": "managed/alpha_user", + "permissions": [ + "VIEW", + "DELETE", + "UPDATE", + ], + }, + { + "accessFlags": [ + { + "attribute": "userName", + "readOnly": false, + }, + { + "attribute": "password", + "readOnly": false, + }, + { + "attribute": "givenName", + "readOnly": false, + }, + { + "attribute": "sn", + "readOnly": false, + }, + { + "attribute": "mail", + "readOnly": false, + }, + { + "attribute": "description", + "readOnly": false, + }, + { + "attribute": "accountStatus", + "readOnly": false, + }, + { + "attribute": "telephoneNumber", + "readOnly": false, + }, + { + "attribute": "postalAddress", + "readOnly": false, + }, + { + "attribute": "city", + "readOnly": false, + }, + { + "attribute": "postalCode", + "readOnly": false, + }, + { + "attribute": "country", + "readOnly": false, + }, + { + "attribute": "stateProvince", + "readOnly": false, + }, + { + "attribute": "roles", + "readOnly": false, + }, + { + "attribute": "groups", + "readOnly": false, + }, + { + "attribute": "manager", + "readOnly": false, + }, + { + "attribute": "authzRoles", + "readOnly": false, + }, + { + "attribute": "reports", + "readOnly": false, + }, + { + "attribute": "effectiveRoles", + "readOnly": false, + }, + { + "attribute": "effectiveAssignments", + "readOnly": false, + }, + { + "attribute": "effectiveGroups", + "readOnly": false, + }, + { + "attribute": "lastSync", + "readOnly": false, + }, + { + "attribute": "kbaInfo", + "readOnly": false, + }, + { + "attribute": "preferences", + "readOnly": false, + }, + { + "attribute": "consentedMappings", + "readOnly": false, + }, + { + "attribute": "memberOfOrg", + "readOnly": false, + }, + { + "attribute": "adminOfOrg", + "readOnly": true, + }, + { + "attribute": "ownerOfOrg", + "readOnly": true, + }, + { + "attribute": "memberOfOrgIDs", + "readOnly": true, + }, + ], + "actions": [], + "filter": "/memberOfOrg/0 pr and !(/adminOfOrg pr) and !(/ownerOfOrg pr)", + "name": "admin-create-members", + "path": "managed/alpha_user", + "permissions": [ + "CREATE", + ], + }, + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/audit.idm.json 1`] = ` +{ + "idm": { + "audit": { + "_id": "audit", + "auditServiceConfig": { + "availableAuditEventHandlers": [ + "org.forgerock.audit.handlers.csv.CsvAuditEventHandler", + "org.forgerock.audit.handlers.elasticsearch.ElasticsearchAuditEventHandler", + "org.forgerock.audit.handlers.jms.JmsAuditEventHandler", + "org.forgerock.audit.handlers.json.JsonAuditEventHandler", + "org.forgerock.audit.handlers.json.stdout.JsonStdoutAuditEventHandler", + "org.forgerock.openidm.audit.impl.RepositoryAuditEventHandler", + "org.forgerock.openidm.audit.impl.RouterAuditEventHandler", + "org.forgerock.audit.handlers.splunk.SplunkAuditEventHandler", + "org.forgerock.audit.handlers.syslog.SyslogAuditEventHandler", + ], + "caseInsensitiveFields": [ + "/access/http/request/headers", + "/access/http/response/headers", + ], + "filterPolicies": { + "value": { + "excludeIf": [ + "/access/http/request/cookies/&{com.iplanet.am.cookie.name}", + "/access/http/request/cookies/session-jwt", + "/access/http/request/headers/&{com.sun.identity.auth.cookieName}", + "/access/http/request/headers/&{com.iplanet.am.cookie.name}", + "/access/http/request/headers/accept-encoding", + "/access/http/request/headers/accept-language", + "/access/http/request/headers/Authorization", + "/access/http/request/headers/cache-control", + "/access/http/request/headers/connection", + "/access/http/request/headers/content-length", + "/access/http/request/headers/content-type", + "/access/http/request/headers/proxy-authorization", + "/access/http/request/headers/X-OpenAM-Password", + "/access/http/request/headers/X-OpenIDM-Password", + "/access/http/request/queryParameters/access_token", + "/access/http/request/queryParameters/IDToken1", + "/access/http/request/queryParameters/id_token_hint", + "/access/http/request/queryParameters/Login.Token1", + "/access/http/request/queryParameters/redirect_uri", + "/access/http/request/queryParameters/requester", + "/access/http/request/queryParameters/sessionUpgradeSSOTokenId", + "/access/http/request/queryParameters/tokenId", + "/access/http/response/headers/Authorization", + "/access/http/response/headers/Set-Cookie", + "/access/http/response/headers/X-OpenIDM-Password", + ], + "includeIf": [], + }, + }, + "handlerForQueries": "json", + }, + "eventHandlers": [ + { + "class": "org.forgerock.audit.handlers.json.stdout.JsonStdoutAuditEventHandler", + "config": { + "name": "json", + "topics": [ + "access", + "activity", + "sync", + "authentication", + "config", + ], + }, + }, + { + "class": "org.forgerock.openidm.audit.impl.RepositoryAuditEventHandler", + "config": { + "enabled": false, + "name": "repo", + "topics": [ + "access", + "activity", + "sync", + "authentication", + "config", + ], + }, + }, + ], + "eventTopics": { + "activity": { + "filter": { + "actions": [ + "create", + "update", + "delete", + "patch", + "action", + ], + }, + "passwordFields": [ + "password", + ], + "watchedFields": [], + }, + "config": { + "filter": { + "actions": [ + "create", + "update", + "delete", + "patch", + "action", + ], + }, + }, + }, + "exceptionFormatter": { + "file": "bin/defaults/script/audit/stacktraceFormatter.js", + "type": "text/javascript", + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/authentication.idm.json 1`] = ` +{ + "idm": { + "authentication": { + "_id": "authentication", + "rsFilter": { + "augmentSecurityContext": { + "source": "require('auth/orgPrivileges').assignPrivilegesToUser(resource, security, properties, subjectMapping, privileges, security.authorization.component.includes('/alpha_') ? 'alphaOrgPrivileges' : 'bravoOrgPrivileges', 'privilegeAssignments');", + "type": "text/javascript", + }, + "cache": { + "maxTimeout": "300 seconds", + }, + "scopes": [ + "fr:idm:*", + ], + "staticUserMapping": [ + { + "localUser": "internal/user/idm-provisioning", + "roles": [ + "internal/role/openidm-admin", + ], + "subject": "autoid-resource-server", + }, + ], + "subjectMapping": [ + { + "additionalUserFields": [ + "adminOfOrg", + "ownerOfOrg", + ], + "defaultRoles": [ + "internal/role/openidm-authorized", + ], + "propertyMapping": { + "sub": "_id", + }, + "queryOnResource": "managed/{{substring realm 1}}_user", + "userRoles": "authzRoles/*", + }, + ], + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/bravoOrgPrivileges.idm.json 1`] = ` +{ + "idm": { + "bravoOrgPrivileges": { + "_id": "bravoOrgPrivileges", + "privileges": [ + { + "accessFlags": [ + { + "attribute": "name", + "readOnly": false, + }, + { + "attribute": "description", + "readOnly": false, + }, + { + "attribute": "owners", + "readOnly": true, + }, + { + "attribute": "admins", + "readOnly": false, + }, + { + "attribute": "members", + "readOnly": false, + }, + { + "attribute": "parent", + "readOnly": false, + }, + { + "attribute": "children", + "readOnly": false, + }, + { + "attribute": "parentIDs", + "readOnly": true, + }, + { + "attribute": "adminIDs", + "readOnly": true, + }, + { + "attribute": "parentAdminIDs", + "readOnly": true, + }, + { + "attribute": "ownerIDs", + "readOnly": true, + }, + { + "attribute": "parentOwnerIDs", + "readOnly": true, + }, + ], + "actions": [], + "filter": "/ownerIDs eq "{{_id}}" or /parentOwnerIDs eq "{{_id}}"", + "name": "owner-view-update-delete-orgs", + "path": "managed/bravo_organization", + "permissions": [ + "VIEW", + "UPDATE", + "DELETE", + ], + }, + { + "accessFlags": [ + { + "attribute": "name", + "readOnly": false, + }, + { + "attribute": "description", + "readOnly": false, + }, + { + "attribute": "owners", + "readOnly": true, + }, + { + "attribute": "admins", + "readOnly": false, + }, + { + "attribute": "members", + "readOnly": false, + }, + { + "attribute": "parent", + "readOnly": false, + }, + { + "attribute": "children", + "readOnly": false, + }, + { + "attribute": "parentIDs", + "readOnly": true, + }, + { + "attribute": "adminIDs", + "readOnly": true, + }, + { + "attribute": "parentAdminIDs", + "readOnly": true, + }, + { + "attribute": "ownerIDs", + "readOnly": true, + }, + { + "attribute": "parentOwnerIDs", + "readOnly": true, + }, + ], + "actions": [], + "filter": "/parent pr", + "name": "owner-create-orgs", + "path": "managed/bravo_organization", + "permissions": [ + "CREATE", + ], + }, + { + "accessFlags": [ + { + "attribute": "userName", + "readOnly": false, + }, + { + "attribute": "password", + "readOnly": false, + }, + { + "attribute": "givenName", + "readOnly": false, + }, + { + "attribute": "sn", + "readOnly": false, + }, + { + "attribute": "mail", + "readOnly": false, + }, + { + "attribute": "description", + "readOnly": false, + }, + { + "attribute": "accountStatus", + "readOnly": false, + }, + { + "attribute": "telephoneNumber", + "readOnly": false, + }, + { + "attribute": "postalAddress", + "readOnly": false, + }, + { + "attribute": "city", + "readOnly": false, + }, + { + "attribute": "postalCode", + "readOnly": false, + }, + { + "attribute": "country", + "readOnly": false, + }, + { + "attribute": "stateProvince", + "readOnly": false, + }, + { + "attribute": "roles", + "readOnly": false, + }, + { + "attribute": "groups", + "readOnly": false, + }, + { + "attribute": "manager", + "readOnly": false, + }, + { + "attribute": "authzRoles", + "readOnly": false, + }, + { + "attribute": "reports", + "readOnly": false, + }, + { + "attribute": "effectiveRoles", + "readOnly": false, + }, + { + "attribute": "effectiveAssignments", + "readOnly": false, + }, + { + "attribute": "effectiveGroups", + "readOnly": false, + }, + { + "attribute": "lastSync", + "readOnly": false, + }, + { + "attribute": "kbaInfo", + "readOnly": false, + }, + { + "attribute": "preferences", + "readOnly": false, + }, + { + "attribute": "consentedMappings", + "readOnly": false, + }, + { + "attribute": "memberOfOrg", + "readOnly": false, + }, + { + "attribute": "adminOfOrg", + "readOnly": false, + }, + { + "attribute": "ownerOfOrg", + "readOnly": true, + }, + { + "attribute": "memberOfOrgIDs", + "readOnly": true, + }, + ], + "actions": [], + "filter": "/memberOfOrgIDs eq "__org_id_placeholder__"", + "name": "owner-view-update-delete-admins-and-members", + "path": "managed/bravo_user", + "permissions": [ + "VIEW", + "DELETE", + "UPDATE", + ], + }, + { + "accessFlags": [ + { + "attribute": "userName", + "readOnly": false, + }, + { + "attribute": "password", + "readOnly": false, + }, + { + "attribute": "givenName", + "readOnly": false, + }, + { + "attribute": "sn", + "readOnly": false, + }, + { + "attribute": "mail", + "readOnly": false, + }, + { + "attribute": "description", + "readOnly": false, + }, + { + "attribute": "accountStatus", + "readOnly": false, + }, + { + "attribute": "telephoneNumber", + "readOnly": false, + }, + { + "attribute": "postalAddress", + "readOnly": false, + }, + { + "attribute": "city", + "readOnly": false, + }, + { + "attribute": "postalCode", + "readOnly": false, + }, + { + "attribute": "country", + "readOnly": false, + }, + { + "attribute": "stateProvince", + "readOnly": false, + }, + { + "attribute": "roles", + "readOnly": false, + }, + { + "attribute": "groups", + "readOnly": false, + }, + { + "attribute": "manager", + "readOnly": false, + }, + { + "attribute": "authzRoles", + "readOnly": false, + }, + { + "attribute": "reports", + "readOnly": false, + }, + { + "attribute": "effectiveRoles", + "readOnly": false, + }, + { + "attribute": "effectiveAssignments", + "readOnly": false, + }, + { + "attribute": "effectiveGroups", + "readOnly": false, + }, + { + "attribute": "lastSync", + "readOnly": false, + }, + { + "attribute": "kbaInfo", + "readOnly": false, + }, + { + "attribute": "preferences", + "readOnly": false, + }, + { + "attribute": "consentedMappings", + "readOnly": false, + }, + { + "attribute": "memberOfOrg", + "readOnly": false, + }, + { + "attribute": "adminOfOrg", + "readOnly": false, + }, + { + "attribute": "ownerOfOrg", + "readOnly": true, + }, + { + "attribute": "memberOfOrgIDs", + "readOnly": true, + }, + ], + "actions": [], + "filter": "/memberOfOrg/0 pr and /adminOfOrg/0 pr and !(/ownerOfOrg pr)", + "name": "owner-create-admins", + "path": "managed/bravo_user", + "permissions": [ + "CREATE", + ], + }, + { + "accessFlags": [ + { + "attribute": "name", + "readOnly": false, + }, + { + "attribute": "description", + "readOnly": false, + }, + { + "attribute": "owners", + "readOnly": true, + }, + { + "attribute": "admins", + "readOnly": true, + }, + { + "attribute": "members", + "readOnly": false, + }, + { + "attribute": "parent", + "readOnly": false, + }, + { + "attribute": "children", + "readOnly": false, + }, + { + "attribute": "parentIDs", + "readOnly": true, + }, + { + "attribute": "adminIDs", + "readOnly": true, + }, + { + "attribute": "parentAdminIDs", + "readOnly": true, + }, + { + "attribute": "ownerIDs", + "readOnly": true, + }, + { + "attribute": "parentOwnerIDs", + "readOnly": true, + }, + ], + "actions": [], + "filter": "/adminIDs eq "{{_id}}" or /parentAdminIDs eq "{{_id}}"", + "name": "admin-view-update-delete-orgs", + "path": "managed/bravo_organization", + "permissions": [ + "VIEW", + "UPDATE", + "DELETE", + ], + }, + { + "accessFlags": [ + { + "attribute": "name", + "readOnly": false, + }, + { + "attribute": "description", + "readOnly": false, + }, + { + "attribute": "owners", + "readOnly": true, + }, + { + "attribute": "admins", + "readOnly": true, + }, + { + "attribute": "members", + "readOnly": false, + }, + { + "attribute": "parent", + "readOnly": false, + }, + { + "attribute": "children", + "readOnly": false, + }, + { + "attribute": "parentIDs", + "readOnly": true, + }, + { + "attribute": "adminIDs", + "readOnly": true, + }, + { + "attribute": "parentAdminIDs", + "readOnly": true, + }, + { + "attribute": "ownerIDs", + "readOnly": true, + }, + { + "attribute": "parentOwnerIDs", + "readOnly": true, + }, + ], + "actions": [], + "filter": "/parent pr", + "name": "admin-create-orgs", + "path": "managed/bravo_organization", + "permissions": [ + "CREATE", + ], + }, + { + "accessFlags": [ + { + "attribute": "userName", + "readOnly": false, + }, + { + "attribute": "password", + "readOnly": false, + }, + { + "attribute": "givenName", + "readOnly": false, + }, + { + "attribute": "sn", + "readOnly": false, + }, + { + "attribute": "mail", + "readOnly": false, + }, + { + "attribute": "description", + "readOnly": false, + }, + { + "attribute": "accountStatus", + "readOnly": false, + }, + { + "attribute": "telephoneNumber", + "readOnly": false, + }, + { + "attribute": "postalAddress", + "readOnly": false, + }, + { + "attribute": "city", + "readOnly": false, + }, + { + "attribute": "postalCode", + "readOnly": false, + }, + { + "attribute": "country", + "readOnly": false, + }, + { + "attribute": "stateProvince", + "readOnly": false, + }, + { + "attribute": "roles", + "readOnly": false, + }, + { + "attribute": "groups", + "readOnly": false, + }, + { + "attribute": "manager", + "readOnly": false, + }, + { + "attribute": "authzRoles", + "readOnly": false, + }, + { + "attribute": "reports", + "readOnly": false, + }, + { + "attribute": "effectiveRoles", + "readOnly": false, + }, + { + "attribute": "effectiveAssignments", + "readOnly": false, + }, + { + "attribute": "effectiveGroups", + "readOnly": false, + }, + { + "attribute": "lastSync", + "readOnly": false, + }, + { + "attribute": "kbaInfo", + "readOnly": false, + }, + { + "attribute": "preferences", + "readOnly": false, + }, + { + "attribute": "consentedMappings", + "readOnly": false, + }, + { + "attribute": "memberOfOrg", + "readOnly": false, + }, + { + "attribute": "adminOfOrg", + "readOnly": true, + }, + { + "attribute": "ownerOfOrg", + "readOnly": true, + }, + { + "attribute": "memberOfOrgIDs", + "readOnly": true, + }, + ], + "actions": [], + "filter": "/memberOfOrgIDs eq "__org_id_placeholder__"", + "name": "admin-view-update-delete-members", + "path": "managed/bravo_user", + "permissions": [ + "VIEW", + "DELETE", + "UPDATE", + ], + }, + { + "accessFlags": [ + { + "attribute": "userName", + "readOnly": false, + }, + { + "attribute": "password", + "readOnly": false, + }, + { + "attribute": "givenName", + "readOnly": false, + }, + { + "attribute": "sn", + "readOnly": false, + }, + { + "attribute": "mail", + "readOnly": false, + }, + { + "attribute": "description", + "readOnly": false, + }, + { + "attribute": "accountStatus", + "readOnly": false, + }, + { + "attribute": "telephoneNumber", + "readOnly": false, + }, + { + "attribute": "postalAddress", + "readOnly": false, + }, + { + "attribute": "city", + "readOnly": false, + }, + { + "attribute": "postalCode", + "readOnly": false, + }, + { + "attribute": "country", + "readOnly": false, + }, + { + "attribute": "stateProvince", + "readOnly": false, + }, + { + "attribute": "roles", + "readOnly": false, + }, + { + "attribute": "groups", + "readOnly": false, + }, + { + "attribute": "manager", + "readOnly": false, + }, + { + "attribute": "authzRoles", + "readOnly": false, + }, + { + "attribute": "reports", + "readOnly": false, + }, + { + "attribute": "effectiveRoles", + "readOnly": false, + }, + { + "attribute": "effectiveAssignments", + "readOnly": false, + }, + { + "attribute": "effectiveGroups", + "readOnly": false, + }, + { + "attribute": "lastSync", + "readOnly": false, + }, + { + "attribute": "kbaInfo", + "readOnly": false, + }, + { + "attribute": "preferences", + "readOnly": false, + }, + { + "attribute": "consentedMappings", + "readOnly": false, + }, + { + "attribute": "memberOfOrg", + "readOnly": false, + }, + { + "attribute": "adminOfOrg", + "readOnly": true, + }, + { + "attribute": "ownerOfOrg", + "readOnly": true, + }, + { + "attribute": "memberOfOrgIDs", + "readOnly": true, + }, + ], + "actions": [], + "filter": "/memberOfOrg/0 pr and !(/adminOfOrg pr) and !(/ownerOfOrg pr)", + "name": "admin-create-members", + "path": "managed/bravo_user", + "permissions": [ + "CREATE", + ], + }, + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/endpoint/Test.idm.json 1`] = ` +{ + "idm": { + "endpoint/Test": { + "_id": "endpoint/Test", + "description": "test", + "globalsObject": "" {\\n \\"request\\": {\\n \\"method\\": \\"create\\"\\n }\\n }"", + "source": " (function () { + if (request.method === 'create') { + // POST + return {}; + } else if (request.method === 'read') { + // GET + return {}; + } else if (request.method === 'update') { + // PUT + return {}; + } else if (request.method === 'patch') { + return {}; + } else if (request.method === 'delete') { + return {}; + } + throw { code: 500, message: 'Unknown error' }; + }());", + "type": "text/javascript", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/endpoint/testEndpoint2.idm.json 1`] = ` +{ + "idm": { + "endpoint/testEndpoint2": { + "_id": "endpoint/testEndpoint2", + "description": "", + "globalsObject": "" {\\n \\"request\\": {\\n \\"method\\": \\"create\\"\\n }\\n }"", + "source": " (function () { + if (request.method === 'create') { + // POST + return {}; + } else if (request.method === 'read') { + // GET + return {}; + } else if (request.method === 'update') { + // PUT + return {}; + } else if (request.method === 'patch') { + return {}; + } else if (request.method === 'delete') { + return {}; + } + throw { code: 500, message: 'Unknown error' }; + }());", + "type": "text/javascript", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/entityId.idm.json 1`] = ` +{ + "idm": { + "entityId": { + "_id": "entityId", + "defaultLocale": "en", + "displayName": "Frodo Test Email Template Three", + "enabled": true, + "from": "", + "message": { + "en": "

You started a login or profile update that requires MFA.

Click to Proceed

", + }, + "mimeType": "text/html", + "subject": { + "en": "Multi-Factor Email for Identity Cloud login", + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/external.email.idm.json 1`] = ` +{ + "idm": { + "external.email": { + "_id": "external.email", + "auth": { + "enable": true, + "password": "&{aic.customer.sasl.pass}", + "username": "&{aic.customer.sasl.user|donotuse@pingidentity.com}", + }, + "connectiontimeout": 300000, + "debug": false, + "from": "&{email.sender.address}", + "host": "&{aic.smtp.relay.host|smtp-relay.fr-platform.svc.cluster.local}", + "port": 25, + "smtpProperties": [], + "ssl": { + "enable": false, + }, + "starttls": { + "enable": false, + }, + "threadPoolSize": 20, + "timeout": 300000, + "writetimeout": 300000, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/external.emailDefault.idm.json 1`] = ` +{ + "idm": { + "external.emailDefault": { + "_id": "external.emailDefault", + "auth": { + "enable": true, + "password": "&{aic.customer.sasl.pass}", + "username": "&{aic.customer.sasl.user|donotuse@pingidentity.com}", + }, + "connectiontimeout": 300000, + "debug": false, + "from": "&{email.sender.address}", + "host": "&{aic.smtp.relay.host|smtp-relay.fr-platform.svc.cluster.local}", + "port": 25, + "smtpProperties": [], + "ssl": { + "enable": false, + }, + "starttls": { + "enable": false, + }, + "threadPoolSize": 20, + "timeout": 300000, + "writetimeout": 300000, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/fieldPolicy/alpha_user.idm.json 1`] = ` +{ + "idm": { + "fieldPolicy/alpha_user": { + "_id": "fieldPolicy/alpha_user", + "defaultPasswordStorageScheme": [ + { + "_id": "PBKDF2-HMAC-SHA256", + }, + ], + "passwordAttribute": "password", + "resourceCollection": "managed/alpha_user", + "type": "password-policy", + "validator": [ + { + "_id": "alpha_userPasswordPolicy-length-based-password-validator", + "enabled": true, + "maxPasswordLength": 0, + "minPasswordLength": 10, + "type": "length-based", + }, + { + "_id": "alpha_userPasswordPolicy-attribute-value-password-validator", + "checkSubstrings": true, + "enabled": true, + "matchAttribute": [ + "mail", + "userName", + "givenName", + "sn", + ], + "minSubstringLength": 5, + "testReversedPassword": true, + "type": "attribute-value", + }, + { + "_id": "alpha_userPasswordPolicy-character-set-password-validator", + "allowUnclassifiedCharacters": true, + "characterSet": [ + "0:abcdefghijklmnopqrstuvwxyz", + "0:ABCDEFGHIJKLMNOPQRSTUVWXYZ", + "0:0123456789", + "0:~!@#$%^&*()-_=+[]{}|;:,.<>/?"'\\\`", + ], + "enabled": true, + "minCharacterSets": 4, + "type": "character-set", + }, + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/fieldPolicy/bravo_user.idm.json 1`] = ` +{ + "idm": { + "fieldPolicy/bravo_user": { + "_id": "fieldPolicy/bravo_user", + "defaultPasswordStorageScheme": [ + { + "_id": "PBKDF2-HMAC-SHA256", + }, + ], + "passwordAttribute": "password", + "resourceCollection": "managed/bravo_user", + "type": "password-policy", + "validator": [ + { + "_id": "bravo_userPasswordPolicy-length-based-password-validator", + "enabled": true, + "maxPasswordLength": 0, + "minPasswordLength": 8, + "type": "length-based", + }, + { + "_id": "bravo_userPasswordPolicy-attribute-value-password-validator", + "checkSubstrings": true, + "enabled": true, + "matchAttribute": [ + "mail", + "userName", + "givenName", + "sn", + ], + "minSubstringLength": 5, + "testReversedPassword": true, + "type": "attribute-value", + }, + { + "_id": "bravo_userPasswordPolicy-character-set-password-validator", + "allowUnclassifiedCharacters": true, + "characterSet": [ + "1:abcdefghijklmnopqrstuvwxyz", + "1:ABCDEFGHIJKLMNOPQRSTUVWXYZ", + "1:0123456789", + "1:~!@#$%^&*()-_=+[]{}|;:,.<>/?"'\\\`", + ], + "enabled": true, + "type": "character-set", + }, + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/internal.idm.json 1`] = ` +{ + "idm": { + "internal": { + "_id": "internal", + "objects": [ + { + "name": "role", + "properties": { + "authzMembers": { + "items": { + "resourceCollection": [ + { + "conditionalAssociation": true, + "label": "User", + "notify": true, + "path": "managed/alpha_user", + "query": { + "fields": [ + "userName", + "givenName", + "sn", + ], + "queryFilter": "true", + }, + }, + ], + }, + }, + }, + }, + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/managed/alpha_application.managed.json 1`] = ` +{ + "name": "alpha_application", + "schema": { + "$schema": "http://forgerock.org/json-schema#", + "description": "Application Object", + "icon": "fa-folder", + "order": [ + "name", + "description", + "url", + "icon", + "mappingNames", + "owners", + "roles", + "members", + ], + "properties": { + "_id": { + "description": "Application ID", + "isPersonal": false, + "searchable": false, + "type": "string", + "userEditable": false, + "viewable": false, + }, + "authoritative": { + "description": "Is this an authoritative application", + "searchable": false, + "title": "Authoritative", + "type": "boolean", + "viewable": false, + }, + "connectorId": { + "description": "Id of the connector associated with the application", + "searchable": false, + "title": "Connector ID", + "type": "string", + "userEditable": false, + "viewable": false, + }, + "description": { + "description": "Application Description", + "searchable": true, + "title": "Description", + "type": "string", + "viewable": true, + }, + "icon": { + "searchable": true, + "title": "Icon", + "type": "string", + "userEditable": true, + "viewable": true, + }, + "mappingNames": { + "description": "Names of the sync mappings used by an application with provisioning configured.", + "items": { + "title": "Mapping Name Items", + "type": "string", + }, + "searchable": true, + "title": "Sync Mapping Names", + "type": "array", + "viewable": true, + }, + "members": { + "description": "Application Members", + "items": { + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:Application:members:items", + "properties": { + "_ref": { + "description": "References a relationship from a managed object", + "type": "string", + }, + "_refProperties": { + "description": "Supports metadata within the relationship", + "properties": { + "_grantType": { + "description": "Grant Type", + "label": "Grant Type", + "type": "string", + }, + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Group Members Items _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "User", + "notify": true, + "path": "managed/alpha_user", + "query": { + "fields": [ + "userName", + "givenName", + "sn", + ], + "queryFilter": "true", + }, + }, + ], + "reversePropertyName": "applications", + "reverseRelationship": true, + "title": "Group Members Items", + "type": "relationship", + "validate": true, + }, + "policies": [], + "returnByDefault": false, + "searchable": false, + "title": "Members", + "type": "array", + "userEditable": false, + "viewable": true, + }, + "name": { + "description": "Application name", + "notifyRelationships": [ + "roles", + "members", + ], + "policies": [ + { + "policyId": "unique", + }, + ], + "returnByDefault": true, + "searchable": true, + "title": "Name", + "type": "string", + "userEditable": true, + "viewable": true, + }, + "owners": { + "description": "Application Owners", + "items": { + "properties": { + "_ref": { + "type": "string", + }, + "_refProperties": { + "properties": { + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Application _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "User", + "path": "managed/alpha_user", + "query": { + "fields": [ + "userName", + "givenName", + "sn", + ], + "queryFilter": "true", + }, + }, + ], + "reversePropertyName": "ownerOfApp", + "reverseRelationship": true, + "type": "relationship", + "validate": true, + }, + "returnByDefault": false, + "searchable": false, + "title": "Owners", + "type": "array", + "userEditable": false, + "viewable": true, + }, + "roles": { + "description": "Roles granting users the application", + "items": { + "notifySelf": true, + "properties": { + "_ref": { + "type": "string", + }, + "_refProperties": { + "properties": { + "_id": { + "propName": "_id", + "required": false, + "type": "string", + }, + }, + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "Role", + "notify": true, + "path": "managed/alpha_role", + "query": { + "fields": [ + "name", + ], + "queryFilter": "true", + "sortKeys": [], + }, + }, + ], + "reversePropertyName": "applications", + "reverseRelationship": true, + "type": "relationship", + "validate": true, + }, + "returnByDefault": false, + "searchable": false, + "title": "Roles", + "type": "array", + "userEditable": false, + "viewable": true, + }, + "ssoEntities": { + "description": "SSO Entity Id", + "properties": { + "idpLocation": { + "type": "string", + }, + "idpPrivateId": { + "type": "string", + }, + "spLocation": { + "type": "string", + }, + "spPrivate": { + "type": "string", + }, + }, + "searchable": false, + "title": "SSO Entity Id", + "type": "object", + "userEditable": false, + "viewable": false, + }, + "templateName": { + "description": "Name of the template the application was created from", + "searchable": false, + "title": "Template Name", + "type": "string", + "userEditable": false, + "viewable": false, + }, + "templateVersion": { + "description": "The template version", + "searchable": false, + "title": "Template Version", + "type": "string", + "userEditable": false, + "viewable": false, + }, + "uiConfig": { + "description": "UI Config", + "isPersonal": false, + "properties": {}, + "searchable": false, + "title": "UI Config", + "type": "object", + "usageDescription": "", + "viewable": false, + }, + "url": { + "searchable": true, + "title": "Url", + "type": "string", + "userEditable": true, + "viewable": true, + }, + }, + "required": [ + "name", + ], + "title": "Alpha realm - Application", + "type": "object", + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/managed/alpha_assignment.managed.json 1`] = ` +{ + "attributeEncryption": {}, + "name": "alpha_assignment", + "schema": { + "$schema": "http://forgerock.org/json-schema#", + "description": "A role assignment", + "icon": "fa-key", + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:Assignment", + "mat-icon": "vpn_key", + "order": [ + "_id", + "name", + "description", + "type", + "mapping", + "attributes", + "linkQualifiers", + "roles", + "members", + "condition", + "weight", + ], + "properties": { + "_id": { + "description": "The assignment ID", + "searchable": false, + "title": "Name", + "type": "string", + "viewable": false, + }, + "attributes": { + "description": "The attributes operated on by this assignment.", + "items": { + "order": [ + "assignmentOperation", + "unassignmentOperation", + "name", + "value", + ], + "properties": { + "assignmentOperation": { + "description": "Assignment operation", + "type": "string", + }, + "name": { + "description": "Name", + "type": "string", + }, + "unassignmentOperation": { + "description": "Unassignment operation", + "type": "string", + }, + "value": { + "description": "Value", + "type": "string", + }, + }, + "required": [], + "title": "Assignment Attributes Items", + "type": "object", + }, + "notifyRelationships": [ + "roles", + "members", + ], + "title": "Assignment Attributes", + "type": "array", + "viewable": true, + }, + "condition": { + "description": "A conditional filter for this assignment", + "isConditional": true, + "searchable": false, + "title": "Condition", + "type": "string", + "viewable": false, + }, + "description": { + "description": "The assignment description, used for display purposes.", + "searchable": true, + "title": "Description", + "type": "string", + "viewable": true, + }, + "linkQualifiers": { + "description": "Conditional link qualifiers to restrict this assignment to.", + "items": { + "title": "Link Qualifiers Items", + "type": "string", + }, + "title": "Link Qualifiers", + "type": "array", + "viewable": true, + }, + "mapping": { + "description": "The name of the mapping this assignment applies to", + "policies": [ + { + "policyId": "mapping-exists", + }, + ], + "searchable": true, + "title": "Mapping", + "type": "string", + "viewable": true, + }, + "members": { + "description": "Assignment Members", + "items": { + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:Assignment:members:items", + "properties": { + "_ref": { + "description": "References a relationship from a managed object", + "type": "string", + }, + "_refProperties": { + "description": "Supports metadata within the relationship", + "properties": { + "_grantType": { + "description": "Grant Type", + "label": "Grant Type", + "type": "string", + }, + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Assignment Members Items _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "conditionalAssociation": true, + "label": "User", + "notify": true, + "path": "managed/alpha_user", + "query": { + "fields": [ + "userName", + "givenName", + "sn", + ], + "queryFilter": "true", + }, + }, + ], + "reversePropertyName": "assignments", + "reverseRelationship": true, + "title": "Assignment Members Items", + "type": "relationship", + "validate": true, + }, + "returnByDefault": false, + "title": "Assignment Members", + "type": "array", + "viewable": true, + }, + "name": { + "description": "The assignment name, used for display purposes.", + "searchable": true, + "title": "Name", + "type": "string", + "viewable": true, + }, + "roles": { + "description": "Managed Roles", + "items": { + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:Assignment:roles:items", + "properties": { + "_ref": { + "description": "References a relationship from a managed object", + "type": "string", + }, + "_refProperties": { + "description": "Supports metadata within the relationship", + "properties": { + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Managed Roles Items _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "Role", + "notify": true, + "path": "managed/alpha_role", + "query": { + "fields": [ + "name", + ], + "queryFilter": "true", + }, + }, + ], + "reversePropertyName": "assignments", + "reverseRelationship": true, + "title": "Managed Roles Items", + "type": "relationship", + "validate": true, + }, + "returnByDefault": false, + "title": "Managed Roles", + "type": "array", + "userEditable": false, + "viewable": true, + }, + "type": { + "description": "The type of object this assignment represents", + "title": "Type", + "type": "string", + "viewable": true, + }, + "weight": { + "description": "The weight of the assignment.", + "notifyRelationships": [ + "roles", + "members", + ], + "searchable": false, + "title": "Weight", + "type": [ + "number", + "null", + ], + "viewable": true, + }, + }, + "required": [ + "name", + "description", + "mapping", + ], + "title": "Alpha realm - Assignment", + "type": "object", + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/managed/alpha_group.managed.json 1`] = ` +{ + "name": "alpha_group", + "schema": { + "$schema": "http://forgerock.org/json-schema#", + "icon": "fa-group", + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:Group", + "mat-icon": "group", + "order": [ + "_id", + "name", + "description", + "condition", + "members", + ], + "properties": { + "_id": { + "description": "Group ID", + "isPersonal": false, + "policies": [ + { + "params": { + "propertyName": "name", + }, + "policyId": "id-must-equal-property", + }, + ], + "searchable": false, + "type": "string", + "usageDescription": "", + "userEditable": false, + "viewable": false, + }, + "condition": { + "description": "A filter for conditionally assigned members", + "isConditional": true, + "policies": [ + { + "policyId": "valid-query-filter", + }, + ], + "searchable": false, + "title": "Condition", + "type": "string", + "viewable": false, + }, + "description": { + "description": "Group Description", + "searchable": true, + "title": "Description", + "type": "string", + "userEditable": false, + "viewable": true, + }, + "members": { + "description": "Group Members", + "items": { + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:Group:members:items", + "properties": { + "_ref": { + "description": "References a relationship from a managed object", + "type": "string", + }, + "_refProperties": { + "description": "Supports metadata within the relationship", + "properties": { + "_grantType": { + "description": "Grant Type", + "label": "Grant Type", + "type": "string", + }, + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Group Members Items _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "conditionalAssociation": true, + "label": "User", + "notify": true, + "path": "managed/alpha_user", + "query": { + "fields": [ + "userName", + "givenName", + "sn", + ], + "queryFilter": "true", + }, + }, + ], + "reversePropertyName": "groups", + "reverseRelationship": true, + "title": "Group Members Items", + "type": "relationship", + "validate": true, + }, + "policies": [], + "returnByDefault": false, + "searchable": false, + "title": "Members", + "type": "array", + "userEditable": false, + "viewable": true, + }, + "name": { + "description": "Group Name", + "policies": [ + { + "policyId": "required", + }, + { + "params": { + "forbiddenChars": [ + "/*", + ], + }, + "policyId": "cannot-contain-characters", + }, + ], + "searchable": true, + "title": "Name", + "type": "string", + "viewable": true, + }, + }, + "required": [ + "name", + ], + "title": "Alpha realm - Group", + "viewable": true, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/managed/alpha_organization.managed.json 1`] = ` +{ + "name": "alpha_organization", + "schema": { + "$schema": "http://forgerock.org/json-schema#", + "description": "An organization or tenant, whose resources are managed by organizational admins.", + "icon": "fa-building", + "mat-icon": "domain", + "order": [ + "name", + "description", + "owners", + "admins", + "members", + "parent", + "children", + "adminIDs", + "ownerIDs", + "parentAdminIDs", + "parentOwnerIDs", + "parentIDs", + ], + "properties": { + "adminIDs": { + "isVirtual": true, + "items": { + "title": "admin ids", + "type": "string", + }, + "queryConfig": { + "flattenProperties": true, + "referencedObjectFields": [ + "_id", + ], + "referencedRelationshipFields": [ + "admins", + ], + }, + "returnByDefault": true, + "searchable": false, + "title": "Admin user ids", + "type": "array", + "userEditable": false, + "viewable": false, + }, + "admins": { + "items": { + "notifySelf": true, + "properties": { + "_ref": { + "type": "string", + }, + "_refProperties": { + "properties": { + "_id": { + "propName": "_id", + "required": false, + "type": "string", + }, + }, + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "User", + "notify": false, + "path": "managed/alpha_user", + "query": { + "fields": [ + "userName", + "givenName", + "sn", + ], + "queryFilter": "true", + "sortKeys": [], + }, + }, + ], + "reversePropertyName": "adminOfOrg", + "reverseRelationship": true, + "type": "relationship", + "validate": true, + }, + "notifyRelationships": [ + "children", + ], + "returnByDefault": false, + "searchable": false, + "title": "Administrators", + "type": "array", + "userEditable": false, + "viewable": true, + }, + "children": { + "description": "Child Organizations", + "items": { + "notifySelf": true, + "properties": { + "_ref": { + "type": "string", + }, + "_refProperties": { + "properties": { + "_id": { + "propName": "_id", + "required": false, + "type": "string", + }, + }, + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "Organization", + "notify": true, + "path": "managed/alpha_organization", + "query": { + "fields": [ + "name", + "description", + ], + "queryFilter": "true", + "sortKeys": [], + }, + }, + ], + "reversePropertyName": "parent", + "reverseRelationship": true, + "type": "relationship", + "validate": true, + }, + "policies": [], + "returnByDefault": false, + "searchable": false, + "title": "Child Organizations", + "type": "array", + "userEditable": false, + "viewable": false, + }, + "description": { + "searchable": true, + "title": "Description", + "type": "string", + "userEditable": true, + "viewable": true, + }, + "members": { + "items": { + "notifySelf": false, + "properties": { + "_ref": { + "type": "string", + }, + "_refProperties": { + "properties": { + "_id": { + "propName": "_id", + "required": false, + "type": "string", + }, + }, + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "User", + "notify": true, + "path": "managed/alpha_user", + "query": { + "fields": [ + "userName", + "givenName", + "sn", + ], + "queryFilter": "true", + "sortKeys": [], + }, + }, + ], + "reversePropertyName": "memberOfOrg", + "reverseRelationship": true, + "type": "relationship", + "validate": true, + }, + "returnByDefault": false, + "searchable": false, + "title": "Members", + "type": "array", + "userEditable": false, + "viewable": true, + }, + "name": { + "searchable": true, + "title": "Name", + "type": "string", + "userEditable": true, + "viewable": true, + }, + "ownerIDs": { + "isVirtual": true, + "items": { + "title": "owner ids", + "type": "string", + }, + "queryConfig": { + "flattenProperties": true, + "referencedObjectFields": [ + "_id", + ], + "referencedRelationshipFields": [ + "owners", + ], + }, + "returnByDefault": true, + "searchable": false, + "title": "Owner user ids", + "type": "array", + "userEditable": false, + "viewable": false, + }, + "owners": { + "items": { + "notifySelf": true, + "properties": { + "_ref": { + "type": "string", + }, + "_refProperties": { + "properties": { + "_id": { + "propName": "_id", + "required": false, + "type": "string", + }, + }, + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "User", + "notify": false, + "path": "managed/alpha_user", + "query": { + "fields": [ + "userName", + "givenName", + "sn", + ], + "queryFilter": "true", + "sortKeys": [], + }, + }, + ], + "reversePropertyName": "ownerOfOrg", + "reverseRelationship": true, + "type": "relationship", + "validate": true, + }, + "notifyRelationships": [ + "children", + ], + "returnByDefault": false, + "searchable": false, + "title": "Owner", + "type": "array", + "userEditable": false, + "viewable": true, + }, + "parent": { + "description": "Parent Organization", + "notifyRelationships": [ + "children", + "members", + ], + "notifySelf": true, + "properties": { + "_ref": { + "type": "string", + }, + "_refProperties": { + "properties": { + "_id": { + "propName": "_id", + "required": false, + "type": "string", + }, + }, + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "Organization", + "notify": false, + "path": "managed/alpha_organization", + "query": { + "fields": [ + "name", + "description", + ], + "queryFilter": "true", + "sortKeys": [], + }, + }, + ], + "returnByDefault": false, + "reversePropertyName": "children", + "reverseRelationship": true, + "searchable": false, + "title": "Parent Organization", + "type": "relationship", + "userEditable": false, + "validate": true, + "viewable": true, + }, + "parentAdminIDs": { + "isVirtual": true, + "items": { + "title": "user ids of parent admins", + "type": "string", + }, + "queryConfig": { + "flattenProperties": true, + "referencedObjectFields": [ + "adminIDs", + "parentAdminIDs", + ], + "referencedRelationshipFields": [ + "parent", + ], + }, + "returnByDefault": true, + "searchable": false, + "title": "user ids of parent admins", + "type": "array", + "userEditable": false, + "viewable": false, + }, + "parentIDs": { + "isVirtual": true, + "items": { + "title": "parent org ids", + "type": "string", + }, + "queryConfig": { + "flattenProperties": true, + "referencedObjectFields": [ + "_id", + "parentIDs", + ], + "referencedRelationshipFields": [ + "parent", + ], + }, + "returnByDefault": true, + "searchable": false, + "title": "parent org ids", + "type": "array", + "userEditable": false, + "viewable": false, + }, + "parentOwnerIDs": { + "isVirtual": true, + "items": { + "title": "user ids of parent owners", + "type": "string", + }, + "queryConfig": { + "flattenProperties": true, + "referencedObjectFields": [ + "ownerIDs", + "parentOwnerIDs", + ], + "referencedRelationshipFields": [ + "parent", + ], + }, + "returnByDefault": true, + "searchable": false, + "title": "user ids of parent owners", + "type": "array", + "userEditable": false, + "viewable": false, + }, + }, + "required": [ + "name", + ], + "title": "Alpha realm - Organization", + "type": "object", + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/managed/alpha_role.managed.json 1`] = ` +{ + "name": "alpha_role", + "schema": { + "$schema": "http://forgerock.org/json-schema#", + "description": "", + "icon": "fa-check-square-o", + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:Role", + "mat-icon": "assignment_ind", + "order": [ + "_id", + "name", + "description", + "members", + "assignments", + "applications", + "condition", + "temporalConstraints", + ], + "properties": { + "_id": { + "description": "Role ID", + "searchable": false, + "title": "Name", + "type": "string", + "viewable": false, + }, + "applications": { + "description": "Role Applications", + "items": { + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:Role:applications:items", + "notifySelf": true, + "properties": { + "_ref": { + "description": "References a relationship from a managed object", + "type": "string", + }, + "_refProperties": { + "description": "Supports metadata within the relationship", + "properties": { + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Role Application Items _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "Application", + "path": "managed/alpha_application", + "query": { + "fields": [ + "name", + ], + "queryFilter": "true", + }, + }, + ], + "reversePropertyName": "roles", + "reverseRelationship": true, + "title": "Role Application Items", + "type": "relationship", + "validate": true, + }, + "notifyRelationships": [ + "members", + ], + "relationshipGrantTemporalConstraintsEnforced": true, + "returnByDefault": false, + "title": "Applications", + "type": "array", + "viewable": false, + }, + "assignments": { + "description": "Managed Assignments", + "items": { + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:Role:assignments:items", + "notifySelf": true, + "properties": { + "_ref": { + "description": "References a relationship from a managed object", + "type": "string", + }, + "_refProperties": { + "description": "Supports metadata within the relationship", + "properties": { + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Managed Assignments Items _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "Assignment", + "path": "managed/alpha_assignment", + "query": { + "fields": [ + "name", + ], + "queryFilter": "true", + }, + }, + ], + "reversePropertyName": "roles", + "reverseRelationship": true, + "title": "Managed Assignments Items", + "type": "relationship", + "validate": true, + }, + "notifyRelationships": [ + "members", + ], + "returnByDefault": false, + "title": "Managed Assignments", + "type": "array", + "viewable": true, + }, + "condition": { + "description": "A conditional filter for this role", + "isConditional": true, + "searchable": false, + "title": "Condition", + "type": "string", + "viewable": false, + }, + "description": { + "description": "The role description, used for display purposes.", + "searchable": true, + "title": "Description", + "type": "string", + "viewable": true, + }, + "members": { + "description": "Role Members", + "items": { + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:Role:members:items", + "properties": { + "_ref": { + "description": "References a relationship from a managed object", + "type": "string", + }, + "_refProperties": { + "description": "Supports metadata within the relationship", + "properties": { + "_grantType": { + "description": "Grant Type", + "label": "Grant Type", + "type": "string", + }, + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Role Members Items _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "conditionalAssociation": true, + "label": "User", + "notify": true, + "path": "managed/alpha_user", + "query": { + "fields": [ + "userName", + "givenName", + "sn", + ], + "queryFilter": "true", + }, + }, + ], + "reversePropertyName": "roles", + "reverseRelationship": true, + "title": "Role Members Items", + "type": "relationship", + "validate": true, + }, + "relationshipGrantTemporalConstraintsEnforced": true, + "returnByDefault": false, + "title": "Role Members", + "type": "array", + "viewable": true, + }, + "name": { + "description": "The role name, used for display purposes.", + "policies": [ + { + "policyId": "unique", + }, + ], + "searchable": true, + "title": "Name", + "type": "string", + "viewable": true, + }, + "temporalConstraints": { + "description": "An array of temporal constraints for a role", + "isTemporalConstraint": true, + "items": { + "order": [ + "duration", + ], + "properties": { + "duration": { + "description": "Duration", + "type": "string", + }, + }, + "required": [ + "duration", + ], + "title": "Temporal Constraints Items", + "type": "object", + }, + "notifyRelationships": [ + "members", + ], + "returnByDefault": true, + "title": "Temporal Constraints", + "type": "array", + "viewable": false, + }, + }, + "required": [ + "name", + ], + "title": "Alpha realm - Role", + "type": "object", + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/managed/alpha_user.managed.json 1`] = ` +{ + "lastSync": { + "effectiveAssignmentsProperty": "effectiveAssignments", + "lastSyncProperty": "lastSync", + }, + "name": "alpha_user", + "notifications": {}, + "schema": { + "$schema": "http://json-schema.org/draft-03/schema", + "icon": "fa-user", + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:User", + "mat-icon": "people", + "order": [ + "_id", + "userName", + "password", + "givenName", + "cn", + "sn", + "mail", + "profileImage", + "description", + "accountStatus", + "telephoneNumber", + "postalAddress", + "city", + "postalCode", + "country", + "stateProvince", + "roles", + "assignments", + "groups", + "applications", + "manager", + "authzRoles", + "reports", + "effectiveRoles", + "effectiveAssignments", + "effectiveGroups", + "effectiveApplications", + "lastSync", + "kbaInfo", + "preferences", + "consentedMappings", + "ownerOfOrg", + "adminOfOrg", + "memberOfOrg", + "memberOfOrgIDs", + "ownerOfApp", + "frIndexedString1", + "frIndexedString2", + "frIndexedString3", + "frIndexedString4", + "frIndexedString5", + "frUnindexedString1", + "frUnindexedString2", + "frUnindexedString3", + "frUnindexedString4", + "frUnindexedString5", + "frIndexedMultivalued1", + "frIndexedMultivalued2", + "frIndexedMultivalued3", + "frIndexedMultivalued4", + "frIndexedMultivalued5", + "frUnindexedMultivalued1", + "frUnindexedMultivalued2", + "frUnindexedMultivalued3", + "frUnindexedMultivalued4", + "frUnindexedMultivalued5", + "frIndexedDate1", + "frIndexedDate2", + "frIndexedDate3", + "frIndexedDate4", + "frIndexedDate5", + "frUnindexedDate1", + "frUnindexedDate2", + "frUnindexedDate3", + "frUnindexedDate4", + "frUnindexedDate5", + "frIndexedInteger1", + "frIndexedInteger2", + "frIndexedInteger3", + "frIndexedInteger4", + "frIndexedInteger5", + "frUnindexedInteger1", + "frUnindexedInteger2", + "frUnindexedInteger3", + "frUnindexedInteger4", + "frUnindexedInteger5", + "assignedDashboard", + ], + "properties": { + "_id": { + "description": "User ID", + "isPersonal": false, + "policies": [ + { + "params": { + "forbiddenChars": [ + "/", + ], + }, + "policyId": "cannot-contain-characters", + }, + ], + "searchable": false, + "type": "string", + "usageDescription": "", + "userEditable": false, + "viewable": false, + }, + "accountStatus": { + "default": "active", + "description": "Status", + "isPersonal": false, + "searchable": true, + "title": "Status", + "type": "string", + "usageDescription": "", + "userEditable": false, + "viewable": true, + }, + "adminOfOrg": { + "items": { + "notifySelf": false, + "properties": { + "_ref": { + "type": "string", + }, + "_refProperties": { + "properties": { + "_id": { + "propName": "_id", + "required": false, + "type": "string", + }, + }, + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "Organization", + "notify": true, + "path": "managed/alpha_organization", + "query": { + "fields": [ + "name", + ], + "queryFilter": "true", + "sortKeys": [], + }, + }, + ], + "reversePropertyName": "admins", + "reverseRelationship": true, + "type": "relationship", + "validate": true, + }, + "policies": [], + "returnByDefault": false, + "searchable": false, + "title": "Organizations I Administer", + "type": "array", + "userEditable": false, + "viewable": true, + }, + "aliasList": { + "description": "List of identity aliases used primarily to record social IdP subjects for this user", + "isVirtual": false, + "items": { + "title": "User Alias Names Items", + "type": "string", + }, + "returnByDefault": false, + "searchable": false, + "title": "User Alias Names List", + "type": "array", + "userEditable": true, + "viewable": false, + }, + "applications": { + "description": "Applications", + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:User:applications", + "isPersonal": false, + "items": { + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:User:applications:items", + "notifySelf": true, + "properties": { + "_ref": { + "description": "References a relationship from a managed object", + "type": "string", + }, + "_refProperties": { + "description": "Supports metadata within the relationship", + "properties": { + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Groups Items _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "Application", + "path": "managed/alpha_application", + "query": { + "fields": [ + "name", + ], + "queryFilter": "true", + "sortKeys": [ + "name", + ], + }, + }, + ], + "reversePropertyName": "members", + "reverseRelationship": true, + "title": "Groups Items", + "type": "relationship", + "validate": true, + }, + "returnByDefault": false, + "title": "Applications", + "type": "array", + "usageDescription": "", + "userEditable": false, + "viewable": false, + }, + "assignedDashboard": { + "description": "List of items to click on for this user", + "isVirtual": true, + "items": { + "title": "Assigned Dashboard Items", + "type": "string", + }, + "queryConfig": { + "flattenProperties": true, + "referencedObjectFields": [ + "name", + ], + "referencedRelationshipFields": [ + [ + "roles", + "applications", + ], + [ + "applications", + ], + ], + }, + "searchable": false, + "title": "Assigned Dashboard", + "type": "array", + "userEditable": false, + "viewable": true, + }, + "assignments": { + "description": "Assignments", + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:User:assignments", + "isPersonal": false, + "items": { + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:User:assignments:items", + "notifySelf": true, + "properties": { + "_ref": { + "description": "References a relationship from a managed object", + "type": "string", + }, + "_refProperties": { + "description": "Supports metadata within the relationship", + "properties": { + "_grantType": { + "description": "Grant Type", + "label": "Grant Type", + "type": "string", + }, + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Provisioning Roles Items _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "conditionalAssociationField": "condition", + "label": "Assignment", + "path": "managed/alpha_assignment", + "query": { + "fields": [ + "name", + ], + "queryFilter": "true", + }, + }, + ], + "reversePropertyName": "members", + "reverseRelationship": true, + "title": "Assignments Items", + "type": "relationship", + "validate": true, + }, + "returnByDefault": false, + "title": "Assignments", + "type": "array", + "usageDescription": "", + "userEditable": false, + "viewable": true, + }, + "authzRoles": { + "description": "Authorization Roles", + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:User:authzRoles", + "isPersonal": false, + "items": { + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:User:authzRoles:items", + "properties": { + "_ref": { + "description": "References a relationship from a managed object", + "type": "string", + }, + "_refProperties": { + "description": "Supports metadata within the relationship", + "properties": { + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Authorization Roles Items _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "conditionalAssociationField": "condition", + "label": "Internal Role", + "path": "internal/role", + "query": { + "fields": [ + "name", + ], + "queryFilter": "true", + }, + }, + ], + "reversePropertyName": "authzMembers", + "reverseRelationship": true, + "title": "Authorization Roles Items", + "type": "relationship", + "validate": true, + }, + "returnByDefault": false, + "title": "Authorization Roles", + "type": "array", + "usageDescription": "", + "userEditable": false, + "viewable": true, + }, + "city": { + "description": "City", + "isPersonal": false, + "title": "City", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "cn": { + "default": "{{givenName}} {{sn}}", + "description": "Common Name", + "isPersonal": true, + "scope": "private", + "searchable": false, + "title": "Common Name", + "type": "string", + "userEditable": false, + "viewable": false, + }, + "consentedMappings": { + "description": "Consented Mappings", + "isPersonal": false, + "isVirtual": false, + "items": { + "items": { + "order": [ + "mapping", + "consentDate", + ], + "properties": { + "consentDate": { + "description": "Consent Date", + "searchable": true, + "title": "Consent Date", + "type": "string", + "userEditable": true, + "viewable": true, + }, + "mapping": { + "description": "Mapping", + "searchable": true, + "title": "Mapping", + "type": "string", + "userEditable": true, + "viewable": true, + }, + }, + "required": [ + "mapping", + "consentDate", + ], + "title": "Consented Mappings Item", + "type": "object", + }, + "title": "Consented Mappings Items", + "type": "array", + }, + "returnByDefault": false, + "searchable": false, + "title": "Consented Mappings", + "type": "array", + "usageDescription": "", + "userEditable": true, + "viewable": false, + }, + "country": { + "description": "Country", + "isPersonal": false, + "title": "Country", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "description": { + "description": "Description", + "isPersonal": false, + "searchable": true, + "title": "Description", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "effectiveApplications": { + "description": "Effective Applications", + "isPersonal": false, + "isVirtual": true, + "items": { + "title": "Effective Assigned Application Items", + "type": "object", + }, + "queryConfig": { + "referencedObjectFields": [ + "name", + ], + "referencedRelationshipFields": [ + [ + "roles", + "applications", + ], + [ + "applications", + ], + ], + }, + "returnByDefault": true, + "title": "Effective Applications", + "type": "array", + "viewable": false, + }, + "effectiveAssignments": { + "description": "Effective Assignments", + "isPersonal": false, + "isVirtual": true, + "items": { + "title": "Effective Assignments Items", + "type": "object", + }, + "queryConfig": { + "referencedObjectFields": [ + "*", + ], + "referencedRelationshipFields": [ + [ + "roles", + "assignments", + ], + [ + "assignments", + ], + ], + }, + "returnByDefault": true, + "title": "Effective Assignments", + "type": "array", + "usageDescription": "", + "viewable": false, + }, + "effectiveGroups": { + "description": "Effective Groups", + "isPersonal": false, + "isVirtual": true, + "items": { + "title": "Effective Groups Items", + "type": "object", + }, + "queryConfig": { + "referencedRelationshipFields": [ + "groups", + ], + }, + "returnByDefault": true, + "title": "Effective Groups", + "type": "array", + "usageDescription": "", + "viewable": false, + }, + "effectiveRoles": { + "description": "Effective Roles", + "isPersonal": false, + "isVirtual": true, + "items": { + "title": "Effective Roles Items", + "type": "object", + }, + "queryConfig": { + "referencedRelationshipFields": [ + "roles", + ], + }, + "returnByDefault": true, + "title": "Effective Roles", + "type": "array", + "usageDescription": "", + "viewable": false, + }, + "frIndexedDate1": { + "description": "Generic Indexed Date 1", + "isPersonal": false, + "title": "Generic Indexed Date 1", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedDate2": { + "description": "Generic Indexed Date 2", + "isPersonal": false, + "title": "Generic Indexed Date 2", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedDate3": { + "description": "Generic Indexed Date 3", + "isPersonal": false, + "title": "Generic Indexed Date 3", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedDate4": { + "description": "Generic Indexed Date 4", + "isPersonal": false, + "title": "Generic Indexed Date 4", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedDate5": { + "description": "Generic Indexed Date 5", + "isPersonal": false, + "title": "Generic Indexed Date 5", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedInteger1": { + "description": "Generic Indexed Integer 1", + "isPersonal": false, + "title": "Generic Indexed Integer 1", + "type": "number", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedInteger2": { + "description": "Generic Indexed Integer 2", + "isPersonal": false, + "title": "Generic Indexed Integer 2", + "type": "number", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedInteger3": { + "description": "Generic Indexed Integer 3", + "isPersonal": false, + "title": "Generic Indexed Integer 3", + "type": "number", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedInteger4": { + "description": "Generic Indexed Integer 4", + "isPersonal": false, + "title": "Generic Indexed Integer 4", + "type": "number", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedInteger5": { + "description": "Generic Indexed Integer 5", + "isPersonal": false, + "title": "Generic Indexed Integer 5", + "type": "number", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedMultivalued1": { + "description": "Generic Indexed Multivalue 1", + "isPersonal": false, + "items": { + "type": "string", + }, + "title": "Generic Indexed Multivalue 1", + "type": "array", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedMultivalued2": { + "description": "Generic Indexed Multivalue 2", + "isPersonal": false, + "items": { + "type": "string", + }, + "title": "Generic Indexed Multivalue 2", + "type": "array", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedMultivalued3": { + "description": "Generic Indexed Multivalue 3", + "isPersonal": false, + "items": { + "type": "string", + }, + "title": "Generic Indexed Multivalue 3", + "type": "array", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedMultivalued4": { + "description": "Generic Indexed Multivalue 4", + "isPersonal": false, + "items": { + "type": "string", + }, + "title": "Generic Indexed Multivalue 4", + "type": "array", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedMultivalued5": { + "description": "Generic Indexed Multivalue 5", + "isPersonal": false, + "items": { + "type": "string", + }, + "title": "Generic Indexed Multivalue 5", + "type": "array", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedString1": { + "description": "Generic Indexed String 1", + "isPersonal": false, + "title": "Generic Indexed String 1", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedString2": { + "description": "Generic Indexed String 2", + "isPersonal": false, + "title": "Generic Indexed String 2", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedString3": { + "description": "Generic Indexed String 3", + "isPersonal": false, + "title": "Generic Indexed String 3", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedString4": { + "description": "Generic Indexed String 4", + "isPersonal": false, + "title": "Generic Indexed String 4", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedString5": { + "description": "Generic Indexed String 5", + "isPersonal": false, + "title": "Generic Indexed String 5", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedDate1": { + "description": "Generic Unindexed Date 1", + "isPersonal": false, + "title": "Generic Unindexed Date 1", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedDate2": { + "description": "Generic Unindexed Date 2", + "isPersonal": false, + "title": "Generic Unindexed Date 2", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedDate3": { + "description": "Generic Unindexed Date 3", + "isPersonal": false, + "title": "Generic Unindexed Date 3", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedDate4": { + "description": "Generic Unindexed Date 4", + "isPersonal": false, + "title": "Generic Unindexed Date 4", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedDate5": { + "description": "Generic Unindexed Date 5", + "isPersonal": false, + "title": "Generic Unindexed Date 5", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedInteger1": { + "description": "Generic Unindexed Integer 1", + "isPersonal": false, + "title": "Generic Unindexed Integer 1", + "type": "number", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedInteger2": { + "description": "Generic Unindexed Integer 2", + "isPersonal": false, + "title": "Generic Unindexed Integer 2", + "type": "number", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedInteger3": { + "description": "Generic Unindexed Integer 3", + "isPersonal": false, + "title": "Generic Unindexed Integer 3", + "type": "number", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedInteger4": { + "description": "Generic Unindexed Integer 4", + "isPersonal": false, + "title": "Generic Unindexed Integer 4", + "type": "number", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedInteger5": { + "description": "Generic Unindexed Integer 5", + "isPersonal": false, + "title": "Generic Unindexed Integer 5", + "type": "number", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedMultivalued1": { + "description": "Generic Unindexed Multivalue 1", + "isPersonal": false, + "items": { + "type": "string", + }, + "title": "Generic Unindexed Multivalue 1", + "type": "array", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedMultivalued2": { + "description": "Generic Unindexed Multivalue 2", + "isPersonal": false, + "items": { + "type": "string", + }, + "title": "Generic Unindexed Multivalue 2", + "type": "array", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedMultivalued3": { + "description": "Generic Unindexed Multivalue 3", + "isPersonal": false, + "items": { + "type": "string", + }, + "title": "Generic Unindexed Multivalue 3", + "type": "array", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedMultivalued4": { + "description": "Generic Unindexed Multivalue 4", + "isPersonal": false, + "items": { + "type": "string", + }, + "title": "Generic Unindexed Multivalue 4", + "type": "array", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedMultivalued5": { + "description": "Generic Unindexed Multivalue 5", + "isPersonal": false, + "items": { + "type": "string", + }, + "title": "Generic Unindexed Multivalue 5", + "type": "array", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedString1": { + "description": "Generic Unindexed String 1", + "isPersonal": false, + "title": "Generic Unindexed String 1", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedString2": { + "description": "Generic Unindexed String 2", + "isPersonal": false, + "title": "Generic Unindexed String 2", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedString3": { + "description": "Generic Unindexed String 3", + "isPersonal": false, + "title": "Generic Unindexed String 3", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedString4": { + "description": "Generic Unindexed String 4", + "isPersonal": false, + "title": "Generic Unindexed String 4", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedString5": { + "description": "Generic Unindexed String 5", + "isPersonal": false, + "title": "Generic Unindexed String 5", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "givenName": { + "description": "First Name", + "isPersonal": true, + "searchable": true, + "title": "First Name", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "groups": { + "description": "Groups", + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:User:groups", + "isPersonal": false, + "items": { + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:User:groups:items", + "notifySelf": true, + "properties": { + "_ref": { + "description": "References a relationship from a managed object", + "type": "string", + }, + "_refProperties": { + "description": "Supports metadata within the relationship", + "properties": { + "_grantType": { + "description": "Grant Type", + "label": "Grant Type", + "type": "string", + }, + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Groups Items _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "conditionalAssociationField": "condition", + "label": "Group", + "path": "managed/alpha_group", + "query": { + "fields": [ + "name", + ], + "queryFilter": "true", + }, + }, + ], + "reversePropertyName": "members", + "reverseRelationship": true, + "title": "Groups Items", + "type": "relationship", + "validate": true, + }, + "relationshipGrantTemporalConstraintsEnforced": false, + "returnByDefault": false, + "title": "Groups", + "type": "array", + "usageDescription": "", + "userEditable": false, + "viewable": true, + }, + "kbaInfo": { + "description": "KBA Info", + "isPersonal": true, + "items": { + "order": [ + "answer", + "customQuestion", + "questionId", + ], + "properties": { + "answer": { + "description": "Answer", + "type": "string", + }, + "customQuestion": { + "description": "Custom question", + "type": "string", + }, + "questionId": { + "description": "Question ID", + "type": "string", + }, + }, + "required": [], + "title": "KBA Info Items", + "type": "object", + }, + "type": "array", + "usageDescription": "", + "userEditable": true, + "viewable": false, + }, + "lastSync": { + "description": "Last Sync timestamp", + "isPersonal": false, + "order": [ + "effectiveAssignments", + "timestamp", + ], + "properties": { + "effectiveAssignments": { + "description": "Effective Assignments", + "items": { + "title": "Effective Assignments Items", + "type": "object", + }, + "title": "Effective Assignments", + "type": "array", + }, + "timestamp": { + "description": "Timestamp", + "type": "string", + }, + }, + "required": [], + "scope": "private", + "searchable": false, + "title": "Last Sync timestamp", + "type": "object", + "usageDescription": "", + "viewable": false, + }, + "mail": { + "description": "Email Address", + "isPersonal": true, + "policies": [ + { + "policyId": "valid-email-address-format", + }, + ], + "searchable": true, + "title": "Email Address", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "manager": { + "description": "Manager", + "isPersonal": false, + "properties": { + "_ref": { + "description": "References a relationship from a managed object", + "type": "string", + }, + "_refProperties": { + "description": "Supports metadata within the relationship", + "properties": { + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Manager _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "User", + "path": "managed/alpha_user", + "query": { + "fields": [ + "userName", + "givenName", + "sn", + ], + "queryFilter": "true", + }, + }, + ], + "reversePropertyName": "reports", + "reverseRelationship": true, + "searchable": false, + "title": "Manager", + "type": "relationship", + "usageDescription": "", + "userEditable": false, + "validate": true, + "viewable": true, + }, + "memberOfOrg": { + "items": { + "notifySelf": true, + "properties": { + "_ref": { + "type": "string", + }, + "_refProperties": { + "properties": { + "_id": { + "propName": "_id", + "required": false, + "type": "string", + }, + }, + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "Organization", + "notify": false, + "path": "managed/alpha_organization", + "query": { + "fields": [ + "name", + ], + "queryFilter": "true", + "sortKeys": [], + }, + }, + ], + "reversePropertyName": "members", + "reverseRelationship": true, + "type": "relationship", + "validate": true, + }, + "policies": [], + "returnByDefault": false, + "searchable": false, + "title": "Organizations to which I Belong", + "type": "array", + "userEditable": false, + "viewable": true, + }, + "memberOfOrgIDs": { + "isVirtual": true, + "items": { + "title": "org identifiers", + "type": "string", + }, + "queryConfig": { + "flattenProperties": true, + "referencedObjectFields": [ + "_id", + "parentIDs", + ], + "referencedRelationshipFields": [ + "memberOfOrg", + ], + }, + "returnByDefault": true, + "searchable": false, + "title": "MemberOfOrgIDs", + "type": "array", + "userEditable": false, + "viewable": false, + }, + "ownerOfApp": { + "items": { + "properties": { + "_ref": { + "type": "string", + }, + "_refProperties": { + "properties": { + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "Application", + "path": "managed/alpha_application", + "query": { + "fields": [ + "name", + ], + "queryFilter": "true", + "sortKeys": [ + "name", + ], + }, + }, + ], + "reversePropertyName": "owners", + "reverseRelationship": true, + "type": "relationship", + "validate": true, + }, + "returnByDefault": false, + "searchable": false, + "title": "Applications I Own", + "type": "array", + "userEditable": false, + "viewable": true, + }, + "ownerOfOrg": { + "items": { + "notifySelf": false, + "properties": { + "_ref": { + "type": "string", + }, + "_refProperties": { + "properties": { + "_id": { + "propName": "_id", + "required": false, + "type": "string", + }, + }, + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "Organization", + "notify": true, + "path": "managed/alpha_organization", + "query": { + "fields": [ + "name", + ], + "queryFilter": "true", + "sortKeys": [], + }, + }, + ], + "reversePropertyName": "owners", + "reverseRelationship": true, + "type": "relationship", + "validate": true, + }, + "policies": [], + "returnByDefault": false, + "searchable": false, + "title": "Organizations I Own", + "type": "array", + "userEditable": false, + "viewable": true, + }, + "password": { + "description": "Password", + "isPersonal": false, + "isProtected": true, + "scope": "private", + "searchable": false, + "title": "Password", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": false, + }, + "postalAddress": { + "description": "Address 1", + "isPersonal": true, + "title": "Address 1", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "postalCode": { + "description": "Postal Code", + "isPersonal": false, + "title": "Postal Code", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "preferences": { + "description": "Preferences", + "isPersonal": false, + "order": [ + "updates", + "marketing", + ], + "properties": { + "marketing": { + "description": "Send me special offers and services", + "type": "boolean", + }, + "updates": { + "description": "Send me news and updates", + "type": "boolean", + }, + }, + "required": [], + "searchable": false, + "title": "Preferences", + "type": "object", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "profileImage": { + "description": "Profile Image", + "isPersonal": true, + "searchable": true, + "title": "Profile Image", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": false, + }, + "reports": { + "description": "Direct Reports", + "isPersonal": false, + "items": { + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:User:reports:items", + "properties": { + "_ref": { + "description": "References a relationship from a managed object", + "type": "string", + }, + "_refProperties": { + "description": "Supports metadata within the relationship", + "properties": { + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Direct Reports Items _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "User", + "path": "managed/alpha_user", + "query": { + "fields": [ + "userName", + "givenName", + "sn", + ], + "queryFilter": "true", + }, + }, + ], + "reversePropertyName": "manager", + "reverseRelationship": true, + "title": "Direct Reports Items", + "type": "relationship", + "validate": true, + }, + "returnByDefault": false, + "title": "Direct Reports", + "type": "array", + "usageDescription": "", + "userEditable": false, + "viewable": true, + }, + "roles": { + "description": "Provisioning Roles", + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:User:roles", + "isPersonal": false, + "items": { + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:User:roles:items", + "notifySelf": true, + "properties": { + "_ref": { + "description": "References a relationship from a managed object", + "type": "string", + }, + "_refProperties": { + "description": "Supports metadata within the relationship", + "properties": { + "_grantType": { + "description": "Grant Type", + "label": "Grant Type", + "type": "string", + }, + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Provisioning Roles Items _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "conditionalAssociationField": "condition", + "label": "Role", + "path": "managed/alpha_role", + "query": { + "fields": [ + "name", + ], + "queryFilter": "true", + }, + }, + ], + "reversePropertyName": "members", + "reverseRelationship": true, + "title": "Provisioning Roles Items", + "type": "relationship", + "validate": true, + }, + "relationshipGrantTemporalConstraintsEnforced": true, + "returnByDefault": false, + "title": "Provisioning Roles", + "type": "array", + "usageDescription": "", + "userEditable": false, + "viewable": true, + }, + "sn": { + "description": "Last Name", + "isPersonal": true, + "searchable": true, + "title": "Last Name", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "stateProvince": { + "description": "State/Province", + "isPersonal": false, + "title": "State/Province", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "telephoneNumber": { + "description": "Telephone Number", + "isPersonal": true, + "pattern": "^\\+?([0-9\\- \\(\\)])*$", + "title": "Telephone Number", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "userName": { + "description": "Username", + "isPersonal": true, + "minLength": 1, + "policies": [ + { + "policyId": "valid-username", + }, + { + "params": { + "forbiddenChars": [ + "/", + ], + }, + "policyId": "cannot-contain-characters", + }, + { + "params": { + "minLength": 1, + }, + "policyId": "minimum-length", + }, + { + "params": { + "maxLength": 255, + }, + "policyId": "maximum-length", + }, + ], + "searchable": true, + "title": "Username", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + }, + "required": [ + "userName", + "givenName", + "sn", + "mail", + ], + "title": "Alpha realm - User", + "type": "object", + "viewable": true, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/managed/bravo_application.managed.json 1`] = ` +{ + "name": "bravo_application", + "schema": { + "$schema": "http://forgerock.org/json-schema#", + "description": "Application Object", + "icon": "fa-folder", + "order": [ + "name", + "description", + "url", + "icon", + "mappingNames", + "owners", + "roles", + "members", + ], + "properties": { + "_id": { + "description": "Application ID", + "isPersonal": false, + "searchable": false, + "type": "string", + "userEditable": false, + "viewable": false, + }, + "authoritative": { + "description": "Is this an authoritative application", + "searchable": false, + "title": "Authoritative", + "type": "boolean", + "viewable": false, + }, + "connectorId": { + "description": "Id of the connector associated with the application", + "searchable": false, + "title": "Connector ID", + "type": "string", + "userEditable": false, + "viewable": false, + }, + "description": { + "description": "Application Description", + "searchable": true, + "title": "Description", + "type": "string", + "viewable": true, + }, + "icon": { + "searchable": true, + "title": "Icon", + "type": "string", + "userEditable": true, + "viewable": true, + }, + "mappingNames": { + "description": "Names of the sync mappings used by an application with provisioning configured.", + "items": { + "title": "Mapping Name Items", + "type": "string", + }, + "searchable": true, + "title": "Sync Mapping Names", + "type": "array", + "viewable": true, + }, + "members": { + "description": "Application Members", + "items": { + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:Application:members:items", + "properties": { + "_ref": { + "description": "References a relationship from a managed object", + "type": "string", + }, + "_refProperties": { + "description": "Supports metadata within the relationship", + "properties": { + "_grantType": { + "description": "Grant Type", + "label": "Grant Type", + "type": "string", + }, + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Group Members Items _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "User", + "notify": true, + "path": "managed/bravo_user", + "query": { + "fields": [ + "userName", + "givenName", + "sn", + ], + "queryFilter": "true", + }, + }, + ], + "reversePropertyName": "applications", + "reverseRelationship": true, + "title": "Group Members Items", + "type": "relationship", + "validate": true, + }, + "policies": [], + "returnByDefault": false, + "searchable": false, + "title": "Members", + "type": "array", + "userEditable": false, + "viewable": true, + }, + "name": { + "description": "Application name", + "notifyRelationships": [ + "roles", + "members", + ], + "policies": [ + { + "policyId": "unique", + }, + ], + "returnByDefault": true, + "searchable": true, + "title": "Name", + "type": "string", + "userEditable": true, + "viewable": true, + }, + "owners": { + "description": "Application Owners", + "items": { + "properties": { + "_ref": { + "type": "string", + }, + "_refProperties": { + "properties": { + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Application _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "User", + "path": "managed/bravo_user", + "query": { + "fields": [ + "userName", + "givenName", + "sn", + ], + "queryFilter": "true", + }, + }, + ], + "reversePropertyName": "ownerOfApp", + "reverseRelationship": true, + "type": "relationship", + "validate": true, + }, + "returnByDefault": false, + "searchable": false, + "title": "Owners", + "type": "array", + "userEditable": false, + "viewable": true, + }, + "roles": { + "description": "Roles granting users the application", + "items": { + "notifySelf": true, + "properties": { + "_ref": { + "type": "string", + }, + "_refProperties": { + "properties": { + "_id": { + "propName": "_id", + "required": false, + "type": "string", + }, + }, + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "Role", + "notify": true, + "path": "managed/bravo_role", + "query": { + "fields": [ + "name", + ], + "queryFilter": "true", + "sortKeys": [], + }, + }, + ], + "reversePropertyName": "applications", + "reverseRelationship": true, + "type": "relationship", + "validate": true, + }, + "returnByDefault": false, + "searchable": false, + "title": "Roles", + "type": "array", + "userEditable": false, + "viewable": true, + }, + "ssoEntities": { + "description": "SSO Entity Id", + "properties": { + "idpLocation": { + "type": "string", + }, + "idpPrivateId": { + "type": "string", + }, + "spLocation": { + "type": "string", + }, + "spPrivate": { + "type": "string", + }, + }, + "searchable": false, + "title": "SSO Entity Id", + "type": "object", + "userEditable": false, + "viewable": false, + }, + "templateName": { + "description": "Name of the template the application was created from", + "searchable": false, + "title": "Template Name", + "type": "string", + "userEditable": false, + "viewable": false, + }, + "templateVersion": { + "description": "The template version", + "searchable": false, + "title": "Template Version", + "type": "string", + "userEditable": false, + "viewable": false, + }, + "uiConfig": { + "description": "UI Config", + "isPersonal": false, + "properties": {}, + "searchable": false, + "title": "UI Config", + "type": "object", + "usageDescription": "", + "viewable": false, + }, + "url": { + "searchable": true, + "title": "Url", + "type": "string", + "userEditable": true, + "viewable": true, + }, + }, + "required": [ + "name", + ], + "title": "Bravo realm - Application", + "type": "object", + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/managed/bravo_assignment.managed.json 1`] = ` +{ + "attributeEncryption": {}, + "name": "bravo_assignment", + "schema": { + "$schema": "http://forgerock.org/json-schema#", + "description": "A role assignment", + "icon": "fa-key", + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:Assignment", + "mat-icon": "vpn_key", + "order": [ + "_id", + "name", + "description", + "type", + "mapping", + "attributes", + "linkQualifiers", + "roles", + "members", + "condition", + "weight", + ], + "properties": { + "_id": { + "description": "The assignment ID", + "searchable": false, + "title": "Name", + "type": "string", + "viewable": false, + }, + "attributes": { + "description": "The attributes operated on by this assignment.", + "items": { + "order": [ + "assignmentOperation", + "unassignmentOperation", + "name", + "value", + ], + "properties": { + "assignmentOperation": { + "description": "Assignment operation", + "type": "string", + }, + "name": { + "description": "Name", + "type": "string", + }, + "unassignmentOperation": { + "description": "Unassignment operation", + "type": "string", + }, + "value": { + "description": "Value", + "type": "string", + }, + }, + "required": [], + "title": "Assignment Attributes Items", + "type": "object", + }, + "notifyRelationships": [ + "roles", + "members", + ], + "title": "Assignment Attributes", + "type": "array", + "viewable": true, + }, + "condition": { + "description": "A conditional filter for this assignment", + "isConditional": true, + "searchable": false, + "title": "Condition", + "type": "string", + "viewable": false, + }, + "description": { + "description": "The assignment description, used for display purposes.", + "searchable": true, + "title": "Description", + "type": "string", + "viewable": true, + }, + "linkQualifiers": { + "description": "Conditional link qualifiers to restrict this assignment to.", + "items": { + "title": "Link Qualifiers Items", + "type": "string", + }, + "title": "Link Qualifiers", + "type": "array", + "viewable": true, + }, + "mapping": { + "description": "The name of the mapping this assignment applies to", + "policies": [ + { + "policyId": "mapping-exists", + }, + ], + "searchable": true, + "title": "Mapping", + "type": "string", + "viewable": true, + }, + "members": { + "description": "Assignment Members", + "items": { + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:Assignment:members:items", + "properties": { + "_ref": { + "description": "References a relationship from a managed object", + "type": "string", + }, + "_refProperties": { + "description": "Supports metadata within the relationship", + "properties": { + "_grantType": { + "description": "Grant Type", + "label": "Grant Type", + "type": "string", + }, + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Assignment Members Items _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "conditionalAssociation": true, + "label": "User", + "notify": true, + "path": "managed/bravo_user", + "query": { + "fields": [ + "userName", + "givenName", + "sn", + ], + "queryFilter": "true", + }, + }, + ], + "reversePropertyName": "assignments", + "reverseRelationship": true, + "title": "Assignment Members Items", + "type": "relationship", + "validate": true, + }, + "returnByDefault": false, + "title": "Assignment Members", + "type": "array", + "viewable": true, + }, + "name": { + "description": "The assignment name, used for display purposes.", + "searchable": true, + "title": "Name", + "type": "string", + "viewable": true, + }, + "roles": { + "description": "Managed Roles", + "items": { + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:Assignment:roles:items", + "properties": { + "_ref": { + "description": "References a relationship from a managed object", + "type": "string", + }, + "_refProperties": { + "description": "Supports metadata within the relationship", + "properties": { + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Managed Roles Items _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "Role", + "notify": true, + "path": "managed/bravo_role", + "query": { + "fields": [ + "name", + ], + "queryFilter": "true", + }, + }, + ], + "reversePropertyName": "assignments", + "reverseRelationship": true, + "title": "Managed Roles Items", + "type": "relationship", + "validate": true, + }, + "returnByDefault": false, + "title": "Managed Roles", + "type": "array", + "userEditable": false, + "viewable": true, + }, + "type": { + "description": "The type of object this assignment represents", + "title": "Type", + "type": "string", + "viewable": true, + }, + "weight": { + "description": "The weight of the assignment.", + "notifyRelationships": [ + "roles", + "members", + ], + "searchable": false, + "title": "Weight", + "type": [ + "number", + "null", + ], + "viewable": true, + }, + }, + "required": [ + "name", + "description", + "mapping", + ], + "title": "Bravo realm - Assignment", + "type": "object", + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/managed/bravo_group.managed.json 1`] = ` +{ + "name": "bravo_group", + "schema": { + "$schema": "http://forgerock.org/json-schema#", + "icon": "fa-group", + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:Group", + "mat-icon": "group", + "order": [ + "_id", + "name", + "description", + "condition", + "members", + ], + "properties": { + "_id": { + "description": "Group ID", + "isPersonal": false, + "policies": [ + { + "params": { + "propertyName": "name", + }, + "policyId": "id-must-equal-property", + }, + ], + "searchable": false, + "type": "string", + "usageDescription": "", + "userEditable": false, + "viewable": false, + }, + "condition": { + "description": "A filter for conditionally assigned members", + "isConditional": true, + "policies": [ + { + "policyId": "valid-query-filter", + }, + ], + "searchable": false, + "title": "Condition", + "type": "string", + "viewable": false, + }, + "description": { + "description": "Group Description", + "searchable": true, + "title": "Description", + "type": "string", + "userEditable": false, + "viewable": true, + }, + "members": { + "description": "Group Members", + "items": { + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:Group:members:items", + "properties": { + "_ref": { + "description": "References a relationship from a managed object", + "type": "string", + }, + "_refProperties": { + "description": "Supports metadata within the relationship", + "properties": { + "_grantType": { + "description": "Grant Type", + "label": "Grant Type", + "type": "string", + }, + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Group Members Items _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "conditionalAssociation": true, + "label": "User", + "notify": true, + "path": "managed/bravo_user", + "query": { + "fields": [ + "userName", + "givenName", + "sn", + ], + "queryFilter": "true", + }, + }, + ], + "reversePropertyName": "groups", + "reverseRelationship": true, + "title": "Group Members Items", + "type": "relationship", + "validate": true, + }, + "policies": [], + "returnByDefault": false, + "searchable": false, + "title": "Members", + "type": "array", + "userEditable": false, + "viewable": true, + }, + "name": { + "description": "Group Name", + "policies": [ + { + "policyId": "required", + }, + { + "params": { + "forbiddenChars": [ + "/*", + ], + }, + "policyId": "cannot-contain-characters", + }, + ], + "searchable": true, + "title": "Name", + "type": "string", + "viewable": true, + }, + }, + "required": [ + "name", + ], + "title": "Bravo realm - Group", + "viewable": true, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/managed/bravo_organization.managed.json 1`] = ` +{ + "name": "bravo_organization", + "schema": { + "$schema": "http://forgerock.org/json-schema#", + "description": "An organization or tenant, whose resources are managed by organizational admins.", + "icon": "fa-building", + "mat-icon": "domain", + "order": [ + "name", + "description", + "owners", + "admins", + "members", + "parent", + "children", + "adminIDs", + "ownerIDs", + "parentAdminIDs", + "parentOwnerIDs", + "parentIDs", + ], + "properties": { + "adminIDs": { + "isVirtual": true, + "items": { + "title": "admin ids", + "type": "string", + }, + "queryConfig": { + "flattenProperties": true, + "referencedObjectFields": [ + "_id", + ], + "referencedRelationshipFields": [ + "admins", + ], + }, + "returnByDefault": true, + "searchable": false, + "title": "Admin user ids", + "type": "array", + "userEditable": false, + "viewable": false, + }, + "admins": { + "items": { + "notifySelf": true, + "properties": { + "_ref": { + "type": "string", + }, + "_refProperties": { + "properties": { + "_id": { + "propName": "_id", + "required": false, + "type": "string", + }, + }, + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "User", + "notify": false, + "path": "managed/bravo_user", + "query": { + "fields": [ + "userName", + "givenName", + "sn", + ], + "queryFilter": "true", + "sortKeys": [], + }, + }, + ], + "reversePropertyName": "adminOfOrg", + "reverseRelationship": true, + "type": "relationship", + "validate": true, + }, + "notifyRelationships": [ + "children", + ], + "returnByDefault": false, + "searchable": false, + "title": "Administrators", + "type": "array", + "userEditable": false, + "viewable": true, + }, + "children": { + "description": "Child Organizations", + "items": { + "notifySelf": true, + "properties": { + "_ref": { + "type": "string", + }, + "_refProperties": { + "properties": { + "_id": { + "propName": "_id", + "required": false, + "type": "string", + }, + }, + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "Organization", + "notify": true, + "path": "managed/bravo_organization", + "query": { + "fields": [ + "name", + "description", + ], + "queryFilter": "true", + "sortKeys": [], + }, + }, + ], + "reversePropertyName": "parent", + "reverseRelationship": true, + "type": "relationship", + "validate": true, + }, + "policies": [], + "returnByDefault": false, + "searchable": false, + "title": "Child Organizations", + "type": "array", + "userEditable": false, + "viewable": false, + }, + "description": { + "searchable": true, + "title": "Description", + "type": "string", + "userEditable": true, + "viewable": true, + }, + "members": { + "items": { + "notifySelf": false, + "properties": { + "_ref": { + "type": "string", + }, + "_refProperties": { + "properties": { + "_id": { + "propName": "_id", + "required": false, + "type": "string", + }, + }, + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "User", + "notify": true, + "path": "managed/bravo_user", + "query": { + "fields": [ + "userName", + "givenName", + "sn", + ], + "queryFilter": "true", + "sortKeys": [], + }, + }, + ], + "reversePropertyName": "memberOfOrg", + "reverseRelationship": true, + "type": "relationship", + "validate": true, + }, + "returnByDefault": false, + "searchable": false, + "title": "Members", + "type": "array", + "userEditable": false, + "viewable": true, + }, + "name": { + "searchable": true, + "title": "Name", + "type": "string", + "userEditable": true, + "viewable": true, + }, + "ownerIDs": { + "isVirtual": true, + "items": { + "title": "owner ids", + "type": "string", + }, + "queryConfig": { + "flattenProperties": true, + "referencedObjectFields": [ + "_id", + ], + "referencedRelationshipFields": [ + "owners", + ], + }, + "returnByDefault": true, + "searchable": false, + "title": "Owner user ids", + "type": "array", + "userEditable": false, + "viewable": false, + }, + "owners": { + "items": { + "notifySelf": true, + "properties": { + "_ref": { + "type": "string", + }, + "_refProperties": { + "properties": { + "_id": { + "propName": "_id", + "required": false, + "type": "string", + }, + }, + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "User", + "notify": false, + "path": "managed/bravo_user", + "query": { + "fields": [ + "userName", + "givenName", + "sn", + ], + "queryFilter": "true", + "sortKeys": [], + }, + }, + ], + "reversePropertyName": "ownerOfOrg", + "reverseRelationship": true, + "type": "relationship", + "validate": true, + }, + "notifyRelationships": [ + "children", + ], + "returnByDefault": false, + "searchable": false, + "title": "Owner", + "type": "array", + "userEditable": false, + "viewable": true, + }, + "parent": { + "description": "Parent Organization", + "notifyRelationships": [ + "children", + "members", + ], + "notifySelf": true, + "properties": { + "_ref": { + "type": "string", + }, + "_refProperties": { + "properties": { + "_id": { + "propName": "_id", + "required": false, + "type": "string", + }, + }, + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "Organization", + "notify": false, + "path": "managed/bravo_organization", + "query": { + "fields": [ + "name", + "description", + ], + "queryFilter": "true", + "sortKeys": [], + }, + }, + ], + "returnByDefault": false, + "reversePropertyName": "children", + "reverseRelationship": true, + "searchable": false, + "title": "Parent Organization", + "type": "relationship", + "userEditable": false, + "validate": true, + "viewable": true, + }, + "parentAdminIDs": { + "isVirtual": true, + "items": { + "title": "user ids of parent admins", + "type": "string", + }, + "queryConfig": { + "flattenProperties": true, + "referencedObjectFields": [ + "adminIDs", + "parentAdminIDs", + ], + "referencedRelationshipFields": [ + "parent", + ], + }, + "returnByDefault": true, + "searchable": false, + "title": "user ids of parent admins", + "type": "array", + "userEditable": false, + "viewable": false, + }, + "parentIDs": { + "isVirtual": true, + "items": { + "title": "parent org ids", + "type": "string", + }, + "queryConfig": { + "flattenProperties": true, + "referencedObjectFields": [ + "_id", + "parentIDs", + ], + "referencedRelationshipFields": [ + "parent", + ], + }, + "returnByDefault": true, + "searchable": false, + "title": "parent org ids", + "type": "array", + "userEditable": false, + "viewable": false, + }, + "parentOwnerIDs": { + "isVirtual": true, + "items": { + "title": "user ids of parent owners", + "type": "string", + }, + "queryConfig": { + "flattenProperties": true, + "referencedObjectFields": [ + "ownerIDs", + "parentOwnerIDs", + ], + "referencedRelationshipFields": [ + "parent", + ], + }, + "returnByDefault": true, + "searchable": false, + "title": "user ids of parent owners", + "type": "array", + "userEditable": false, + "viewable": false, + }, + }, + "required": [ + "name", + ], + "title": "Bravo realm - Organization", + "type": "object", + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/managed/bravo_role.managed.json 1`] = ` +{ + "name": "bravo_role", + "schema": { + "$schema": "http://forgerock.org/json-schema#", + "description": "", + "icon": "fa-check-square-o", + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:Role", + "mat-icon": "assignment_ind", + "order": [ + "_id", + "name", + "description", + "members", + "assignments", + "applications", + "condition", + "temporalConstraints", + ], + "properties": { + "_id": { + "description": "Role ID", + "searchable": false, + "title": "Name", + "type": "string", + "viewable": false, + }, + "applications": { + "description": "Role Applications", + "items": { + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:Role:applications:items", + "notifySelf": true, + "properties": { + "_ref": { + "description": "References a relationship from a managed object", + "type": "string", + }, + "_refProperties": { + "description": "Supports metadata within the relationship", + "properties": { + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Role Application Items _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "Application", + "path": "managed/bravo_application", + "query": { + "fields": [ + "name", + ], + "queryFilter": "true", + }, + }, + ], + "reversePropertyName": "roles", + "reverseRelationship": true, + "title": "Role Application Items", + "type": "relationship", + "validate": true, + }, + "notifyRelationships": [ + "members", + ], + "relationshipGrantTemporalConstraintsEnforced": true, + "returnByDefault": false, + "title": "Applications", + "type": "array", + "viewable": false, + }, + "assignments": { + "description": "Managed Assignments", + "items": { + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:Role:assignments:items", + "notifySelf": true, + "properties": { + "_ref": { + "description": "References a relationship from a managed object", + "type": "string", + }, + "_refProperties": { + "description": "Supports metadata within the relationship", + "properties": { + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Managed Assignments Items _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "Assignment", + "path": "managed/bravo_assignment", + "query": { + "fields": [ + "name", + ], + "queryFilter": "true", + }, + }, + ], + "reversePropertyName": "roles", + "reverseRelationship": true, + "title": "Managed Assignments Items", + "type": "relationship", + "validate": true, + }, + "notifyRelationships": [ + "members", + ], + "returnByDefault": false, + "title": "Managed Assignments", + "type": "array", + "viewable": true, + }, + "condition": { + "description": "A conditional filter for this role", + "isConditional": true, + "searchable": false, + "title": "Condition", + "type": "string", + "viewable": false, + }, + "description": { + "description": "The role description, used for display purposes.", + "searchable": true, + "title": "Description", + "type": "string", + "viewable": true, + }, + "members": { + "description": "Role Members", + "items": { + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:Role:members:items", + "properties": { + "_ref": { + "description": "References a relationship from a managed object", + "type": "string", + }, + "_refProperties": { + "description": "Supports metadata within the relationship", + "properties": { + "_grantType": { + "description": "Grant Type", + "label": "Grant Type", + "type": "string", + }, + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Role Members Items _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "conditionalAssociation": true, + "label": "User", + "notify": true, + "path": "managed/bravo_user", + "query": { + "fields": [ + "userName", + "givenName", + "sn", + ], + "queryFilter": "true", + }, + }, + ], + "reversePropertyName": "roles", + "reverseRelationship": true, + "title": "Role Members Items", + "type": "relationship", + "validate": true, + }, + "relationshipGrantTemporalConstraintsEnforced": true, + "returnByDefault": false, + "title": "Role Members", + "type": "array", + "viewable": true, + }, + "name": { + "description": "The role name, used for display purposes.", + "policies": [ + { + "policyId": "unique", + }, + ], + "searchable": true, + "title": "Name", + "type": "string", + "viewable": true, + }, + "temporalConstraints": { + "description": "An array of temporal constraints for a role", + "isTemporalConstraint": true, + "items": { + "order": [ + "duration", + ], + "properties": { + "duration": { + "description": "Duration", + "type": "string", + }, + }, + "required": [ + "duration", + ], + "title": "Temporal Constraints Items", + "type": "object", + }, + "notifyRelationships": [ + "members", + ], + "returnByDefault": true, + "title": "Temporal Constraints", + "type": "array", + "viewable": false, + }, + }, + "required": [ + "name", + ], + "title": "Bravo realm - Role", + "type": "object", + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/managed/bravo_user.managed.json 1`] = ` +{ + "lastSync": { + "effectiveAssignmentsProperty": "effectiveAssignments", + "lastSyncProperty": "lastSync", + }, + "name": "bravo_user", + "notifications": {}, + "schema": { + "$schema": "http://json-schema.org/draft-03/schema", + "icon": "fa-user", + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:User", + "mat-icon": "people", + "order": [ + "_id", + "userName", + "password", + "givenName", + "cn", + "sn", + "mail", + "profileImage", + "description", + "accountStatus", + "telephoneNumber", + "postalAddress", + "city", + "postalCode", + "country", + "stateProvince", + "roles", + "assignments", + "groups", + "applications", + "manager", + "authzRoles", + "reports", + "effectiveRoles", + "effectiveAssignments", + "effectiveGroups", + "effectiveApplications", + "lastSync", + "kbaInfo", + "preferences", + "consentedMappings", + "ownerOfOrg", + "adminOfOrg", + "memberOfOrg", + "memberOfOrgIDs", + "ownerOfApp", + "frIndexedString1", + "frIndexedString2", + "frIndexedString3", + "frIndexedString4", + "frIndexedString5", + "frUnindexedString1", + "frUnindexedString2", + "frUnindexedString3", + "frUnindexedString4", + "frUnindexedString5", + "frIndexedMultivalued1", + "frIndexedMultivalued2", + "frIndexedMultivalued3", + "frIndexedMultivalued4", + "frIndexedMultivalued5", + "frUnindexedMultivalued1", + "frUnindexedMultivalued2", + "frUnindexedMultivalued3", + "frUnindexedMultivalued4", + "frUnindexedMultivalued5", + "frIndexedDate1", + "frIndexedDate2", + "frIndexedDate3", + "frIndexedDate4", + "frIndexedDate5", + "frUnindexedDate1", + "frUnindexedDate2", + "frUnindexedDate3", + "frUnindexedDate4", + "frUnindexedDate5", + "frIndexedInteger1", + "frIndexedInteger2", + "frIndexedInteger3", + "frIndexedInteger4", + "frIndexedInteger5", + "frUnindexedInteger1", + "frUnindexedInteger2", + "frUnindexedInteger3", + "frUnindexedInteger4", + "frUnindexedInteger5", + "assignedDashboard", + ], + "properties": { + "_id": { + "description": "User ID", + "isPersonal": false, + "policies": [ + { + "params": { + "forbiddenChars": [ + "/", + ], + }, + "policyId": "cannot-contain-characters", + }, + ], + "searchable": false, + "type": "string", + "usageDescription": "", + "userEditable": false, + "viewable": false, + }, + "accountStatus": { + "default": "active", + "description": "Status", + "isPersonal": false, + "searchable": true, + "title": "Status", + "type": "string", + "usageDescription": "", + "userEditable": false, + "viewable": true, + }, + "adminOfOrg": { + "items": { + "notifySelf": false, + "properties": { + "_ref": { + "type": "string", + }, + "_refProperties": { + "properties": { + "_id": { + "propName": "_id", + "required": false, + "type": "string", + }, + }, + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "Organization", + "notify": true, + "path": "managed/bravo_organization", + "query": { + "fields": [ + "name", + ], + "queryFilter": "true", + "sortKeys": [], + }, + }, + ], + "reversePropertyName": "admins", + "reverseRelationship": true, + "type": "relationship", + "validate": true, + }, + "policies": [], + "returnByDefault": false, + "searchable": false, + "title": "Organizations I Administer", + "type": "array", + "userEditable": false, + "viewable": true, + }, + "aliasList": { + "description": "List of identity aliases used primarily to record social IdP subjects for this user", + "isVirtual": false, + "items": { + "title": "User Alias Names Items", + "type": "string", + }, + "returnByDefault": false, + "searchable": false, + "title": "User Alias Names List", + "type": "array", + "userEditable": true, + "viewable": false, + }, + "applications": { + "description": "Applications", + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:User:applications", + "isPersonal": false, + "items": { + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:User:applications:items", + "notifySelf": true, + "properties": { + "_ref": { + "description": "References a relationship from a managed object", + "type": "string", + }, + "_refProperties": { + "description": "Supports metadata within the relationship", + "properties": { + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Groups Items _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "Application", + "path": "managed/bravo_application", + "query": { + "fields": [ + "name", + ], + "queryFilter": "true", + "sortKeys": [ + "name", + ], + }, + }, + ], + "reversePropertyName": "members", + "reverseRelationship": true, + "title": "Groups Items", + "type": "relationship", + "validate": true, + }, + "returnByDefault": false, + "title": "Applications", + "type": "array", + "usageDescription": "", + "userEditable": false, + "viewable": false, + }, + "assignedDashboard": { + "description": "List of items to click on for this user", + "isVirtual": true, + "items": { + "title": "Assigned Dashboard Items", + "type": "string", + }, + "queryConfig": { + "flattenProperties": true, + "referencedObjectFields": [ + "name", + ], + "referencedRelationshipFields": [ + [ + "roles", + "applications", + ], + [ + "applications", + ], + ], + }, + "searchable": false, + "title": "Assigned Dashboard", + "type": "array", + "userEditable": false, + "viewable": true, + }, + "assignments": { + "description": "Assignments", + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:User:assignments", + "isPersonal": false, + "items": { + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:User:assignments:items", + "notifySelf": true, + "properties": { + "_ref": { + "description": "References a relationship from a managed object", + "type": "string", + }, + "_refProperties": { + "description": "Supports metadata within the relationship", + "properties": { + "_grantType": { + "description": "Grant Type", + "label": "Grant Type", + "type": "string", + }, + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Provisioning Roles Items _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "conditionalAssociationField": "condition", + "label": "Assignment", + "path": "managed/bravo_assignment", + "query": { + "fields": [ + "name", + ], + "queryFilter": "true", + }, + }, + ], + "reversePropertyName": "members", + "reverseRelationship": true, + "title": "Assignments Items", + "type": "relationship", + "validate": true, + }, + "returnByDefault": false, + "title": "Assignments", + "type": "array", + "usageDescription": "", + "userEditable": false, + "viewable": true, + }, + "authzRoles": { + "description": "Authorization Roles", + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:User:authzRoles", + "isPersonal": false, + "items": { + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:User:authzRoles:items", + "properties": { + "_ref": { + "description": "References a relationship from a managed object", + "type": "string", + }, + "_refProperties": { + "description": "Supports metadata within the relationship", + "properties": { + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Authorization Roles Items _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "conditionalAssociationField": "condition", + "label": "Internal Role", + "path": "internal/role", + "query": { + "fields": [ + "name", + ], + "queryFilter": "true", + }, + }, + ], + "reversePropertyName": "authzMembers", + "reverseRelationship": true, + "title": "Authorization Roles Items", + "type": "relationship", + "validate": true, + }, + "returnByDefault": false, + "title": "Authorization Roles", + "type": "array", + "usageDescription": "", + "userEditable": false, + "viewable": true, + }, + "city": { + "description": "City", + "isPersonal": false, + "title": "City", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "cn": { + "default": "{{givenName}} {{sn}}", + "description": "Common Name", + "isPersonal": true, + "scope": "private", + "searchable": false, + "title": "Common Name", + "type": "string", + "userEditable": false, + "viewable": false, + }, + "consentedMappings": { + "description": "Consented Mappings", + "isPersonal": false, + "isVirtual": false, + "items": { + "items": { + "order": [ + "mapping", + "consentDate", + ], + "properties": { + "consentDate": { + "description": "Consent Date", + "searchable": true, + "title": "Consent Date", + "type": "string", + "userEditable": true, + "viewable": true, + }, + "mapping": { + "description": "Mapping", + "searchable": true, + "title": "Mapping", + "type": "string", + "userEditable": true, + "viewable": true, + }, + }, + "required": [ + "mapping", + "consentDate", + ], + "title": "Consented Mappings Item", + "type": "object", + }, + "title": "Consented Mappings Items", + "type": "array", + }, + "returnByDefault": false, + "searchable": false, + "title": "Consented Mappings", + "type": "array", + "usageDescription": "", + "userEditable": true, + "viewable": false, + }, + "country": { + "description": "Country", + "isPersonal": false, + "title": "Country", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "description": { + "description": "Description", + "isPersonal": false, + "searchable": true, + "title": "Description", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "effectiveApplications": { + "description": "Effective Applications", + "isPersonal": false, + "isVirtual": true, + "items": { + "title": "Effective Assigned Application Items", + "type": "object", + }, + "queryConfig": { + "referencedObjectFields": [ + "name", + ], + "referencedRelationshipFields": [ + [ + "roles", + "applications", + ], + [ + "applications", + ], + ], + }, + "returnByDefault": true, + "title": "Effective Applications", + "type": "array", + "viewable": false, + }, + "effectiveAssignments": { + "description": "Effective Assignments", + "isPersonal": false, + "isVirtual": true, + "items": { + "title": "Effective Assignments Items", + "type": "object", + }, + "queryConfig": { + "referencedObjectFields": [ + "*", + ], + "referencedRelationshipFields": [ + [ + "roles", + "assignments", + ], + [ + "assignments", + ], + ], + }, + "returnByDefault": true, + "title": "Effective Assignments", + "type": "array", + "usageDescription": "", + "viewable": false, + }, + "effectiveGroups": { + "description": "Effective Groups", + "isPersonal": false, + "isVirtual": true, + "items": { + "title": "Effective Groups Items", + "type": "object", + }, + "queryConfig": { + "referencedRelationshipFields": [ + "groups", + ], + }, + "returnByDefault": true, + "title": "Effective Groups", + "type": "array", + "usageDescription": "", + "viewable": false, + }, + "effectiveRoles": { + "description": "Effective Roles", + "isPersonal": false, + "isVirtual": true, + "items": { + "title": "Effective Roles Items", + "type": "object", + }, + "queryConfig": { + "referencedRelationshipFields": [ + "roles", + ], + }, + "returnByDefault": true, + "title": "Effective Roles", + "type": "array", + "usageDescription": "", + "viewable": false, + }, + "frIndexedDate1": { + "description": "Generic Indexed Date 1", + "isPersonal": false, + "title": "Generic Indexed Date 1", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedDate2": { + "description": "Generic Indexed Date 2", + "isPersonal": false, + "title": "Generic Indexed Date 2", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedDate3": { + "description": "Generic Indexed Date 3", + "isPersonal": false, + "title": "Generic Indexed Date 3", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedDate4": { + "description": "Generic Indexed Date 4", + "isPersonal": false, + "title": "Generic Indexed Date 4", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedDate5": { + "description": "Generic Indexed Date 5", + "isPersonal": false, + "title": "Generic Indexed Date 5", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedInteger1": { + "description": "Generic Indexed Integer 1", + "isPersonal": false, + "title": "Generic Indexed Integer 1", + "type": "number", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedInteger2": { + "description": "Generic Indexed Integer 2", + "isPersonal": false, + "title": "Generic Indexed Integer 2", + "type": "number", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedInteger3": { + "description": "Generic Indexed Integer 3", + "isPersonal": false, + "title": "Generic Indexed Integer 3", + "type": "number", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedInteger4": { + "description": "Generic Indexed Integer 4", + "isPersonal": false, + "title": "Generic Indexed Integer 4", + "type": "number", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedInteger5": { + "description": "Generic Indexed Integer 5", + "isPersonal": false, + "title": "Generic Indexed Integer 5", + "type": "number", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedMultivalued1": { + "description": "Generic Indexed Multivalue 1", + "isPersonal": false, + "items": { + "type": "string", + }, + "title": "Generic Indexed Multivalue 1", + "type": "array", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedMultivalued2": { + "description": "Generic Indexed Multivalue 2", + "isPersonal": false, + "items": { + "type": "string", + }, + "title": "Generic Indexed Multivalue 2", + "type": "array", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedMultivalued3": { + "description": "Generic Indexed Multivalue 3", + "isPersonal": false, + "items": { + "type": "string", + }, + "title": "Generic Indexed Multivalue 3", + "type": "array", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedMultivalued4": { + "description": "Generic Indexed Multivalue 4", + "isPersonal": false, + "items": { + "type": "string", + }, + "title": "Generic Indexed Multivalue 4", + "type": "array", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedMultivalued5": { + "description": "Generic Indexed Multivalue 5", + "isPersonal": false, + "items": { + "type": "string", + }, + "title": "Generic Indexed Multivalue 5", + "type": "array", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedString1": { + "description": "Generic Indexed String 1", + "isPersonal": false, + "title": "Generic Indexed String 1", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedString2": { + "description": "Generic Indexed String 2", + "isPersonal": false, + "title": "Generic Indexed String 2", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedString3": { + "description": "Generic Indexed String 3", + "isPersonal": false, + "title": "Generic Indexed String 3", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedString4": { + "description": "Generic Indexed String 4", + "isPersonal": false, + "title": "Generic Indexed String 4", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frIndexedString5": { + "description": "Generic Indexed String 5", + "isPersonal": false, + "title": "Generic Indexed String 5", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedDate1": { + "description": "Generic Unindexed Date 1", + "isPersonal": false, + "title": "Generic Unindexed Date 1", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedDate2": { + "description": "Generic Unindexed Date 2", + "isPersonal": false, + "title": "Generic Unindexed Date 2", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedDate3": { + "description": "Generic Unindexed Date 3", + "isPersonal": false, + "title": "Generic Unindexed Date 3", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedDate4": { + "description": "Generic Unindexed Date 4", + "isPersonal": false, + "title": "Generic Unindexed Date 4", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedDate5": { + "description": "Generic Unindexed Date 5", + "isPersonal": false, + "title": "Generic Unindexed Date 5", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedInteger1": { + "description": "Generic Unindexed Integer 1", + "isPersonal": false, + "title": "Generic Unindexed Integer 1", + "type": "number", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedInteger2": { + "description": "Generic Unindexed Integer 2", + "isPersonal": false, + "title": "Generic Unindexed Integer 2", + "type": "number", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedInteger3": { + "description": "Generic Unindexed Integer 3", + "isPersonal": false, + "title": "Generic Unindexed Integer 3", + "type": "number", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedInteger4": { + "description": "Generic Unindexed Integer 4", + "isPersonal": false, + "title": "Generic Unindexed Integer 4", + "type": "number", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedInteger5": { + "description": "Generic Unindexed Integer 5", + "isPersonal": false, + "title": "Generic Unindexed Integer 5", + "type": "number", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedMultivalued1": { + "description": "Generic Unindexed Multivalue 1", + "isPersonal": false, + "items": { + "type": "string", + }, + "title": "Generic Unindexed Multivalue 1", + "type": "array", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedMultivalued2": { + "description": "Generic Unindexed Multivalue 2", + "isPersonal": false, + "items": { + "type": "string", + }, + "title": "Generic Unindexed Multivalue 2", + "type": "array", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedMultivalued3": { + "description": "Generic Unindexed Multivalue 3", + "isPersonal": false, + "items": { + "type": "string", + }, + "title": "Generic Unindexed Multivalue 3", + "type": "array", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedMultivalued4": { + "description": "Generic Unindexed Multivalue 4", + "isPersonal": false, + "items": { + "type": "string", + }, + "title": "Generic Unindexed Multivalue 4", + "type": "array", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedMultivalued5": { + "description": "Generic Unindexed Multivalue 5", + "isPersonal": false, + "items": { + "type": "string", + }, + "title": "Generic Unindexed Multivalue 5", + "type": "array", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedString1": { + "description": "Generic Unindexed String 1", + "isPersonal": false, + "title": "Generic Unindexed String 1", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedString2": { + "description": "Generic Unindexed String 2", + "isPersonal": false, + "title": "Generic Unindexed String 2", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedString3": { + "description": "Generic Unindexed String 3", + "isPersonal": false, + "title": "Generic Unindexed String 3", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedString4": { + "description": "Generic Unindexed String 4", + "isPersonal": false, + "title": "Generic Unindexed String 4", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "frUnindexedString5": { + "description": "Generic Unindexed String 5", + "isPersonal": false, + "title": "Generic Unindexed String 5", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "givenName": { + "description": "First Name", + "isPersonal": true, + "searchable": true, + "title": "First Name", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "groups": { + "description": "Groups", + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:User:groups", + "isPersonal": false, + "items": { + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:User:groups:items", + "notifySelf": true, + "properties": { + "_ref": { + "description": "References a relationship from a managed object", + "type": "string", + }, + "_refProperties": { + "description": "Supports metadata within the relationship", + "properties": { + "_grantType": { + "description": "Grant Type", + "label": "Grant Type", + "type": "string", + }, + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Groups Items _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "conditionalAssociationField": "condition", + "label": "Group", + "path": "managed/bravo_group", + "query": { + "fields": [ + "name", + ], + "queryFilter": "true", + }, + }, + ], + "reversePropertyName": "members", + "reverseRelationship": true, + "title": "Groups Items", + "type": "relationship", + "validate": true, + }, + "relationshipGrantTemporalConstraintsEnforced": false, + "returnByDefault": false, + "title": "Groups", + "type": "array", + "usageDescription": "", + "userEditable": false, + "viewable": true, + }, + "kbaInfo": { + "description": "KBA Info", + "isPersonal": true, + "items": { + "order": [ + "answer", + "customQuestion", + "questionId", + ], + "properties": { + "answer": { + "description": "Answer", + "type": "string", + }, + "customQuestion": { + "description": "Custom question", + "type": "string", + }, + "questionId": { + "description": "Question ID", + "type": "string", + }, + }, + "required": [], + "title": "KBA Info Items", + "type": "object", + }, + "type": "array", + "usageDescription": "", + "userEditable": true, + "viewable": false, + }, + "lastSync": { + "description": "Last Sync timestamp", + "isPersonal": false, + "order": [ + "effectiveAssignments", + "timestamp", + ], + "properties": { + "effectiveAssignments": { + "description": "Effective Assignments", + "items": { + "title": "Effective Assignments Items", + "type": "object", + }, + "title": "Effective Assignments", + "type": "array", + }, + "timestamp": { + "description": "Timestamp", + "type": "string", + }, + }, + "required": [], + "scope": "private", + "searchable": false, + "title": "Last Sync timestamp", + "type": "object", + "usageDescription": "", + "viewable": false, + }, + "mail": { + "description": "Email Address", + "isPersonal": true, + "policies": [ + { + "policyId": "valid-email-address-format", + }, + ], + "searchable": true, + "title": "Email Address", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "manager": { + "description": "Manager", + "isPersonal": false, + "properties": { + "_ref": { + "description": "References a relationship from a managed object", + "type": "string", + }, + "_refProperties": { + "description": "Supports metadata within the relationship", + "properties": { + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Manager _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "User", + "path": "managed/bravo_user", + "query": { + "fields": [ + "userName", + "givenName", + "sn", + ], + "queryFilter": "true", + }, + }, + ], + "reversePropertyName": "reports", + "reverseRelationship": true, + "searchable": false, + "title": "Manager", + "type": "relationship", + "usageDescription": "", + "userEditable": false, + "validate": true, + "viewable": true, + }, + "memberOfOrg": { + "items": { + "notifySelf": true, + "properties": { + "_ref": { + "type": "string", + }, + "_refProperties": { + "properties": { + "_id": { + "propName": "_id", + "required": false, + "type": "string", + }, + }, + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "Organization", + "notify": false, + "path": "managed/bravo_organization", + "query": { + "fields": [ + "name", + ], + "queryFilter": "true", + "sortKeys": [], + }, + }, + ], + "reversePropertyName": "members", + "reverseRelationship": true, + "type": "relationship", + "validate": true, + }, + "policies": [], + "returnByDefault": false, + "searchable": false, + "title": "Organizations to which I Belong", + "type": "array", + "userEditable": false, + "viewable": true, + }, + "memberOfOrgIDs": { + "isVirtual": true, + "items": { + "title": "org identifiers", + "type": "string", + }, + "queryConfig": { + "flattenProperties": true, + "referencedObjectFields": [ + "_id", + "parentIDs", + ], + "referencedRelationshipFields": [ + "memberOfOrg", + ], + }, + "returnByDefault": true, + "searchable": false, + "title": "MemberOfOrgIDs", + "type": "array", + "userEditable": false, + "viewable": false, + }, + "ownerOfApp": { + "items": { + "properties": { + "_ref": { + "type": "string", + }, + "_refProperties": { + "properties": { + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "Application", + "path": "managed/bravo_application", + "query": { + "fields": [ + "name", + ], + "queryFilter": "true", + "sortKeys": [ + "name", + ], + }, + }, + ], + "reversePropertyName": "owners", + "reverseRelationship": true, + "type": "relationship", + "validate": true, + }, + "returnByDefault": false, + "searchable": false, + "title": "Applications I Own", + "type": "array", + "userEditable": false, + "viewable": true, + }, + "ownerOfOrg": { + "items": { + "notifySelf": false, + "properties": { + "_ref": { + "type": "string", + }, + "_refProperties": { + "properties": { + "_id": { + "propName": "_id", + "required": false, + "type": "string", + }, + }, + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "Organization", + "notify": true, + "path": "managed/bravo_organization", + "query": { + "fields": [ + "name", + ], + "queryFilter": "true", + "sortKeys": [], + }, + }, + ], + "reversePropertyName": "owners", + "reverseRelationship": true, + "type": "relationship", + "validate": true, + }, + "policies": [], + "returnByDefault": false, + "searchable": false, + "title": "Organizations I Own", + "type": "array", + "userEditable": false, + "viewable": true, + }, + "password": { + "description": "Password", + "isPersonal": false, + "isProtected": true, + "scope": "private", + "searchable": false, + "title": "Password", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": false, + }, + "postalAddress": { + "description": "Address 1", + "isPersonal": true, + "title": "Address 1", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "postalCode": { + "description": "Postal Code", + "isPersonal": false, + "title": "Postal Code", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "preferences": { + "description": "Preferences", + "isPersonal": false, + "order": [ + "updates", + "marketing", + ], + "properties": { + "marketing": { + "description": "Send me special offers and services", + "type": "boolean", + }, + "updates": { + "description": "Send me news and updates", + "type": "boolean", + }, + }, + "required": [], + "searchable": false, + "title": "Preferences", + "type": "object", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "profileImage": { + "description": "Profile Image", + "isPersonal": true, + "searchable": true, + "title": "Profile Image", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": false, + }, + "reports": { + "description": "Direct Reports", + "isPersonal": false, + "items": { + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:User:reports:items", + "properties": { + "_ref": { + "description": "References a relationship from a managed object", + "type": "string", + }, + "_refProperties": { + "description": "Supports metadata within the relationship", + "properties": { + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Direct Reports Items _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "label": "User", + "path": "managed/bravo_user", + "query": { + "fields": [ + "userName", + "givenName", + "sn", + ], + "queryFilter": "true", + }, + }, + ], + "reversePropertyName": "manager", + "reverseRelationship": true, + "title": "Direct Reports Items", + "type": "relationship", + "validate": true, + }, + "returnByDefault": false, + "title": "Direct Reports", + "type": "array", + "usageDescription": "", + "userEditable": false, + "viewable": true, + }, + "roles": { + "description": "Provisioning Roles", + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:User:roles", + "isPersonal": false, + "items": { + "id": "urn:jsonschema:org:forgerock:openidm:managed:api:User:roles:items", + "notifySelf": true, + "properties": { + "_ref": { + "description": "References a relationship from a managed object", + "type": "string", + }, + "_refProperties": { + "description": "Supports metadata within the relationship", + "properties": { + "_grantType": { + "description": "Grant Type", + "label": "Grant Type", + "type": "string", + }, + "_id": { + "description": "_refProperties object ID", + "type": "string", + }, + }, + "title": "Provisioning Roles Items _refProperties", + "type": "object", + }, + }, + "resourceCollection": [ + { + "conditionalAssociationField": "condition", + "label": "Role", + "path": "managed/bravo_role", + "query": { + "fields": [ + "name", + ], + "queryFilter": "true", + }, + }, + ], + "reversePropertyName": "members", + "reverseRelationship": true, + "title": "Provisioning Roles Items", + "type": "relationship", + "validate": true, + }, + "relationshipGrantTemporalConstraintsEnforced": true, + "returnByDefault": false, + "title": "Provisioning Roles", + "type": "array", + "usageDescription": "", + "userEditable": false, + "viewable": true, + }, + "sn": { + "description": "Last Name", + "isPersonal": true, + "searchable": true, + "title": "Last Name", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "stateProvince": { + "description": "State/Province", + "isPersonal": false, + "title": "State/Province", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "telephoneNumber": { + "description": "Telephone Number", + "isPersonal": true, + "pattern": "^\\+?([0-9\\- \\(\\)])*$", + "title": "Telephone Number", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + "userName": { + "description": "Username", + "isPersonal": true, + "minLength": 1, + "policies": [ + { + "policyId": "valid-username", + }, + { + "params": { + "forbiddenChars": [ + "/", + ], + }, + "policyId": "cannot-contain-characters", + }, + { + "params": { + "minLength": 1, + }, + "policyId": "minimum-length", + }, + { + "params": { + "maxLength": 255, + }, + "policyId": "maximum-length", + }, + ], + "searchable": true, + "title": "Username", + "type": "string", + "usageDescription": "", + "userEditable": true, + "viewable": true, + }, + }, + "required": [ + "userName", + "givenName", + "sn", + "mail", + ], + "title": "Bravo realm - User", + "type": "object", + "viewable": true, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/managed/managed.idm.json 1`] = ` +{ + "idm": { + "managed": { + "_id": "managed", + "objects": [ + "file://alpha_user.managed.json", + "file://bravo_user.managed.json", + "file://alpha_role.managed.json", + "file://bravo_role.managed.json", + "file://alpha_assignment.managed.json", + "file://bravo_assignment.managed.json", + "file://alpha_organization.managed.json", + "file://bravo_organization.managed.json", + "file://alpha_group.managed.json", + "file://bravo_group.managed.json", + "file://alpha_application.managed.json", + "file://bravo_application.managed.json", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/policy.idm.json 1`] = ` +{ + "idm": { + "policy": { + "_id": "policy", + "additionalFiles": [], + "resources": [], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/privilegeAssignments.idm.json 1`] = ` +{ + "idm": { + "privilegeAssignments": { + "_id": "privilegeAssignments", + "privilegeAssignments": [ + { + "name": "ownerPrivileges", + "privileges": [ + "owner-view-update-delete-orgs", + "owner-create-orgs", + "owner-view-update-delete-admins-and-members", + "owner-create-admins", + "admin-view-update-delete-members", + "admin-create-members", + ], + "relationshipField": "ownerOfOrg", + }, + { + "name": "adminPrivileges", + "privileges": [ + "admin-view-update-delete-orgs", + "admin-create-orgs", + "admin-view-update-delete-members", + "admin-create-members", + ], + "relationshipField": "adminOfOrg", + }, + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/privileges.idm.json 1`] = ` +{ + "idm": { + "privileges": { + "_id": "privileges", + "privileges": [], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/provisioner.openic/GoogleApps.idm.json 1`] = ` +{ + "idm": { + "provisioner.openic/GoogleApps": { + "_id": "provisioner.openic/GoogleApps", + "configurationProperties": { + "availableLicenses": [ + "101005/1010050001", + "101001/1010010001", + "101031/1010310010", + "101034/1010340002", + "101038/1010380002", + "101034/1010340001", + "101038/1010380003", + "101034/1010340004", + "101034/1010340003", + "101034/1010340006", + "Google-Apps/Google-Apps-For-Business", + "101034/1010340005", + "Google-Vault/Google-Vault", + "Google-Apps/1010020031", + "Google-Apps/1010020030", + "Google-Apps/1010060003", + "Google-Apps/1010060005", + "Google-Apps/Google-Apps-Unlimited", + "Google-Apps/1010020029", + "Google-Apps/Google-Apps-Lite", + "101031/1010310003", + "101033/1010330002", + "101033/1010330004", + "Google-Apps/Google-Apps-For-Education", + "101031/1010310002", + "101033/1010330003", + "Google-Apps/1010020026", + "101031/1010310007", + "Google-Apps/1010020025", + "101031/1010310008", + "Google-Apps/1010020028", + "Google-Apps/Google-Apps-For-Postini", + "101031/1010310005", + "Google-Apps/1010020027", + "101031/1010310006", + "101031/1010310009", + "Google-Vault/Google-Vault-Former-Employee", + "101038/1010370001", + "Google-Apps/1010020020", + "Google-Apps/1010060001", + ], + "clientId": "&{esv.gac.client.id}", + "clientSecret": "&{esv.gac.secret}", + "domain": "&{esv.gac.domain}", + "groupsMaxResults": "200", + "listProductAndSkuMaxResults": "100", + "listProductMaxResults": "100", + "membersMaxResults": "200", + "proxyHost": null, + "proxyPort": 8080, + "refreshToken": "&{esv.gac.refresh}", + "roleAssignmentMaxResults": 100, + "roleMaxResults": 100, + "usersMaxResults": "100", + "validateCertificate": true, + }, + "connectorRef": { + "bundleName": "org.forgerock.openicf.connectors.googleapps-connector", + "bundleVersion": "[1.5.0.0,1.6.0.0)", + "connectorHostRef": "", + "connectorName": "org.forgerock.openicf.connectors.googleapps.GoogleAppsConnector", + "displayName": "GoogleApps Connector", + "systemType": "provisioner.openicf", + }, + "enabled": { + "$bool": "&{esv.gac.enable.connector}", + }, + "objectTypes": { + "__ACCOUNT__": { + "$schema": "http://json-schema.org/draft-03/schema", + "id": "__ACCOUNT__", + "nativeType": "__ACCOUNT__", + "properties": { + "__GROUPS__": { + "flags": [ + "NOT_RETURNED_BY_DEFAULT", + ], + "items": { + "nativeType": "string", + "type": "string", + }, + "nativeName": "__GROUPS__", + "nativeType": "string", + "type": "array", + }, + "__NAME__": { + "nativeName": "__NAME__", + "nativeType": "string", + "type": "string", + }, + "__PASSWORD__": { + "flags": [ + "NOT_READABLE", + "NOT_RETURNED_BY_DEFAULT", + ], + "nativeName": "__PASSWORD__", + "nativeType": "JAVA_TYPE_GUARDEDSTRING", + "required": true, + "type": "string", + }, + "__PHOTO__": { + "flags": [ + "NOT_RETURNED_BY_DEFAULT", + ], + "nativeName": "__PHOTO__", + "nativeType": "JAVA_TYPE_BYTE_ARRAY", + "type": "string", + }, + "__SECONDARY_EMAILS__": { + "items": { + "nativeType": "object", + "type": "object", + }, + "nativeName": "__SECONDARY_EMAILS__", + "nativeType": "object", + "type": "array", + }, + "__UID__": { + "nativeName": "__UID__", + "nativeType": "string", + "required": false, + "type": "string", + }, + "addresses": { + "items": { + "nativeType": "object", + "type": "object", + }, + "nativeName": "addresses", + "nativeType": "object", + "type": "array", + }, + "agreedToTerms": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "nativeName": "agreedToTerms", + "nativeType": "JAVA_TYPE_PRIMITIVE_BOOLEAN", + "type": "boolean", + }, + "aliases": { + "flags": [ + "NOT_CREATABLE", + ], + "items": { + "nativeType": "string", + "type": "string", + }, + "nativeName": "aliases", + "nativeType": "string", + "type": "array", + }, + "archived": { + "nativeName": "archived", + "nativeType": "boolean", + "type": "boolean", + }, + "changePasswordAtNextLogin": { + "nativeName": "changePasswordAtNextLogin", + "nativeType": "boolean", + "type": "boolean", + }, + "creationTime": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "items": { + "nativeType": "string", + "type": "string", + }, + "nativeName": "creationTime", + "nativeType": "string", + "type": "array", + }, + "customSchemas": { + "nativeName": "customSchemas", + "nativeType": "object", + "type": "object", + }, + "customerId": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "nativeName": "customerId", + "nativeType": "string", + "type": "string", + }, + "deletionTime": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "nativeName": "deletionTime", + "nativeType": "string", + "type": "string", + }, + "externalIds": { + "items": { + "nativeType": "object", + "type": "object", + }, + "nativeName": "externalIds", + "nativeType": "object", + "type": "array", + }, + "familyName": { + "nativeName": "familyName", + "nativeType": "string", + "type": "string", + }, + "fullName": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "nativeName": "fullName", + "nativeType": "string", + "type": "string", + }, + "givenName": { + "nativeName": "givenName", + "nativeType": "string", + "required": true, + "type": "string", + }, + "hashFunction": { + "flags": [ + "NOT_RETURNED_BY_DEFAULT", + ], + "nativeName": "hashFunction", + "nativeType": "string", + "type": "string", + }, + "ims": { + "items": { + "nativeType": "object", + "type": "object", + }, + "nativeName": "ims", + "nativeType": "object", + "type": "array", + }, + "includeInGlobalAddressList": { + "nativeName": "includeInGlobalAddressList", + "nativeType": "boolean", + "type": "boolean", + }, + "ipWhitelisted": { + "nativeName": "ipWhitelisted", + "nativeType": "boolean", + "type": "boolean", + }, + "isAdmin": { + "nativeName": "isAdmin", + "nativeType": "JAVA_TYPE_PRIMITIVE_BOOLEAN", + "type": "boolean", + }, + "isDelegatedAdmin": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "nativeName": "isDelegatedAdmin", + "nativeType": "JAVA_TYPE_PRIMITIVE_BOOLEAN", + "type": "boolean", + }, + "isEnforcedIn2Sv": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "nativeName": "isEnforcedIn2Sv", + "nativeType": "boolean", + "type": "boolean", + }, + "isEnrolledIn2Sv": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "nativeName": "isEnrolledIn2Sv", + "nativeType": "boolean", + "type": "boolean", + }, + "isMailboxSetup": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "nativeName": "isMailboxSetup", + "nativeType": "boolean", + "type": "boolean", + }, + "languages": { + "items": { + "nativeType": "object", + "type": "object", + }, + "nativeName": "languages", + "nativeType": "object", + "type": "array", + }, + "lastLoginTime": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "items": { + "nativeType": "string", + "type": "string", + }, + "nativeName": "lastLoginTime", + "nativeType": "string", + "type": "array", + }, + "nonEditableAliases": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "items": { + "nativeType": "string", + "type": "string", + }, + "nativeName": "nonEditableAliases", + "nativeType": "string", + "type": "array", + }, + "orgUnitPath": { + "nativeName": "orgUnitPath", + "nativeType": "string", + "type": "string", + }, + "organizations": { + "items": { + "nativeType": "object", + "type": "object", + }, + "nativeName": "organizations", + "nativeType": "object", + "type": "array", + }, + "phones": { + "items": { + "nativeType": "object", + "type": "object", + }, + "nativeName": "phones", + "nativeType": "object", + "type": "array", + }, + "primaryEmail": { + "nativeName": "primaryEmail", + "nativeType": "string", + "type": "string", + }, + "recoveryEmail": { + "nativeName": "recoveryEmail", + "nativeType": "string", + "type": "string", + }, + "recoveryPhone": { + "nativeName": "recoveryPhone", + "nativeType": "string", + "type": "string", + }, + "relations": { + "items": { + "nativeType": "object", + "type": "object", + }, + "nativeName": "relations", + "nativeType": "object", + "type": "array", + }, + "suspended": { + "nativeName": "suspended", + "nativeType": "boolean", + "type": "boolean", + }, + "suspensionReason": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "nativeName": "suspensionReason", + "nativeType": "string", + "type": "string", + }, + "thumbnailPhotoUrl": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "nativeName": "thumbnailPhotoUrl", + "nativeType": "string", + "type": "string", + }, + }, + "type": "object", + }, + }, + "operationTimeout": { + "AUTHENTICATE": -1, + "CREATE": -1, + "DELETE": -1, + "GET": -1, + "RESOLVEUSERNAME": -1, + "SCHEMA": -1, + "SCRIPT_ON_CONNECTOR": -1, + "SCRIPT_ON_RESOURCE": -1, + "SEARCH": -1, + "SYNC": -1, + "TEST": -1, + "UPDATE": -1, + "VALIDATE": -1, + }, + "poolConfigOption": { + "maxIdle": 10, + "maxObjects": 10, + "maxWait": 150000, + "minEvictableIdleTimeMillis": 120000, + "minIdle": 1, + }, + "resultsHandlerConfig": { + "enableAttributesToGetSearchResultsHandler": true, + "enableCaseInsensitiveFilter": false, + "enableFilteredResultsHandler": false, + "enableNormalizingResultsHandler": false, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/provisioner.openicf.connectorinfoprovider.idm.json 1`] = ` +{ + "idm": { + "provisioner.openicf.connectorinfoprovider": { + "_id": "provisioner.openicf.connectorinfoprovider", + "connectorsLocation": "connectors", + "remoteConnectorClients": [ + { + "enabled": true, + "name": "rcs1", + "useSSL": true, + }, + ], + "remoteConnectorClientsGroups": [], + "remoteConnectorServers": [], + "remoteConnectorServersGroups": [], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/provisioner.openicf/Azure.idm.json 1`] = ` +{ + "idm": { + "provisioner.openicf/Azure": { + "_id": "provisioner.openicf/Azure", + "configurationProperties": { + "clientId": "4b07adcc-329c-434c-aa83-49a14bef3c49", + "clientSecret": { + "$crypto": { + "type": "x-simple-encryption", + "value": { + "cipher": "AES/CBC/PKCS5Padding", + "data": "W63amdvzlmynT40WOTl1wPWDc8FUlGWQZK158lmlFTrnhy9PbWZV5YE4v3VeMUDC", + "iv": "KG/YFc8v26QHJzRI3uFhzw==", + "keySize": 16, + "mac": "mA4BzCNS7tuLhosQ+es1Tg==", + "purpose": "idm.config.encryption", + "salt": "vvPwKk0KqOqMjElQgICqEA==", + "stableId": "openidm-sym-default", + }, + }, + }, + "httpProxyHost": null, + "httpProxyPassword": null, + "httpProxyPort": null, + "httpProxyUsername": null, + "licenseCacheExpiryTime": 60, + "performHardDelete": true, + "readRateLimit": null, + "tenant": "711ffa9c-5972-4713-ace3-688c9732614a", + "writeRateLimit": null, + }, + "connectorRef": { + "bundleName": "org.forgerock.openicf.connectors.msgraphapi-connector", + "bundleVersion": "1.5.20.21", + "connectorName": "org.forgerock.openicf.connectors.msgraphapi.MSGraphAPIConnector", + "displayName": "MSGraphAPI Connector", + "systemType": "provisioner.openicf", + }, + "enabled": true, + "objectTypes": { + "User": { + "$schema": "http://json-schema.org/draft-03/schema", + "id": "__ACCOUNT__", + "nativeType": "__ACCOUNT__", + "properties": { + "__PASSWORD__": { + "autocomplete": "new-password", + "flags": [ + "NOT_UPDATEABLE", + "NOT_READABLE", + "NOT_RETURNED_BY_DEFAULT", + ], + "nativeName": "__PASSWORD__", + "nativeType": "JAVA_TYPE_GUARDEDSTRING", + "required": true, + "type": "string", + }, + "__roles__": { + "flags": [ + "NOT_RETURNED_BY_DEFAULT", + ], + "items": { + "nativeType": "string", + "type": "string", + }, + "nativeName": "__roles__", + "nativeType": "string", + "type": "array", + }, + "__servicePlanIds__": { + "items": { + "nativeType": "string", + "type": "string", + }, + "nativeName": "__servicePlanIds__", + "nativeType": "string", + "type": "array", + }, + "accountEnabled": { + "nativeName": "accountEnabled", + "nativeType": "boolean", + "required": true, + "type": "boolean", + }, + "city": { + "nativeName": "city", + "nativeType": "string", + "type": "string", + }, + "companyName": { + "nativeName": "companyName", + "nativeType": "string", + "type": "string", + }, + "country": { + "nativeName": "country", + "nativeType": "string", + "type": "string", + }, + "department": { + "nativeName": "department", + "nativeType": "string", + "type": "string", + }, + "displayName": { + "nativeName": "displayName", + "nativeType": "string", + "required": true, + "type": "string", + }, + "givenName": { + "nativeName": "givenName", + "nativeType": "string", + "type": "string", + }, + "jobTitle": { + "nativeName": "jobTitle", + "nativeType": "string", + "type": "string", + }, + "mail": { + "nativeName": "mail", + "nativeType": "string", + "required": true, + "type": "string", + }, + "mailNickname": { + "nativeName": "mailNickname", + "nativeType": "string", + "required": true, + "type": "string", + }, + "manager": { + "nativeName": "manager", + "nativeType": "object", + "type": "object", + }, + "memberOf": { + "flags": [ + "NOT_RETURNED_BY_DEFAULT", + ], + "items": { + "nativeType": "string", + "type": "string", + }, + "nativeName": "memberOf", + "nativeType": "string", + "type": "array", + }, + "mobilePhone": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "nativeName": "mobilePhone", + "nativeType": "string", + "type": "string", + }, + "onPremisesImmutableId": { + "flags": [ + "NOT_UPDATEABLE", + "NOT_CREATABLE", + ], + "nativeName": "onPremisesImmutableId", + "nativeType": "string", + "type": "string", + }, + "onPremisesSecurityIdentifier": { + "flags": [ + "NOT_UPDATEABLE", + "NOT_CREATABLE", + ], + "nativeName": "onPremisesSecurityIdentifier", + "nativeType": "string", + "type": "string", + }, + "otherMails": { + "items": { + "nativeType": "string", + "type": "string", + }, + "nativeName": "otherMails", + "nativeType": "string", + "type": "array", + }, + "postalCode": { + "nativeName": "postalCode", + "nativeType": "string", + "type": "string", + }, + "preferredLanguage": { + "nativeName": "preferredLanguage", + "nativeType": "string", + "type": "string", + }, + "proxyAddresses": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "items": { + "nativeType": "string", + "type": "string", + }, + "nativeName": "proxyAddresses", + "nativeType": "string", + "type": "array", + }, + "state": { + "nativeName": "state", + "nativeType": "string", + "type": "string", + }, + "streetAddress": { + "nativeName": "streetAddress", + "nativeType": "string", + "type": "string", + }, + "surname": { + "nativeName": "surname", + "nativeType": "string", + "type": "string", + }, + "usageLocation": { + "nativeName": "usageLocation", + "nativeType": "string", + "type": "string", + }, + "userPrincipalName": { + "nativeName": "userPrincipalName", + "nativeType": "string", + "required": true, + "type": "string", + }, + "userType": { + "nativeName": "userType", + "nativeType": "string", + "type": "string", + }, + }, + "type": "object", + }, + "__GROUP__": { + "$schema": "http://json-schema.org/draft-03/schema", + "id": "__GROUP__", + "nativeType": "__GROUP__", + "properties": { + "__NAME__": { + "nativeName": "__NAME__", + "nativeType": "string", + "required": true, + "type": "string", + }, + "description": { + "nativeName": "description", + "nativeType": "string", + "type": "string", + }, + "displayName": { + "nativeName": "displayName", + "nativeType": "string", + "required": true, + "type": "string", + }, + "groupTypes": { + "items": { + "nativeType": "string", + "type": "string", + }, + "nativeName": "groupTypes", + "nativeType": "string", + "type": "string", + }, + "id": { + "flags": [ + "NOT_UPDATEABLE", + "NOT_CREATABLE", + ], + "nativeName": "id", + "type": "string", + }, + "mail": { + "nativeName": "mail", + "nativeType": "string", + "type": "string", + }, + "mailEnabled": { + "nativeName": "mailEnabled", + "nativeType": "boolean", + "required": true, + "type": "boolean", + }, + "onPremisesSecurityIdentifier": { + "flags": [ + "NOT_UPDATEABLE", + "NOT_CREATABLE", + ], + "nativeName": "onPremisesSecurityIdentifier", + "nativeType": "string", + "type": "string", + }, + "proxyAddresses": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "items": { + "nativeType": "string", + "type": "string", + }, + "nativeName": "proxyAddresses", + "nativeType": "string", + "type": "array", + }, + "securityEnabled": { + "nativeName": "securityEnabled", + "nativeType": "boolean", + "required": true, + "type": "boolean", + }, + "type": { + "nativeName": "type", + "required": true, + "type": "string", + }, + }, + "type": "object", + }, + "directoryRole": { + "$schema": "http://json-schema.org/draft-03/schema", + "id": "directoryRole", + "nativeType": "directoryRole", + "properties": { + "description": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "nativeName": "description", + "nativeType": "string", + "type": "string", + }, + "displayName": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "nativeName": "displayName", + "nativeType": "string", + "type": "string", + }, + }, + "type": "object", + }, + "servicePlan": { + "$schema": "http://json-schema.org/draft-03/schema", + "id": "servicePlan", + "nativeType": "servicePlan", + "properties": { + "__NAME__": { + "nativeName": "__NAME__", + "nativeType": "string", + "type": "string", + }, + "appliesTo": { + "flags": [ + "NOT_UPDATEABLE", + "NOT_CREATABLE", + ], + "nativeName": "appliesTo", + "nativeType": "string", + "type": "string", + }, + "provisioningStatus": { + "flags": [ + "NOT_UPDATEABLE", + "NOT_CREATABLE", + ], + "nativeName": "provisioningStatus", + "nativeType": "string", + "type": "string", + }, + "servicePlanId": { + "flags": [ + "NOT_UPDATEABLE", + "NOT_CREATABLE", + ], + "nativeName": "servicePlanId", + "nativeType": "string", + "type": "string", + }, + "servicePlanName": { + "flags": [ + "NOT_UPDATEABLE", + "NOT_CREATABLE", + ], + "nativeName": "servicePlanName", + "nativeType": "string", + "type": "string", + }, + "subscriberSkuId": { + "flags": [ + "NOT_UPDATEABLE", + "NOT_CREATABLE", + ], + "nativeName": "subscriberSkuId", + "type": "string", + }, + }, + "type": "object", + }, + "servicePrincipal": { + "$schema": "http://json-schema.org/draft-03/schema", + "id": "servicePrincipal", + "nativeType": "servicePrincipal", + "properties": { + "__NAME__": { + "nativeName": "__NAME__", + "nativeType": "string", + "type": "string", + }, + "__addAppRoleAssignedTo__": { + "flags": [ + "NOT_READABLE", + "NOT_RETURNED_BY_DEFAULT", + ], + "items": { + "nativeType": "object", + "type": "object", + }, + "nativeName": "__addAppRoleAssignedTo__", + "nativeType": "object", + "type": "array", + }, + "__addAppRoleAssignments__": { + "flags": [ + "NOT_READABLE", + "NOT_RETURNED_BY_DEFAULT", + ], + "items": { + "nativeType": "object", + "type": "object", + }, + "nativeName": "__addAppRoleAssignments__", + "nativeType": "object", + "type": "array", + }, + "__removeAppRoleAssignedTo__": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + "NOT_RETURNED_BY_DEFAULT", + ], + "items": { + "nativeType": "string", + "type": "string", + }, + "nativeName": "__removeAppRoleAssignedTo__", + "nativeType": "string", + "type": "array", + }, + "__removeAppRoleAssignments__": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + "NOT_RETURNED_BY_DEFAULT", + ], + "items": { + "nativeType": "string", + "type": "string", + }, + "nativeName": "__removeAppRoleAssignments__", + "nativeType": "string", + "type": "array", + }, + "accountEnabled": { + "nativeName": "accountEnabled", + "nativeType": "boolean", + "type": "boolean", + }, + "addIns": { + "items": { + "nativeType": "object", + "type": "object", + }, + "nativeName": "addIns", + "nativeType": "object", + "type": "array", + }, + "alternativeNames": { + "items": { + "nativeType": "string", + "type": "string", + }, + "nativeName": "alternativeNames", + "nativeType": "string", + "type": "array", + }, + "appDescription": { + "nativeName": "appDescription", + "nativeType": "string", + "type": "string", + }, + "appDisplayName": { + "nativeName": "appDisplayName", + "nativeType": "string", + "type": "string", + }, + "appId": { + "nativeName": "appId", + "nativeType": "string", + "type": "string", + }, + "appOwnerOrganizationId": { + "nativeName": "appOwnerOrganizationId", + "nativeType": "string", + "type": "string", + }, + "appRoleAssignmentRequired": { + "nativeName": "appRoleAssignmentRequired", + "nativeType": "boolean", + "type": "boolean", + }, + "appRoles": { + "items": { + "nativeType": "object", + "type": "object", + }, + "nativeName": "appRoles", + "nativeType": "object", + "type": "array", + }, + "applicationTemplateId": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "nativeName": "applicationTemplateId", + "nativeType": "string", + "type": "string", + }, + "deletedDateTime": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "nativeName": "deletedDateTime", + "nativeType": "string", + "type": "string", + }, + "description": { + "nativeName": "description", + "nativeType": "string", + "type": "string", + }, + "disabledByMicrosoftStatus": { + "nativeName": "disabledByMicrosoftStatus", + "nativeType": "string", + "type": "string", + }, + "displayName": { + "nativeName": "displayName", + "nativeType": "string", + "type": "string", + }, + "homepage": { + "nativeName": "homepage", + "nativeType": "string", + "type": "string", + }, + "info": { + "nativeName": "info", + "nativeType": "object", + "type": "object", + }, + "keyCredentials": { + "items": { + "nativeType": "object", + "type": "object", + }, + "nativeName": "keyCredentials", + "nativeType": "object", + "type": "array", + }, + "loginUrl": { + "nativeName": "loginUrl", + "nativeType": "string", + "type": "string", + }, + "logoutUrl": { + "nativeName": "logoutUrl", + "nativeType": "string", + "type": "string", + }, + "notes": { + "nativeName": "notes", + "nativeType": "string", + "type": "string", + }, + "notificationEmailAddresses": { + "items": { + "nativeType": "string", + "type": "string", + }, + "nativeName": "notificationEmailAddresses", + "nativeType": "string", + "type": "array", + }, + "oauth2PermissionScopes": { + "items": { + "nativeType": "object", + "type": "object", + }, + "nativeName": "oauth2PermissionScopes", + "nativeType": "object", + "type": "array", + }, + "passwordCredentials": { + "items": { + "nativeType": "object", + "type": "object", + }, + "nativeName": "passwordCredentials", + "nativeType": "object", + "type": "array", + }, + "preferredSingleSignOnMode": { + "nativeName": "preferredSingleSignOnMode", + "nativeType": "string", + "type": "string", + }, + "replyUrls": { + "items": { + "nativeType": "string", + "type": "string", + }, + "nativeName": "replyUrls", + "nativeType": "string", + "type": "array", + }, + "resourceSpecificApplicationPermissions": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "items": { + "nativeType": "object", + "type": "object", + }, + "nativeName": "resourceSpecificApplicationPermissions", + "nativeType": "object", + "type": "array", + }, + "samlSingleSignOnSettings": { + "nativeName": "samlSingleSignOnSettings", + "nativeType": "object", + "type": "object", + }, + "servicePrincipalNames": { + "items": { + "nativeType": "string", + "type": "string", + }, + "nativeName": "servicePrincipalNames", + "nativeType": "string", + "type": "array", + }, + "servicePrincipalType": { + "nativeName": "servicePrincipalType", + "nativeType": "string", + "type": "string", + }, + "signInAudience": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "nativeName": "signInAudience", + "nativeType": "string", + "type": "string", + }, + "tags": { + "items": { + "nativeType": "string", + "type": "string", + }, + "nativeName": "tags", + "nativeType": "string", + "type": "array", + }, + "tokenEncryptionKeyId": { + "nativeName": "tokenEncryptionKeyId", + "nativeType": "string", + "type": "string", + }, + "verifiedPublisher": { + "nativeName": "verifiedPublisher", + "nativeType": "object", + "type": "object", + }, + }, + "type": "object", + }, + }, + "operationTimeout": { + "AUTHENTICATE": -1, + "CREATE": -1, + "DELETE": -1, + "GET": -1, + "RESOLVEUSERNAME": -1, + "SCHEMA": -1, + "SCRIPT_ON_CONNECTOR": -1, + "SCRIPT_ON_RESOURCE": -1, + "SEARCH": -1, + "SYNC": -1, + "TEST": -1, + "UPDATE": -1, + "VALIDATE": -1, + }, + "poolConfigOption": { + "maxIdle": 10, + "maxObjects": 10, + "maxWait": 150000, + "minEvictableIdleTimeMillis": 120000, + "minIdle": 1, + }, + "resultsHandlerConfig": { + "enableAttributesToGetSearchResultsHandler": true, + "enableCaseInsensitiveFilter": false, + "enableFilteredResultsHandler": false, + "enableNormalizingResultsHandler": false, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/provisioner.openicf/GoogleApps.idm.json 1`] = ` +{ + "idm": { + "provisioner.openicf/GoogleApps": { + "_id": "provisioner.openicf/GoogleApps", + "configurationProperties": { + "availableLicenses": [ + "101005/1010050001", + "101001/1010010001", + "101031/1010310010", + "101034/1010340002", + "101038/1010380002", + "101034/1010340001", + "101038/1010380003", + "101034/1010340004", + "101034/1010340003", + "101034/1010340006", + "Google-Apps/Google-Apps-For-Business", + "101034/1010340005", + "Google-Vault/Google-Vault", + "Google-Apps/1010020031", + "Google-Apps/1010020030", + "Google-Apps/1010060003", + "Google-Apps/1010060005", + "Google-Apps/Google-Apps-Unlimited", + "Google-Apps/1010020029", + "Google-Apps/Google-Apps-Lite", + "101031/1010310003", + "101033/1010330002", + "101033/1010330004", + "Google-Apps/Google-Apps-For-Education", + "101031/1010310002", + "101033/1010330003", + "Google-Apps/1010020026", + "101031/1010310007", + "Google-Apps/1010020025", + "101031/1010310008", + "Google-Apps/1010020028", + "Google-Apps/Google-Apps-For-Postini", + "101031/1010310005", + "Google-Apps/1010020027", + "101031/1010310006", + "101031/1010310009", + "Google-Vault/Google-Vault-Former-Employee", + "101038/1010370001", + "Google-Apps/1010020020", + "Google-Apps/1010060001", + ], + "clientId": "&{esv.gac.client.id}", + "clientSecret": "&{esv.gac.secret}", + "domain": "&{esv.gac.domain}", + "groupsMaxResults": "200", + "listProductAndSkuMaxResults": "100", + "listProductMaxResults": "100", + "membersMaxResults": "200", + "proxyHost": null, + "proxyPort": 8080, + "refreshToken": "&{esv.gac.refresh}", + "roleAssignmentMaxResults": 100, + "roleMaxResults": 100, + "usersMaxResults": "100", + "validateCertificate": true, + }, + "connectorRef": { + "bundleName": "org.forgerock.openicf.connectors.googleapps-connector", + "bundleVersion": "[1.5.0.0,1.6.0.0)", + "connectorHostRef": "", + "connectorName": "org.forgerock.openicf.connectors.googleapps.GoogleAppsConnector", + "displayName": "GoogleApps Connector", + "systemType": "provisioner.openicf", + }, + "enabled": { + "$bool": "&{esv.gac.enable.connector}", + }, + "objectTypes": { + "__ACCOUNT__": { + "$schema": "http://json-schema.org/draft-03/schema", + "id": "__ACCOUNT__", + "nativeType": "__ACCOUNT__", + "properties": { + "__GROUPS__": { + "flags": [ + "NOT_RETURNED_BY_DEFAULT", + ], + "items": { + "nativeType": "string", + "type": "string", + }, + "nativeName": "__GROUPS__", + "nativeType": "string", + "type": "array", + }, + "__NAME__": { + "nativeName": "__NAME__", + "nativeType": "string", + "type": "string", + }, + "__PASSWORD__": { + "flags": [ + "NOT_READABLE", + "NOT_RETURNED_BY_DEFAULT", + ], + "nativeName": "__PASSWORD__", + "nativeType": "JAVA_TYPE_GUARDEDSTRING", + "required": true, + "type": "string", + }, + "__PHOTO__": { + "flags": [ + "NOT_RETURNED_BY_DEFAULT", + ], + "nativeName": "__PHOTO__", + "nativeType": "JAVA_TYPE_BYTE_ARRAY", + "type": "string", + }, + "__SECONDARY_EMAILS__": { + "items": { + "nativeType": "object", + "type": "object", + }, + "nativeName": "__SECONDARY_EMAILS__", + "nativeType": "object", + "type": "array", + }, + "__UID__": { + "nativeName": "__UID__", + "nativeType": "string", + "required": false, + "type": "string", + }, + "addresses": { + "items": { + "nativeType": "object", + "type": "object", + }, + "nativeName": "addresses", + "nativeType": "object", + "type": "array", + }, + "agreedToTerms": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "nativeName": "agreedToTerms", + "nativeType": "JAVA_TYPE_PRIMITIVE_BOOLEAN", + "type": "boolean", + }, + "aliases": { + "flags": [ + "NOT_CREATABLE", + ], + "items": { + "nativeType": "string", + "type": "string", + }, + "nativeName": "aliases", + "nativeType": "string", + "type": "array", + }, + "archived": { + "nativeName": "archived", + "nativeType": "boolean", + "type": "boolean", + }, + "changePasswordAtNextLogin": { + "nativeName": "changePasswordAtNextLogin", + "nativeType": "boolean", + "type": "boolean", + }, + "creationTime": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "items": { + "nativeType": "string", + "type": "string", + }, + "nativeName": "creationTime", + "nativeType": "string", + "type": "array", + }, + "customSchemas": { + "nativeName": "customSchemas", + "nativeType": "object", + "type": "object", + }, + "customerId": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "nativeName": "customerId", + "nativeType": "string", + "type": "string", + }, + "deletionTime": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "nativeName": "deletionTime", + "nativeType": "string", + "type": "string", + }, + "externalIds": { + "items": { + "nativeType": "object", + "type": "object", + }, + "nativeName": "externalIds", + "nativeType": "object", + "type": "array", + }, + "familyName": { + "nativeName": "familyName", + "nativeType": "string", + "type": "string", + }, + "fullName": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "nativeName": "fullName", + "nativeType": "string", + "type": "string", + }, + "givenName": { + "nativeName": "givenName", + "nativeType": "string", + "required": true, + "type": "string", + }, + "hashFunction": { + "flags": [ + "NOT_RETURNED_BY_DEFAULT", + ], + "nativeName": "hashFunction", + "nativeType": "string", + "type": "string", + }, + "ims": { + "items": { + "nativeType": "object", + "type": "object", + }, + "nativeName": "ims", + "nativeType": "object", + "type": "array", + }, + "includeInGlobalAddressList": { + "nativeName": "includeInGlobalAddressList", + "nativeType": "boolean", + "type": "boolean", + }, + "ipWhitelisted": { + "nativeName": "ipWhitelisted", + "nativeType": "boolean", + "type": "boolean", + }, + "isAdmin": { + "nativeName": "isAdmin", + "nativeType": "JAVA_TYPE_PRIMITIVE_BOOLEAN", + "type": "boolean", + }, + "isDelegatedAdmin": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "nativeName": "isDelegatedAdmin", + "nativeType": "JAVA_TYPE_PRIMITIVE_BOOLEAN", + "type": "boolean", + }, + "isEnforcedIn2Sv": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "nativeName": "isEnforcedIn2Sv", + "nativeType": "boolean", + "type": "boolean", + }, + "isEnrolledIn2Sv": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "nativeName": "isEnrolledIn2Sv", + "nativeType": "boolean", + "type": "boolean", + }, + "isMailboxSetup": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "nativeName": "isMailboxSetup", + "nativeType": "boolean", + "type": "boolean", + }, + "languages": { + "items": { + "nativeType": "object", + "type": "object", + }, + "nativeName": "languages", + "nativeType": "object", + "type": "array", + }, + "lastLoginTime": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "items": { + "nativeType": "string", + "type": "string", + }, + "nativeName": "lastLoginTime", + "nativeType": "string", + "type": "array", + }, + "nonEditableAliases": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "items": { + "nativeType": "string", + "type": "string", + }, + "nativeName": "nonEditableAliases", + "nativeType": "string", + "type": "array", + }, + "orgUnitPath": { + "nativeName": "orgUnitPath", + "nativeType": "string", + "type": "string", + }, + "organizations": { + "items": { + "nativeType": "object", + "type": "object", + }, + "nativeName": "organizations", + "nativeType": "object", + "type": "array", + }, + "phones": { + "items": { + "nativeType": "object", + "type": "object", + }, + "nativeName": "phones", + "nativeType": "object", + "type": "array", + }, + "primaryEmail": { + "nativeName": "primaryEmail", + "nativeType": "string", + "type": "string", + }, + "recoveryEmail": { + "nativeName": "recoveryEmail", + "nativeType": "string", + "type": "string", + }, + "recoveryPhone": { + "nativeName": "recoveryPhone", + "nativeType": "string", + "type": "string", + }, + "relations": { + "items": { + "nativeType": "object", + "type": "object", + }, + "nativeName": "relations", + "nativeType": "object", + "type": "array", + }, + "suspended": { + "nativeName": "suspended", + "nativeType": "boolean", + "type": "boolean", + }, + "suspensionReason": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "nativeName": "suspensionReason", + "nativeType": "string", + "type": "string", + }, + "thumbnailPhotoUrl": { + "flags": [ + "NOT_CREATABLE", + "NOT_UPDATEABLE", + ], + "nativeName": "thumbnailPhotoUrl", + "nativeType": "string", + "type": "string", + }, + }, + "type": "object", + }, + }, + "operationTimeout": { + "AUTHENTICATE": -1, + "CREATE": -1, + "DELETE": -1, + "GET": -1, + "RESOLVEUSERNAME": -1, + "SCHEMA": -1, + "SCRIPT_ON_CONNECTOR": -1, + "SCRIPT_ON_RESOURCE": -1, + "SEARCH": -1, + "SYNC": -1, + "TEST": -1, + "UPDATE": -1, + "VALIDATE": -1, + }, + "poolConfigOption": { + "maxIdle": 10, + "maxObjects": 10, + "maxWait": 150000, + "minEvictableIdleTimeMillis": 120000, + "minIdle": 1, + }, + "resultsHandlerConfig": { + "enableAttributesToGetSearchResultsHandler": true, + "enableCaseInsensitiveFilter": false, + "enableFilteredResultsHandler": false, + "enableNormalizingResultsHandler": false, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/repo.ds.idm.json 1`] = ` +{ + "idm": { + "repo.ds": { + "_id": "repo.ds", + "commands": { + "delete-mapping-links": { + "_queryFilter": "/linkType eq "\${mapping}"", + "operation": "DELETE", + }, + "delete-target-ids-for-recon": { + "_queryFilter": "/reconId eq "\${reconId}"", + "operation": "DELETE", + }, + }, + "embedded": false, + "ldapConnectionFactories": { + "bind": { + "availabilityCheckIntervalSeconds": 30, + "availabilityCheckTimeoutMilliSeconds": 10000, + "connectionPoolSize": 50, + "connectionSecurity": "none", + "heartBeatIntervalSeconds": 60, + "heartBeatTimeoutMilliSeconds": 10000, + "primaryLdapServers": [ + { + "hostname": "userstore-0.userstore", + "port": 1389, + }, + ], + "secondaryLdapServers": [ + { + "hostname": "userstore-2.userstore", + "port": 1389, + }, + ], + }, + "root": { + "authentication": { + "simple": { + "bindDn": "uid=admin", + "bindPassword": "&{userstore.password}", + }, + }, + "inheritFrom": "bind", + }, + }, + "maxConnectionAttempts": 5, + "queries": { + "explicit": { + "credential-internaluser-query": { + "_queryFilter": "/_id eq "\${username}"", + }, + "credential-query": { + "_queryFilter": "/userName eq "\${username}"", + }, + "for-userName": { + "_queryFilter": "/userName eq "\${uid}"", + }, + "links-for-firstId": { + "_queryFilter": "/linkType eq "\${linkType}" AND /firstId = "\${firstId}"", + }, + "links-for-linkType": { + "_queryFilter": "/linkType eq "\${linkType}"", + }, + "query-all": { + "_queryFilter": "true", + }, + "query-all-ids": { + "_fields": "_id,_rev", + "_queryFilter": "true", + }, + }, + "generic": { + "credential-internaluser-query": { + "_queryFilter": "/_id eq "\${username}"", + }, + "credential-query": { + "_queryFilter": "/userName eq "\${username}"", + }, + "find-relationship-edges": { + "_queryFilter": "((/firstResourceCollection eq "\${firstResourceCollection}" and /firstResourceId eq "\${firstResourceId}" and /firstPropertyName eq "\${firstPropertyName}") and (/secondResourceCollection eq "\${secondResourceCollection}" and /secondResourceId eq "\${secondResourceId}" and /secondPropertyName eq "\${secondPropertyName}")) or ((/firstResourceCollection eq "\${secondResourceCollection}" and /firstResourceId eq "\${secondResourceId}" and /firstPropertyName eq "\${secondPropertyName}") and (/secondResourceCollection eq "\${firstResourceCollection}" and /secondResourceId eq "\${firstResourceId}" and /secondPropertyName eq "\${firstPropertyName}"))", + }, + "find-relationships-for-resource": { + "_queryFilter": "(/firstResourceCollection eq "\${resourceCollection}" and /firstResourceId eq "\${resourceId}" and /firstPropertyName eq "\${propertyName}") or (/secondResourceCollection eq "\${resourceCollection}" and /secondResourceId eq "\${resourceId}" and /secondPropertyName eq "\${propertyName}")", + }, + "for-userName": { + "_queryFilter": "/userName eq "\${uid}"", + }, + "get-by-field-value": { + "_queryFilter": "/\${field} eq "\${value}"", + }, + "get-notifications-for-user": { + "_queryFilter": "/receiverId eq "\${userId}"", + "_sortKeys": "-createDate", + }, + "get-recons": { + "_fields": "reconId,mapping,activitydate", + "_queryFilter": "/entryType eq "summary"", + "_sortKeys": "-activitydate", + }, + "links-for-firstId": { + "_queryFilter": "/linkType eq "\${linkType}" AND /firstId = "\${firstId}"", + }, + "links-for-linkType": { + "_queryFilter": "/linkType eq "\${linkType}"", + }, + "query-all": { + "_queryFilter": "true", + }, + "query-all-ids": { + "_fields": "_id,_rev", + "_queryFilter": "true", + }, + "query-cluster-events": { + "_queryFilter": "/instanceId eq "\${instanceId}"", + }, + "query-cluster-failed-instances": { + "_queryFilter": "/timestamp le \${timestamp} and (/state eq "1" or /state eq "2")", + }, + "query-cluster-instances": { + "_queryFilter": "true", + }, + "query-cluster-running-instances": { + "_queryFilter": "/state eq 1", + }, + }, + }, + "resourceMapping": { + "defaultMapping": { + "dnTemplate": "ou=generic,dc=openidm,dc=example,dc=com", + }, + "explicitMapping": { + "clusteredrecontargetids": { + "dnTemplate": "ou=clusteredrecontargetids,dc=openidm,dc=example,dc=com", + "objectClasses": [ + "uidObject", + "fr-idm-recon-clusteredTargetIds", + ], + "properties": { + "_id": { + "isRequired": true, + "ldapAttribute": "uid", + "type": "simple", + "writability": "createOnly", + }, + "reconId": { + "ldapAttribute": "fr-idm-recon-id", + "type": "simple", + }, + "targetIds": { + "ldapAttribute": "fr-idm-recon-targetIds", + "type": "json", + }, + }, + }, + "dsconfig/attributeValue": { + "dnTemplate": "cn=Password Validators,cn=config", + "objectClasses": [ + "ds-cfg-password-validator", + "ds-cfg-attribute-value-password-validator", + ], + "properties": { + "_id": { + "isRequired": true, + "ldapAttribute": "cn", + "type": "simple", + "writability": "createOnly", + }, + "checkSubstrings": { + "ldapAttribute": "ds-cfg-check-substrings", + "type": "simple", + }, + "enabled": { + "ldapAttribute": "ds-cfg-enabled", + "type": "simple", + }, + "javaClass": { + "ldapAttribute": "ds-cfg-java-class", + "type": "simple", + }, + "matchAttribute": { + "isMultiValued": true, + "ldapAttribute": "ds-cfg-match-attribute", + "type": "simple", + }, + "minSubstringLength": { + "ldapAttribute": "ds-cfg-min-substring-length", + "type": "simple", + }, + "testReversedPassword": { + "isRequired": true, + "ldapAttribute": "ds-cfg-test-reversed-password", + "type": "simple", + }, + }, + }, + "dsconfig/characterSet": { + "dnTemplate": "cn=Password Validators,cn=config", + "objectClasses": [ + "ds-cfg-password-validator", + "ds-cfg-character-set-password-validator", + ], + "properties": { + "_id": { + "isRequired": true, + "ldapAttribute": "cn", + "type": "simple", + "writability": "createOnly", + }, + "allowUnclassifiedCharacters": { + "isRequired": true, + "ldapAttribute": "ds-cfg-allow-unclassified-characters", + "type": "simple", + }, + "characterSet": { + "isMultiValued": true, + "ldapAttribute": "ds-cfg-character-set", + "type": "simple", + }, + "enabled": { + "ldapAttribute": "ds-cfg-enabled", + "type": "simple", + }, + "javaClass": { + "ldapAttribute": "ds-cfg-java-class", + "type": "simple", + }, + "minCharacterSets": { + "ldapAttribute": "ds-cfg-min-character-sets", + "type": "simple", + }, + }, + }, + "dsconfig/dictionary": { + "dnTemplate": "cn=Password Validators,cn=config", + "objectClasses": [ + "ds-cfg-password-validator", + "ds-cfg-dictionary-password-validator", + ], + "properties": { + "_id": { + "isRequired": true, + "ldapAttribute": "cn", + "type": "simple", + "writability": "createOnly", + }, + "caseSensitiveValidation": { + "isRequired": true, + "ldapAttribute": "ds-cfg-case-sensitive-validation", + "type": "simple", + }, + "checkSubstrings": { + "ldapAttribute": "ds-cfg-check-substrings", + "type": "simple", + }, + "dictionaryFile": { + "isRequired": true, + "ldapAttribute": "ds-cfg-dictionary-file", + "type": "simple", + }, + "enabled": { + "ldapAttribute": "ds-cfg-enabled", + "type": "simple", + }, + "javaClass": { + "ldapAttribute": "ds-cfg-java-class", + "type": "simple", + }, + "minSubstringLength": { + "ldapAttribute": "ds-cfg-min-substring-length", + "type": "simple", + }, + "testReversedPassword": { + "isRequired": true, + "ldapAttribute": "ds-cfg-test-reversed-password", + "type": "simple", + }, + }, + }, + "dsconfig/lengthBased": { + "dnTemplate": "cn=Password Validators,cn=config", + "objectClasses": [ + "ds-cfg-password-validator", + "ds-cfg-length-based-password-validator", + ], + "properties": { + "_id": { + "isRequired": true, + "ldapAttribute": "cn", + "type": "simple", + "writability": "createOnly", + }, + "enabled": { + "ldapAttribute": "ds-cfg-enabled", + "type": "simple", + }, + "javaClass": { + "ldapAttribute": "ds-cfg-java-class", + "type": "simple", + }, + "maxPasswordLength": { + "ldapAttribute": "ds-cfg-max-password-length", + "type": "simple", + }, + "minPasswordLength": { + "ldapAttribute": "ds-cfg-min-password-length", + "type": "simple", + }, + }, + }, + "dsconfig/passwordPolicies": { + "dnTemplate": "cn=Password Policies,cn=config", + "objectClasses": [ + "ds-cfg-password-policy", + "ds-cfg-authentication-policy", + ], + "properties": { + "_id": { + "isRequired": true, + "ldapAttribute": "cn", + "type": "simple", + "writability": "createOnly", + }, + "allowPreEncodedPasswords": { + "ldapAttribute": "ds-cfg-allow-pre-encoded-passwords", + "type": "simple", + }, + "defaultPasswordStorageScheme": { + "isMultiValued": true, + "isRequired": true, + "ldapAttribute": "ds-cfg-default-password-storage-scheme", + "type": "simple", + }, + "deprecatedPasswordStorageScheme": { + "isMultiValued": true, + "ldapAttribute": "ds-cfg-deprecated-password-storage-scheme", + "type": "simple", + }, + "maxPasswordAge": { + "ldapAttribute": "ds-cfg-max-password-age", + "type": "simple", + }, + "passwordAttribute": { + "isRequired": true, + "ldapAttribute": "ds-cfg-password-attribute", + "type": "simple", + }, + "passwordHistoryCount": { + "ldapAttribute": "ds-cfg-password-history-count", + "type": "simple", + }, + "validator": { + "isMultiValued": true, + "ldapAttribute": "ds-cfg-password-validator", + "type": "simple", + }, + }, + }, + "dsconfig/repeatedCharacters": { + "dnTemplate": "cn=Password Validators,cn=config", + "objectClasses": [ + "ds-cfg-password-validator", + "ds-cfg-repeated-characters-password-validator", + ], + "properties": { + "_id": { + "isRequired": true, + "ldapAttribute": "cn", + "type": "simple", + "writability": "createOnly", + }, + "caseSensitiveValidation": { + "isRequired": true, + "ldapAttribute": "ds-cfg-case-sensitive-validation", + "type": "simple", + }, + "enabled": { + "ldapAttribute": "ds-cfg-enabled", + "type": "simple", + }, + "javaClass": { + "ldapAttribute": "ds-cfg-java-class", + "type": "simple", + }, + "maxConsecutiveLength": { + "isRequired": true, + "ldapAttribute": "ds-cfg-max-consecutive-length", + "type": "simple", + }, + }, + }, + "dsconfig/similarityBased": { + "dnTemplate": "cn=Password Validators,cn=config", + "objectClasses": [ + "ds-cfg-password-validator", + "ds-cfg-similarity-based-password-validator", + ], + "properties": { + "_id": { + "isRequired": true, + "ldapAttribute": "cn", + "type": "simple", + "writability": "createOnly", + }, + "enabled": { + "ldapAttribute": "ds-cfg-enabled", + "type": "simple", + }, + "javaClass": { + "ldapAttribute": "ds-cfg-java-class", + "type": "simple", + }, + "minPasswordDifference": { + "isRequired": true, + "ldapAttribute": "ds-cfg-min-password-difference", + "type": "simple", + }, + }, + }, + "dsconfig/uniqueCharacters": { + "dnTemplate": "cn=Password Validators,cn=config", + "objectClasses": [ + "ds-cfg-password-validator", + "ds-cfg-unique-characters-password-validator", + ], + "properties": { + "_id": { + "isRequired": true, + "ldapAttribute": "cn", + "type": "simple", + "writability": "createOnly", + }, + "caseSensitiveValidation": { + "isRequired": true, + "ldapAttribute": "ds-cfg-case-sensitive-validation", + "type": "simple", + }, + "enabled": { + "ldapAttribute": "ds-cfg-enabled", + "type": "simple", + }, + "javaClass": { + "ldapAttribute": "ds-cfg-java-class", + "type": "simple", + }, + "minUniqueCharacters": { + "isRequired": true, + "ldapAttribute": "ds-cfg-min-unique-characters", + "type": "simple", + }, + }, + }, + "dsconfig/userDefinedVirtualAttribute": { + "dnTemplate": "cn=Virtual Attributes,cn=config", + "objectClasses": [ + "ds-cfg-user-defined-virtual-attribute", + "ds-cfg-virtual-attribute", + ], + "properties": { + "_id": { + "isRequired": true, + "ldapAttribute": "cn", + "type": "simple", + "writability": "createOnly", + }, + "attributeType": { + "isRequired": true, + "ldapAttribute": "ds-cfg-attribute-type", + "type": "simple", + }, + "baseDn": { + "isMultiValued": true, + "ldapAttribute": "ds-cfg-base-dn", + "type": "simple", + }, + "conflictBehavior": { + "ldapAttribute": "ds-cfg-conflict-behavior", + "type": "simple", + }, + "enabled": { + "isRequired": true, + "ldapAttribute": "ds-cfg-enabled", + "type": "simple", + }, + "filter": { + "isMultiValued": true, + "ldapAttribute": "ds-cfg-filter", + "type": "simple", + }, + "groupDn": { + "ldapAttribute": "ds-cfg-group-dn", + "type": "simple", + }, + "javaClass": { + "isRequired": true, + "ldapAttribute": "ds-cfg-java-class", + "type": "simple", + }, + "scope": { + "ldapAttribute": "ds-cfg-scope", + "type": "simple", + }, + "value": { + "isMultiValued": true, + "isRequired": true, + "ldapAttribute": "ds-cfg-value", + "type": "simple", + }, + }, + }, + "identities/admin": { + "dnTemplate": "o=root,ou=identities", + "isReadOnly": true, + "namingStrategy": { + "dnAttribute": "ou", + "type": "clientDnNaming", + }, + "objectClasses": [ + "organizationalunit", + ], + "properties": { + "_id": { + "ldapAttribute": "ou", + "primaryKey": true, + "type": "simple", + }, + "count": { + "isRequired": true, + "ldapAttribute": "numSubordinates", + "type": "simple", + "writability": "readOnly", + }, + }, + }, + "identities/alpha": { + "dnTemplate": "o=alpha,o=root,ou=identities", + "isReadOnly": true, + "namingStrategy": { + "dnAttribute": "ou", + "type": "clientDnNaming", + }, + "objectClasses": [ + "organizationalunit", + ], + "properties": { + "_id": { + "ldapAttribute": "ou", + "primaryKey": true, + "type": "simple", + }, + "count": { + "isRequired": true, + "ldapAttribute": "numSubordinates", + "type": "simple", + "writability": "readOnly", + }, + }, + }, + "identities/bravo": { + "dnTemplate": "o=bravo,o=root,ou=identities", + "isReadOnly": true, + "namingStrategy": { + "dnAttribute": "ou", + "type": "clientDnNaming", + }, + "objectClasses": [ + "organizationalunit", + ], + "properties": { + "_id": { + "ldapAttribute": "ou", + "primaryKey": true, + "type": "simple", + }, + "count": { + "isRequired": true, + "ldapAttribute": "numSubordinates", + "type": "simple", + "writability": "readOnly", + }, + }, + }, + "internal/role": { + "dnTemplate": "ou=roles,ou=internal,dc=openidm,dc=example,dc=com", + "objectClasses": [ + "fr-idm-internal-role", + ], + "properties": { + "_id": { + "isRequired": true, + "ldapAttribute": "cn", + "type": "simple", + "writability": "createOnly", + }, + "authzMembers": { + "isMultiValued": true, + "propertyName": "authzRoles", + "resourcePath": "managed/alpha_user", + "type": "reverseReference", + }, + "condition": { + "ldapAttribute": "fr-idm-condition", + "type": "simple", + }, + "description": { + "ldapAttribute": "description", + "type": "simple", + }, + "name": { + "ldapAttribute": "fr-idm-name", + "type": "simple", + }, + "privileges": { + "isMultiValued": true, + "ldapAttribute": "fr-idm-privilege", + "type": "json", + }, + "temporalConstraints": { + "isMultiValued": true, + "ldapAttribute": "fr-idm-temporal-constraints", + "type": "json", + }, + }, + }, + "internal/user": { + "dnTemplate": "ou=users,ou=internal,dc=openidm,dc=example,dc=com", + "objectClasses": [ + "uidObject", + "fr-idm-internal-user", + ], + "properties": { + "_id": { + "isRequired": true, + "ldapAttribute": "uid", + "type": "simple", + "writability": "createOnly", + }, + "password": { + "ldapAttribute": "fr-idm-password", + "type": "json", + }, + }, + }, + "link": { + "dnTemplate": "ou=links,dc=openidm,dc=example,dc=com", + "objectClasses": [ + "uidObject", + "fr-idm-link", + ], + "properties": { + "_id": { + "isRequired": true, + "ldapAttribute": "uid", + "type": "simple", + "writability": "createOnly", + }, + "firstId": { + "ldapAttribute": "fr-idm-link-firstId", + "type": "simple", + }, + "linkQualifier": { + "ldapAttribute": "fr-idm-link-qualifier", + "type": "simple", + }, + "linkType": { + "ldapAttribute": "fr-idm-link-type", + "type": "simple", + }, + "secondId": { + "ldapAttribute": "fr-idm-link-secondId", + "type": "simple", + }, + }, + }, + "locks": { + "dnTemplate": "ou=locks,dc=openidm,dc=example,dc=com", + "objectClasses": [ + "uidObject", + "fr-idm-lock", + ], + "properties": { + "_id": { + "isRequired": true, + "ldapAttribute": "uid", + "type": "simple", + "writability": "createOnly", + }, + "nodeId": { + "ldapAttribute": "fr-idm-lock-nodeid", + "type": "simple", + }, + }, + }, + "managed/teammember": { + "dnTemplate": "ou=people,o=root,ou=identities", + "namingStrategy": { + "dnAttribute": "fr-idm-uuid", + "type": "clientDnNaming", + }, + "nativeId": false, + "objectClasses": [ + "person", + "organizationalPerson", + "inetOrgPerson", + "fraas-admin", + "iplanet-am-user-service", + "deviceProfilesContainer", + "devicePrintProfilesContainer", + "kbaInfoContainer", + "fr-idm-managed-user-explicit", + "forgerock-am-dashboard-service", + "inetuser", + "iplanet-am-auth-configuration-service", + "iplanet-am-managed-person", + "iPlanetPreferences", + "oathDeviceProfilesContainer", + "pushDeviceProfilesContainer", + "sunAMAuthAccountLockout", + "sunFMSAML2NameIdentifier", + "webauthnDeviceProfilesContainer", + "fr-idm-hybrid-obj", + ], + "properties": { + "_id": { + "ldapAttribute": "fr-idm-uuid", + "primaryKey": true, + "type": "simple", + }, + "_meta": { + "isMultiValued": false, + "ldapAttribute": "fr-idm-managed-user-meta", + "primaryKey": "uid", + "resourcePath": "managed/teammembermeta", + "type": "reference", + }, + "accountStatus": { + "ldapAttribute": "inetUserStatus", + "type": "simple", + }, + "cn": { + "ldapAttribute": "cn", + "type": "simple", + }, + "givenName": { + "ldapAttribute": "givenName", + "type": "simple", + }, + "inviteDate": { + "ldapAttribute": "fr-idm-inviteDate", + "type": "simple", + }, + "jurisdiction": { + "ldapAttribute": "fr-idm-jurisdiction", + "type": "simple", + }, + "mail": { + "ldapAttribute": "mail", + "type": "simple", + }, + "onboardDate": { + "ldapAttribute": "fr-idm-onboardDate", + "type": "simple", + }, + "password": { + "ldapAttribute": "userPassword", + "type": "simple", + }, + "sn": { + "ldapAttribute": "sn", + "type": "simple", + }, + "userName": { + "ldapAttribute": "uid", + "type": "simple", + }, + }, + }, + "managed/teammembergroup": { + "dnTemplate": "ou=groups,o=root,ou=identities", + "objectClasses": [ + "groupofuniquenames", + ], + "properties": { + "_id": { + "ldapAttribute": "cn", + "primaryKey": true, + "type": "simple", + }, + "members": { + "isMultiValued": true, + "ldapAttribute": "uniqueMember", + "type": "simple", + }, + }, + }, + "recon/assoc": { + "dnTemplate": "ou=assoc,ou=recon,dc=openidm,dc=example,dc=com", + "namingStrategy": { + "dnAttribute": "fr-idm-reconassoc-reconid", + "type": "clientDnNaming", + }, + "objectClasses": [ + "fr-idm-reconassoc", + ], + "properties": { + "_id": { + "isRequired": true, + "ldapAttribute": "fr-idm-reconassoc-reconid", + "type": "simple", + }, + "finishTime": { + "ldapAttribute": "fr-idm-reconassoc-finishtime", + "type": "simple", + }, + "isAnalysis": { + "ldapAttribute": "fr-idm-reconassoc-isanalysis", + "type": "simple", + }, + "mapping": { + "ldapAttribute": "fr-idm-reconassoc-mapping", + "type": "simple", + }, + "sourceResourceCollection": { + "ldapAttribute": "fr-idm-reconassoc-sourceresourcecollection", + "type": "simple", + }, + "targetResourceCollection": { + "ldapAttribute": "fr-idm-reconassoc-targetresourcecollection", + "type": "simple", + }, + }, + "subResources": { + "entry": { + "namingStrategy": { + "dnAttribute": "uid", + "type": "clientDnNaming", + }, + "resource": "recon-assoc-entry", + "type": "collection", + }, + }, + }, + "recon/assoc/entry": { + "objectClasses": [ + "uidObject", + "fr-idm-reconassocentry", + ], + "properties": { + "_id": { + "isRequired": true, + "ldapAttribute": "uid", + "type": "simple", + }, + "action": { + "ldapAttribute": "fr-idm-reconassocentry-action", + "type": "simple", + }, + "ambiguousTargetObjectIds": { + "ldapAttribute": "fr-idm-reconassocentry-ambiguoustargetobjectids", + "type": "simple", + }, + "exception": { + "ldapAttribute": "fr-idm-reconassocentry-exception", + "type": "simple", + }, + "isAnalysis": { + "ldapAttribute": "fr-idm-reconassoc-isanalysis", + "type": "simple", + }, + "linkQualifier": { + "ldapAttribute": "fr-idm-reconassocentry-linkqualifier", + "type": "simple", + }, + "mapping": { + "ldapAttribute": "fr-idm-reconassoc-mapping", + "type": "simple", + }, + "message": { + "ldapAttribute": "fr-idm-reconassocentry-message", + "type": "simple", + }, + "messageDetail": { + "ldapAttribute": "fr-idm-reconassocentry-messagedetail", + "type": "simple", + }, + "phase": { + "ldapAttribute": "fr-idm-reconassocentry-phase", + "type": "simple", + }, + "reconId": { + "ldapAttribute": "fr-idm-reconassocentry-reconid", + "type": "simple", + }, + "situation": { + "ldapAttribute": "fr-idm-reconassocentry-situation", + "type": "simple", + }, + "sourceObjectId": { + "ldapAttribute": "fr-idm-reconassocentry-sourceObjectId", + "type": "simple", + }, + "sourceResourceCollection": { + "ldapAttribute": "fr-idm-reconassoc-sourceresourcecollection", + "type": "simple", + }, + "status": { + "ldapAttribute": "fr-idm-reconassocentry-status", + "type": "simple", + }, + "targetObjectId": { + "ldapAttribute": "fr-idm-reconassocentry-targetObjectId", + "type": "simple", + }, + "targetResourceCollection": { + "ldapAttribute": "fr-idm-reconassoc-targetresourcecollection", + "type": "simple", + }, + }, + "resourceName": "recon-assoc-entry", + "subResourceRouting": [ + { + "prefix": "entry", + "template": "recon/assoc/{reconId}/entry", + }, + ], + }, + "sync/queue": { + "dnTemplate": "ou=queue,ou=sync,dc=openidm,dc=example,dc=com", + "objectClasses": [ + "uidObject", + "fr-idm-syncqueue", + ], + "properties": { + "_id": { + "isRequired": true, + "ldapAttribute": "uid", + "type": "simple", + "writability": "createOnly", + }, + "context": { + "ldapAttribute": "fr-idm-syncqueue-context", + "type": "json", + }, + "createDate": { + "ldapAttribute": "fr-idm-syncqueue-createdate", + "type": "simple", + }, + "mapping": { + "ldapAttribute": "fr-idm-syncqueue-mapping", + "type": "simple", + }, + "newObject": { + "ldapAttribute": "fr-idm-syncqueue-newobject", + "type": "json", + }, + "nodeId": { + "ldapAttribute": "fr-idm-syncqueue-nodeid", + "type": "simple", + }, + "objectRev": { + "ldapAttribute": "fr-idm-syncqueue-objectRev", + "type": "simple", + }, + "oldObject": { + "ldapAttribute": "fr-idm-syncqueue-oldobject", + "type": "json", + }, + "remainingRetries": { + "ldapAttribute": "fr-idm-syncqueue-remainingretries", + "type": "simple", + }, + "resourceCollection": { + "ldapAttribute": "fr-idm-syncqueue-resourcecollection", + "type": "simple", + }, + "resourceId": { + "ldapAttribute": "fr-idm-syncqueue-resourceid", + "type": "simple", + }, + "state": { + "ldapAttribute": "fr-idm-syncqueue-state", + "type": "simple", + }, + "syncAction": { + "ldapAttribute": "fr-idm-syncqueue-syncaction", + "type": "simple", + }, + }, + }, + }, + "genericMapping": { + "cluster/*": { + "dnTemplate": "ou=cluster,dc=openidm,dc=example,dc=com", + "jsonAttribute": "fr-idm-cluster-json", + "jsonQueryEqualityMatchingRule": "caseIgnoreJsonQueryMatchClusterObject", + "objectClasses": [ + "uidObject", + "fr-idm-cluster-obj", + ], + }, + "config": { + "dnTemplate": "ou=config,dc=openidm,dc=example,dc=com", + }, + "file": { + "dnTemplate": "ou=file,dc=openidm,dc=example,dc=com", + }, + "internal/notification": { + "dnTemplate": "ou=notification,ou=internal,dc=openidm,dc=example,dc=com", + "jsonAttribute": "fr-idm-notification-json", + "jsonQueryEqualityMatchingRule": "caseIgnoreJsonQueryMatch", + "objectClasses": [ + "uidObject", + "fr-idm-notification", + ], + "properties": { + "target": { + "propertyName": "_notifications", + "resourcePath": "managed/alpha_user", + "type": "reverseReference", + }, + }, + }, + "internal/usermeta": { + "dnTemplate": "ou=usermeta,ou=internal,dc=openidm,dc=example,dc=com", + "jsonAttribute": "fr-idm-json", + "jsonQueryEqualityMatchingRule": "caseIgnoreJsonQueryMatch", + "objectClasses": [ + "uidObject", + "fr-idm-generic-obj", + ], + "properties": { + "target": { + "propertyName": "_meta", + "resourcePath": "managed/alpha_user", + "type": "reverseReference", + }, + }, + }, + "jsonstorage": { + "dnTemplate": "ou=jsonstorage,dc=openidm,dc=example,dc=com", + }, + "managed/*": { + "dnTemplate": "ou=managed,dc=openidm,dc=example,dc=com", + }, + "managed/alpha_group": { + "dnTemplate": "ou=groups,o=alpha,o=root,ou=identities", + "idGenerator": { + "propertyName": "name", + "type": "property", + }, + "jsonAttribute": "fr-idm-managed-group-json", + "jsonQueryEqualityMatchingRule": "caseIgnoreJsonQueryMatch", + "namingStrategy": { + "dnAttribute": "cn", + "type": "clientDnNaming", + }, + "nativeId": false, + "objectClasses": [ + "top", + "groupOfURLs", + "fr-idm-managed-group", + ], + "properties": { + "_id": { + "ldapAttribute": "cn", + "primaryKey": true, + "type": "simple", + "writability": "createOnly", + }, + "condition": { + "ldapAttribute": "fr-idm-managed-group-condition", + "type": "simple", + }, + "description": { + "ldapAttribute": "description", + "type": "simple", + }, + "members": { + "isMultiValued": true, + "propertyName": "groups", + "resourcePath": "managed/alpha_user", + "type": "reverseReference", + }, + }, + }, + "managed/alpha_organization": { + "dnTemplate": "ou=organization,o=alpha,o=root,ou=identities", + "jsonAttribute": "fr-idm-managed-organization-json", + "jsonQueryEqualityMatchingRule": "caseIgnoreJsonQueryMatch", + "objectClasses": [ + "uidObject", + "fr-idm-managed-organization", + "fr-ext-attrs", + ], + "properties": { + "_id": { + "ldapAttribute": "uid", + "type": "simple", + }, + "admins": { + "isMultiValued": true, + "propertyName": "adminOfOrg", + "resourcePath": "managed/alpha_user", + "type": "reverseReference", + }, + "children": { + "isMultiValued": true, + "propertyName": "parent", + "resourcePath": "managed/alpha_organization", + "type": "reverseReference", + }, + "members": { + "isMultiValued": true, + "propertyName": "memberOfOrg", + "resourcePath": "managed/alpha_user", + "type": "reverseReference", + }, + "name": { + "ldapAttribute": "fr-idm-managed-organization-name", + "type": "simple", + }, + "owners": { + "isMultiValued": true, + "propertyName": "ownerOfOrg", + "resourcePath": "managed/alpha_user", + "type": "reverseReference", + }, + "parent": { + "ldapAttribute": "fr-idm-managed-organization-parent", + "primaryKey": "uid", + "resourcePath": "managed/alpha_organization", + "type": "reference", + }, + }, + }, + "managed/alpha_role": { + "dnTemplate": "ou=role,o=alpha,o=root,ou=identities", + "jsonAttribute": "fr-idm-managed-role-json", + "jsonQueryEqualityMatchingRule": "caseIgnoreJsonQueryMatchManagedRole", + "objectClasses": [ + "uidObject", + "fr-idm-managed-role", + ], + "properties": { + "members": { + "isMultiValued": true, + "propertyName": "roles", + "resourcePath": "managed/alpha_user", + "type": "reverseReference", + }, + }, + }, + "managed/alpha_user": { + "dnTemplate": "ou=user,o=alpha,o=root,ou=identities", + "jsonAttribute": "fr-idm-custom-attrs", + "jsonQueryEqualityMatchingRule": "caseIgnoreJsonQueryMatch", + "namingStrategy": { + "dnAttribute": "fr-idm-uuid", + "type": "clientDnNaming", + }, + "nativeId": false, + "objectClasses": [ + "person", + "organizationalPerson", + "inetOrgPerson", + "iplanet-am-user-service", + "devicePrintProfilesContainer", + "deviceProfilesContainer", + "kbaInfoContainer", + "fr-idm-managed-user-explicit", + "forgerock-am-dashboard-service", + "inetuser", + "iplanet-am-auth-configuration-service", + "iplanet-am-managed-person", + "iPlanetPreferences", + "oathDeviceProfilesContainer", + "pushDeviceProfilesContainer", + "sunAMAuthAccountLockout", + "sunFMSAML2NameIdentifier", + "webauthnDeviceProfilesContainer", + "fr-idm-hybrid-obj", + "fr-ext-attrs", + ], + "properties": { + "_id": { + "ldapAttribute": "fr-idm-uuid", + "primaryKey": true, + "type": "simple", + }, + "_meta": { + "isMultiValued": false, + "ldapAttribute": "fr-idm-managed-user-meta", + "primaryKey": "uid", + "resourcePath": "managed/alpha_usermeta", + "type": "reference", + }, + "_notifications": { + "isMultiValued": true, + "ldapAttribute": "fr-idm-managed-user-notifications", + "primaryKey": "uid", + "resourcePath": "internal/notification", + "type": "reference", + }, + "accountStatus": { + "ldapAttribute": "inetUserStatus", + "type": "simple", + }, + "adminOfOrg": { + "isMultiValued": true, + "ldapAttribute": "fr-idm-managed-organization-admin", + "primaryKey": "uid", + "resourcePath": "managed/alpha_organization", + "type": "reference", + }, + "aliasList": { + "isMultiValued": true, + "ldapAttribute": "iplanet-am-user-alias-list", + "type": "simple", + }, + "assignedDashboard": { + "isMultiValued": true, + "ldapAttribute": "assignedDashboard", + "type": "simple", + }, + "authzRoles": { + "isMultiValued": true, + "ldapAttribute": "fr-idm-managed-user-authzroles-internal-role", + "primaryKey": "cn", + "resourcePath": "internal/role", + "type": "reference", + }, + "city": { + "ldapAttribute": "l", + "type": "simple", + }, + "cn": { + "ldapAttribute": "cn", + "type": "simple", + }, + "consentedMappings": { + "isMultiValued": true, + "ldapAttribute": "fr-idm-consentedMapping", + "type": "json", + }, + "country": { + "ldapAttribute": "co", + "type": "simple", + }, + "description": { + "ldapAttribute": "description", + "type": "simple", + }, + "displayName": { + "ldapAttribute": "displayName", + "type": "simple", + }, + "effectiveAssignments": { + "isMultiValued": true, + "ldapAttribute": "fr-idm-effectiveAssignment", + "type": "json", + }, + "effectiveGroups": { + "isMultiValued": true, + "ldapAttribute": "fr-idm-effectiveGroup", + "type": "json", + }, + "effectiveRoles": { + "isMultiValued": true, + "ldapAttribute": "fr-idm-effectiveRole", + "type": "json", + }, + "frIndexedDate1": { + "ldapAttribute": "fr-attr-idate1", + "type": "simple", + }, + "frIndexedDate2": { + "ldapAttribute": "fr-attr-idate2", + "type": "simple", + }, + "frIndexedDate3": { + "ldapAttribute": "fr-attr-idate3", + "type": "simple", + }, + "frIndexedDate4": { + "ldapAttribute": "fr-attr-idate4", + "type": "simple", + }, + "frIndexedDate5": { + "ldapAttribute": "fr-attr-idate5", + "type": "simple", + }, + "frIndexedInteger1": { + "ldapAttribute": "fr-attr-iint1", + "type": "simple", + }, + "frIndexedInteger2": { + "ldapAttribute": "fr-attr-iint2", + "type": "simple", + }, + "frIndexedInteger3": { + "ldapAttribute": "fr-attr-iint3", + "type": "simple", + }, + "frIndexedInteger4": { + "ldapAttribute": "fr-attr-iint4", + "type": "simple", + }, + "frIndexedInteger5": { + "ldapAttribute": "fr-attr-iint5", + "type": "simple", + }, + "frIndexedMultivalued1": { + "isMultiValued": true, + "ldapAttribute": "fr-attr-imulti1", + "type": "simple", + }, + "frIndexedMultivalued2": { + "isMultiValued": true, + "ldapAttribute": "fr-attr-imulti2", + "type": "simple", + }, + "frIndexedMultivalued3": { + "isMultiValued": true, + "ldapAttribute": "fr-attr-imulti3", + "type": "simple", + }, + "frIndexedMultivalued4": { + "isMultiValued": true, + "ldapAttribute": "fr-attr-imulti4", + "type": "simple", + }, + "frIndexedMultivalued5": { + "isMultiValued": true, + "ldapAttribute": "fr-attr-imulti5", + "type": "simple", + }, + "frIndexedString1": { + "ldapAttribute": "fr-attr-istr1", + "type": "simple", + }, + "frIndexedString2": { + "ldapAttribute": "fr-attr-istr2", + "type": "simple", + }, + "frIndexedString3": { + "ldapAttribute": "fr-attr-istr3", + "type": "simple", + }, + "frIndexedString4": { + "ldapAttribute": "fr-attr-istr4", + "type": "simple", + }, + "frIndexedString5": { + "ldapAttribute": "fr-attr-istr5", + "type": "simple", + }, + "frUnindexedDate1": { + "ldapAttribute": "fr-attr-date1", + "type": "simple", + }, + "frUnindexedDate2": { + "ldapAttribute": "fr-attr-date2", + "type": "simple", + }, + "frUnindexedDate3": { + "ldapAttribute": "fr-attr-date3", + "type": "simple", + }, + "frUnindexedDate4": { + "ldapAttribute": "fr-attr-date4", + "type": "simple", + }, + "frUnindexedDate5": { + "ldapAttribute": "fr-attr-date5", + "type": "simple", + }, + "frUnindexedInteger1": { + "ldapAttribute": "fr-attr-int1", + "type": "simple", + }, + "frUnindexedInteger2": { + "ldapAttribute": "fr-attr-int2", + "type": "simple", + }, + "frUnindexedInteger3": { + "ldapAttribute": "fr-attr-int3", + "type": "simple", + }, + "frUnindexedInteger4": { + "ldapAttribute": "fr-attr-int4", + "type": "simple", + }, + "frUnindexedInteger5": { + "ldapAttribute": "fr-attr-int5", + "type": "simple", + }, + "frUnindexedMultivalued1": { + "isMultiValued": true, + "ldapAttribute": "fr-attr-multi1", + "type": "simple", + }, + "frUnindexedMultivalued2": { + "isMultiValued": true, + "ldapAttribute": "fr-attr-multi2", + "type": "simple", + }, + "frUnindexedMultivalued3": { + "isMultiValued": true, + "ldapAttribute": "fr-attr-multi3", + "type": "simple", + }, + "frUnindexedMultivalued4": { + "isMultiValued": true, + "ldapAttribute": "fr-attr-multi4", + "type": "simple", + }, + "frUnindexedMultivalued5": { + "isMultiValued": true, + "ldapAttribute": "fr-attr-multi5", + "type": "simple", + }, + "frUnindexedString1": { + "ldapAttribute": "fr-attr-str1", + "type": "simple", + }, + "frUnindexedString2": { + "ldapAttribute": "fr-attr-str2", + "type": "simple", + }, + "frUnindexedString3": { + "ldapAttribute": "fr-attr-str3", + "type": "simple", + }, + "frUnindexedString4": { + "ldapAttribute": "fr-attr-str4", + "type": "simple", + }, + "frUnindexedString5": { + "ldapAttribute": "fr-attr-str5", + "type": "simple", + }, + "givenName": { + "ldapAttribute": "givenName", + "type": "simple", + }, + "groups": { + "isMultiValued": true, + "ldapAttribute": "fr-idm-managed-user-groups", + "primaryKey": "cn", + "resourcePath": "managed/alpha_group", + "type": "reference", + }, + "kbaInfo": { + "isMultiValued": true, + "ldapAttribute": "fr-idm-kbaInfo", + "type": "json", + }, + "lastSync": { + "ldapAttribute": "fr-idm-lastSync", + "type": "json", + }, + "mail": { + "ldapAttribute": "mail", + "type": "simple", + }, + "manager": { + "isMultiValued": false, + "ldapAttribute": "fr-idm-managed-user-manager", + "primaryKey": "uid", + "resourcePath": "managed/alpha_user", + "type": "reference", + }, + "memberOfOrg": { + "isMultiValued": true, + "ldapAttribute": "fr-idm-managed-organization-member", + "primaryKey": "uid", + "resourcePath": "managed/alpha_organization", + "type": "reference", + }, + "memberOfOrgIDs": { + "isMultiValued": true, + "ldapAttribute": "fr-idm-managed-user-memberoforgid", + "type": "simple", + }, + "ownerOfOrg": { + "isMultiValued": true, + "ldapAttribute": "fr-idm-managed-organization-owner", + "primaryKey": "uid", + "resourcePath": "managed/alpha_organization", + "type": "reference", + }, + "password": { + "ldapAttribute": "userPassword", + "type": "simple", + }, + "postalAddress": { + "ldapAttribute": "street", + "type": "simple", + }, + "postalCode": { + "ldapAttribute": "postalCode", + "type": "simple", + }, + "preferences": { + "ldapAttribute": "fr-idm-preferences", + "type": "json", + }, + "profileImage": { + "ldapAttribute": "labeledURI", + "type": "simple", + }, + "reports": { + "isMultiValued": true, + "propertyName": "manager", + "resourcePath": "managed/alpha_user", + "type": "reverseReference", + }, + "roles": { + "isMultiValued": true, + "ldapAttribute": "fr-idm-managed-user-roles", + "primaryKey": "uid", + "resourcePath": "managed/alpha_role", + "type": "reference", + }, + "sn": { + "ldapAttribute": "sn", + "type": "simple", + }, + "stateProvince": { + "ldapAttribute": "st", + "type": "simple", + }, + "telephoneNumber": { + "ldapAttribute": "telephoneNumber", + "type": "simple", + }, + "userName": { + "ldapAttribute": "uid", + "type": "simple", + }, + }, + }, + "managed/alpha_usermeta": { + "dnTemplate": "ou=usermeta,o=alpha,o=root,ou=identities", + "jsonAttribute": "fr-idm-json", + "jsonQueryEqualityMatchingRule": "caseIgnoreJsonQueryMatch", + "objectClasses": [ + "uidObject", + "fr-idm-generic-obj", + ], + "properties": { + "target": { + "propertyName": "_meta", + "resourcePath": "managed/alpha_user", + "type": "reverseReference", + }, + }, + }, + "managed/bravo_group": { + "dnTemplate": "ou=groups,o=bravo,o=root,ou=identities", + "idGenerator": { + "propertyName": "name", + "type": "property", + }, + "jsonAttribute": "fr-idm-managed-group-json", + "jsonQueryEqualityMatchingRule": "caseIgnoreJsonQueryMatch", + "namingStrategy": { + "dnAttribute": "cn", + "type": "clientDnNaming", + }, + "nativeId": false, + "objectClasses": [ + "top", + "groupOfURLs", + "fr-idm-managed-group", + ], + "properties": { + "_id": { + "ldapAttribute": "cn", + "primaryKey": true, + "type": "simple", + "writability": "createOnly", + }, + "condition": { + "ldapAttribute": "fr-idm-managed-group-condition", + "type": "simple", + }, + "description": { + "ldapAttribute": "description", + "type": "simple", + }, + "members": { + "isMultiValued": true, + "propertyName": "groups", + "resourcePath": "managed/bravo_user", + "type": "reverseReference", + }, + }, + }, + "managed/bravo_organization": { + "dnTemplate": "ou=organization,o=bravo,o=root,ou=identities", + "jsonAttribute": "fr-idm-managed-organization-json", + "jsonQueryEqualityMatchingRule": "caseIgnoreJsonQueryMatch", + "objectClasses": [ + "uidObject", + "fr-idm-managed-organization", + "fr-ext-attrs", + ], + "properties": { + "_id": { + "ldapAttribute": "uid", + "type": "simple", + }, + "admins": { + "isMultiValued": true, + "propertyName": "adminOfOrg", + "resourcePath": "managed/bravo_user", + "type": "reverseReference", + }, + "children": { + "isMultiValued": true, + "propertyName": "parent", + "resourcePath": "managed/bravo_organization", + "type": "reverseReference", + }, + "members": { + "isMultiValued": true, + "propertyName": "memberOfOrg", + "resourcePath": "managed/bravo_user", + "type": "reverseReference", + }, + "name": { + "ldapAttribute": "fr-idm-managed-organization-name", + "type": "simple", + }, + "owners": { + "isMultiValued": true, + "propertyName": "ownerOfOrg", + "resourcePath": "managed/bravo_user", + "type": "reverseReference", + }, + "parent": { + "ldapAttribute": "fr-idm-managed-organization-parent", + "primaryKey": "uid", + "resourcePath": "managed/bravo_organization", + "type": "reference", + }, + }, + }, + "managed/bravo_role": { + "dnTemplate": "ou=role,o=bravo,o=root,ou=identities", + "jsonAttribute": "fr-idm-managed-role-json", + "jsonQueryEqualityMatchingRule": "caseIgnoreJsonQueryMatchManagedRole", + "objectClasses": [ + "uidObject", + "fr-idm-managed-role", + ], + "properties": { + "members": { + "isMultiValued": true, + "propertyName": "roles", + "resourcePath": "managed/bravo_user", + "type": "reverseReference", + }, + }, + }, + "managed/bravo_user": { + "dnTemplate": "ou=user,o=bravo,o=root,ou=identities", + "jsonAttribute": "fr-idm-custom-attrs", + "jsonQueryEqualityMatchingRule": "caseIgnoreJsonQueryMatch", + "namingStrategy": { + "dnAttribute": "fr-idm-uuid", + "type": "clientDnNaming", + }, + "nativeId": false, + "objectClasses": [ + "person", + "organizationalPerson", + "inetOrgPerson", + "iplanet-am-user-service", + "devicePrintProfilesContainer", + "deviceProfilesContainer", + "kbaInfoContainer", + "fr-idm-managed-user-explicit", + "forgerock-am-dashboard-service", + "inetuser", + "iplanet-am-auth-configuration-service", + "iplanet-am-managed-person", + "iPlanetPreferences", + "oathDeviceProfilesContainer", + "pushDeviceProfilesContainer", + "sunAMAuthAccountLockout", + "sunFMSAML2NameIdentifier", + "webauthnDeviceProfilesContainer", + "fr-idm-hybrid-obj", + "fr-ext-attrs", + ], + "properties": { + "_id": { + "ldapAttribute": "fr-idm-uuid", + "primaryKey": true, + "type": "simple", + }, + "_meta": { + "isMultiValued": false, + "ldapAttribute": "fr-idm-managed-user-meta", + "primaryKey": "uid", + "resourcePath": "managed/bravo_usermeta", + "type": "reference", + }, + "_notifications": { + "isMultiValued": true, + "ldapAttribute": "fr-idm-managed-user-notifications", + "primaryKey": "uid", + "resourcePath": "internal/notification", + "type": "reference", + }, + "accountStatus": { + "ldapAttribute": "inetUserStatus", + "type": "simple", + }, + "adminOfOrg": { + "isMultiValued": true, + "ldapAttribute": "fr-idm-managed-organization-admin", + "primaryKey": "uid", + "resourcePath": "managed/bravo_organization", + "type": "reference", + }, + "aliasList": { + "isMultiValued": true, + "ldapAttribute": "iplanet-am-user-alias-list", + "type": "simple", + }, + "assignedDashboard": { + "isMultiValued": true, + "ldapAttribute": "assignedDashboard", + "type": "simple", + }, + "authzRoles": { + "isMultiValued": true, + "ldapAttribute": "fr-idm-managed-user-authzroles-internal-role", + "primaryKey": "cn", + "resourcePath": "internal/role", + "type": "reference", + }, + "city": { + "ldapAttribute": "l", + "type": "simple", + }, + "cn": { + "ldapAttribute": "cn", + "type": "simple", + }, + "consentedMappings": { + "isMultiValued": true, + "ldapAttribute": "fr-idm-consentedMapping", + "type": "json", + }, + "country": { + "ldapAttribute": "co", + "type": "simple", + }, + "description": { + "ldapAttribute": "description", + "type": "simple", + }, + "displayName": { + "ldapAttribute": "displayName", + "type": "simple", + }, + "effectiveAssignments": { + "isMultiValued": true, + "ldapAttribute": "fr-idm-effectiveAssignment", + "type": "json", + }, + "effectiveGroups": { + "isMultiValued": true, + "ldapAttribute": "fr-idm-effectiveGroup", + "type": "json", + }, + "effectiveRoles": { + "isMultiValued": true, + "ldapAttribute": "fr-idm-effectiveRole", + "type": "json", + }, + "frIndexedDate1": { + "ldapAttribute": "fr-attr-idate1", + "type": "simple", + }, + "frIndexedDate2": { + "ldapAttribute": "fr-attr-idate2", + "type": "simple", + }, + "frIndexedDate3": { + "ldapAttribute": "fr-attr-idate3", + "type": "simple", + }, + "frIndexedDate4": { + "ldapAttribute": "fr-attr-idate4", + "type": "simple", + }, + "frIndexedDate5": { + "ldapAttribute": "fr-attr-idate5", + "type": "simple", + }, + "frIndexedInteger1": { + "ldapAttribute": "fr-attr-iint1", + "type": "simple", + }, + "frIndexedInteger2": { + "ldapAttribute": "fr-attr-iint2", + "type": "simple", + }, + "frIndexedInteger3": { + "ldapAttribute": "fr-attr-iint3", + "type": "simple", + }, + "frIndexedInteger4": { + "ldapAttribute": "fr-attr-iint4", + "type": "simple", + }, + "frIndexedInteger5": { + "ldapAttribute": "fr-attr-iint5", + "type": "simple", + }, + "frIndexedMultivalued1": { + "isMultiValued": true, + "ldapAttribute": "fr-attr-imulti1", + "type": "simple", + }, + "frIndexedMultivalued2": { + "isMultiValued": true, + "ldapAttribute": "fr-attr-imulti2", + "type": "simple", + }, + "frIndexedMultivalued3": { + "isMultiValued": true, + "ldapAttribute": "fr-attr-imulti3", + "type": "simple", + }, + "frIndexedMultivalued4": { + "isMultiValued": true, + "ldapAttribute": "fr-attr-imulti4", + "type": "simple", + }, + "frIndexedMultivalued5": { + "isMultiValued": true, + "ldapAttribute": "fr-attr-imulti5", + "type": "simple", + }, + "frIndexedString1": { + "ldapAttribute": "fr-attr-istr1", + "type": "simple", + }, + "frIndexedString2": { + "ldapAttribute": "fr-attr-istr2", + "type": "simple", + }, + "frIndexedString3": { + "ldapAttribute": "fr-attr-istr3", + "type": "simple", + }, + "frIndexedString4": { + "ldapAttribute": "fr-attr-istr4", + "type": "simple", + }, + "frIndexedString5": { + "ldapAttribute": "fr-attr-istr5", + "type": "simple", + }, + "frUnindexedDate1": { + "ldapAttribute": "fr-attr-date1", + "type": "simple", + }, + "frUnindexedDate2": { + "ldapAttribute": "fr-attr-date2", + "type": "simple", + }, + "frUnindexedDate3": { + "ldapAttribute": "fr-attr-date3", + "type": "simple", + }, + "frUnindexedDate4": { + "ldapAttribute": "fr-attr-date4", + "type": "simple", + }, + "frUnindexedDate5": { + "ldapAttribute": "fr-attr-date5", + "type": "simple", + }, + "frUnindexedInteger1": { + "ldapAttribute": "fr-attr-int1", + "type": "simple", + }, + "frUnindexedInteger2": { + "ldapAttribute": "fr-attr-int2", + "type": "simple", + }, + "frUnindexedInteger3": { + "ldapAttribute": "fr-attr-int3", + "type": "simple", + }, + "frUnindexedInteger4": { + "ldapAttribute": "fr-attr-int4", + "type": "simple", + }, + "frUnindexedInteger5": { + "ldapAttribute": "fr-attr-int5", + "type": "simple", + }, + "frUnindexedMultivalued1": { + "isMultiValued": true, + "ldapAttribute": "fr-attr-multi1", + "type": "simple", + }, + "frUnindexedMultivalued2": { + "isMultiValued": true, + "ldapAttribute": "fr-attr-multi2", + "type": "simple", + }, + "frUnindexedMultivalued3": { + "isMultiValued": true, + "ldapAttribute": "fr-attr-multi3", + "type": "simple", + }, + "frUnindexedMultivalued4": { + "isMultiValued": true, + "ldapAttribute": "fr-attr-multi4", + "type": "simple", + }, + "frUnindexedMultivalued5": { + "isMultiValued": true, + "ldapAttribute": "fr-attr-multi5", + "type": "simple", + }, + "frUnindexedString1": { + "ldapAttribute": "fr-attr-str1", + "type": "simple", + }, + "frUnindexedString2": { + "ldapAttribute": "fr-attr-str2", + "type": "simple", + }, + "frUnindexedString3": { + "ldapAttribute": "fr-attr-str3", + "type": "simple", + }, + "frUnindexedString4": { + "ldapAttribute": "fr-attr-str4", + "type": "simple", + }, + "frUnindexedString5": { + "ldapAttribute": "fr-attr-str5", + "type": "simple", + }, + "givenName": { + "ldapAttribute": "givenName", + "type": "simple", + }, + "groups": { + "isMultiValued": true, + "ldapAttribute": "fr-idm-managed-user-groups", + "primaryKey": "cn", + "resourcePath": "managed/bravo_group", + "type": "reference", + }, + "kbaInfo": { + "isMultiValued": true, + "ldapAttribute": "fr-idm-kbaInfo", + "type": "json", + }, + "lastSync": { + "ldapAttribute": "fr-idm-lastSync", + "type": "json", + }, + "mail": { + "ldapAttribute": "mail", + "type": "simple", + }, + "manager": { + "isMultiValued": false, + "ldapAttribute": "fr-idm-managed-user-manager", + "primaryKey": "uid", + "resourcePath": "managed/bravo_user", + "type": "reference", + }, + "memberOfOrg": { + "isMultiValued": true, + "ldapAttribute": "fr-idm-managed-organization-member", + "primaryKey": "uid", + "resourcePath": "managed/bravo_organization", + "type": "reference", + }, + "memberOfOrgIDs": { + "isMultiValued": true, + "ldapAttribute": "fr-idm-managed-user-memberoforgid", + "type": "simple", + }, + "ownerOfOrg": { + "isMultiValued": true, + "ldapAttribute": "fr-idm-managed-organization-owner", + "primaryKey": "uid", + "resourcePath": "managed/bravo_organization", + "type": "reference", + }, + "password": { + "ldapAttribute": "userPassword", + "type": "simple", + }, + "postalAddress": { + "ldapAttribute": "street", + "type": "simple", + }, + "postalCode": { + "ldapAttribute": "postalCode", + "type": "simple", + }, + "preferences": { + "ldapAttribute": "fr-idm-preferences", + "type": "json", + }, + "profileImage": { + "ldapAttribute": "labeledURI", + "type": "simple", + }, + "reports": { + "isMultiValued": true, + "propertyName": "manager", + "resourcePath": "managed/bravo_user", + "type": "reverseReference", + }, + "roles": { + "isMultiValued": true, + "ldapAttribute": "fr-idm-managed-user-roles", + "primaryKey": "uid", + "resourcePath": "managed/bravo_role", + "type": "reference", + }, + "sn": { + "ldapAttribute": "sn", + "type": "simple", + }, + "stateProvince": { + "ldapAttribute": "st", + "type": "simple", + }, + "telephoneNumber": { + "ldapAttribute": "telephoneNumber", + "type": "simple", + }, + "userName": { + "ldapAttribute": "uid", + "type": "simple", + }, + }, + }, + "managed/bravo_usermeta": { + "dnTemplate": "ou=usermeta,o=bravo,o=root,ou=identities", + "jsonAttribute": "fr-idm-json", + "jsonQueryEqualityMatchingRule": "caseIgnoreJsonQueryMatch", + "objectClasses": [ + "uidObject", + "fr-idm-generic-obj", + ], + "properties": { + "target": { + "propertyName": "_meta", + "resourcePath": "managed/bravo_user", + "type": "reverseReference", + }, + }, + }, + "managed/teammembermeta": { + "dnTemplate": "ou=teammembermeta,o=root,ou=identities", + "jsonAttribute": "fr-idm-json", + "jsonQueryEqualityMatchingRule": "caseIgnoreJsonQueryMatch", + "objectClasses": [ + "uidObject", + "fr-idm-generic-obj", + ], + "properties": { + "target": { + "propertyName": "_meta", + "resourcePath": "managed/teammember", + "type": "reverseReference", + }, + }, + }, + "reconprogressstate": { + "dnTemplate": "ou=reconprogressstate,dc=openidm,dc=example,dc=com", + }, + "relationships": { + "dnTemplate": "ou=relationships,dc=openidm,dc=example,dc=com", + "jsonAttribute": "fr-idm-relationship-json", + "jsonQueryEqualityMatchingRule": "caseIgnoreJsonQueryMatchRelationship", + "objectClasses": [ + "uidObject", + "fr-idm-relationship", + ], + }, + "scheduler": { + "dnTemplate": "ou=scheduler,dc=openidm,dc=example,dc=com", + }, + "scheduler/*": { + "dnTemplate": "ou=scheduler,dc=openidm,dc=example,dc=com", + }, + "ui/*": { + "dnTemplate": "ou=ui,dc=openidm,dc=example,dc=com", + }, + "updates": { + "dnTemplate": "ou=updates,dc=openidm,dc=example,dc=com", + }, + }, + }, + "rest2LdapOptions": { + "mvccAttribute": "etag", + "readOnUpdatePolicy": "controls", + "returnNullForMissingProperties": true, + "useMvcc": true, + "usePermissiveModify": true, + "useSubtreeDelete": true, + }, + "security": { + "keyManager": "jvm", + "trustManager": "jvm", + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/router.idm.json 1`] = ` +{ + "idm": { + "router": { + "_id": "router", + "filters": [], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/script.idm.json 1`] = ` +{ + "idm": { + "script": { + "ECMAScript": { + "#javascript.debug": "&{openidm.script.javascript.debug}", + "javascript.recompile.minimumInterval": 60000, + }, + "Groovy": { + "#groovy.disabled.global.ast.transformations": "", + "#groovy.errors.tolerance": 10, + "#groovy.output.debug": false, + "#groovy.output.verbose": false, + "#groovy.script.base": "#any class extends groovy.lang.Script", + "#groovy.script.extension": ".groovy", + "#groovy.source.encoding": "utf-8 #default US-ASCII", + "#groovy.target.bytecode": "1.5", + "#groovy.target.indy": true, + "#groovy.warnings": "likely errors #othere values [none,likely,possible,paranoia]", + "groovy.classpath": "&{idm.install.dir}/lib", + "groovy.recompile": true, + "groovy.recompile.minimumInterval": 60000, + "groovy.source.encoding": "UTF-8", + "groovy.target.directory": "&{idm.install.dir}/classes", + }, + "_id": "script", + "properties": {}, + "sources": { + "default": { + "directory": "&{idm.install.dir}/bin/defaults/script", + }, + "install": { + "directory": "&{idm.install.dir}", + }, + "project": { + "directory": "&{idm.instance.dir}", + }, + "project-script": { + "directory": "&{idm.instance.dir}/script", + }, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/secrets.idm.json 1`] = ` +{ + "idm": { + "secrets": { + "_id": "secrets", + "populateDefaults": true, + "stores": [ + { + "class": "org.forgerock.openidm.secrets.config.FileBasedStore", + "config": { + "file": "&{openidm.keystore.location|&{idm.install.dir}/security/keystore.jceks}", + "mappings": [ + { + "aliases": [ + "&{openidm.config.crypto.alias|openidm-sym-default}", + "openidm-localhost", + ], + "secretId": "idm.default", + "types": [ + "ENCRYPT", + "DECRYPT", + ], + }, + { + "aliases": [ + "&{openidm.config.crypto.alias|openidm-sym-default}", + ], + "secretId": "idm.config.encryption", + "types": [ + "ENCRYPT", + "DECRYPT", + ], + }, + { + "aliases": [ + "&{openidm.config.crypto.alias|openidm-sym-default}", + ], + "secretId": "idm.password.encryption", + "types": [ + "ENCRYPT", + "DECRYPT", + ], + }, + { + "aliases": [ + "&{openidm.https.keystore.cert.alias|openidm-localhost}", + ], + "secretId": "idm.jwt.session.module.encryption", + "types": [ + "ENCRYPT", + "DECRYPT", + ], + }, + { + "aliases": [ + "&{openidm.config.crypto.jwtsession.hmackey.alias|openidm-jwtsessionhmac-key}", + ], + "secretId": "idm.jwt.session.module.signing", + "types": [ + "SIGN", + "VERIFY", + ], + }, + { + "aliases": [ + "selfservice", + ], + "secretId": "idm.selfservice.encryption", + "types": [ + "ENCRYPT", + "DECRYPT", + ], + }, + { + "aliases": [ + "&{openidm.config.crypto.selfservice.sharedkey.alias|openidm-selfservice-key}", + ], + "secretId": "idm.selfservice.signing", + "types": [ + "SIGN", + "VERIFY", + ], + }, + { + "aliases": [ + "&{openidm.config.crypto.alias|openidm-sym-default}", + ], + "secretId": "idm.assignment.attribute.encryption", + "types": [ + "ENCRYPT", + "DECRYPT", + ], + }, + ], + "providerName": "&{openidm.keystore.provider|SunJCE}", + "storePassword": "&{openidm.keystore.password|changeit}", + "storetype": "&{openidm.keystore.type|JCEKS}", + }, + "name": "mainKeyStore", + }, + { + "class": "org.forgerock.openidm.secrets.config.FileBasedStore", + "config": { + "file": "&{openidm.truststore.location|&{idm.install.dir}/security/truststore}", + "mappings": [], + "providerName": "&{openidm.truststore.provider|SUN}", + "storePassword": "&{openidm.truststore.password|changeit}", + "storetype": "&{openidm.truststore.type|JKS}", + }, + "name": "mainTrustStore", + }, + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/selfservice.kba.idm.json 1`] = ` +{ + "idm": { + "selfservice.kba": { + "_id": "selfservice.kba", + "kbaPropertyName": "kbaInfo", + "minimumAnswersToDefine": 1, + "minimumAnswersToVerify": 1, + "questions": { + "1": { + "en": "What's your favorite color?", + }, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/selfservice.terms.idm.json 1`] = ` +{ + "idm": { + "selfservice.terms": { + "_id": "selfservice.terms", + "active": "0.0", + "uiConfig": { + "buttonText": "Accept", + "displayName": "We've updated our terms", + "purpose": "You must accept the updated terms in order to proceed.", + }, + "versions": [ + { + "createDate": "2019-10-28T04:20:11.320Z", + "termsTranslations": { + "en": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", + }, + "version": "0.0", + }, + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/servletfilter/cors.idm.json 1`] = ` +{ + "idm": { + "servletfilter/cors": { + "_id": "servletfilter/cors", + "initParams": { + "allowCredentials": false, + "allowedHeaders": "authorization,accept,content-type,origin,x-requested-with,cache-control,accept-api-version,if-match,if-none-match", + "allowedMethods": "GET,POST,PUT,DELETE,PATCH", + "allowedOrigins": "*", + "chainPreflight": false, + "exposedHeaders": "WWW-Authenticate", + }, + "urlPatterns": [ + "/*", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/servletfilter/payload.idm.json 1`] = ` +{ + "idm": { + "servletfilter/payload": { + "_id": "servletfilter/payload", + "initParams": { + "maxRequestSizeInMegabytes": 5, + }, + "urlPatterns": [ + "&{openidm.servlet.alias}/*", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/servletfilter/upload.idm.json 1`] = ` +{ + "idm": { + "servletfilter/upload": { + "_id": "servletfilter/upload", + "initParams": { + "maxRequestSizeInMegabytes": 50, + }, + "urlPatterns": [ + "&{openidm.servlet.upload.alias}/*", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/ui.context/admin.idm.json 1`] = ` +{ + "idm": { + "ui.context/admin": { + "_id": "ui.context/admin", + "defaultDir": "&{idm.install.dir}/ui/admin/default", + "enabled": true, + "extensionDir": "&{idm.install.dir}/ui/admin/extension", + "responseHeaders": { + "X-Frame-Options": "SAMEORIGIN", + }, + "urlContextRoot": "/admin", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/ui.context/api.idm.json 1`] = ` +{ + "idm": { + "ui.context/api": { + "_id": "ui.context/api", + "authEnabled": true, + "cacheEnabled": false, + "defaultDir": "&{idm.install.dir}/ui/api/default", + "enabled": true, + "extensionDir": "&{idm.install.dir}/ui/api/extension", + "urlContextRoot": "/api", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/ui.context/enduser.idm.json 1`] = ` +{ + "idm": { + "ui.context/enduser": { + "_id": "ui.context/enduser", + "defaultDir": "&{idm.install.dir}/ui/enduser", + "enabled": true, + "responseHeaders": { + "X-Frame-Options": "DENY", + }, + "urlContextRoot": "/", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/ui.context/oauth.idm.json 1`] = ` +{ + "idm": { + "ui.context/oauth": { + "_id": "ui.context/oauth", + "cacheEnabled": true, + "defaultDir": "&{idm.install.dir}/ui/oauth/default", + "enabled": true, + "extensionDir": "&{idm.install.dir}/ui/oauth/extension", + "urlContextRoot": "/oauthReturn", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/ui/configuration.idm.json 1`] = ` +{ + "idm": { + "ui/configuration": { + "_id": "ui/configuration", + "configuration": { + "defaultNotificationType": "info", + "forgotUsername": false, + "lang": "en", + "notificationTypes": { + "error": { + "iconPath": "images/notifications/error.png", + "name": "common.notification.types.error", + }, + "info": { + "iconPath": "images/notifications/info.png", + "name": "common.notification.types.info", + }, + "warning": { + "iconPath": "images/notifications/warning.png", + "name": "common.notification.types.warning", + }, + }, + "passwordReset": true, + "passwordResetLink": "", + "platformSettings": { + "adminOauthClient": "idmAdminClient", + "adminOauthClientScopes": "fr:idm:*", + "amUrl": "/am", + "loginUrl": "", + }, + "roles": { + "internal/role/openidm-admin": "ui-admin", + "internal/role/openidm-authorized": "ui-user", + }, + "selfRegistration": true, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/ui/dashboard.idm.json 1`] = ` +{ + "idm": { + "ui/dashboard": { + "_id": "ui/dashboard", + "adminDashboards": [ + { + "isDefault": true, + "name": "Quick Start", + "widgets": [ + { + "cards": [ + { + "href": "#resource/managed/alpha_user/list/", + "icon": "fa-user", + "name": "Manage Users", + }, + { + "href": "#resource/managed/alpha_role/list/", + "icon": "fa-check-square-o", + "name": "Manage Roles", + }, + { + "href": "#connectors/add/", + "icon": "fa-database", + "name": "Add Connector", + }, + { + "href": "#mapping/add/", + "icon": "fa-map-marker", + "name": "Create Mapping", + }, + { + "href": "#managed/add/", + "icon": "fa-tablet", + "name": "Add Device", + }, + { + "href": "#settings/", + "icon": "fa-user", + "name": "Configure System Preferences", + }, + ], + "size": "large", + "type": "quickStart", + }, + ], + }, + { + "isDefault": false, + "name": "System Monitoring", + "widgets": [ + { + "legendRange": { + "month": [ + 500, + 2500, + 5000, + ], + "week": [ + 10, + 30, + 90, + 270, + 810, + ], + "year": [ + 10000, + 40000, + 100000, + 250000, + ], + }, + "maxRange": "#24423c", + "minRange": "#b0d4cd", + "size": "large", + "type": "audit", + }, + { + "size": "large", + "type": "clusterStatus", + }, + { + "size": "large", + "type": "systemHealthFull", + }, + { + "barchart": "false", + "size": "large", + "type": "lastRecon", + }, + ], + }, + { + "isDefault": false, + "name": "Resource Report", + "widgets": [ + { + "selected": "activeUsers", + "size": "x-small", + "type": "counter", + }, + { + "selected": "rolesEnabled", + "size": "x-small", + "type": "counter", + }, + { + "selected": "activeConnectors", + "size": "x-small", + "type": "counter", + }, + { + "size": "large", + "type": "resourceList", + }, + ], + }, + { + "isDefault": false, + "name": "Business Report", + "widgets": [ + { + "graphType": "fa-pie-chart", + "providers": [ + "Username/Password", + ], + "size": "x-small", + "type": "signIns", + "widgetTitle": "Sign-Ins", + }, + { + "graphType": "fa-bar-chart", + "size": "x-small", + "type": "passwordResets", + "widgetTitle": "Password Resets", + }, + { + "graphType": "fa-line-chart", + "providers": [ + "Username/Password", + ], + "size": "x-small", + "type": "newRegistrations", + "widgetTitle": "New Registrations", + }, + { + "size": "x-small", + "timezone": { + "hours": "07", + "minutes": "00", + "negative": true, + }, + "type": "socialLogin", + }, + { + "selected": "socialEnabled", + "size": "x-small", + "type": "counter", + }, + { + "selected": "manualRegistrations", + "size": "x-small", + "type": "counter", + }, + ], + }, + ], + "dashboard": { + "widgets": [ + { + "size": "large", + "type": "Welcome", + }, + ], + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/ui/profile.idm.json 1`] = ` +{ + "idm": { + "ui/profile": { + "_id": "ui/profile", + "tabs": [ + { + "name": "personalInfoTab", + "view": "org/forgerock/openidm/ui/user/profile/personalInfo/PersonalInfoTab", + }, + { + "name": "signInAndSecurity", + "view": "org/forgerock/openidm/ui/user/profile/signInAndSecurity/SignInAndSecurityTab", + }, + { + "name": "preference", + "view": "org/forgerock/openidm/ui/user/profile/PreferencesTab", + }, + { + "name": "trustedDevice", + "view": "org/forgerock/openidm/ui/user/profile/TrustedDevicesTab", + }, + { + "name": "oauthApplication", + "view": "org/forgerock/openidm/ui/user/profile/OauthApplicationsTab", + }, + { + "name": "privacyAndConsent", + "view": "org/forgerock/openidm/ui/user/profile/PrivacyAndConsentTab", + }, + { + "name": "sharing", + "view": "org/forgerock/openidm/ui/user/profile/uma/SharingTab", + }, + { + "name": "auditHistory", + "view": "org/forgerock/openidm/ui/user/profile/uma/ActivityTab", + }, + { + "name": "accountControls", + "view": "org/forgerock/openidm/ui/user/profile/accountControls/AccountControlsTab", + }, + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/ui/themeconfig.idm.json 1`] = ` +{ + "idm": { + "ui/themeconfig": { + "_id": "ui/themeconfig", + "icon": "favicon.ico", + "path": "", + "settings": { + "footer": { + "mailto": "info@forgerock.com", + }, + "loginLogo": { + "alt": "ForgeRock", + "height": "104px", + "src": "images/login-logo-dark.png", + "title": "ForgeRock", + "width": "210px", + }, + "logo": { + "alt": "ForgeRock", + "src": "images/logo-horizontal-white.png", + "title": "ForgeRock", + }, + }, + "stylesheets": [ + "css/bootstrap-3.4.1-custom.css", + "css/structure.css", + "css/theme.css", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/uilocale/fr.idm.json 1`] = ` +{ + "idm": { + "uilocale/fr": { + "_id": "uilocale/fr", + "admin": { + "overrides": { + "AppLogoURI": "URI du logo de l’application", + "EmailAddress": "Adresse e-mail", + "Name": "Nom", + "Owners": "Les propriétaires", + }, + "sideMenu": { + "securityQuestions": "Questions de sécurité", + }, + }, + "enduser": { + "overrides": { + "FirstName": "Prénom", + "LastName": "Nom de famille", + }, + "pages": { + "dashboard": { + "widgets": { + "welcome": { + "greeting": "Bonjour", + }, + }, + }, + }, + }, + "login": { + "login": { + "next": "Suivant", + }, + "overrides": { + "Password": "Mot de passe", + "UserName": "Nom d'utilisateur", + }, + }, + "shared": { + "sideMenu": { + "dashboard": "Tableau de bord", + }, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/idm/undefined.idm.json 1`] = ` +{ + "idm": { + "undefined": { + "_id": "undefined", + "mapping": { + "mapping/managedBravo_user_managedBravo_user0": { + "_id": "mapping/managedBravo_user_managedBravo_user0", + "consentRequired": false, + "displayName": "managedBravo_user_managedBravo_user0", + "icon": null, + "name": "managedBravo_user_managedBravo_user0", + "policies": [ + { + "action": "ASYNC", + "situation": "ABSENT", + }, + { + "action": "ASYNC", + "situation": "ALL_GONE", + }, + { + "action": "ASYNC", + "situation": "AMBIGUOUS", + }, + { + "action": "ASYNC", + "situation": "CONFIRMED", + }, + { + "action": "ASYNC", + "situation": "FOUND", + }, + { + "action": "ASYNC", + "situation": "FOUND_ALREADY_LINKED", + }, + { + "action": "ASYNC", + "situation": "LINK_ONLY", + }, + { + "action": "ASYNC", + "situation": "MISSING", + }, + { + "action": "ASYNC", + "situation": "SOURCE_IGNORED", + }, + { + "action": "ASYNC", + "situation": "SOURCE_MISSING", + }, + { + "action": "ASYNC", + "situation": "TARGET_IGNORED", + }, + { + "action": "ASYNC", + "situation": "UNASSIGNED", + }, + { + "action": "ASYNC", + "situation": "UNQUALIFIED", + }, + ], + "properties": [], + "source": "managed/bravo_user", + "target": "managed/bravo_user", + }, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/internalRole/openidm-admin.internalRole.json 1`] = ` +{ + "internalRole": { + "openidm-admin": { + "_id": "openidm-admin", + "condition": null, + "description": "Administrative access", + "name": "openidm-admin", + "privileges": [], + "temporalConstraints": [], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/internalRole/openidm-authorized.internalRole.json 1`] = ` +{ + "internalRole": { + "openidm-authorized": { + "_id": "openidm-authorized", + "condition": null, + "description": "Basic minimum user", + "name": "openidm-authorized", + "privileges": [], + "temporalConstraints": [], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/internalRole/openidm-cert.internalRole.json 1`] = ` +{ + "internalRole": { + "openidm-cert": { + "_id": "openidm-cert", + "condition": null, + "description": "Authenticated via certificate", + "name": "openidm-cert", + "privileges": [], + "temporalConstraints": [], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/internalRole/openidm-reg.internalRole.json 1`] = ` +{ + "internalRole": { + "openidm-reg": { + "_id": "openidm-reg", + "condition": null, + "description": "Anonymous access", + "name": "openidm-reg", + "privileges": [], + "temporalConstraints": [], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/internalRole/openidm-tasks-manager.internalRole.json 1`] = ` +{ + "internalRole": { + "openidm-tasks-manager": { + "_id": "openidm-tasks-manager", + "condition": null, + "description": "Allowed to reassign workflow tasks", + "name": "openidm-tasks-manager", + "privileges": [], + "temporalConstraints": [], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/internalRole/platform-provisioning.internalRole.json 1`] = ` +{ + "internalRole": { + "platform-provisioning": { + "_id": "platform-provisioning", + "condition": null, + "description": "Platform provisioning access", + "name": "platform-provisioning", + "privileges": [], + "temporalConstraints": [], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/internalRole/test-internal-role.internalRole.json 1`] = ` +{ + "internalRole": { + "ccb11ba1-333b-4197-95db-89bb08a2ab56": { + "_id": "ccb11ba1-333b-4197-95db-89bb08a2ab56", + "condition": "/description co "somerandomstring"", + "description": "A test internal role", + "name": "test-internal-role", + "privileges": [ + { + "accessFlags": [ + { + "attribute": "userName", + "readOnly": false, + }, + { + "attribute": "givenName", + "readOnly": false, + }, + { + "attribute": "cn", + "readOnly": false, + }, + { + "attribute": "sn", + "readOnly": false, + }, + { + "attribute": "mail", + "readOnly": false, + }, + { + "attribute": "profileImage", + "readOnly": true, + }, + { + "attribute": "description", + "readOnly": false, + }, + { + "attribute": "accountStatus", + "readOnly": true, + }, + { + "attribute": "telephoneNumber", + "readOnly": true, + }, + { + "attribute": "postalAddress", + "readOnly": true, + }, + { + "attribute": "city", + "readOnly": true, + }, + { + "attribute": "postalCode", + "readOnly": true, + }, + { + "attribute": "country", + "readOnly": true, + }, + { + "attribute": "stateProvince", + "readOnly": true, + }, + { + "attribute": "roles", + "readOnly": true, + }, + { + "attribute": "assignments", + "readOnly": true, + }, + { + "attribute": "groups", + "readOnly": true, + }, + { + "attribute": "applications", + "readOnly": true, + }, + { + "attribute": "manager", + "readOnly": true, + }, + { + "attribute": "authzRoles", + "readOnly": true, + }, + { + "attribute": "reports", + "readOnly": true, + }, + { + "attribute": "effectiveRoles", + "readOnly": true, + }, + { + "attribute": "effectiveAssignments", + "readOnly": true, + }, + { + "attribute": "effectiveGroups", + "readOnly": true, + }, + { + "attribute": "effectiveApplications", + "readOnly": true, + }, + { + "attribute": "lastSync", + "readOnly": true, + }, + { + "attribute": "kbaInfo", + "readOnly": true, + }, + { + "attribute": "preferences", + "readOnly": true, + }, + { + "attribute": "consentedMappings", + "readOnly": true, + }, + { + "attribute": "ownerOfOrg", + "readOnly": true, + }, + { + "attribute": "adminOfOrg", + "readOnly": true, + }, + { + "attribute": "memberOfOrg", + "readOnly": true, + }, + { + "attribute": "memberOfOrgIDs", + "readOnly": true, + }, + { + "attribute": "ownerOfApp", + "readOnly": true, + }, + { + "attribute": "frIndexedString1", + "readOnly": true, + }, + { + "attribute": "frIndexedString2", + "readOnly": true, + }, + { + "attribute": "frIndexedString3", + "readOnly": true, + }, + { + "attribute": "frIndexedString4", + "readOnly": true, + }, + { + "attribute": "frIndexedString5", + "readOnly": true, + }, + { + "attribute": "frUnindexedString1", + "readOnly": true, + }, + { + "attribute": "frUnindexedString2", + "readOnly": true, + }, + { + "attribute": "frUnindexedString3", + "readOnly": true, + }, + { + "attribute": "frUnindexedString4", + "readOnly": true, + }, + { + "attribute": "frUnindexedString5", + "readOnly": true, + }, + { + "attribute": "frIndexedMultivalued1", + "readOnly": true, + }, + { + "attribute": "frIndexedMultivalued2", + "readOnly": true, + }, + { + "attribute": "frIndexedMultivalued3", + "readOnly": true, + }, + { + "attribute": "frIndexedMultivalued4", + "readOnly": true, + }, + { + "attribute": "frIndexedMultivalued5", + "readOnly": true, + }, + { + "attribute": "frUnindexedMultivalued1", + "readOnly": true, + }, + { + "attribute": "frUnindexedMultivalued2", + "readOnly": true, + }, + { + "attribute": "frUnindexedMultivalued3", + "readOnly": true, + }, + { + "attribute": "frUnindexedMultivalued4", + "readOnly": true, + }, + { + "attribute": "frUnindexedMultivalued5", + "readOnly": true, + }, + { + "attribute": "frIndexedDate1", + "readOnly": true, + }, + { + "attribute": "frIndexedDate2", + "readOnly": true, + }, + { + "attribute": "frIndexedDate3", + "readOnly": true, + }, + { + "attribute": "frIndexedDate4", + "readOnly": true, + }, + { + "attribute": "frIndexedDate5", + "readOnly": true, + }, + { + "attribute": "frUnindexedDate1", + "readOnly": true, + }, + { + "attribute": "frUnindexedDate2", + "readOnly": true, + }, + { + "attribute": "frUnindexedDate3", + "readOnly": true, + }, + { + "attribute": "frUnindexedDate4", + "readOnly": true, + }, + { + "attribute": "frUnindexedDate5", + "readOnly": true, + }, + { + "attribute": "frIndexedInteger1", + "readOnly": true, + }, + { + "attribute": "frIndexedInteger2", + "readOnly": true, + }, + { + "attribute": "frIndexedInteger3", + "readOnly": true, + }, + { + "attribute": "frIndexedInteger4", + "readOnly": true, + }, + { + "attribute": "frIndexedInteger5", + "readOnly": true, + }, + { + "attribute": "frUnindexedInteger1", + "readOnly": true, + }, + { + "attribute": "frUnindexedInteger2", + "readOnly": true, + }, + { + "attribute": "frUnindexedInteger3", + "readOnly": true, + }, + { + "attribute": "frUnindexedInteger4", + "readOnly": true, + }, + { + "attribute": "frUnindexedInteger5", + "readOnly": true, + }, + { + "attribute": "assignedDashboard", + "readOnly": true, + }, + ], + "actions": [], + "filter": "/userName co "test"", + "name": "Alpha realm - Users", + "path": "managed/alpha_user", + "permissions": [ + "VIEW", + "UPDATE", + "CREATE", + ], + }, + ], + "temporalConstraints": [ + { + "duration": "2024-11-04T12:45:00.000Z/2100-12-01T12:45:00.000Z", + }, + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/mapping/managedAlpha_assignment_managedBravo_assignment.mapping.json 1`] = ` +{ + "mapping": { + "mapping/managedAlpha_assignment_managedBravo_assignment": { + "_id": "mapping/managedAlpha_assignment_managedBravo_assignment", + "consentRequired": false, + "displayName": "managedAlpha_assignment_managedBravo_assignment", + "icon": null, + "name": "managedAlpha_assignment_managedBravo_assignment", + "policies": [ + { + "action": "ASYNC", + "situation": "ABSENT", + }, + { + "action": "ASYNC", + "situation": "ALL_GONE", + }, + { + "action": "ASYNC", + "situation": "AMBIGUOUS", + }, + { + "action": "ASYNC", + "situation": "CONFIRMED", + }, + { + "action": "ASYNC", + "situation": "FOUND", + }, + { + "action": "ASYNC", + "situation": "FOUND_ALREADY_LINKED", + }, + { + "action": "ASYNC", + "situation": "LINK_ONLY", + }, + { + "action": "ASYNC", + "situation": "MISSING", + }, + { + "action": "ASYNC", + "situation": "SOURCE_IGNORED", + }, + { + "action": "ASYNC", + "situation": "SOURCE_MISSING", + }, + { + "action": "ASYNC", + "situation": "TARGET_IGNORED", + }, + { + "action": "ASYNC", + "situation": "UNASSIGNED", + }, + { + "action": "ASYNC", + "situation": "UNQUALIFIED", + }, + ], + "properties": [], + "source": "managed/alpha_assignment", + "target": "managed/bravo_assignment", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/mapping/managedAlpha_user_systemAzureUser.mapping.json 1`] = ` +{ + "mapping": { + "mapping/managedAlpha_user_systemAzureUser": { + "_id": "mapping/managedAlpha_user_systemAzureUser", + "consentRequired": false, + "defaultSourceFields": [ + "*", + "assignments", + ], + "defaultTargetFields": [ + "*", + "memberOf", + "__roles__", + "__servicePlanIds__", + ], + "displayName": "managedAlpha_user_systemAzureUser", + "icon": null, + "name": "managedAlpha_user_systemAzureUser", + "optimizeAssignmentSync": true, + "policies": [ + { + "action": "ASYNC", + "situation": "AMBIGUOUS", + }, + { + "action": "ASYNC", + "situation": "SOURCE_MISSING", + }, + { + "action": "ASYNC", + "situation": "MISSING", + }, + { + "action": "ASYNC", + "situation": "FOUND_ALREADY_LINKED", + }, + { + "action": "DELETE", + "situation": "UNQUALIFIED", + }, + { + "action": "ASYNC", + "situation": "UNASSIGNED", + }, + { + "action": "ASYNC", + "situation": "LINK_ONLY", + }, + { + "action": "ASYNC", + "situation": "TARGET_IGNORED", + }, + { + "action": "ASYNC", + "situation": "SOURCE_IGNORED", + }, + { + "action": "ASYNC", + "situation": "ALL_GONE", + }, + { + "action": "UPDATE", + "situation": "CONFIRMED", + }, + { + "action": "ASYNC", + "situation": "FOUND", + }, + { + "action": "CREATE", + "situation": "ABSENT", + }, + { + "action": "ASYNC", + "situation": "SOURCE_TARGET_CONFLICT", + }, + { + "action": "INCORPORATE_CHANGES", + "situation": "TARGET_CHANGED", + }, + ], + "properties": [ + { + "source": "mail", + "target": "mail", + }, + { + "source": "givenName", + "target": "givenName", + }, + { + "source": "sn", + "target": "surname", + }, + { + "source": "", + "target": "displayName", + "transform": { + "source": "source.givenName+" "+source.sn", + "type": "text/javascript", + }, + }, + { + "source": "", + "target": "mailNickname", + "transform": { + "source": "source.givenName[0].toLowerCase()+source.sn.toLowerCase()", + "type": "text/javascript", + }, + }, + { + "source": "", + "target": "accountEnabled", + "transform": { + "source": "true", + "type": "text/javascript", + }, + }, + { + "condition": { + "globals": {}, + "source": "(typeof oldTarget === 'undefined' || oldTarget === null)", + "type": "text/javascript", + }, + "source": "", + "target": "__PASSWORD__", + "transform": { + "source": ""!@#$%"[Math.floor(Math.random()*5)] + Math.random().toString(36).slice(2, 13).toUpperCase()+Math.random().toString(36).slice(2,13)", + "type": "text/javascript", + }, + }, + ], + "queuedSync": { + "enabled": true, + "maxRetries": 0, + "pollingInterval": 10000, + }, + "runTargetPhase": false, + "source": "managed/alpha_user", + "sourceCondition": "/source/effectiveApplications[_id eq "0f357b7e-6c54-4351-a094-43916877d7e5"] or /source/effectiveAssignments[(mapping eq "managedAlpha_user_systemAzureUser" and type eq "__ENTITLEMENT__")]", + "sourceQuery": { + "_queryFilter": "effectiveApplications[_id eq "0f357b7e-6c54-4351-a094-43916877d7e5"] or lastSync/managedAlpha_user_systemAzureUser pr or /source/effectiveAssignments[(mapping eq "managedAlpha_user_systemAzureUser" and type eq "__ENTITLEMENT__")]", + }, + "target": "system/Azure/User", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/mapping/managedBravo_group_managedBravo_group.mapping.json 1`] = ` +{ + "mapping": { + "mapping/managedBravo_group_managedBravo_group": { + "_id": "mapping/managedBravo_group_managedBravo_group", + "consentRequired": false, + "displayName": "managedBravo_group_managedBravo_group", + "icon": null, + "name": "managedBravo_group_managedBravo_group", + "policies": [ + { + "action": "ASYNC", + "situation": "ABSENT", + }, + { + "action": "ASYNC", + "situation": "ALL_GONE", + }, + { + "action": "ASYNC", + "situation": "AMBIGUOUS", + }, + { + "action": "ASYNC", + "situation": "CONFIRMED", + }, + { + "action": "ASYNC", + "situation": "FOUND", + }, + { + "action": "ASYNC", + "situation": "FOUND_ALREADY_LINKED", + }, + { + "action": "ASYNC", + "situation": "LINK_ONLY", + }, + { + "action": "ASYNC", + "situation": "MISSING", + }, + { + "action": "ASYNC", + "situation": "SOURCE_IGNORED", + }, + { + "action": "ASYNC", + "situation": "SOURCE_MISSING", + }, + { + "action": "ASYNC", + "situation": "TARGET_IGNORED", + }, + { + "action": "ASYNC", + "situation": "UNASSIGNED", + }, + { + "action": "ASYNC", + "situation": "UNQUALIFIED", + }, + ], + "properties": [], + "source": "managed/bravo_group", + "target": "managed/bravo_group", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/mapping/managedBravo_user_managedBravo_user0.mapping.json 1`] = ` +{ + "mapping": { + "mapping/managedBravo_user_managedBravo_user0": { + "_id": "mapping/managedBravo_user_managedBravo_user0", + "consentRequired": false, + "displayName": "managedBravo_user_managedBravo_user0", + "icon": null, + "name": "managedBravo_user_managedBravo_user0", + "policies": [ + { + "action": "ASYNC", + "situation": "ABSENT", + }, + { + "action": "ASYNC", + "situation": "ALL_GONE", + }, + { + "action": "ASYNC", + "situation": "AMBIGUOUS", + }, + { + "action": "ASYNC", + "situation": "CONFIRMED", + }, + { + "action": "ASYNC", + "situation": "FOUND", + }, + { + "action": "ASYNC", + "situation": "FOUND_ALREADY_LINKED", + }, + { + "action": "ASYNC", + "situation": "LINK_ONLY", + }, + { + "action": "ASYNC", + "situation": "MISSING", + }, + { + "action": "ASYNC", + "situation": "SOURCE_IGNORED", + }, + { + "action": "ASYNC", + "situation": "SOURCE_MISSING", + }, + { + "action": "ASYNC", + "situation": "TARGET_IGNORED", + }, + { + "action": "ASYNC", + "situation": "UNASSIGNED", + }, + { + "action": "ASYNC", + "situation": "UNQUALIFIED", + }, + ], + "properties": [], + "source": "managed/bravo_user", + "target": "managed/bravo_user", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/mapping/mapping12.mapping.json 1`] = ` +{ + "mapping": { + "mapping/mapping12": { + "_id": "mapping/mapping12", + "consentRequired": false, + "displayName": "mapping12", + "linkQualifiers": [], + "name": "mapping12", + "policies": [], + "properties": [], + "source": "managed/bravo_user", + "syncAfter": [], + "target": "managed/bravo_user", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/mapping/systemAzure__group___managedAlpha_assignment.mapping.json 1`] = ` +{ + "mapping": { + "mapping/systemAzure__group___managedAlpha_assignment": { + "_id": "mapping/systemAzure__group___managedAlpha_assignment", + "consentRequired": false, + "displayName": "systemAzure__group___managedAlpha_assignment", + "icon": null, + "name": "systemAzure__group___managedAlpha_assignment", + "policies": [ + { + "action": "EXCEPTION", + "situation": "AMBIGUOUS", + }, + { + "action": "DELETE", + "situation": "SOURCE_MISSING", + }, + { + "action": "CREATE", + "situation": "MISSING", + }, + { + "action": "EXCEPTION", + "situation": "FOUND_ALREADY_LINKED", + }, + { + "action": "DELETE", + "situation": "UNQUALIFIED", + }, + { + "action": "EXCEPTION", + "situation": "UNASSIGNED", + }, + { + "action": "EXCEPTION", + "situation": "LINK_ONLY", + }, + { + "action": "IGNORE", + "situation": "TARGET_IGNORED", + }, + { + "action": "IGNORE", + "situation": "SOURCE_IGNORED", + }, + { + "action": "IGNORE", + "situation": "ALL_GONE", + }, + { + "action": "UPDATE", + "situation": "CONFIRMED", + }, + { + "action": "LINK", + "situation": "FOUND", + }, + { + "action": "CREATE", + "situation": "ABSENT", + }, + ], + "properties": [ + { + "default": "__RESOURCE__", + "target": "type", + }, + { + "source": "", + "target": "description", + "transform": { + "globals": {}, + "source": "(typeof source.description !== "undefined" && source.description !== null) ? source.description : source._id", + "type": "text/javascript", + }, + }, + { + "default": "managedAlpha_user_systemAzureUser", + "target": "mapping", + }, + { + "source": "", + "target": "name", + "transform": { + "globals": {}, + "source": "(typeof source.displayName !== "undefined" && source.displayName !== null) ? source.displayName : source._id", + "type": "text/javascript", + }, + }, + { + "source": "_id", + "target": "attributes", + "transform": { + "globals": {}, + "source": "[ + { + 'name': 'memberOf', + 'value': [source] + } +]", + "type": "text/javascript", + }, + }, + { + "source": "_id", + "target": "_id", + "transform": { + "globals": { + "sourceObjectSet": "system_Azure___GROUP___", + }, + "source": "sourceObjectSet.concat(source)", + "type": "text/javascript", + }, + }, + ], + "source": "system/Azure/__GROUP__", + "target": "managed/alpha_assignment", + "targetQuery": { + "_queryFilter": "mapping eq "managedAlpha_user_systemAzureUser" and attributes[name eq "memberOf"]", + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/mapping/systemAzureDirectoryrole_managedAlpha_assignment.mapping.json 1`] = ` +{ + "mapping": { + "mapping/systemAzureDirectoryrole_managedAlpha_assignment": { + "_id": "mapping/systemAzureDirectoryrole_managedAlpha_assignment", + "consentRequired": false, + "displayName": "systemAzureDirectoryrole_managedAlpha_assignment", + "icon": null, + "name": "systemAzureDirectoryrole_managedAlpha_assignment", + "policies": [ + { + "action": "EXCEPTION", + "situation": "AMBIGUOUS", + }, + { + "action": "DELETE", + "situation": "SOURCE_MISSING", + }, + { + "action": "CREATE", + "situation": "MISSING", + }, + { + "action": "EXCEPTION", + "situation": "FOUND_ALREADY_LINKED", + }, + { + "action": "DELETE", + "situation": "UNQUALIFIED", + }, + { + "action": "EXCEPTION", + "situation": "UNASSIGNED", + }, + { + "action": "EXCEPTION", + "situation": "LINK_ONLY", + }, + { + "action": "IGNORE", + "situation": "TARGET_IGNORED", + }, + { + "action": "IGNORE", + "situation": "SOURCE_IGNORED", + }, + { + "action": "IGNORE", + "situation": "ALL_GONE", + }, + { + "action": "UPDATE", + "situation": "CONFIRMED", + }, + { + "action": "LINK", + "situation": "FOUND", + }, + { + "action": "CREATE", + "situation": "ABSENT", + }, + ], + "properties": [ + { + "default": "__RESOURCE__", + "target": "type", + }, + { + "source": "", + "target": "description", + "transform": { + "globals": {}, + "source": "(typeof source.description !== "undefined" && source.description !== null) ? source.description : source._id", + "type": "text/javascript", + }, + }, + { + "default": "managedAlpha_user_systemAzureUser", + "target": "mapping", + }, + { + "source": "", + "target": "name", + "transform": { + "globals": {}, + "source": "(typeof source.displayName !== "undefined" && source.displayName !== null) ? source.displayName : source._id", + "type": "text/javascript", + }, + }, + { + "source": "_id", + "target": "attributes", + "transform": { + "globals": {}, + "source": "[ + { + 'name': '__roles__', + 'value': [source] + } +]", + "type": "text/javascript", + }, + }, + { + "source": "_id", + "target": "_id", + "transform": { + "globals": { + "sourceObjectSet": "system_Azure_directoryRole_", + }, + "source": "sourceObjectSet.concat(source)", + "type": "text/javascript", + }, + }, + ], + "source": "system/Azure/directoryRole", + "target": "managed/alpha_assignment", + "targetQuery": { + "_queryFilter": "mapping eq "managedAlpha_user_systemAzureUser" and attributes[name eq "__roles__"]", + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/mapping/systemAzureServiceplan_managedAlpha_assignment.mapping.json 1`] = ` +{ + "mapping": { + "mapping/systemAzureServiceplan_managedAlpha_assignment": { + "_id": "mapping/systemAzureServiceplan_managedAlpha_assignment", + "consentRequired": false, + "displayName": "systemAzureServiceplan_managedAlpha_assignment", + "icon": null, + "name": "systemAzureServiceplan_managedAlpha_assignment", + "policies": [ + { + "action": "EXCEPTION", + "situation": "AMBIGUOUS", + }, + { + "action": "DELETE", + "situation": "SOURCE_MISSING", + }, + { + "action": "CREATE", + "situation": "MISSING", + }, + { + "action": "EXCEPTION", + "situation": "FOUND_ALREADY_LINKED", + }, + { + "action": "DELETE", + "situation": "UNQUALIFIED", + }, + { + "action": "EXCEPTION", + "situation": "UNASSIGNED", + }, + { + "action": "EXCEPTION", + "situation": "LINK_ONLY", + }, + { + "action": "IGNORE", + "situation": "TARGET_IGNORED", + }, + { + "action": "IGNORE", + "situation": "SOURCE_IGNORED", + }, + { + "action": "IGNORE", + "situation": "ALL_GONE", + }, + { + "action": "UPDATE", + "situation": "CONFIRMED", + }, + { + "action": "LINK", + "situation": "FOUND", + }, + { + "action": "CREATE", + "situation": "ABSENT", + }, + ], + "properties": [ + { + "default": "__RESOURCE__", + "target": "type", + }, + { + "source": "", + "target": "description", + "transform": { + "globals": {}, + "source": "(typeof source.servicePlanName !== "undefined" && source.servicePlanName !== null) ? source.servicePlanName : source._id", + "type": "text/javascript", + }, + }, + { + "default": "managedAlpha_user_systemAzureUser", + "target": "mapping", + }, + { + "source": "", + "target": "name", + "transform": { + "globals": {}, + "source": "(typeof source.servicePlanName !== "undefined" && source.servicePlanName !== null) ? source.servicePlanName : source._id", + "type": "text/javascript", + }, + }, + { + "source": "_id", + "target": "attributes", + "transform": { + "globals": {}, + "source": "[ + { + 'name': '__servicePlanIds__', + 'value': [source] + } +]", + "type": "text/javascript", + }, + }, + { + "source": "_id", + "target": "_id", + "transform": { + "globals": { + "sourceObjectSet": "system_Azure_servicePlan_", + }, + "source": "sourceObjectSet.concat(source)", + "type": "text/javascript", + }, + }, + ], + "source": "system/Azure/servicePlan", + "target": "managed/alpha_assignment", + "targetQuery": { + "_queryFilter": "mapping eq "managedAlpha_user_systemAzureUser" and attributes[name eq "__servicePlanIds__"]", + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/mapping/systemAzureUser_managedAlpha_user.mapping.json 1`] = ` +{ + "mapping": { + "mapping/systemAzureUser_managedAlpha_user": { + "_id": "mapping/systemAzureUser_managedAlpha_user", + "consentRequired": false, + "correlationQuery": [ + { + "linkQualifier": "default", + "source": "var qry = {'_queryFilter': 'mail eq "' + source.mail + '"'}; qry", + "type": "text/javascript", + }, + ], + "defaultSourceFields": [ + "*", + "memberOf", + "__roles__", + "__servicePlanIds__", + ], + "defaultTargetFields": [ + "*", + "assignments", + ], + "displayName": "systemAzureUser_managedAlpha_user", + "icon": null, + "links": "managedAlpha_user_systemAzureUser", + "name": "systemAzureUser_managedAlpha_user", + "policies": [ + { + "action": "ASYNC", + "situation": "AMBIGUOUS", + }, + { + "action": "ASYNC", + "situation": "SOURCE_MISSING", + }, + { + "action": "ASYNC", + "situation": "MISSING", + }, + { + "action": "ASYNC", + "situation": "FOUND_ALREADY_LINKED", + }, + { + "action": "ASYNC", + "situation": "UNQUALIFIED", + }, + { + "action": "ASYNC", + "situation": "UNASSIGNED", + }, + { + "action": "ASYNC", + "situation": "LINK_ONLY", + }, + { + "action": "ASYNC", + "situation": "TARGET_IGNORED", + }, + { + "action": "ASYNC", + "situation": "SOURCE_IGNORED", + }, + { + "action": "ASYNC", + "situation": "ALL_GONE", + }, + { + "action": "UPDATE", + "situation": "CONFIRMED", + }, + { + "action": "ONBOARD", + "situation": "FOUND", + }, + { + "action": "ASYNC", + "situation": "ABSENT", + }, + { + "action": "ASYNC", + "situation": "SOURCE_TARGET_CONFLICT", + }, + ], + "properties": [ + { + "referencedObjectType": "__GROUP__", + "source": "memberOf", + "target": "assignments", + }, + { + "referencedObjectType": "directoryRole", + "source": "__roles__", + "target": "assignments", + }, + { + "referencedObjectType": "servicePlan", + "source": "__servicePlanIds__", + "target": "assignments", + }, + ], + "reconSourceQueryPageSize": 999, + "reconSourceQueryPaging": true, + "runTargetPhase": false, + "source": "system/Azure/User", + "sourceQueryFullEntry": true, + "target": "managed/alpha_user", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/realm/alpha.realm.json 1`] = ` +{ + "realm": { + "L2FscGhh": { + "_id": "L2FscGhh", + "active": true, + "aliases": [], + "name": "alpha", + "parentPath": "/", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/realm/bravo.realm.json 1`] = ` +{ + "realm": { + "L2JyYXZv": { + "_id": "L2JyYXZv", + "active": true, + "aliases": [], + "name": "bravo", + "parentPath": "/", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/scripttype/AUTHENTICATION_CLIENT_SIDE.scripttype.json 1`] = ` +{ + "scripttype": { + "AUTHENTICATION_CLIENT_SIDE": { + "_id": "AUTHENTICATION_CLIENT_SIDE", + "_type": { + "_id": "contexts", + "collection": true, + "name": "scriptContext", + }, + "context": { + "_id": "AUTHENTICATION_CLIENT_SIDE", + "allowLists": [], + "bindings": [], + "evaluatorVersions": { + "GROOVY": [ + "1.0", + ], + "JAVASCRIPT": [ + "1.0", + ], + }, + }, + "defaultScript": "[Empty]", + "isHidden": false, + "languages": [ + "JAVASCRIPT", + "GROOVY", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/scripttype/AUTHENTICATION_SERVER_SIDE.scripttype.json 1`] = ` +{ + "scripttype": { + "AUTHENTICATION_SERVER_SIDE": { + "_id": "AUTHENTICATION_SERVER_SIDE", + "_type": { + "_id": "contexts", + "collection": true, + "name": "scriptContext", + }, + "context": { + "_id": "AUTHENTICATION_SERVER_SIDE", + "allowLists": [ + "java.util.LinkedList", + "org.forgerock.openam.authentication.modules.scripted.*", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "java.util.Map", + "java.lang.Number", + "java.util.TreeMap", + "java.util.TreeSet", + "java.lang.Double", + "java.lang.Short", + "org.forgerock.util.promise.NeverThrowsException", + "org.forgerock.util.promise.PromiseImpl", + "org.mozilla.javascript.JavaScriptException", + "java.util.HashMap", + "org.forgerock.openam.scripting.idrepo.ScriptIdentityRepository", + "java.util.HashSet", + "java.util.Collections$UnmodifiableCollection$1", + "java.util.ArrayList$Itr", + "org.forgerock.openam.shared.security.crypto.CertificateService", + "org.forgerock.http.protocol.Response", + "java.lang.Character$UnicodeBlock", + "org.forgerock.http.protocol.Form", + "org.forgerock.http.client.*", + "org.forgerock.openam.core.rest.devices.deviceprint.DeviceIdDao", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentity", + "java.lang.StrictMath", + "org.forgerock.opendj.ldap.Rdn", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "java.lang.Long", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.lang.Boolean", + "java.lang.Character", + "java.util.LinkedHashMap", + "java.util.ArrayList", + "java.util.HashMap$KeyIterator", + "groovy.json.JsonSlurper", + "org.forgerock.http.protocol.Responses", + "java.util.LinkedHashSet", + "java.lang.Byte", + "java.lang.Math", + "java.util.List", + "org.forgerock.http.protocol.Entity", + "org.forgerock.http.protocol.Cookie", + "sun.security.ec.ECPrivateKeyImpl", + "org.codehaus.groovy.runtime.GStringImpl", + "org.forgerock.opendj.ldap.Dn", + "java.lang.String", + "java.lang.Void", + "org.forgerock.util.promise.Promise", + "java.lang.Integer", + "org.forgerock.http.protocol.Status", + "org.forgerock.json.JsonValue", + "com.sun.identity.shared.debug.Debug", + "java.lang.Character$Subset", + "org.forgerock.http.protocol.RequestCookies", + "java.lang.Float", + "org.forgerock.http.protocol.Header", + "org.forgerock.http.protocol.Headers", + "org.forgerock.http.protocol.Message", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "org.forgerock.http.protocol.ResponseException", + "java.lang.Object", + "org.forgerock.http.protocol.Request", + "org.forgerock.openam.scripting.api.ScriptedSession", + ], + "bindings": [], + "evaluatorVersions": { + "GROOVY": [ + "1.0", + ], + "JAVASCRIPT": [ + "1.0", + ], + }, + }, + "defaultScript": "7e3d7067-d50f-4674-8c76-a3e13a810c33", + "engineConfiguration": { + "_id": "engineConfiguration", + "_type": { + "_id": "engineConfiguration", + "collection": false, + "name": "Scripting engine configuration", + }, + "blackList": [ + "java.lang.Class", + "java.lang.Thread", + "java.lang.invoke.*", + "java.lang.reflect.*", + "java.security.AccessController", + ], + "coreThreads": { + "$int": "&{authentication.server.side.script.context.core.threads|10}", + }, + "idleTimeout": 60, + "maxThreads": { + "$int": "&{authentication.server.side.script.context.max.threads|50}", + }, + "propertyNamePrefix": "esv.", + "queueSize": { + "$int": "&{authentication.server.side.script.context.queue.size|10}", + }, + "serverTimeout": 0, + "useSecurityManager": true, + "whiteList": [ + "com.google.common.collect.ImmutableList", + "com.google.common.collect.Sets$1", + "com.iplanet.am.sdk.AMHashMap", + "com.iplanet.sso.providers.dpro.SSOTokenIDImpl", + "com.iplanet.sso.providers.dpro.SessionSsoToken", + "com.sun.identity.authentication.callbacks.HiddenValueCallback", + "com.sun.identity.authentication.callbacks.ReCaptchaCallback", + "com.sun.identity.authentication.callbacks.ScriptTextOutputCallback", + "com.sun.identity.authentication.spi.HttpCallback", + "com.sun.identity.authentication.spi.IdentifiableCallback", + "com.sun.identity.authentication.spi.MetadataCallback", + "com.sun.identity.authentication.spi.PagePropertiesCallback", + "com.sun.identity.authentication.spi.RedirectCallback", + "com.sun.identity.authentication.spi.X509CertificateCallback", + "com.sun.identity.common.CaseInsensitiveHashMap", + "com.sun.identity.common.CaseInsensitiveHashMap$Entry", + "com.sun.identity.idm.AMIdentity", + "com.sun.identity.idm.IdType", + "com.sun.identity.saml2.assertion.impl.AttributeImpl", + "com.sun.identity.saml2.common.SAML2Exception", + "com.sun.identity.saml2.plugins.scripted.IdpAttributeMapperScriptHelper", + "com.sun.identity.shared.debug.Debug", + "groovy.json.JsonSlurper", + "groovy.json.StringEscapeUtils", + "groovy.json.internal.LazyMap", + "java.io.ByteArrayInputStream", + "java.io.ByteArrayOutputStream", + "java.io.UnsupportedEncodingException", + "java.lang.Boolean", + "java.lang.Byte", + "java.lang.Character", + "java.lang.Character$Subset", + "java.lang.Character$UnicodeBlock", + "java.lang.Double", + "java.lang.Float", + "java.lang.Integer", + "java.lang.Long", + "java.lang.Math", + "java.lang.NullPointerException", + "java.lang.Number", + "java.lang.Object", + "java.lang.RuntimeException", + "java.lang.SecurityException", + "java.lang.Short", + "java.lang.StrictMath", + "java.lang.String", + "java.lang.Void", + "java.math.BigDecimal", + "java.math.BigInteger", + "java.net.URI", + "java.security.KeyFactory", + "java.security.KeyPair", + "java.security.KeyPairGenerator", + "java.security.KeyPairGenerator$*", + "java.security.MessageDigest", + "java.security.MessageDigest$Delegate", + "java.security.MessageDigest$Delegate$CloneableDelegate", + "java.security.NoSuchAlgorithmException", + "java.security.PrivateKey", + "java.security.PublicKey", + "java.security.cert.CertificateFactory", + "java.security.cert.X509Certificate", + "java.security.spec.MGF1ParameterSpec", + "java.security.spec.PKCS8EncodedKeySpec", + "java.security.spec.X509EncodedKeySpec", + "java.text.SimpleDateFormat", + "java.time.Clock", + "java.time.Clock$FixedClock", + "java.time.Clock$OffsetClock", + "java.time.Clock$SystemClock", + "java.time.Clock$TickClock", + "java.time.temporal.ChronoUnit", + "java.util.AbstractMap$*", + "java.util.ArrayList", + "java.util.ArrayList$Itr", + "java.util.Arrays", + "java.util.Collections", + "java.util.Collections$*", + "java.util.Date", + "java.util.HashMap", + "java.util.HashMap$Entry", + "java.util.HashMap$KeyIterator", + "java.util.HashMap$KeySet", + "java.util.HashMap$Node", + "java.util.HashSet", + "java.util.LinkedHashMap", + "java.util.LinkedHashMap$Entry", + "java.util.LinkedHashMap$LinkedEntryIterator", + "java.util.LinkedHashMap$LinkedEntrySet", + "java.util.LinkedHashMap$LinkedKeySet", + "java.util.LinkedHashSet", + "java.util.LinkedList", + "java.util.List", + "java.util.Locale", + "java.util.Map", + "java.util.TreeMap", + "java.util.TreeSet", + "java.util.UUID", + "javax.crypto.Cipher", + "javax.crypto.Mac", + "javax.crypto.spec.IvParameterSpec", + "javax.crypto.spec.OAEPParameterSpec", + "javax.crypto.spec.PSource", + "javax.crypto.spec.PSource$*", + "javax.crypto.spec.SecretKeySpec", + "javax.security.auth.callback.ChoiceCallback", + "javax.security.auth.callback.ConfirmationCallback", + "javax.security.auth.callback.LanguageCallback", + "javax.security.auth.callback.NameCallback", + "javax.security.auth.callback.PasswordCallback", + "javax.security.auth.callback.TextInputCallback", + "javax.security.auth.callback.TextOutputCallback", + "org.apache.groovy.json.internal.LazyMap", + "org.codehaus.groovy.runtime.GStringImpl", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "org.forgerock.guice.core.IdentityProvider", + "org.forgerock.guice.core.InjectorHolder", + "org.forgerock.http.Client", + "org.forgerock.http.Context", + "org.forgerock.http.Handler", + "org.forgerock.http.client.*", + "org.forgerock.http.context.RootContext", + "org.forgerock.http.header.*", + "org.forgerock.http.header.authorization.*", + "org.forgerock.http.protocol.*", + "org.forgerock.json.JsonValue", + "org.forgerock.json.jose.builders.EncryptedJwtBuilder", + "org.forgerock.json.jose.builders.EncryptedThenSignedJwtBuilder", + "org.forgerock.json.jose.builders.JweHeaderBuilder", + "org.forgerock.json.jose.builders.JwsHeaderBuilder", + "org.forgerock.json.jose.builders.JwtBuilderFactory", + "org.forgerock.json.jose.builders.SignedJwtBuilderImpl", + "org.forgerock.json.jose.builders.SignedThenEncryptedJwtBuilder", + "org.forgerock.json.jose.builders.SignedThenEncryptedJwtHeaderBuilder", + "org.forgerock.json.jose.jwe.EncryptedJwt", + "org.forgerock.json.jose.jwe.EncryptionMethod", + "org.forgerock.json.jose.jwe.JweAlgorithm", + "org.forgerock.json.jose.jwe.SignedThenEncryptedJwt", + "org.forgerock.json.jose.jwk.JWKSet", + "org.forgerock.json.jose.jwk.RsaJWK", + "org.forgerock.json.jose.jws.EncryptedThenSignedJwt", + "org.forgerock.json.jose.jws.JwsAlgorithm", + "org.forgerock.json.jose.jws.JwsHeader", + "org.forgerock.json.jose.jws.SignedEncryptedJwt", + "org.forgerock.json.jose.jws.SignedJwt", + "org.forgerock.json.jose.jws.SigningManager", + "org.forgerock.json.jose.jws.handlers.HmacSigningHandler", + "org.forgerock.json.jose.jws.handlers.RSASigningHandler", + "org.forgerock.json.jose.jws.handlers.SecretHmacSigningHandler", + "org.forgerock.json.jose.jws.handlers.SecretRSASigningHandler", + "org.forgerock.json.jose.jwt.JwtClaimsSet", + "org.forgerock.macaroons.Macaroon", + "org.forgerock.oauth.clients.oidc.Claim", + "org.forgerock.oauth2.core.GrantType", + "org.forgerock.oauth2.core.StatefulAccessToken", + "org.forgerock.oauth2.core.UserInfoClaims", + "org.forgerock.oauth2.core.exceptions.InvalidRequestException", + "org.forgerock.oauth2.core.tokenexchange.ExchangeableToken", + "org.forgerock.openam.auth.node.api.Action", + "org.forgerock.openam.auth.node.api.Action$ActionBuilder", + "org.forgerock.openam.auth.node.api.NodeState", + "org.forgerock.openam.auth.node.api.SuspendedTextOutputCallback", + "org.forgerock.openam.auth.nodes.IdentityProvider", + "org.forgerock.openam.auth.nodes.InjectorHolder", + "org.forgerock.openam.authentication.callbacks.AbstractValidatedCallback", + "org.forgerock.openam.authentication.callbacks.AttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.BooleanAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.ConsentMappingCallback", + "org.forgerock.openam.authentication.callbacks.DeviceProfileCallback", + "org.forgerock.openam.authentication.callbacks.IdPCallback", + "org.forgerock.openam.authentication.callbacks.KbaCreateCallback", + "org.forgerock.openam.authentication.callbacks.NumberAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.PollingWaitCallback", + "org.forgerock.openam.authentication.callbacks.SelectIdPCallback", + "org.forgerock.openam.authentication.callbacks.StringAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.TermsAndConditionsCallback", + "org.forgerock.openam.authentication.callbacks.ValidatedPasswordCallback", + "org.forgerock.openam.authentication.callbacks.ValidatedUsernameCallback", + "org.forgerock.openam.authentication.modules.scripted.*", + "org.forgerock.openam.core.rest.authn.callbackhandlers.*", + "org.forgerock.openam.core.rest.devices.deviceprint.DeviceIdDao", + "org.forgerock.openam.core.rest.devices.profile.DeviceProfilesDao", + "org.forgerock.openam.oauth2.OpenAMAccessToken", + "org.forgerock.openam.oauth2.token.grantset.Authorization$ModifiedAccessToken", + "org.forgerock.openam.oauth2.token.macaroon.MacaroonAccessToken", + "org.forgerock.openam.oauth2.token.stateless.StatelessAccessToken", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "org.forgerock.openam.scripting.api.ScriptedIdentity", + "org.forgerock.openam.scripting.api.ScriptedSession", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentity", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentityRepository", + "org.forgerock.openam.scripting.api.secrets.ScriptedSecrets", + "org.forgerock.openam.scripting.api.secrets.Secret", + "org.forgerock.openam.scripting.idrepo.ScriptIdentityRepository", + "org.forgerock.openam.shared.security.ThreadLocalSecureRandom", + "org.forgerock.openidconnect.Claim", + "org.forgerock.openidconnect.OpenIdConnectToken", + "org.forgerock.openidconnect.ssoprovider.OpenIdConnectSSOToken", + "org.forgerock.secrets.SecretBuilder", + "org.forgerock.secrets.keys.SigningKey", + "org.forgerock.secrets.keys.VerificationKey", + "org.forgerock.util.encode.Base64", + "org.forgerock.util.encode.Base64url", + "org.forgerock.util.encode.Hex", + "org.forgerock.util.promise.NeverThrowsException", + "org.forgerock.util.promise.Promise", + "org.forgerock.util.promise.PromiseImpl", + "org.mozilla.javascript.ConsString", + "org.mozilla.javascript.JavaScriptException", + "org.mozilla.javascript.WrappedException", + "sun.security.ec.ECPrivateKeyImpl", + "sun.security.rsa.RSAPrivateCrtKeyImpl", + "sun.security.rsa.RSAPublicKeyImpl", + "sun.security.x509.X500Name", + "sun.security.x509.X509CertImpl", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.util.Collections$UnmodifiableCollection$1", + "org.forgerock.opendj.ldap.Rdn", + "org.forgerock.opendj.ldap.Dn", + "org.forgerock.openam.auth.nodes.VerifyTransactionsHelper", + ], + }, + "isHidden": false, + "languages": [ + "JAVASCRIPT", + "GROOVY", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/scripttype/AUTHENTICATION_TREE_DECISION_NODE.scripttype.json 1`] = ` +{ + "scripttype": { + "AUTHENTICATION_TREE_DECISION_NODE": { + "_id": "AUTHENTICATION_TREE_DECISION_NODE", + "_type": { + "_id": "contexts", + "collection": true, + "name": "scriptContext", + }, + "context": { + "_id": "AUTHENTICATION_TREE_DECISION_NODE", + "allowLists": [ + "java.lang.Integer", + "java.lang.StrictMath", + "java.security.spec.MGF1ParameterSpec", + "java.security.KeyPair", + "org.forgerock.http.protocol.Cookie", + "javax.security.auth.callback.NameCallback", + "javax.security.auth.callback.TextInputCallback", + "org.forgerock.http.protocol.ResponseException", + "java.util.HashSet", + "java.util.Collections", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "org.forgerock.openam.auth.node.api.NodeState", + "java.util.TreeMap", + "org.forgerock.http.header.authorization.*", + "javax.crypto.spec.OAEPParameterSpec", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentity", + "java.util.LinkedHashSet", + "java.util.Map", + "org.mozilla.javascript.JavaScriptException", + "java.lang.Void", + "com.sun.crypto.provider.PBKDF2KeyImpl", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "org.mozilla.javascript.ConsString", + "org.forgerock.http.context.RootContext", + "javax.crypto.SecretKeyFactory", + "com.sun.identity.authentication.spi.RedirectCallback", + "java.lang.Double", + "org.forgerock.json.JsonValue", + "java.util.Collections$*", + "org.forgerock.http.header.*", + "org.forgerock.http.protocol.Message", + "java.util.List", + "com.sun.identity.shared.debug.Debug", + "org.forgerock.http.protocol.Headers", + "java.security.KeyPairGenerator", + "org.forgerock.openam.authentication.callbacks.ValidatedPasswordCallback", + "javax.security.auth.callback.ChoiceCallback", + "org.forgerock.openam.scripting.api.secrets.ScriptedSecrets", + "groovy.json.JsonSlurper", + "java.security.PublicKey", + "org.forgerock.http.protocol.Form", + "org.forgerock.http.protocol.Request", + "java.lang.Number", + "java.util.AbstractMap$*", + "com.sun.identity.authentication.spi.MetadataCallback", + "org.forgerock.openam.authentication.callbacks.StringAttributeInputCallback", + "org.forgerock.opendj.ldap.Dn", + "java.util.concurrent.TimeUnit", + "org.forgerock.openam.authentication.callbacks.PollingWaitCallback", + "java.lang.String", + "com.sun.identity.authentication.callbacks.HiddenValueCallback", + "org.forgerock.http.protocol.Responses", + "org.forgerock.http.protocol.Header", + "javax.crypto.spec.PBEKeySpec", + "org.forgerock.openam.scripting.api.ScriptedSession", + "org.forgerock.openam.auth.nodes.VerifyTransactionsHelper", + "java.util.TreeSet", + "java.lang.Short", + "org.forgerock.util.promise.PromiseImpl", + "java.lang.Character", + "javax.crypto.spec.PSource", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "sun.security.ec.ECPrivateKeyImpl", + "org.forgerock.openam.authentication.callbacks.NumberAttributeInputCallback", + "javax.security.auth.callback.TextOutputCallback", + "java.util.concurrent.TimeoutException", + "java.lang.Object", + "java.security.spec.InvalidKeySpecException", + "org.forgerock.http.Client", + "org.forgerock.http.protocol.Response", + "org.forgerock.openam.auth.node.api.Action$ActionBuilder", + "java.util.Collections$UnmodifiableCollection$1", + "org.forgerock.openam.scripting.idrepo.ScriptIdentityRepository", + "java.security.spec.X509EncodedKeySpec", + "org.forgerock.http.Context", + "java.util.HashMap", + "java.util.LinkedList", + "org.forgerock.http.protocol.Entity", + "org.forgerock.util.promise.Promise", + "java.util.LinkedHashMap", + "java.util.concurrent.ExecutionException", + "java.lang.Long", + "org.forgerock.openam.authentication.callbacks.BooleanAttributeInputCallback", + "org.forgerock.openam.scripting.api.secrets.Secret", + "javax.security.auth.callback.ConfirmationCallback", + "org.forgerock.openam.auth.node.api.Action", + "java.security.PrivateKey", + "org.forgerock.opendj.ldap.Rdn", + "java.lang.Character$Subset", + "org.forgerock.http.Handler", + "org.forgerock.http.client.*", + "java.util.ArrayList", + "java.util.HashMap$KeyIterator", + "org.forgerock.openam.authentication.callbacks.IdPCallback", + "java.security.KeyPairGenerator$*", + "java.lang.Byte", + "org.forgerock.http.protocol.RequestCookies", + "com.sun.identity.authentication.spi.X509CertificateCallback", + "java.lang.Float", + "java.util.Collections$UnmodifiableRandomAccessList", + "org.forgerock.openam.authentication.callbacks.ValidatedUsernameCallback", + "javax.security.auth.callback.PasswordCallback", + "org.forgerock.util.promise.NeverThrowsException", + "com.sun.identity.authentication.callbacks.ScriptTextOutputCallback", + "java.lang.Boolean", + "org.forgerock.openam.core.rest.devices.profile.DeviceProfilesDao", + "org.forgerock.http.protocol.Status", + "org.forgerock.openam.core.rest.authn.callbackhandlers.*", + "org.codehaus.groovy.runtime.GStringImpl", + "javax.crypto.spec.PSource$*", + "java.lang.Math", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "org.forgerock.openam.shared.security.crypto.CertificateService", + "com.sun.identity.authentication.spi.HttpCallback", + "javax.security.auth.callback.LanguageCallback", + "java.lang.Character$UnicodeBlock", + ], + "bindings": [], + "evaluatorVersions": { + "GROOVY": [ + "1.0", + ], + "JAVASCRIPT": [ + "1.0", + ], + }, + }, + "defaultScript": "01e1a3c0-038b-4c16-956a-6c9d89328cff", + "engineConfiguration": { + "_id": "engineConfiguration", + "_type": { + "_id": "engineConfiguration", + "collection": false, + "name": "Scripting engine configuration", + }, + "blackList": [ + "java.lang.Class", + "java.lang.Thread", + "java.lang.invoke.*", + "java.lang.reflect.*", + "java.security.AccessController", + ], + "coreThreads": { + "$int": "&{authentication.tree.decision.node.script.context.core.threads|10}", + }, + "idleTimeout": 60, + "maxThreads": { + "$int": "&{authentication.tree.decision.node.script.context.max.threads|50}", + }, + "propertyNamePrefix": "esv.", + "queueSize": { + "$int": "&{authentication.tree.decision.node.script.context.queue.size|10}", + }, + "serverTimeout": 0, + "useSecurityManager": true, + "whiteList": [ + "com.google.common.collect.ImmutableList", + "com.google.common.collect.Sets$1", + "com.iplanet.am.sdk.AMHashMap", + "com.iplanet.sso.providers.dpro.SSOTokenIDImpl", + "com.iplanet.sso.providers.dpro.SessionSsoToken", + "com.sun.identity.authentication.callbacks.HiddenValueCallback", + "com.sun.identity.authentication.callbacks.ReCaptchaCallback", + "com.sun.identity.authentication.callbacks.ScriptTextOutputCallback", + "com.sun.identity.authentication.spi.HttpCallback", + "com.sun.identity.authentication.spi.IdentifiableCallback", + "com.sun.identity.authentication.spi.MetadataCallback", + "com.sun.identity.authentication.spi.PagePropertiesCallback", + "com.sun.identity.authentication.spi.RedirectCallback", + "com.sun.identity.authentication.spi.X509CertificateCallback", + "com.sun.identity.common.CaseInsensitiveHashMap", + "com.sun.identity.common.CaseInsensitiveHashMap$Entry", + "com.sun.identity.idm.AMIdentity", + "com.sun.identity.idm.IdType", + "com.sun.identity.saml2.assertion.impl.AttributeImpl", + "com.sun.identity.saml2.common.SAML2Exception", + "com.sun.identity.saml2.plugins.scripted.IdpAttributeMapperScriptHelper", + "com.sun.identity.shared.debug.Debug", + "groovy.json.JsonSlurper", + "groovy.json.StringEscapeUtils", + "groovy.json.internal.LazyMap", + "java.io.ByteArrayInputStream", + "java.io.ByteArrayOutputStream", + "java.io.UnsupportedEncodingException", + "java.lang.Boolean", + "java.lang.Byte", + "java.lang.Character", + "java.lang.Character$Subset", + "java.lang.Character$UnicodeBlock", + "java.lang.Double", + "java.lang.Float", + "java.lang.Integer", + "java.lang.Long", + "java.lang.Math", + "java.lang.NullPointerException", + "java.lang.Number", + "java.lang.Object", + "java.lang.RuntimeException", + "java.lang.SecurityException", + "java.lang.Short", + "java.lang.StrictMath", + "java.lang.String", + "java.lang.Void", + "java.math.BigDecimal", + "java.math.BigInteger", + "java.net.URI", + "java.security.KeyFactory", + "java.security.KeyPair", + "java.security.KeyPairGenerator", + "java.security.KeyPairGenerator$*", + "java.security.MessageDigest", + "java.security.MessageDigest$Delegate", + "java.security.MessageDigest$Delegate$CloneableDelegate", + "java.security.NoSuchAlgorithmException", + "java.security.PrivateKey", + "java.security.PublicKey", + "java.security.cert.CertificateFactory", + "java.security.cert.X509Certificate", + "java.security.spec.MGF1ParameterSpec", + "java.security.spec.PKCS8EncodedKeySpec", + "java.security.spec.X509EncodedKeySpec", + "java.text.SimpleDateFormat", + "java.time.Clock", + "java.time.Clock$FixedClock", + "java.time.Clock$OffsetClock", + "java.time.Clock$SystemClock", + "java.time.Clock$TickClock", + "java.time.temporal.ChronoUnit", + "java.util.AbstractMap$*", + "java.util.ArrayList", + "java.util.ArrayList$Itr", + "java.util.Arrays", + "java.util.Collections", + "java.util.Collections$*", + "java.util.Date", + "java.util.HashMap", + "java.util.HashMap$Entry", + "java.util.HashMap$KeyIterator", + "java.util.HashMap$KeySet", + "java.util.HashMap$Node", + "java.util.HashSet", + "java.util.LinkedHashMap", + "java.util.LinkedHashMap$Entry", + "java.util.LinkedHashMap$LinkedEntryIterator", + "java.util.LinkedHashMap$LinkedEntrySet", + "java.util.LinkedHashMap$LinkedKeySet", + "java.util.LinkedHashSet", + "java.util.LinkedList", + "java.util.List", + "java.util.Locale", + "java.util.Map", + "java.util.TreeMap", + "java.util.TreeSet", + "java.util.UUID", + "javax.crypto.Cipher", + "javax.crypto.Mac", + "javax.crypto.spec.IvParameterSpec", + "javax.crypto.spec.OAEPParameterSpec", + "javax.crypto.spec.PSource", + "javax.crypto.spec.PSource$*", + "javax.crypto.spec.SecretKeySpec", + "javax.security.auth.callback.ChoiceCallback", + "javax.security.auth.callback.ConfirmationCallback", + "javax.security.auth.callback.LanguageCallback", + "javax.security.auth.callback.NameCallback", + "javax.security.auth.callback.PasswordCallback", + "javax.security.auth.callback.TextInputCallback", + "javax.security.auth.callback.TextOutputCallback", + "org.apache.groovy.json.internal.LazyMap", + "org.codehaus.groovy.runtime.GStringImpl", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "org.forgerock.guice.core.IdentityProvider", + "org.forgerock.guice.core.InjectorHolder", + "org.forgerock.http.Client", + "org.forgerock.http.Context", + "org.forgerock.http.Handler", + "org.forgerock.http.client.*", + "org.forgerock.http.context.RootContext", + "org.forgerock.http.header.*", + "org.forgerock.http.header.authorization.*", + "org.forgerock.http.protocol.*", + "org.forgerock.json.JsonValue", + "org.forgerock.json.jose.builders.EncryptedJwtBuilder", + "org.forgerock.json.jose.builders.EncryptedThenSignedJwtBuilder", + "org.forgerock.json.jose.builders.JweHeaderBuilder", + "org.forgerock.json.jose.builders.JwsHeaderBuilder", + "org.forgerock.json.jose.builders.JwtBuilderFactory", + "org.forgerock.json.jose.builders.SignedJwtBuilderImpl", + "org.forgerock.json.jose.builders.SignedThenEncryptedJwtBuilder", + "org.forgerock.json.jose.builders.SignedThenEncryptedJwtHeaderBuilder", + "org.forgerock.json.jose.jwe.EncryptedJwt", + "org.forgerock.json.jose.jwe.EncryptionMethod", + "org.forgerock.json.jose.jwe.JweAlgorithm", + "org.forgerock.json.jose.jwe.JweHeader", + "org.forgerock.json.jose.jwe.SignedThenEncryptedJwt", + "org.forgerock.json.jose.jwk.JWKSet", + "org.forgerock.json.jose.jwk.RsaJWK", + "org.forgerock.json.jose.jws.EncryptedThenSignedJwt", + "org.forgerock.json.jose.jws.JwsAlgorithm", + "org.forgerock.json.jose.jws.JwsHeader", + "org.forgerock.json.jose.jws.SignedEncryptedJwt", + "org.forgerock.json.jose.jws.SignedJwt", + "org.forgerock.json.jose.jws.SigningManager", + "org.forgerock.json.jose.jws.handlers.HmacSigningHandler", + "org.forgerock.json.jose.jws.handlers.RSASigningHandler", + "org.forgerock.json.jose.jws.handlers.SecretHmacSigningHandler", + "org.forgerock.json.jose.jws.handlers.SecretRSASigningHandler", + "org.forgerock.json.jose.jwt.JwtClaimsSet", + "org.forgerock.macaroons.Macaroon", + "org.forgerock.oauth.clients.oidc.Claim", + "org.forgerock.oauth2.core.GrantType", + "org.forgerock.oauth2.core.StatefulAccessToken", + "org.forgerock.oauth2.core.UserInfoClaims", + "org.forgerock.oauth2.core.exceptions.InvalidRequestException", + "org.forgerock.oauth2.core.tokenexchange.ExchangeableToken", + "org.forgerock.openam.auth.node.api.Action", + "org.forgerock.openam.auth.node.api.Action$ActionBuilder", + "org.forgerock.openam.auth.node.api.NodeState", + "org.forgerock.openam.auth.node.api.SuspendedTextOutputCallback", + "org.forgerock.openam.auth.nodes.IdentityProvider", + "org.forgerock.openam.auth.nodes.InjectorHolder", + "org.forgerock.openam.authentication.callbacks.AbstractValidatedCallback", + "org.forgerock.openam.authentication.callbacks.AttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.BooleanAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.ConsentMappingCallback", + "org.forgerock.openam.authentication.callbacks.DeviceProfileCallback", + "org.forgerock.openam.authentication.callbacks.IdPCallback", + "org.forgerock.openam.authentication.callbacks.KbaCreateCallback", + "org.forgerock.openam.authentication.callbacks.NumberAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.PollingWaitCallback", + "org.forgerock.openam.authentication.callbacks.SelectIdPCallback", + "org.forgerock.openam.authentication.callbacks.StringAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.TermsAndConditionsCallback", + "org.forgerock.openam.authentication.callbacks.ValidatedPasswordCallback", + "org.forgerock.openam.authentication.callbacks.ValidatedUsernameCallback", + "org.forgerock.openam.authentication.modules.scripted.*", + "org.forgerock.openam.core.realms.impl.RealmImpl", + "org.forgerock.openam.core.realms.Realms", + "org.forgerock.openam.core.realms.RootRealm", + "org.forgerock.openam.core.rest.authn.callbackhandlers.*", + "org.forgerock.openam.core.rest.devices.deviceprint.DeviceIdDao", + "org.forgerock.openam.core.rest.devices.profile.DeviceProfilesDao", + "org.forgerock.openam.oauth2.OpenAMAccessToken", + "org.forgerock.openam.oauth2.token.grantset.Authorization$ModifiedAccessToken", + "org.forgerock.openam.oauth2.token.macaroon.MacaroonAccessToken", + "org.forgerock.openam.oauth2.token.stateless.StatelessAccessToken", + "org.forgerock.openam.placeholder.substitution.FbcPlaceholderSubstitution", + "org.forgerock.openam.placeholder.substitution.PlaceholderSubstitution", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "org.forgerock.openam.scripting.api.ScriptedIdentity", + "org.forgerock.openam.scripting.api.ScriptedSession", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentity", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentityRepository", + "org.forgerock.openam.scripting.api.secrets.ScriptedSecrets", + "org.forgerock.openam.scripting.api.secrets.Secret", + "org.forgerock.openam.scripting.idrepo.ScriptIdentityRepository", + "org.forgerock.openam.shared.security.ThreadLocalSecureRandom", + "org.forgerock.openam.social.idp.OpenIDConnectClientConfig", + "org.forgerock.openam.social.idp.OpenIDConnectClientConfig$ByteBuddy*", + "org.forgerock.openam.social.idp.SocialIdentityProviders", + "org.forgerock.openam.social.idp.SocialIdentityProvidersImpl", + "org.forgerock.openidconnect.Claim", + "org.forgerock.openidconnect.OpenIdConnectToken", + "org.forgerock.openidconnect.ssoprovider.OpenIdConnectSSOToken", + "org.forgerock.secrets.SecretBuilder", + "org.forgerock.secrets.keys.SigningKey", + "org.forgerock.secrets.keys.VerificationKey", + "org.forgerock.util.encode.Base64", + "org.forgerock.util.encode.Base64url", + "org.forgerock.util.encode.Hex", + "org.forgerock.util.promise.NeverThrowsException", + "org.forgerock.util.promise.Promise", + "org.forgerock.util.promise.PromiseImpl", + "org.mozilla.javascript.ConsString", + "org.mozilla.javascript.JavaScriptException", + "org.mozilla.javascript.WrappedException", + "sun.security.ec.ECPrivateKeyImpl", + "sun.security.rsa.RSAPrivateCrtKeyImpl", + "sun.security.rsa.RSAPublicKeyImpl", + "sun.security.x509.X500Name", + "sun.security.x509.X509CertImpl", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.util.Collections$UnmodifiableCollection$1", + "java.util.concurrent.TimeUnit", + "java.util.concurrent.ExecutionException", + "java.util.concurrent.TimeoutException", + "javax.crypto.SecretKeyFactory", + "javax.crypto.spec.PBEKeySpec", + "com.sun.crypto.provider.PBKDF2KeyImpl", + "java.security.spec.InvalidKeySpecException", + "org.forgerock.opendj.ldap.Rdn", + "org.forgerock.opendj.ldap.Dn", + ], + }, + "isHidden": false, + "languages": [ + "JAVASCRIPT", + "GROOVY", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/scripttype/CONFIG_PROVIDER_NODE.scripttype.json 1`] = ` +{ + "scripttype": { + "CONFIG_PROVIDER_NODE": { + "_id": "CONFIG_PROVIDER_NODE", + "_type": { + "_id": "contexts", + "collection": true, + "name": "scriptContext", + }, + "context": { + "_id": "CONFIG_PROVIDER_NODE", + "allowLists": [ + "org.forgerock.opendj.ldap.Dn", + "org.forgerock.util.promise.NeverThrowsException", + "java.util.Collections$UnmodifiableCollection$1", + "java.lang.Object", + "java.util.concurrent.ExecutionException", + "java.util.LinkedHashSet", + "java.lang.Long", + "java.security.KeyPairGenerator", + "org.forgerock.http.protocol.Form", + "org.forgerock.json.JsonValue", + "sun.security.ec.ECPrivateKeyImpl", + "org.forgerock.openam.authentication.callbacks.PollingWaitCallback", + "org.forgerock.http.header.authorization.*", + "org.forgerock.http.protocol.Responses", + "com.sun.identity.authentication.callbacks.ScriptTextOutputCallback", + "java.security.KeyPairGenerator$*", + "org.forgerock.openam.shared.security.crypto.CertificateService", + "java.util.concurrent.TimeoutException", + "java.lang.Double", + "java.lang.String", + "java.lang.Float", + "org.forgerock.openam.scripting.idrepo.ScriptIdentityRepository", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "org.mozilla.javascript.ConsString", + "java.util.List", + "javax.crypto.spec.PBEKeySpec", + "org.forgerock.openam.auth.node.api.Action", + "org.forgerock.http.protocol.Status", + "org.forgerock.http.context.RootContext", + "java.security.spec.InvalidKeySpecException", + "java.security.PrivateKey", + "javax.security.auth.callback.ConfirmationCallback", + "java.lang.Byte", + "java.util.Collections$*", + "com.sun.identity.authentication.spi.X509CertificateCallback", + "org.forgerock.http.Handler", + "java.util.TreeSet", + "org.forgerock.http.protocol.Header", + "org.forgerock.openam.auth.node.api.Action$ActionBuilder", + "java.util.LinkedHashMap", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "org.forgerock.http.protocol.Entity", + "org.forgerock.openam.authentication.callbacks.ValidatedPasswordCallback", + "javax.crypto.spec.PSource$*", + "java.lang.Short", + "com.sun.identity.authentication.callbacks.HiddenValueCallback", + "java.util.HashSet", + "java.util.Map", + "org.forgerock.util.promise.PromiseImpl", + "org.forgerock.opendj.ldap.Rdn", + "java.lang.Character", + "org.forgerock.openam.auth.node.api.NodeState", + "org.forgerock.http.protocol.Message", + "org.forgerock.http.protocol.RequestCookies", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentity", + "org.forgerock.openam.authentication.callbacks.NumberAttributeInputCallback", + "java.security.spec.MGF1ParameterSpec", + "org.forgerock.http.Client", + "javax.crypto.SecretKeyFactory", + "java.security.PublicKey", + "javax.crypto.spec.PSource", + "org.forgerock.openam.scripting.api.secrets.ScriptedSecrets", + "javax.security.auth.callback.ChoiceCallback", + "javax.security.auth.callback.TextInputCallback", + "org.mozilla.javascript.JavaScriptException", + "java.security.KeyPair", + "java.lang.Void", + "java.lang.Number", + "java.util.LinkedList", + "org.forgerock.openam.scripting.api.ScriptedSession", + "org.forgerock.util.promise.Promise", + "org.forgerock.http.Context", + "javax.security.auth.callback.TextOutputCallback", + "javax.security.auth.callback.LanguageCallback", + "java.security.spec.X509EncodedKeySpec", + "org.forgerock.http.header.*", + "org.forgerock.http.protocol.Request", + "org.forgerock.http.protocol.Cookie", + "javax.security.auth.callback.PasswordCallback", + "org.forgerock.openam.core.rest.authn.callbackhandlers.*", + "java.lang.Character$UnicodeBlock", + "com.sun.crypto.provider.PBKDF2KeyImpl", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "java.util.HashMap$KeyIterator", + "java.util.TreeMap", + "java.lang.StrictMath", + "java.lang.Boolean", + "org.forgerock.openam.authentication.callbacks.ValidatedUsernameCallback", + "groovy.json.JsonSlurper", + "org.forgerock.openam.scripting.api.secrets.Secret", + "java.util.Collections$UnmodifiableRandomAccessList", + "javax.security.auth.callback.NameCallback", + "java.util.AbstractMap$*", + "java.lang.Character$Subset", + "java.util.HashMap", + "org.codehaus.groovy.runtime.GStringImpl", + "org.forgerock.http.protocol.Response", + "javax.crypto.spec.OAEPParameterSpec", + "org.forgerock.http.protocol.Headers", + "java.util.concurrent.TimeUnit", + "com.sun.identity.authentication.spi.MetadataCallback", + "java.lang.Integer", + "com.sun.identity.shared.debug.Debug", + "java.lang.Math", + "com.sun.identity.authentication.spi.RedirectCallback", + "com.sun.identity.authentication.spi.HttpCallback", + "org.forgerock.openam.core.rest.devices.profile.DeviceProfilesDao", + "org.forgerock.http.client.*", + "java.util.ArrayList", + "org.forgerock.openam.authentication.callbacks.IdPCallback", + "org.forgerock.openam.authentication.callbacks.BooleanAttributeInputCallback", + "org.forgerock.http.protocol.ResponseException", + "java.util.Collections", + "org.forgerock.openam.authentication.callbacks.StringAttributeInputCallback", + ], + "bindings": [], + "evaluatorVersions": { + "GROOVY": [ + "1.0", + ], + "JAVASCRIPT": [ + "1.0", + ], + }, + }, + "defaultScript": "5e854779-6ec1-4c39-aeba-0477e0986646", + "engineConfiguration": { + "_id": "engineConfiguration", + "_type": { + "_id": "engineConfiguration", + "collection": false, + "name": "Scripting engine configuration", + }, + "blackList": [ + "java.lang.Class", + "java.lang.Thread", + "java.lang.invoke.*", + "java.lang.reflect.*", + "java.security.AccessController", + ], + "coreThreads": { + "$int": "&{config.provider.node.script.context.core.threads|10}", + }, + "idleTimeout": 60, + "maxThreads": { + "$int": "&{config.provider.node.script.context.max.threads|50}", + }, + "propertyNamePrefix": "esv.", + "queueSize": { + "$int": "&{config.provider.node.script.context.queue.size|10}", + }, + "serverTimeout": 0, + "useSecurityManager": true, + "whiteList": [ + "com.google.common.collect.ImmutableList", + "com.google.common.collect.Sets$1", + "com.iplanet.am.sdk.AMHashMap", + "com.iplanet.sso.providers.dpro.SSOTokenIDImpl", + "com.iplanet.sso.providers.dpro.SessionSsoToken", + "com.sun.identity.authentication.callbacks.HiddenValueCallback", + "com.sun.identity.authentication.callbacks.ReCaptchaCallback", + "com.sun.identity.authentication.callbacks.ScriptTextOutputCallback", + "com.sun.identity.authentication.spi.HttpCallback", + "com.sun.identity.authentication.spi.IdentifiableCallback", + "com.sun.identity.authentication.spi.MetadataCallback", + "com.sun.identity.authentication.spi.PagePropertiesCallback", + "com.sun.identity.authentication.spi.RedirectCallback", + "com.sun.identity.authentication.spi.X509CertificateCallback", + "com.sun.identity.common.CaseInsensitiveHashMap", + "com.sun.identity.common.CaseInsensitiveHashMap$Entry", + "com.sun.identity.idm.AMIdentity", + "com.sun.identity.idm.IdType", + "com.sun.identity.saml2.assertion.impl.AttributeImpl", + "com.sun.identity.saml2.common.SAML2Exception", + "com.sun.identity.saml2.plugins.scripted.IdpAttributeMapperScriptHelper", + "com.sun.identity.shared.debug.Debug", + "groovy.json.JsonSlurper", + "groovy.json.StringEscapeUtils", + "groovy.json.internal.LazyMap", + "java.io.ByteArrayInputStream", + "java.io.ByteArrayOutputStream", + "java.io.UnsupportedEncodingException", + "java.lang.Boolean", + "java.lang.Byte", + "java.lang.Character", + "java.lang.Character$Subset", + "java.lang.Character$UnicodeBlock", + "java.lang.Double", + "java.lang.Float", + "java.lang.Integer", + "java.lang.Long", + "java.lang.Math", + "java.lang.NullPointerException", + "java.lang.Number", + "java.lang.Object", + "java.lang.RuntimeException", + "java.lang.SecurityException", + "java.lang.Short", + "java.lang.StrictMath", + "java.lang.String", + "java.lang.Void", + "java.math.BigDecimal", + "java.math.BigInteger", + "java.net.URI", + "java.security.KeyFactory", + "java.security.KeyPair", + "java.security.KeyPairGenerator", + "java.security.KeyPairGenerator$*", + "java.security.MessageDigest", + "java.security.MessageDigest$Delegate", + "java.security.MessageDigest$Delegate$CloneableDelegate", + "java.security.NoSuchAlgorithmException", + "java.security.PrivateKey", + "java.security.PublicKey", + "java.security.cert.CertificateFactory", + "java.security.cert.X509Certificate", + "java.security.spec.MGF1ParameterSpec", + "java.security.spec.PKCS8EncodedKeySpec", + "java.security.spec.X509EncodedKeySpec", + "java.text.SimpleDateFormat", + "java.time.Clock", + "java.time.Clock$FixedClock", + "java.time.Clock$OffsetClock", + "java.time.Clock$SystemClock", + "java.time.Clock$TickClock", + "java.time.temporal.ChronoUnit", + "java.util.AbstractMap$*", + "java.util.ArrayList", + "java.util.ArrayList$Itr", + "java.util.Arrays", + "java.util.Collections", + "java.util.Collections$*", + "java.util.Date", + "java.util.HashMap", + "java.util.HashMap$Entry", + "java.util.HashMap$KeyIterator", + "java.util.HashMap$KeySet", + "java.util.HashMap$Node", + "java.util.HashSet", + "java.util.LinkedHashMap", + "java.util.LinkedHashMap$Entry", + "java.util.LinkedHashMap$LinkedEntryIterator", + "java.util.LinkedHashMap$LinkedEntrySet", + "java.util.LinkedHashMap$LinkedKeySet", + "java.util.LinkedHashSet", + "java.util.LinkedList", + "java.util.List", + "java.util.Locale", + "java.util.Map", + "java.util.TreeMap", + "java.util.TreeSet", + "java.util.UUID", + "javax.crypto.Cipher", + "javax.crypto.Mac", + "javax.crypto.spec.IvParameterSpec", + "javax.crypto.spec.OAEPParameterSpec", + "javax.crypto.spec.PSource", + "javax.crypto.spec.PSource$*", + "javax.crypto.spec.SecretKeySpec", + "javax.security.auth.callback.ChoiceCallback", + "javax.security.auth.callback.ConfirmationCallback", + "javax.security.auth.callback.LanguageCallback", + "javax.security.auth.callback.NameCallback", + "javax.security.auth.callback.PasswordCallback", + "javax.security.auth.callback.TextInputCallback", + "javax.security.auth.callback.TextOutputCallback", + "org.apache.groovy.json.internal.LazyMap", + "org.codehaus.groovy.runtime.GStringImpl", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "org.forgerock.guice.core.IdentityProvider", + "org.forgerock.guice.core.InjectorHolder", + "org.forgerock.http.Client", + "org.forgerock.http.Context", + "org.forgerock.http.Handler", + "org.forgerock.http.client.*", + "org.forgerock.http.context.RootContext", + "org.forgerock.http.header.*", + "org.forgerock.http.header.authorization.*", + "org.forgerock.http.protocol.*", + "org.forgerock.json.JsonValue", + "org.forgerock.json.jose.builders.EncryptedJwtBuilder", + "org.forgerock.json.jose.builders.EncryptedThenSignedJwtBuilder", + "org.forgerock.json.jose.builders.JweHeaderBuilder", + "org.forgerock.json.jose.builders.JwsHeaderBuilder", + "org.forgerock.json.jose.builders.JwtBuilderFactory", + "org.forgerock.json.jose.builders.SignedJwtBuilderImpl", + "org.forgerock.json.jose.builders.SignedThenEncryptedJwtBuilder", + "org.forgerock.json.jose.builders.SignedThenEncryptedJwtHeaderBuilder", + "org.forgerock.json.jose.jwe.EncryptedJwt", + "org.forgerock.json.jose.jwe.EncryptionMethod", + "org.forgerock.json.jose.jwe.JweAlgorithm", + "org.forgerock.json.jose.jwe.JweHeader", + "org.forgerock.json.jose.jwe.SignedThenEncryptedJwt", + "org.forgerock.json.jose.jwk.JWKSet", + "org.forgerock.json.jose.jwk.RsaJWK", + "org.forgerock.json.jose.jws.EncryptedThenSignedJwt", + "org.forgerock.json.jose.jws.JwsAlgorithm", + "org.forgerock.json.jose.jws.JwsHeader", + "org.forgerock.json.jose.jws.SignedEncryptedJwt", + "org.forgerock.json.jose.jws.SignedJwt", + "org.forgerock.json.jose.jws.SigningManager", + "org.forgerock.json.jose.jws.handlers.HmacSigningHandler", + "org.forgerock.json.jose.jws.handlers.RSASigningHandler", + "org.forgerock.json.jose.jws.handlers.SecretHmacSigningHandler", + "org.forgerock.json.jose.jws.handlers.SecretRSASigningHandler", + "org.forgerock.json.jose.jwt.JwtClaimsSet", + "org.forgerock.macaroons.Macaroon", + "org.forgerock.oauth.clients.oidc.Claim", + "org.forgerock.oauth2.core.GrantType", + "org.forgerock.oauth2.core.StatefulAccessToken", + "org.forgerock.oauth2.core.UserInfoClaims", + "org.forgerock.oauth2.core.exceptions.InvalidRequestException", + "org.forgerock.oauth2.core.tokenexchange.ExchangeableToken", + "org.forgerock.openam.auth.node.api.Action", + "org.forgerock.openam.auth.node.api.Action$ActionBuilder", + "org.forgerock.openam.auth.node.api.NodeState", + "org.forgerock.openam.auth.node.api.SuspendedTextOutputCallback", + "org.forgerock.openam.auth.nodes.IdentityProvider", + "org.forgerock.openam.auth.nodes.InjectorHolder", + "org.forgerock.openam.authentication.callbacks.AbstractValidatedCallback", + "org.forgerock.openam.authentication.callbacks.AttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.BooleanAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.ConsentMappingCallback", + "org.forgerock.openam.authentication.callbacks.DeviceProfileCallback", + "org.forgerock.openam.authentication.callbacks.IdPCallback", + "org.forgerock.openam.authentication.callbacks.KbaCreateCallback", + "org.forgerock.openam.authentication.callbacks.NumberAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.PollingWaitCallback", + "org.forgerock.openam.authentication.callbacks.SelectIdPCallback", + "org.forgerock.openam.authentication.callbacks.StringAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.TermsAndConditionsCallback", + "org.forgerock.openam.authentication.callbacks.ValidatedPasswordCallback", + "org.forgerock.openam.authentication.callbacks.ValidatedUsernameCallback", + "org.forgerock.openam.authentication.modules.scripted.*", + "org.forgerock.openam.core.rest.authn.callbackhandlers.*", + "org.forgerock.openam.core.rest.devices.deviceprint.DeviceIdDao", + "org.forgerock.openam.core.rest.devices.profile.DeviceProfilesDao", + "org.forgerock.openam.oauth2.OpenAMAccessToken", + "org.forgerock.openam.oauth2.token.grantset.Authorization$ModifiedAccessToken", + "org.forgerock.openam.oauth2.token.macaroon.MacaroonAccessToken", + "org.forgerock.openam.oauth2.token.stateless.StatelessAccessToken", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "org.forgerock.openam.scripting.api.ScriptedIdentity", + "org.forgerock.openam.scripting.api.ScriptedSession", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentity", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentityRepository", + "org.forgerock.openam.scripting.api.secrets.ScriptedSecrets", + "org.forgerock.openam.scripting.api.secrets.Secret", + "org.forgerock.openam.scripting.idrepo.ScriptIdentityRepository", + "org.forgerock.openam.shared.security.ThreadLocalSecureRandom", + "org.forgerock.openidconnect.Claim", + "org.forgerock.openidconnect.OpenIdConnectToken", + "org.forgerock.openidconnect.ssoprovider.OpenIdConnectSSOToken", + "org.forgerock.secrets.SecretBuilder", + "org.forgerock.secrets.keys.SigningKey", + "org.forgerock.secrets.keys.VerificationKey", + "org.forgerock.util.encode.Base64", + "org.forgerock.util.encode.Base64url", + "org.forgerock.util.encode.Hex", + "org.forgerock.util.promise.NeverThrowsException", + "org.forgerock.util.promise.Promise", + "org.forgerock.util.promise.PromiseImpl", + "org.mozilla.javascript.ConsString", + "org.mozilla.javascript.JavaScriptException", + "org.mozilla.javascript.WrappedException", + "sun.security.ec.ECPrivateKeyImpl", + "sun.security.rsa.RSAPrivateCrtKeyImpl", + "sun.security.rsa.RSAPublicKeyImpl", + "sun.security.x509.X500Name", + "sun.security.x509.X509CertImpl", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.util.Collections$UnmodifiableCollection$1", + "javax.crypto.SecretKeyFactory", + "javax.crypto.spec.PBEKeySpec", + "com.sun.crypto.provider.PBKDF2KeyImpl", + "java.util.concurrent.TimeUnit", + "java.util.concurrent.ExecutionException", + "java.util.concurrent.TimeoutException", + "java.security.spec.InvalidKeySpecException", + "org.forgerock.opendj.ldap.Rdn", + "org.forgerock.opendj.ldap.Dn", + "org.forgerock.openam.auth.nodes.VerifyTransactionsHelper", + ], + }, + "isHidden": false, + "languages": [ + "JAVASCRIPT", + "GROOVY", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/scripttype/DEVICE_MATCH_NODE.scripttype.json 1`] = ` +{ + "scripttype": { + "DEVICE_MATCH_NODE": { + "_id": "DEVICE_MATCH_NODE", + "_type": { + "_id": "contexts", + "collection": true, + "name": "scriptContext", + }, + "context": { + "_id": "DEVICE_MATCH_NODE", + "allowLists": [ + "org.forgerock.util.promise.PromiseImpl", + "org.forgerock.util.promise.Promises$*", + "java.lang.Object", + "java.lang.Byte", + "java.lang.Character", + "java.lang.Character$Subset", + "java.lang.Character$UnicodeBlock", + "java.lang.Float", + "java.lang.Long", + "java.lang.Math", + "java.lang.Number", + "java.lang.Short", + "java.lang.StrictMath", + "java.lang.Void", + "java.util.AbstractMap$*", + "java.util.ArrayList", + "java.util.Collections", + "java.util.concurrent.TimeUnit", + "java.util.Collections$*", + "java.util.HashSet", + "java.util.HashMap$KeyIterator", + "java.util.LinkedHashSet", + "java.util.LinkedList", + "java.util.TreeSet", + "java.security.KeyPair", + "java.security.KeyPairGenerator", + "java.security.KeyPairGenerator$*", + "java.security.PrivateKey", + "java.security.PublicKey", + "java.security.spec.X509EncodedKeySpec", + "java.security.spec.MGF1ParameterSpec", + "javax.crypto.SecretKeyFactory", + "javax.crypto.spec.OAEPParameterSpec", + "javax.crypto.spec.PBEKeySpec", + "javax.crypto.spec.PSource", + "javax.crypto.spec.PSource$*", + "org.forgerock.json.JsonValue", + "org.forgerock.util.promise.NeverThrowsException", + "java.util.concurrent.ExecutionException", + "java.util.concurrent.TimeoutException", + "org.forgerock.openam.core.rest.authn.callbackhandlers.*", + "com.sun.crypto.provider.PBKDF2KeyImpl", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.util.Collections$UnmodifiableCollection$1", + "sun.security.ec.ECPrivateKeyImpl", + "org.slf4j.Logger", + "com.sun.proxy.$*", + "java.util.Date", + "java.security.spec.InvalidKeySpecException", + "org.forgerock.openam.auth.nodes.VerifyTransactionsHelper", + ], + "bindings": [ + { + "elements": [ + { + "elementType": "method", + "name": "getDeviceProfiles", + "parameters": [ + { + "javaScriptType": "string", + "name": "username", + }, + { + "javaScriptType": "string", + "name": "realm", + }, + ], + "returnType": "array", + }, + { + "elementType": "method", + "name": "saveDeviceProfiles", + "parameters": [ + { + "javaScriptType": "string", + "name": "username", + }, + { + "javaScriptType": "string", + "name": "realm", + }, + { + "javaScriptType": "array", + "name": "deviceProfiles", + }, + ], + "returnType": "void", + }, + ], + "javaClass": "org.forgerock.openam.auth.nodes.script.DeviceProfilesDaoScriptWrapper", + "javaScriptType": "object", + "name": "deviceProfilesDao", + }, + { + "elements": [ + { + "elementType": "method", + "name": "send", + "parameters": [ + { + "javaScriptType": "string", + "name": "uri", + }, + { + "javaScriptType": "object", + "name": "requestOptions", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "send", + "parameters": [ + { + "javaScriptType": "string", + "name": "uri", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.scripting.wrappers.HttpClientScriptWrapper", + "javaScriptType": "object", + "name": "httpClient", + }, + { + "elements": [ + { + "elementType": "method", + "name": "getName", + "parameters": [], + "returnType": "string", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "isTraceEnabled", + "parameters": [], + "returnType": "boolean", + }, + { + "elementType": "method", + "name": "isDebugEnabled", + "parameters": [], + "returnType": "boolean", + }, + { + "elementType": "method", + "name": "isErrorEnabled", + "parameters": [], + "returnType": "boolean", + }, + { + "elementType": "method", + "name": "isInfoEnabled", + "parameters": [], + "returnType": "boolean", + }, + { + "elementType": "method", + "name": "isWarnEnabled", + "parameters": [], + "returnType": "boolean", + }, + ], + "javaClass": "org.forgerock.openam.scripting.logging.ScriptedLoggerWrapper", + "javaScriptType": "object", + "name": "logger", + }, + { + "elements": [], + "javaScriptType": "object", + "name": "requestParameters", + }, + { + "elements": [ + { + "elementType": "method", + "name": "getValidatedUsernameCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getHttpCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getX509CertificateCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getConsentMappingCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getDeviceProfileCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getKbaCreateCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getSelectIdPCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getTermsAndConditionsCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getTextInputCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getStringAttributeInputCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getNumberAttributeInputCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getBooleanAttributeInputCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getConfirmationCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getLanguageCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getIdpCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getValidatedPasswordCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getChoiceCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getNameCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getPasswordCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getHiddenValueCallbacks", + "parameters": [], + "returnType": "object", + }, + { + "elementType": "method", + "name": "isEmpty", + "parameters": [], + "returnType": "boolean", + }, + ], + "javaClass": "org.forgerock.openam.auth.nodes.script.ScriptedCallbacksWrapper", + "javaScriptType": "object", + "name": "callbacks", + }, + { + "elements": [ + { + "elementType": "method", + "name": "getGenericSecret", + "parameters": [ + { + "javaScriptType": "string", + "name": "secretId", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.scripting.api.secrets.ScriptedSecrets", + "javaScriptType": "object", + "name": "secrets", + }, + { + "elements": [ + { + "elementType": "method", + "name": "getIdentity", + "parameters": [ + { + "javaScriptType": "string", + "name": "userName", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.scripting.api.identity.ScriptedIdentityRepositoryScriptWrapper", + "javaScriptType": "object", + "name": "idRepository", + }, + { + "elements": [], + "javaScriptType": "object", + "name": "requestHeaders", + }, + { + "elements": [ + { + "elementType": "method", + "name": "generateJwt", + "parameters": [ + { + "javaScriptType": "object", + "name": "jwtData", + }, + ], + "returnType": "string", + }, + ], + "javaClass": "org.forgerock.openam.auth.nodes.script.JwtAssertionScriptWrapper", + "javaScriptType": "object", + "name": "jwtAssertion", + }, + { + "elements": [ + { + "elementType": "method", + "name": "remove", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "get", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "keys", + "parameters": [], + "returnType": "object", + }, + { + "elementType": "method", + "name": "getObject", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "isDefined", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + ], + "returnType": "boolean", + }, + { + "elementType": "method", + "name": "putShared", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + { + "javaScriptType": "object", + "name": "value", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "mergeShared", + "parameters": [ + { + "javaScriptType": "object", + "name": "object", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "mergeTransient", + "parameters": [ + { + "javaScriptType": "object", + "name": "object", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "putTransient", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + { + "javaScriptType": "object", + "name": "value", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.auth.node.api.NodeStateScriptWrapper", + "javaScriptType": "object", + "name": "nodeState", + }, + { + "javaScriptType": "boolean", + "name": "resumedFromSuspend", + }, + { + "elements": [ + { + "elementType": "field", + "elements": [ + { + "elementType": "method", + "name": "randomUUID", + "parameters": [], + "returnType": "string", + }, + { + "elementType": "method", + "name": "getRandomValues", + "parameters": [ + { + "javaScriptType": "array", + "name": "array", + }, + ], + "returnType": "array", + }, + ], + "javaClass": "org.forgerock.openam.scripting.bindings.ScriptCryptoService", + "javaScriptType": "object", + "name": "crypto", + }, + { + "elementType": "field", + "elements": [ + { + "elementType": "method", + "name": "decode", + "parameters": [ + { + "javaScriptType": "string", + "name": "toDecode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "encode", + "parameters": [ + { + "javaScriptType": "string", + "name": "toEncode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "btoa", + "parameters": [ + { + "javaScriptType": "string", + "name": "toEncode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "atob", + "parameters": [ + { + "javaScriptType": "string", + "name": "toDecode", + }, + ], + "returnType": "string", + }, + ], + "javaClass": "org.forgerock.openam.scripting.bindings.ScriptBase64Service", + "javaScriptType": "object", + "name": "base64", + }, + { + "elementType": "field", + "elements": [ + { + "elementType": "method", + "name": "decode", + "parameters": [ + { + "javaScriptType": "string", + "name": "toDecode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "encode", + "parameters": [ + { + "javaScriptType": "string", + "name": "toEncode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "btoa", + "parameters": [ + { + "javaScriptType": "string", + "name": "toEncode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "atob", + "parameters": [ + { + "javaScriptType": "string", + "name": "toDecode", + }, + ], + "returnType": "string", + }, + ], + "javaClass": "org.forgerock.openam.scripting.bindings.ScriptBase64UrlService", + "javaScriptType": "object", + "name": "base64url", + }, + ], + "javaClass": "org.forgerock.openam.scripting.bindings.ScriptUtilityService", + "javaScriptType": "object", + "name": "utils", + }, + { + "elements": [ + { + "elementType": "method", + "name": "withIdentifiedUser", + "parameters": [ + { + "javaScriptType": "string", + "name": "username", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "withIdentifiedAgent", + "parameters": [ + { + "javaScriptType": "string", + "name": "agentName", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "suspend", + "parameters": [ + { + "javaScriptType": "string", + "name": "callbackTextFormat", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "suspend", + "parameters": [ + { + "javaScriptType": "string", + "name": "callbackTextFormat", + }, + { + "javaScriptType": "object", + "name": "additionalLogic", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "goTo", + "parameters": [ + { + "javaScriptType": "string", + "name": "outcome", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "removeSessionProperty", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "putSessionProperty", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + { + "javaScriptType": "string", + "name": "value", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "withHeader", + "parameters": [ + { + "javaScriptType": "string", + "name": "header", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "withDescription", + "parameters": [ + { + "javaScriptType": "string", + "name": "description", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "withStage", + "parameters": [ + { + "javaScriptType": "string", + "name": "stage", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "withErrorMessage", + "parameters": [ + { + "javaScriptType": "string", + "name": "errorMessage", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "withLockoutMessage", + "parameters": [ + { + "javaScriptType": "string", + "name": "lockoutMessage", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.auth.nodes.script.ActionWrapper", + "javaScriptType": "object", + "name": "action", + }, + { + "javaScriptType": "string", + "name": "scriptName", + }, + { + "javaScriptType": "string", + "name": "realm", + }, + { + "elements": [ + { + "elementType": "method", + "name": "validateJwtClaims", + "parameters": [ + { + "javaScriptType": "object", + "name": "jwtData", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.auth.nodes.script.JwtValidatorScriptWrapper", + "javaScriptType": "object", + "name": "jwtValidator", + }, + { + "elements": [ + { + "elementType": "method", + "name": "languageCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "language", + }, + { + "javaScriptType": "string", + "name": "country", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "idPCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "provider", + }, + { + "javaScriptType": "string", + "name": "clientId", + }, + { + "javaScriptType": "string", + "name": "redirectUri", + }, + { + "javaScriptType": "array", + "name": "scope", + }, + { + "javaScriptType": "string", + "name": "nonce", + }, + { + "javaScriptType": "string", + "name": "request", + }, + { + "javaScriptType": "string", + "name": "requestUri", + }, + { + "javaScriptType": "array", + "name": "acrValues", + }, + { + "javaScriptType": "boolean", + "name": "requestNativeAppForUserInfo", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "idPCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "provider", + }, + { + "javaScriptType": "string", + "name": "clientId", + }, + { + "javaScriptType": "string", + "name": "redirectUri", + }, + { + "javaScriptType": "array", + "name": "scope", + }, + { + "javaScriptType": "string", + "name": "nonce", + }, + { + "javaScriptType": "string", + "name": "request", + }, + { + "javaScriptType": "string", + "name": "requestUri", + }, + { + "javaScriptType": "array", + "name": "acrValues", + }, + { + "javaScriptType": "boolean", + "name": "requestNativeAppForUserInfo", + }, + { + "javaScriptType": "string", + "name": "token", + }, + { + "javaScriptType": "string", + "name": "tokenType", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "stringAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "string", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "stringAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "string", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + { + "javaScriptType": "array", + "name": "failedPolicies", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "stringAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "string", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "stringAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "string", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + { + "javaScriptType": "array", + "name": "failedPolicies", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "httpCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "authorizationHeader", + }, + { + "javaScriptType": "string", + "name": "negotiationHeader", + }, + { + "javaScriptType": "string", + "name": "errorCode", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "httpCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "authRHeader", + }, + { + "javaScriptType": "string", + "name": "negoName", + }, + { + "javaScriptType": "string", + "name": "negoValue", + }, + { + "javaScriptType": "number", + "name": "errorCode", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "x509CertificateCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "object", + "name": "certificate", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "x509CertificateCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "x509CertificateCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "object", + "name": "certificate", + }, + { + "javaScriptType": "boolean", + "name": "requestSignature", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "consentMappingCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "displayName", + }, + { + "javaScriptType": "string", + "name": "icon", + }, + { + "javaScriptType": "string", + "name": "accessLevel", + }, + { + "javaScriptType": "array", + "name": "titles", + }, + { + "javaScriptType": "string", + "name": "message", + }, + { + "javaScriptType": "boolean", + "name": "isRequired", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "consentMappingCallback", + "parameters": [ + { + "javaScriptType": "object", + "name": "config", + }, + { + "javaScriptType": "string", + "name": "message", + }, + { + "javaScriptType": "boolean", + "name": "isRequired", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "deviceProfileCallback", + "parameters": [ + { + "javaScriptType": "boolean", + "name": "metadata", + }, + { + "javaScriptType": "boolean", + "name": "location", + }, + { + "javaScriptType": "string", + "name": "message", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "kbaCreateCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "array", + "name": "predefinedQuestions", + }, + { + "javaScriptType": "boolean", + "name": "allowUserDefinedQuestions", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "selectIdPCallback", + "parameters": [ + { + "javaScriptType": "object", + "name": "providers", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "termsAndConditionsCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "version", + }, + { + "javaScriptType": "string", + "name": "terms", + }, + { + "javaScriptType": "string", + "name": "createDate", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "suspendedTextOutputCallback", + "parameters": [ + { + "javaScriptType": "number", + "name": "messageType", + }, + { + "javaScriptType": "string", + "name": "message", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "textInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "textInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "string", + "name": "defaultText", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "scriptTextOutputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "message", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "metadataCallback", + "parameters": [ + { + "javaScriptType": "object", + "name": "outputValue", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "numberAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "number", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + { + "javaScriptType": "array", + "name": "failedPolicies", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "numberAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "number", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "numberAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "number", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + { + "javaScriptType": "array", + "name": "failedPolicies", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "numberAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "number", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "booleanAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "boolean", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + { + "javaScriptType": "array", + "name": "failedPolicies", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "booleanAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "boolean", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + { + "javaScriptType": "array", + "name": "failedPolicies", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "booleanAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "boolean", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "booleanAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "boolean", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "confirmationCallback", + "parameters": [ + { + "javaScriptType": "number", + "name": "messageType", + }, + { + "javaScriptType": "number", + "name": "optionType", + }, + { + "javaScriptType": "number", + "name": "defaultOption", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "confirmationCallback", + "parameters": [ + { + "javaScriptType": "number", + "name": "messageType", + }, + { + "javaScriptType": "array", + "name": "options", + }, + { + "javaScriptType": "number", + "name": "defaultOption", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "confirmationCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "number", + "name": "messageType", + }, + { + "javaScriptType": "number", + "name": "optionType", + }, + { + "javaScriptType": "number", + "name": "defaultOption", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "confirmationCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "number", + "name": "messageType", + }, + { + "javaScriptType": "array", + "name": "options", + }, + { + "javaScriptType": "number", + "name": "defaultOption", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "pollingWaitCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "waitTime", + }, + { + "javaScriptType": "string", + "name": "message", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "choiceCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "array", + "name": "choices", + }, + { + "javaScriptType": "number", + "name": "defaultChoice", + }, + { + "javaScriptType": "boolean", + "name": "multipleSelectionsAllowed", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "redirectCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "redirectUrl", + }, + { + "javaScriptType": "object", + "name": "redirectData", + }, + { + "javaScriptType": "string", + "name": "method", + }, + { + "javaScriptType": "boolean", + "name": "setTrackingCookie", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "redirectCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "redirectUrl", + }, + { + "javaScriptType": "object", + "name": "redirectData", + }, + { + "javaScriptType": "string", + "name": "method", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "redirectCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "redirectUrl", + }, + { + "javaScriptType": "object", + "name": "redirectData", + }, + { + "javaScriptType": "string", + "name": "method", + }, + { + "javaScriptType": "string", + "name": "statusParameter", + }, + { + "javaScriptType": "string", + "name": "redirectBackUrlCookie", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "redirectCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "redirectUrl", + }, + { + "javaScriptType": "object", + "name": "redirectData", + }, + { + "javaScriptType": "string", + "name": "method", + }, + { + "javaScriptType": "string", + "name": "statusParameter", + }, + { + "javaScriptType": "string", + "name": "redirectBackUrlCookie", + }, + { + "javaScriptType": "boolean", + "name": "setTrackingCookie", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "validatedUsernameCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + { + "javaScriptType": "array", + "name": "failedPolicies", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "validatedUsernameCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "validatedPasswordCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "boolean", + "name": "echoOn", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "validatedPasswordCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "boolean", + "name": "echoOn", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + { + "javaScriptType": "array", + "name": "failedPolicies", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "textOutputCallback", + "parameters": [ + { + "javaScriptType": "number", + "name": "messageType", + }, + { + "javaScriptType": "string", + "name": "message", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "hiddenValueCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "id", + }, + { + "javaScriptType": "string", + "name": "value", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "nameCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "nameCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "string", + "name": "defaultName", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "passwordCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "boolean", + "name": "echoOn", + }, + ], + "returnType": "void", + }, + ], + "javaClass": "org.forgerock.openam.auth.nodes.script.ScriptedCallbacksBuilder", + "javaScriptType": "object", + "name": "callbacksBuilder", + }, + { + "elements": [ + { + "elementType": "method", + "name": "update", + "parameters": [ + { + "javaScriptType": "string", + "name": "id", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "value", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "update", + "parameters": [ + { + "javaScriptType": "string", + "name": "id", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "value", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "update", + "parameters": [ + { + "javaScriptType": "string", + "name": "id", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "value", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "read", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "read", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "read", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "delete", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "delete", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "delete", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "action", + "parameters": [ + { + "javaScriptType": "string", + "name": "resource", + }, + { + "javaScriptType": "string", + "name": "actionName", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "action", + "parameters": [ + { + "javaScriptType": "string", + "name": "resource", + }, + { + "javaScriptType": "string", + "name": "actionName", + }, + { + "javaScriptType": "object", + "name": "content", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "action", + "parameters": [ + { + "javaScriptType": "string", + "name": "resource", + }, + { + "javaScriptType": "string", + "name": "actionName", + }, + { + "javaScriptType": "object", + "name": "content", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "action", + "parameters": [ + { + "javaScriptType": "string", + "name": "resource", + }, + { + "javaScriptType": "string", + "name": "actionName", + }, + { + "javaScriptType": "object", + "name": "content", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "query", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "query", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "create", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "newResourceId", + }, + { + "javaScriptType": "object", + "name": "content", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "create", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "newResourceId", + }, + { + "javaScriptType": "object", + "name": "content", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "create", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "newResourceId", + }, + { + "javaScriptType": "object", + "name": "content", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "patch", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "array", + "name": "patch", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "patch", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "array", + "name": "patch", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "patch", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "array", + "name": "patch", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.scripting.wrappers.IdmIntegrationServiceScriptWrapper", + "javaScriptType": "object", + "name": "openidm", + }, + { + "elements": [], + "javaScriptType": "object", + "name": "requestCookies", + }, + { + "javaScriptType": "string", + "name": "cookieName", + }, + ], + "evaluatorVersions": { + "JAVASCRIPT": [ + "2.0", + ], + }, + }, + "defaultScript": "11e1a3c0-038b-4c16-956a-6c9d89328d00", + "engineConfiguration": { + "_id": "engineConfiguration", + "_type": { + "_id": "engineConfiguration", + "collection": false, + "name": "Scripting engine configuration", + }, + "blackList": [ + "java.lang.Class", + "java.lang.Thread", + "java.lang.invoke.*", + "java.lang.reflect.*", + "java.security.AccessController", + ], + "coreThreads": { + "$int": "&{device.match.node.script.context.core.threads|10}", + }, + "idleTimeout": 60, + "maxThreads": { + "$int": "&{device.match.node.script.context.max.threads|50}", + }, + "propertyNamePrefix": "esv.", + "queueSize": { + "$int": "&{device.match.node.script.context.queue.size|10}", + }, + "serverTimeout": 0, + "useSecurityManager": true, + "whiteList": [ + "jdk.proxy*", + "org.mozilla.javascript.WrappedException", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "java.util.List", + "java.util.Map", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.util.Collections$UnmodifiableCollection$1", + "org.mozilla.javascript.JavaScriptException", + ], + }, + "isHidden": false, + "languages": [ + "JAVASCRIPT", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/scripttype/LIBRARY.scripttype.json 1`] = ` +{ + "scripttype": { + "LIBRARY": { + "_id": "LIBRARY", + "_type": { + "_id": "contexts", + "collection": true, + "name": "scriptContext", + }, + "context": { + "_id": "LIBRARY", + "allowLists": [ + "org.forgerock.util.promise.PromiseImpl", + "org.forgerock.util.promise.Promises$*", + "java.lang.Object", + ], + "bindings": [ + { + "elements": [ + { + "elementType": "method", + "name": "send", + "parameters": [ + { + "javaScriptType": "string", + "name": "uri", + }, + { + "javaScriptType": "object", + "name": "requestOptions", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "send", + "parameters": [ + { + "javaScriptType": "string", + "name": "uri", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.scripting.wrappers.HttpClientScriptWrapper", + "javaScriptType": "object", + "name": "httpClient", + }, + { + "elements": [ + { + "elementType": "field", + "elements": [ + { + "elementType": "method", + "name": "randomUUID", + "parameters": [], + "returnType": "string", + }, + { + "elementType": "method", + "name": "getRandomValues", + "parameters": [ + { + "javaScriptType": "array", + "name": "array", + }, + ], + "returnType": "array", + }, + ], + "javaClass": "org.forgerock.openam.scripting.bindings.ScriptCryptoService", + "javaScriptType": "object", + "name": "crypto", + }, + { + "elementType": "field", + "elements": [ + { + "elementType": "method", + "name": "decode", + "parameters": [ + { + "javaScriptType": "string", + "name": "toDecode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "encode", + "parameters": [ + { + "javaScriptType": "string", + "name": "toEncode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "btoa", + "parameters": [ + { + "javaScriptType": "string", + "name": "toEncode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "atob", + "parameters": [ + { + "javaScriptType": "string", + "name": "toDecode", + }, + ], + "returnType": "string", + }, + ], + "javaClass": "org.forgerock.openam.scripting.bindings.ScriptBase64Service", + "javaScriptType": "object", + "name": "base64", + }, + { + "elementType": "field", + "elements": [ + { + "elementType": "method", + "name": "decode", + "parameters": [ + { + "javaScriptType": "string", + "name": "toDecode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "encode", + "parameters": [ + { + "javaScriptType": "string", + "name": "toEncode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "btoa", + "parameters": [ + { + "javaScriptType": "string", + "name": "toEncode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "atob", + "parameters": [ + { + "javaScriptType": "string", + "name": "toDecode", + }, + ], + "returnType": "string", + }, + ], + "javaClass": "org.forgerock.openam.scripting.bindings.ScriptBase64UrlService", + "javaScriptType": "object", + "name": "base64url", + }, + ], + "javaClass": "org.forgerock.openam.scripting.bindings.ScriptUtilityService", + "javaScriptType": "object", + "name": "utils", + }, + { + "elements": [ + { + "elementType": "method", + "name": "getName", + "parameters": [], + "returnType": "string", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "isTraceEnabled", + "parameters": [], + "returnType": "boolean", + }, + { + "elementType": "method", + "name": "isDebugEnabled", + "parameters": [], + "returnType": "boolean", + }, + { + "elementType": "method", + "name": "isErrorEnabled", + "parameters": [], + "returnType": "boolean", + }, + { + "elementType": "method", + "name": "isInfoEnabled", + "parameters": [], + "returnType": "boolean", + }, + { + "elementType": "method", + "name": "isWarnEnabled", + "parameters": [], + "returnType": "boolean", + }, + ], + "javaClass": "org.forgerock.openam.scripting.logging.ScriptedLoggerWrapper", + "javaScriptType": "object", + "name": "logger", + }, + { + "javaScriptType": "string", + "name": "scriptName", + }, + { + "javaScriptType": "string", + "name": "realm", + }, + { + "elements": [ + { + "elementType": "method", + "name": "update", + "parameters": [ + { + "javaScriptType": "string", + "name": "id", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "value", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "update", + "parameters": [ + { + "javaScriptType": "string", + "name": "id", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "value", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "update", + "parameters": [ + { + "javaScriptType": "string", + "name": "id", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "value", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "read", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "read", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "read", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "delete", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "delete", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "delete", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "action", + "parameters": [ + { + "javaScriptType": "string", + "name": "resource", + }, + { + "javaScriptType": "string", + "name": "actionName", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "action", + "parameters": [ + { + "javaScriptType": "string", + "name": "resource", + }, + { + "javaScriptType": "string", + "name": "actionName", + }, + { + "javaScriptType": "object", + "name": "content", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "action", + "parameters": [ + { + "javaScriptType": "string", + "name": "resource", + }, + { + "javaScriptType": "string", + "name": "actionName", + }, + { + "javaScriptType": "object", + "name": "content", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "action", + "parameters": [ + { + "javaScriptType": "string", + "name": "resource", + }, + { + "javaScriptType": "string", + "name": "actionName", + }, + { + "javaScriptType": "object", + "name": "content", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "query", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "query", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "create", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "newResourceId", + }, + { + "javaScriptType": "object", + "name": "content", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "create", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "newResourceId", + }, + { + "javaScriptType": "object", + "name": "content", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "create", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "newResourceId", + }, + { + "javaScriptType": "object", + "name": "content", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "patch", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "array", + "name": "patch", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "patch", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "array", + "name": "patch", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "patch", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "array", + "name": "patch", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.scripting.wrappers.IdmIntegrationServiceScriptWrapper", + "javaScriptType": "object", + "name": "openidm", + }, + { + "elements": [ + { + "elementType": "method", + "name": "getGenericSecret", + "parameters": [ + { + "javaScriptType": "string", + "name": "secretId", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.scripting.api.secrets.ScriptedSecrets", + "javaScriptType": "object", + "name": "secrets", + }, + { + "javaScriptType": "string", + "name": "cookieName", + }, + ], + "evaluatorVersions": { + "JAVASCRIPT": [ + "2.0", + ], + }, + }, + "defaultScript": "[Empty]", + "engineConfiguration": { + "_id": "engineConfiguration", + "_type": { + "_id": "engineConfiguration", + "collection": false, + "name": "Scripting engine configuration", + }, + "blackList": [ + "java.lang.Class", + "java.security.AccessController", + "java.lang.reflect.*", + ], + "coreThreads": 10, + "idleTimeout": 60, + "maxThreads": 50, + "propertyNamePrefix": "script", + "queueSize": 10, + "serverTimeout": 0, + "useSecurityManager": true, + "whiteList": [ + "java.lang.Float", + "org.forgerock.http.protocol.Header", + "java.lang.Integer", + "org.forgerock.http.Client", + "java.lang.Character$UnicodeBlock", + "java.lang.Character", + "java.lang.Long", + "java.lang.Short", + "java.util.Map", + "org.forgerock.http.client.*", + "java.lang.Math", + "org.forgerock.opendj.ldap.Dn", + "java.lang.Byte", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "java.lang.StrictMath", + "org.forgerock.util.promise.PromiseImpl", + "org.forgerock.http.Context", + "java.lang.Void", + "org.codehaus.groovy.runtime.GStringImpl", + "groovy.json.JsonSlurper", + "org.forgerock.http.protocol.Request", + "org.forgerock.http.protocol.Entity", + "org.forgerock.http.context.RootContext", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentity", + "java.util.List", + "org.forgerock.http.protocol.RequestCookies", + "org.forgerock.http.protocol.Responses", + "org.forgerock.util.promise.Promise", + "java.util.HashMap$KeyIterator", + "com.sun.identity.shared.debug.Debug", + "java.lang.Double", + "org.forgerock.http.protocol.Headers", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "org.forgerock.opendj.ldap.Rdn", + "org.forgerock.http.protocol.Status", + "java.util.HashMap", + "java.lang.Character$Subset", + "java.util.TreeSet", + "java.util.ArrayList", + "java.util.HashSet", + "java.util.LinkedHashMap", + "org.forgerock.http.protocol.ResponseException", + "java.util.Collections$UnmodifiableRandomAccessList", + "org.forgerock.http.protocol.Message", + "java.lang.Boolean", + "java.lang.String", + "java.lang.Number", + "java.util.LinkedList", + "java.util.LinkedHashSet", + "org.forgerock.http.protocol.Response", + "org.forgerock.util.promise.NeverThrowsException", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "java.util.TreeMap", + "java.util.Collections$EmptyList", + "org.forgerock.openam.scripting.api.ScriptedSession", + "java.util.Collections$UnmodifiableCollection$1", + "org.forgerock.http.Handler", + "java.lang.Object", + "org.forgerock.http.protocol.Form", + ], + }, + "isHidden": false, + "languages": [ + "JAVASCRIPT", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/scripttype/NODE_DESIGNER.scripttype.json 1`] = ` +{ + "scripttype": { + "NODE_DESIGNER": { + "_id": "NODE_DESIGNER", + "_type": { + "_id": "contexts", + "collection": true, + "name": "scriptContext", + }, + "context": { + "_id": "NODE_DESIGNER", + "allowLists": [ + "org.forgerock.util.promise.PromiseImpl", + "org.forgerock.util.promise.Promises$*", + "java.lang.Object", + "java.lang.Byte", + "java.lang.Character", + "java.lang.Character$Subset", + "java.lang.Character$UnicodeBlock", + "java.lang.Float", + "java.lang.Long", + "java.lang.Math", + "java.lang.Number", + "java.lang.Short", + "java.lang.StrictMath", + "java.lang.Void", + "java.util.AbstractMap$*", + "java.util.ArrayList", + "java.util.Collections", + "java.util.concurrent.TimeUnit", + "java.util.Collections$*", + "java.util.HashSet", + "java.util.HashMap$KeyIterator", + "java.util.LinkedHashSet", + "java.util.LinkedList", + "java.util.TreeSet", + "java.security.KeyPair", + "java.security.KeyPairGenerator", + "java.security.KeyPairGenerator$*", + "java.security.PrivateKey", + "java.security.PublicKey", + "java.security.spec.X509EncodedKeySpec", + "java.security.spec.MGF1ParameterSpec", + "javax.crypto.SecretKeyFactory", + "javax.crypto.spec.OAEPParameterSpec", + "javax.crypto.spec.PBEKeySpec", + "javax.crypto.spec.PSource", + "javax.crypto.spec.PSource$*", + "org.forgerock.json.JsonValue", + "org.forgerock.util.promise.NeverThrowsException", + "java.util.concurrent.ExecutionException", + "java.util.concurrent.TimeoutException", + "org.forgerock.openam.core.rest.authn.callbackhandlers.*", + "com.sun.crypto.provider.PBKDF2KeyImpl", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.util.Collections$UnmodifiableCollection$1", + "sun.security.ec.ECPrivateKeyImpl", + "ch.qos.logback.classic.Logger", + "com.sun.proxy.$*", + "java.util.Date", + "java.security.spec.InvalidKeySpecException", + ], + "bindings": [ + { + "elements": [ + { + "elementType": "method", + "name": "send", + "parameters": [ + { + "javaScriptType": "string", + "name": "uri", + }, + { + "javaScriptType": "object", + "name": "requestOptions", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "send", + "parameters": [ + { + "javaScriptType": "string", + "name": "uri", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.scripting.wrappers.HttpClientScriptWrapper", + "javaScriptType": "object", + "name": "httpClient", + }, + { + "elements": [ + { + "elementType": "method", + "name": "getName", + "parameters": [], + "returnType": "string", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "isTraceEnabled", + "parameters": [], + "returnType": "boolean", + }, + { + "elementType": "method", + "name": "isDebugEnabled", + "parameters": [], + "returnType": "boolean", + }, + { + "elementType": "method", + "name": "isErrorEnabled", + "parameters": [], + "returnType": "boolean", + }, + { + "elementType": "method", + "name": "isInfoEnabled", + "parameters": [], + "returnType": "boolean", + }, + { + "elementType": "method", + "name": "isWarnEnabled", + "parameters": [], + "returnType": "boolean", + }, + ], + "javaClass": "org.forgerock.openam.scripting.logging.ScriptedLoggerWrapper", + "javaScriptType": "object", + "name": "logger", + }, + { + "elements": [], + "javaScriptType": "object", + "name": "requestParameters", + }, + { + "elements": [ + { + "elementType": "method", + "name": "getValidatedUsernameCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getHttpCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getX509CertificateCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getConsentMappingCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getDeviceProfileCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getKbaCreateCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getSelectIdPCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getTermsAndConditionsCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getTextInputCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getStringAttributeInputCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getNumberAttributeInputCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getBooleanAttributeInputCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getConfirmationCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getLanguageCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getIdpCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getValidatedPasswordCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getChoiceCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getNameCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getPasswordCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getHiddenValueCallbacks", + "parameters": [], + "returnType": "object", + }, + { + "elementType": "method", + "name": "isEmpty", + "parameters": [], + "returnType": "boolean", + }, + ], + "javaClass": "org.forgerock.openam.auth.nodes.script.ScriptedCallbacksWrapper", + "javaScriptType": "object", + "name": "callbacks", + }, + { + "elements": [ + { + "elementType": "method", + "name": "getGenericSecret", + "parameters": [ + { + "javaScriptType": "string", + "name": "secretId", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.scripting.api.secrets.ScriptedSecrets", + "javaScriptType": "object", + "name": "secrets", + }, + { + "elements": [ + { + "elementType": "method", + "name": "getIdentity", + "parameters": [ + { + "javaScriptType": "string", + "name": "userName", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.scripting.api.identity.ScriptedIdentityRepositoryScriptWrapper", + "javaScriptType": "object", + "name": "idRepository", + }, + { + "elements": [], + "javaScriptType": "object", + "name": "requestHeaders", + }, + { + "elements": [ + { + "elementType": "method", + "name": "generateJwt", + "parameters": [ + { + "javaScriptType": "object", + "name": "jwtData", + }, + ], + "returnType": "string", + }, + ], + "javaClass": "org.forgerock.openam.auth.nodes.script.JwtAssertionScriptWrapper", + "javaScriptType": "object", + "name": "jwtAssertion", + }, + { + "elements": [ + { + "elementType": "method", + "name": "remove", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "get", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "keys", + "parameters": [], + "returnType": "object", + }, + { + "elementType": "method", + "name": "getObject", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "isDefined", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + ], + "returnType": "boolean", + }, + { + "elementType": "method", + "name": "putShared", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + { + "javaScriptType": "object", + "name": "value", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "mergeShared", + "parameters": [ + { + "javaScriptType": "object", + "name": "object", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "mergeTransient", + "parameters": [ + { + "javaScriptType": "object", + "name": "object", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "putTransient", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + { + "javaScriptType": "object", + "name": "value", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.auth.node.api.NodeStateScriptWrapper", + "javaScriptType": "object", + "name": "nodeState", + }, + { + "javaScriptType": "boolean", + "name": "resumedFromSuspend", + }, + { + "elements": [ + { + "elementType": "field", + "elements": [ + { + "elementType": "method", + "name": "randomUUID", + "parameters": [], + "returnType": "string", + }, + { + "elementType": "method", + "name": "getRandomValues", + "parameters": [ + { + "javaScriptType": "array", + "name": "array", + }, + ], + "returnType": "array", + }, + ], + "javaClass": "org.forgerock.openam.scripting.bindings.ScriptCryptoService", + "javaScriptType": "object", + "name": "crypto", + }, + { + "elementType": "field", + "elements": [ + { + "elementType": "method", + "name": "decode", + "parameters": [ + { + "javaScriptType": "string", + "name": "toDecode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "encode", + "parameters": [ + { + "javaScriptType": "string", + "name": "toEncode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "btoa", + "parameters": [ + { + "javaScriptType": "string", + "name": "toEncode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "atob", + "parameters": [ + { + "javaScriptType": "string", + "name": "toDecode", + }, + ], + "returnType": "string", + }, + ], + "javaClass": "org.forgerock.openam.scripting.bindings.ScriptBase64Service", + "javaScriptType": "object", + "name": "base64", + }, + { + "elementType": "field", + "elements": [ + { + "elementType": "method", + "name": "decode", + "parameters": [ + { + "javaScriptType": "string", + "name": "toDecode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "encode", + "parameters": [ + { + "javaScriptType": "string", + "name": "toEncode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "btoa", + "parameters": [ + { + "javaScriptType": "string", + "name": "toEncode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "atob", + "parameters": [ + { + "javaScriptType": "string", + "name": "toDecode", + }, + ], + "returnType": "string", + }, + ], + "javaClass": "org.forgerock.openam.scripting.bindings.ScriptBase64UrlService", + "javaScriptType": "object", + "name": "base64url", + }, + ], + "javaClass": "org.forgerock.openam.scripting.bindings.ScriptUtilityService", + "javaScriptType": "object", + "name": "utils", + }, + { + "elements": [], + "javaScriptType": "object", + "name": "existingSession", + }, + { + "elements": [ + { + "elementType": "method", + "name": "withIdentifiedUser", + "parameters": [ + { + "javaScriptType": "string", + "name": "username", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "withIdentifiedAgent", + "parameters": [ + { + "javaScriptType": "string", + "name": "agentName", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "suspend", + "parameters": [ + { + "javaScriptType": "string", + "name": "callbackTextFormat", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "suspend", + "parameters": [ + { + "javaScriptType": "string", + "name": "callbackTextFormat", + }, + { + "javaScriptType": "object", + "name": "additionalLogic", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "goTo", + "parameters": [ + { + "javaScriptType": "string", + "name": "outcome", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "removeSessionProperty", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "putSessionProperty", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + { + "javaScriptType": "string", + "name": "value", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "withHeader", + "parameters": [ + { + "javaScriptType": "string", + "name": "header", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "withDescription", + "parameters": [ + { + "javaScriptType": "string", + "name": "description", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "withStage", + "parameters": [ + { + "javaScriptType": "string", + "name": "stage", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "withErrorMessage", + "parameters": [ + { + "javaScriptType": "string", + "name": "errorMessage", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "withLockoutMessage", + "parameters": [ + { + "javaScriptType": "string", + "name": "lockoutMessage", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.auth.nodes.script.ActionWrapper", + "javaScriptType": "object", + "name": "action", + }, + { + "javaScriptType": "string", + "name": "scriptName", + }, + { + "elements": [], + "javaScriptType": "object", + "name": "attributes", + }, + { + "javaScriptType": "string", + "name": "realm", + }, + { + "elements": [ + { + "elementType": "method", + "name": "validateJwtClaims", + "parameters": [ + { + "javaScriptType": "object", + "name": "jwtData", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.auth.nodes.script.JwtValidatorScriptWrapper", + "javaScriptType": "object", + "name": "jwtValidator", + }, + { + "elements": [ + { + "elementType": "method", + "name": "languageCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "language", + }, + { + "javaScriptType": "string", + "name": "country", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "idPCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "provider", + }, + { + "javaScriptType": "string", + "name": "clientId", + }, + { + "javaScriptType": "string", + "name": "redirectUri", + }, + { + "javaScriptType": "array", + "name": "scope", + }, + { + "javaScriptType": "string", + "name": "nonce", + }, + { + "javaScriptType": "string", + "name": "request", + }, + { + "javaScriptType": "string", + "name": "requestUri", + }, + { + "javaScriptType": "array", + "name": "acrValues", + }, + { + "javaScriptType": "boolean", + "name": "requestNativeAppForUserInfo", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "idPCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "provider", + }, + { + "javaScriptType": "string", + "name": "clientId", + }, + { + "javaScriptType": "string", + "name": "redirectUri", + }, + { + "javaScriptType": "array", + "name": "scope", + }, + { + "javaScriptType": "string", + "name": "nonce", + }, + { + "javaScriptType": "string", + "name": "request", + }, + { + "javaScriptType": "string", + "name": "requestUri", + }, + { + "javaScriptType": "array", + "name": "acrValues", + }, + { + "javaScriptType": "boolean", + "name": "requestNativeAppForUserInfo", + }, + { + "javaScriptType": "string", + "name": "token", + }, + { + "javaScriptType": "string", + "name": "tokenType", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "stringAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "string", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "stringAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "string", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + { + "javaScriptType": "array", + "name": "failedPolicies", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "stringAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "string", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "stringAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "string", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + { + "javaScriptType": "array", + "name": "failedPolicies", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "httpCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "authorizationHeader", + }, + { + "javaScriptType": "string", + "name": "negotiationHeader", + }, + { + "javaScriptType": "string", + "name": "errorCode", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "httpCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "authRHeader", + }, + { + "javaScriptType": "string", + "name": "negoName", + }, + { + "javaScriptType": "string", + "name": "negoValue", + }, + { + "javaScriptType": "number", + "name": "errorCode", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "x509CertificateCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "object", + "name": "certificate", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "x509CertificateCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "x509CertificateCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "object", + "name": "certificate", + }, + { + "javaScriptType": "boolean", + "name": "requestSignature", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "consentMappingCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "displayName", + }, + { + "javaScriptType": "string", + "name": "icon", + }, + { + "javaScriptType": "string", + "name": "accessLevel", + }, + { + "javaScriptType": "array", + "name": "titles", + }, + { + "javaScriptType": "string", + "name": "message", + }, + { + "javaScriptType": "boolean", + "name": "isRequired", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "consentMappingCallback", + "parameters": [ + { + "javaScriptType": "object", + "name": "config", + }, + { + "javaScriptType": "string", + "name": "message", + }, + { + "javaScriptType": "boolean", + "name": "isRequired", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "deviceProfileCallback", + "parameters": [ + { + "javaScriptType": "boolean", + "name": "metadata", + }, + { + "javaScriptType": "boolean", + "name": "location", + }, + { + "javaScriptType": "string", + "name": "message", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "kbaCreateCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "array", + "name": "predefinedQuestions", + }, + { + "javaScriptType": "boolean", + "name": "allowUserDefinedQuestions", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "selectIdPCallback", + "parameters": [ + { + "javaScriptType": "object", + "name": "providers", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "termsAndConditionsCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "version", + }, + { + "javaScriptType": "string", + "name": "terms", + }, + { + "javaScriptType": "string", + "name": "createDate", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "suspendedTextOutputCallback", + "parameters": [ + { + "javaScriptType": "number", + "name": "messageType", + }, + { + "javaScriptType": "string", + "name": "message", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "textInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "textInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "string", + "name": "defaultText", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "scriptTextOutputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "message", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "metadataCallback", + "parameters": [ + { + "javaScriptType": "object", + "name": "outputValue", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "numberAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "number", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + { + "javaScriptType": "array", + "name": "failedPolicies", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "numberAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "number", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "numberAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "number", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + { + "javaScriptType": "array", + "name": "failedPolicies", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "numberAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "number", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "booleanAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "boolean", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + { + "javaScriptType": "array", + "name": "failedPolicies", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "booleanAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "boolean", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + { + "javaScriptType": "array", + "name": "failedPolicies", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "booleanAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "boolean", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "booleanAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "boolean", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "confirmationCallback", + "parameters": [ + { + "javaScriptType": "number", + "name": "messageType", + }, + { + "javaScriptType": "number", + "name": "optionType", + }, + { + "javaScriptType": "number", + "name": "defaultOption", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "confirmationCallback", + "parameters": [ + { + "javaScriptType": "number", + "name": "messageType", + }, + { + "javaScriptType": "array", + "name": "options", + }, + { + "javaScriptType": "number", + "name": "defaultOption", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "confirmationCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "number", + "name": "messageType", + }, + { + "javaScriptType": "number", + "name": "optionType", + }, + { + "javaScriptType": "number", + "name": "defaultOption", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "confirmationCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "number", + "name": "messageType", + }, + { + "javaScriptType": "array", + "name": "options", + }, + { + "javaScriptType": "number", + "name": "defaultOption", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "pollingWaitCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "waitTime", + }, + { + "javaScriptType": "string", + "name": "message", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "choiceCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "array", + "name": "choices", + }, + { + "javaScriptType": "number", + "name": "defaultChoice", + }, + { + "javaScriptType": "boolean", + "name": "multipleSelectionsAllowed", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "redirectCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "redirectUrl", + }, + { + "javaScriptType": "object", + "name": "redirectData", + }, + { + "javaScriptType": "string", + "name": "method", + }, + { + "javaScriptType": "boolean", + "name": "setTrackingCookie", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "redirectCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "redirectUrl", + }, + { + "javaScriptType": "object", + "name": "redirectData", + }, + { + "javaScriptType": "string", + "name": "method", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "redirectCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "redirectUrl", + }, + { + "javaScriptType": "object", + "name": "redirectData", + }, + { + "javaScriptType": "string", + "name": "method", + }, + { + "javaScriptType": "string", + "name": "statusParameter", + }, + { + "javaScriptType": "string", + "name": "redirectBackUrlCookie", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "redirectCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "redirectUrl", + }, + { + "javaScriptType": "object", + "name": "redirectData", + }, + { + "javaScriptType": "string", + "name": "method", + }, + { + "javaScriptType": "string", + "name": "statusParameter", + }, + { + "javaScriptType": "string", + "name": "redirectBackUrlCookie", + }, + { + "javaScriptType": "boolean", + "name": "setTrackingCookie", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "validatedUsernameCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + { + "javaScriptType": "array", + "name": "failedPolicies", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "validatedUsernameCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "validatedPasswordCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "boolean", + "name": "echoOn", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "validatedPasswordCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "boolean", + "name": "echoOn", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + { + "javaScriptType": "array", + "name": "failedPolicies", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "textOutputCallback", + "parameters": [ + { + "javaScriptType": "number", + "name": "messageType", + }, + { + "javaScriptType": "string", + "name": "message", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "hiddenValueCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "id", + }, + { + "javaScriptType": "string", + "name": "value", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "nameCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "nameCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "string", + "name": "defaultName", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "passwordCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "boolean", + "name": "echoOn", + }, + ], + "returnType": "void", + }, + ], + "javaClass": "org.forgerock.openam.auth.nodes.script.ScriptedCallbacksBuilder", + "javaScriptType": "object", + "name": "callbacksBuilder", + }, + { + "elements": [ + { + "elementType": "method", + "name": "update", + "parameters": [ + { + "javaScriptType": "string", + "name": "id", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "value", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "update", + "parameters": [ + { + "javaScriptType": "string", + "name": "id", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "value", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "update", + "parameters": [ + { + "javaScriptType": "string", + "name": "id", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "value", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "read", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "read", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "read", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "delete", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "delete", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "delete", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "action", + "parameters": [ + { + "javaScriptType": "string", + "name": "resource", + }, + { + "javaScriptType": "string", + "name": "actionName", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "action", + "parameters": [ + { + "javaScriptType": "string", + "name": "resource", + }, + { + "javaScriptType": "string", + "name": "actionName", + }, + { + "javaScriptType": "object", + "name": "content", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "action", + "parameters": [ + { + "javaScriptType": "string", + "name": "resource", + }, + { + "javaScriptType": "string", + "name": "actionName", + }, + { + "javaScriptType": "object", + "name": "content", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "action", + "parameters": [ + { + "javaScriptType": "string", + "name": "resource", + }, + { + "javaScriptType": "string", + "name": "actionName", + }, + { + "javaScriptType": "object", + "name": "content", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "query", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "query", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "create", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "newResourceId", + }, + { + "javaScriptType": "object", + "name": "content", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "create", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "newResourceId", + }, + { + "javaScriptType": "object", + "name": "content", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "create", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "newResourceId", + }, + { + "javaScriptType": "object", + "name": "content", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "patch", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "array", + "name": "patch", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "patch", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "array", + "name": "patch", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "patch", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "array", + "name": "patch", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.scripting.wrappers.IdmIntegrationServiceScriptWrapper", + "javaScriptType": "object", + "name": "openidm", + }, + { + "elements": [], + "javaScriptType": "object", + "name": "requestCookies", + }, + { + "javaScriptType": "string", + "name": "cookieName", + }, + ], + "evaluatorVersions": { + "JAVASCRIPT": [ + "2.0", + ], + }, + }, + "defaultScript": "[Empty]", + "engineConfiguration": { + "_id": "engineConfiguration", + "_type": { + "_id": "engineConfiguration", + "collection": false, + "name": "Scripting engine configuration", + }, + "blackList": [ + "java.security.AccessController", + "java.lang.Class", + "java.lang.reflect.*", + ], + "coreThreads": 10, + "idleTimeout": 60, + "maxThreads": 50, + "propertyNamePrefix": "script", + "queueSize": 10, + "serverTimeout": 0, + "useSecurityManager": true, + "whiteList": [ + "org.forgerock.util.promise.PromiseImpl", + "org.forgerock.util.promise.Promises$*", + "java.lang.Object", + "java.lang.Byte", + "java.lang.Character", + "java.lang.Character$Subset", + "java.lang.Character$UnicodeBlock", + "java.lang.Float", + "java.lang.Long", + "java.lang.Math", + "java.lang.Number", + "java.lang.Short", + "java.lang.StrictMath", + "java.lang.Void", + "java.util.AbstractMap$*", + "java.util.ArrayList", + "java.util.Collections", + "java.util.concurrent.TimeUnit", + "java.util.Collections$*", + "java.util.HashSet", + "java.util.HashMap$KeyIterator", + "java.util.LinkedHashSet", + "java.util.LinkedList", + "java.util.TreeSet", + "java.security.KeyPair", + "java.security.KeyPairGenerator", + "java.security.KeyPairGenerator$*", + "java.security.PrivateKey", + "java.security.PublicKey", + "java.security.spec.X509EncodedKeySpec", + "java.security.spec.MGF1ParameterSpec", + "javax.crypto.SecretKeyFactory", + "javax.crypto.spec.OAEPParameterSpec", + "javax.crypto.spec.PBEKeySpec", + "javax.crypto.spec.PSource", + "javax.crypto.spec.PSource$*", + "org.forgerock.json.JsonValue", + "org.forgerock.util.promise.NeverThrowsException", + "java.util.concurrent.ExecutionException", + "java.util.concurrent.TimeoutException", + "org.forgerock.openam.core.rest.authn.callbackhandlers.*", + "com.sun.crypto.provider.PBKDF2KeyImpl", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.util.Collections$UnmodifiableCollection$1", + "sun.security.ec.ECPrivateKeyImpl", + "ch.qos.logback.classic.Logger", + "com.sun.proxy.$*", + "java.util.Date", + "java.security.spec.InvalidKeySpecException", + ], + }, + "isHidden": true, + "languages": [ + "JAVASCRIPT", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/scripttype/OAUTH2_ACCESS_TOKEN_MODIFICATION.scripttype.json 1`] = ` +{ + "scripttype": { + "OAUTH2_ACCESS_TOKEN_MODIFICATION": { + "_id": "OAUTH2_ACCESS_TOKEN_MODIFICATION", + "_type": { + "_id": "contexts", + "collection": true, + "name": "scriptContext", + }, + "context": { + "_id": "OAUTH2_ACCESS_TOKEN_MODIFICATION", + "allowLists": [ + "java.util.List", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.util.HashMap$Node", + "org.forgerock.oauth.clients.oidc.Claim", + "java.util.Collections$SingletonList", + "java.util.HashSet", + "com.iplanet.sso.providers.dpro.SessionSsoToken", + "org.forgerock.openam.oauth2.token.stateless.StatelessAccessToken", + "org.forgerock.oauth2.core.UserInfoClaims", + "java.net.URI", + "java.util.Collections$1", + "groovy.json.internal.LazyMap", + "java.util.LinkedHashMap", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "org.forgerock.openidconnect.Claim", + "java.lang.Number", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentity", + "java.util.LinkedList", + "java.lang.Byte", + "org.forgerock.http.Client", + "org.forgerock.oauth2.core.GrantType", + "java.lang.Character$UnicodeBlock", + "java.util.Collections$UnmodifiableSet", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "org.forgerock.openam.shared.security.crypto.CertificateService", + "java.util.Map", + "java.lang.Character$Subset", + "java.util.TreeSet", + "org.forgerock.openam.oauth2.OpenAMAccessToken", + "org.forgerock.openam.scripting.api.secrets.ScriptedSecrets", + "org.forgerock.oauth2.core.StatefulAccessToken", + "org.mozilla.javascript.JavaScriptException", + "org.forgerock.json.JsonValue", + "org.codehaus.groovy.runtime.GStringImpl", + "org.forgerock.opendj.ldap.Dn", + "com.google.common.collect.Sets$1", + "java.util.ArrayList", + "java.util.LinkedHashMap$Entry", + "org.forgerock.opendj.ldap.Rdn", + "java.lang.StrictMath", + "java.util.HashMap$Entry", + "java.util.LinkedHashSet", + "java.util.AbstractMap$SimpleImmutableEntry", + "org.forgerock.oauth2.core.exceptions.InvalidRequestException", + "java.util.Locale", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "org.forgerock.http.protocol.*", + "sun.security.ec.ECPrivateKeyImpl", + "java.lang.Float", + "java.util.Collections$EmptyList", + "java.lang.Double", + "com.sun.identity.common.CaseInsensitiveHashMap", + "groovy.json.JsonSlurper", + "com.sun.identity.idm.AMIdentity", + "org.forgerock.openam.oauth2.token.macaroon.MacaroonAccessToken", + "org.forgerock.http.client.*", + "org.forgerock.openam.oauth2.token.grantset.Authorization$ModifiedAccessToken", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentityRepository", + "java.lang.Void", + "java.util.HashMap", + "java.lang.Long", + "java.lang.Math", + "java.util.LinkedHashMap$LinkedEntryIterator", + "java.lang.Integer", + "org.forgerock.openidconnect.ssoprovider.OpenIdConnectSSOToken", + "java.util.LinkedHashMap$LinkedEntrySet", + "java.util.HashMap$KeyIterator", + "java.util.ArrayList$Itr", + "java.lang.String", + "java.util.Collections$UnmodifiableMap", + "java.lang.Object", + "java.lang.Boolean", + "org.forgerock.macaroons.Macaroon", + "org.forgerock.util.promise.PromiseImpl", + "java.lang.Short", + "java.util.TreeMap", + "java.lang.Character", + "com.sun.identity.shared.debug.Debug", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "java.util.Collections$UnmodifiableCollection$1", + "java.util.HashMap$KeySet", + ], + "bindings": [], + "evaluatorVersions": { + "GROOVY": [ + "1.0", + ], + "JAVASCRIPT": [ + "1.0", + ], + }, + }, + "defaultScript": "d22f9a0c-426a-4466-b95e-d0f125b0d5fa", + "engineConfiguration": { + "_id": "engineConfiguration", + "_type": { + "_id": "engineConfiguration", + "collection": false, + "name": "Scripting engine configuration", + }, + "blackList": [ + "java.lang.Class", + "java.lang.Thread", + "java.lang.invoke.*", + "java.lang.reflect.*", + "java.security.AccessController", + ], + "coreThreads": { + "$int": "&{oauth2.access.token.modification.script.context.core.threads|10}", + }, + "idleTimeout": 60, + "maxThreads": { + "$int": "&{oauth2.access.token.modification.script.context.max.threads|50}", + }, + "propertyNamePrefix": "esv.", + "queueSize": { + "$int": "&{oauth2.access.token.modification.script.context.queue.size|10}", + }, + "serverTimeout": 0, + "useSecurityManager": true, + "whiteList": [ + "com.google.common.collect.ImmutableList", + "com.google.common.collect.Sets$1", + "com.iplanet.am.sdk.AMHashMap", + "com.iplanet.sso.providers.dpro.SSOTokenIDImpl", + "com.iplanet.sso.providers.dpro.SessionSsoToken", + "com.sun.identity.authentication.callbacks.HiddenValueCallback", + "com.sun.identity.authentication.callbacks.ReCaptchaCallback", + "com.sun.identity.authentication.callbacks.ScriptTextOutputCallback", + "com.sun.identity.authentication.spi.HttpCallback", + "com.sun.identity.authentication.spi.IdentifiableCallback", + "com.sun.identity.authentication.spi.MetadataCallback", + "com.sun.identity.authentication.spi.PagePropertiesCallback", + "com.sun.identity.authentication.spi.RedirectCallback", + "com.sun.identity.authentication.spi.X509CertificateCallback", + "com.sun.identity.common.CaseInsensitiveHashMap", + "com.sun.identity.common.CaseInsensitiveHashMap$Entry", + "com.sun.identity.idm.AMIdentity", + "com.sun.identity.idm.IdType", + "com.sun.identity.saml2.assertion.impl.AttributeImpl", + "com.sun.identity.saml2.common.SAML2Exception", + "com.sun.identity.saml2.plugins.scripted.IdpAttributeMapperScriptHelper", + "com.sun.identity.shared.debug.Debug", + "groovy.json.JsonSlurper", + "groovy.json.StringEscapeUtils", + "groovy.json.internal.LazyMap", + "java.io.ByteArrayInputStream", + "java.io.ByteArrayOutputStream", + "java.io.UnsupportedEncodingException", + "java.lang.Boolean", + "java.lang.Byte", + "java.lang.Character", + "java.lang.Character$Subset", + "java.lang.Character$UnicodeBlock", + "java.lang.Double", + "java.lang.Float", + "java.lang.Integer", + "java.lang.Long", + "java.lang.Math", + "java.lang.NullPointerException", + "java.lang.Number", + "java.lang.Object", + "java.lang.RuntimeException", + "java.lang.SecurityException", + "java.lang.Short", + "java.lang.StrictMath", + "java.lang.String", + "java.lang.Void", + "java.math.BigDecimal", + "java.math.BigInteger", + "java.net.URI", + "java.security.KeyFactory", + "java.security.KeyPair", + "java.security.KeyPairGenerator", + "java.security.KeyPairGenerator$*", + "java.security.MessageDigest", + "java.security.MessageDigest$Delegate", + "java.security.MessageDigest$Delegate$CloneableDelegate", + "java.security.NoSuchAlgorithmException", + "java.security.PrivateKey", + "java.security.PublicKey", + "java.security.cert.CertificateFactory", + "java.security.cert.X509Certificate", + "java.security.spec.MGF1ParameterSpec", + "java.security.spec.PKCS8EncodedKeySpec", + "java.security.spec.X509EncodedKeySpec", + "java.text.SimpleDateFormat", + "java.time.Clock", + "java.time.Clock$FixedClock", + "java.time.Clock$OffsetClock", + "java.time.Clock$SystemClock", + "java.time.Clock$TickClock", + "java.time.temporal.ChronoUnit", + "java.util.AbstractMap$*", + "java.util.ArrayList", + "java.util.ArrayList$Itr", + "java.util.Arrays", + "java.util.Collections", + "java.util.Collections$*", + "java.util.Date", + "java.util.HashMap", + "java.util.HashMap$Entry", + "java.util.HashMap$KeyIterator", + "java.util.HashMap$KeySet", + "java.util.HashMap$Node", + "java.util.HashSet", + "java.util.LinkedHashMap", + "java.util.LinkedHashMap$Entry", + "java.util.LinkedHashMap$LinkedEntryIterator", + "java.util.LinkedHashMap$LinkedEntrySet", + "java.util.LinkedHashMap$LinkedKeySet", + "java.util.LinkedHashSet", + "java.util.LinkedList", + "java.util.List", + "java.util.Locale", + "java.util.Map", + "java.util.TreeMap", + "java.util.TreeSet", + "java.util.UUID", + "javax.crypto.Cipher", + "javax.crypto.Mac", + "javax.crypto.spec.IvParameterSpec", + "javax.crypto.spec.OAEPParameterSpec", + "javax.crypto.spec.PSource", + "javax.crypto.spec.PSource$*", + "javax.crypto.spec.SecretKeySpec", + "javax.security.auth.callback.ChoiceCallback", + "javax.security.auth.callback.ConfirmationCallback", + "javax.security.auth.callback.LanguageCallback", + "javax.security.auth.callback.NameCallback", + "javax.security.auth.callback.PasswordCallback", + "javax.security.auth.callback.TextInputCallback", + "javax.security.auth.callback.TextOutputCallback", + "org.apache.groovy.json.internal.LazyMap", + "org.codehaus.groovy.runtime.GStringImpl", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "org.forgerock.guice.core.IdentityProvider", + "org.forgerock.guice.core.InjectorHolder", + "org.forgerock.http.Client", + "org.forgerock.http.Context", + "org.forgerock.http.Handler", + "org.forgerock.http.client.*", + "org.forgerock.http.context.RootContext", + "org.forgerock.http.header.*", + "org.forgerock.http.header.authorization.*", + "org.forgerock.http.protocol.*", + "org.forgerock.json.JsonValue", + "org.forgerock.json.jose.builders.EncryptedJwtBuilder", + "org.forgerock.json.jose.builders.EncryptedThenSignedJwtBuilder", + "org.forgerock.json.jose.builders.JweHeaderBuilder", + "org.forgerock.json.jose.builders.JwsHeaderBuilder", + "org.forgerock.json.jose.builders.JwtBuilderFactory", + "org.forgerock.json.jose.builders.SignedJwtBuilderImpl", + "org.forgerock.json.jose.builders.SignedThenEncryptedJwtBuilder", + "org.forgerock.json.jose.builders.SignedThenEncryptedJwtHeaderBuilder", + "org.forgerock.json.jose.jwe.EncryptedJwt", + "org.forgerock.json.jose.jwe.EncryptionMethod", + "org.forgerock.json.jose.jwe.JweAlgorithm", + "org.forgerock.json.jose.jwe.SignedThenEncryptedJwt", + "org.forgerock.json.jose.jwk.JWKSet", + "org.forgerock.json.jose.jwk.RsaJWK", + "org.forgerock.json.jose.jws.EncryptedThenSignedJwt", + "org.forgerock.json.jose.jws.JwsAlgorithm", + "org.forgerock.json.jose.jws.JwsHeader", + "org.forgerock.json.jose.jws.SignedEncryptedJwt", + "org.forgerock.json.jose.jws.SignedJwt", + "org.forgerock.json.jose.jws.SigningManager", + "org.forgerock.json.jose.jws.handlers.HmacSigningHandler", + "org.forgerock.json.jose.jws.handlers.RSASigningHandler", + "org.forgerock.json.jose.jws.handlers.SecretHmacSigningHandler", + "org.forgerock.json.jose.jws.handlers.SecretRSASigningHandler", + "org.forgerock.json.jose.jwt.JwtClaimsSet", + "org.forgerock.macaroons.Macaroon", + "org.forgerock.oauth.clients.oidc.Claim", + "org.forgerock.oauth2.core.GrantType", + "org.forgerock.oauth2.core.StatefulAccessToken", + "org.forgerock.oauth2.core.UserInfoClaims", + "org.forgerock.oauth2.core.exceptions.InvalidRequestException", + "org.forgerock.oauth2.core.tokenexchange.ExchangeableToken", + "org.forgerock.openam.auth.node.api.Action", + "org.forgerock.openam.auth.node.api.Action$ActionBuilder", + "org.forgerock.openam.auth.node.api.NodeState", + "org.forgerock.openam.auth.node.api.SuspendedTextOutputCallback", + "org.forgerock.openam.auth.nodes.IdentityProvider", + "org.forgerock.openam.auth.nodes.InjectorHolder", + "org.forgerock.openam.authentication.callbacks.AbstractValidatedCallback", + "org.forgerock.openam.authentication.callbacks.AttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.BooleanAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.ConsentMappingCallback", + "org.forgerock.openam.authentication.callbacks.DeviceProfileCallback", + "org.forgerock.openam.authentication.callbacks.IdPCallback", + "org.forgerock.openam.authentication.callbacks.KbaCreateCallback", + "org.forgerock.openam.authentication.callbacks.NumberAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.PollingWaitCallback", + "org.forgerock.openam.authentication.callbacks.SelectIdPCallback", + "org.forgerock.openam.authentication.callbacks.StringAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.TermsAndConditionsCallback", + "org.forgerock.openam.authentication.callbacks.ValidatedPasswordCallback", + "org.forgerock.openam.authentication.callbacks.ValidatedUsernameCallback", + "org.forgerock.openam.authentication.modules.scripted.*", + "org.forgerock.openam.core.rest.authn.callbackhandlers.*", + "org.forgerock.openam.core.rest.devices.deviceprint.DeviceIdDao", + "org.forgerock.openam.core.rest.devices.profile.DeviceProfilesDao", + "org.forgerock.openam.oauth2.OpenAMAccessToken", + "org.forgerock.openam.oauth2.token.grantset.Authorization$ModifiedAccessToken", + "org.forgerock.openam.oauth2.token.macaroon.MacaroonAccessToken", + "org.forgerock.openam.oauth2.token.stateless.StatelessAccessToken", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "org.forgerock.openam.scripting.api.ScriptedIdentity", + "org.forgerock.openam.scripting.api.ScriptedSession", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentity", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentityRepository", + "org.forgerock.openam.scripting.api.secrets.ScriptedSecrets", + "org.forgerock.openam.scripting.api.secrets.Secret", + "org.forgerock.openam.scripting.idrepo.ScriptIdentityRepository", + "org.forgerock.openam.shared.security.ThreadLocalSecureRandom", + "org.forgerock.openidconnect.Claim", + "org.forgerock.openidconnect.OpenIdConnectToken", + "org.forgerock.openidconnect.ssoprovider.OpenIdConnectSSOToken", + "org.forgerock.secrets.SecretBuilder", + "org.forgerock.secrets.keys.SigningKey", + "org.forgerock.secrets.keys.VerificationKey", + "org.forgerock.util.encode.Base64", + "org.forgerock.util.encode.Base64url", + "org.forgerock.util.encode.Hex", + "org.forgerock.util.promise.NeverThrowsException", + "org.forgerock.util.promise.Promise", + "org.forgerock.util.promise.PromiseImpl", + "org.mozilla.javascript.ConsString", + "org.mozilla.javascript.JavaScriptException", + "org.mozilla.javascript.WrappedException", + "sun.security.ec.ECPrivateKeyImpl", + "sun.security.rsa.RSAPrivateCrtKeyImpl", + "sun.security.rsa.RSAPublicKeyImpl", + "sun.security.x509.X500Name", + "sun.security.x509.X509CertImpl", + "java.util.AbstractMap$SimpleImmutableEntry", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.util.Collections$UnmodifiableCollection$1", + "java.util.Collections$1", + "java.util.Collections$EmptyList", + "java.util.Collections$SingletonList", + "java.util.Collections$UnmodifiableMap", + "java.util.Collections$UnmodifiableSet", + "org.forgerock.opendj.ldap.Rdn", + "org.forgerock.opendj.ldap.Dn", + "org.forgerock.openam.auth.nodes.VerifyTransactionsHelper", + ], + }, + "isHidden": false, + "languages": [ + "JAVASCRIPT", + "GROOVY", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/scripttype/OAUTH2_AUTHORIZE_ENDPOINT_DATA_PROVIDER.scripttype.json 1`] = ` +{ + "scripttype": { + "OAUTH2_AUTHORIZE_ENDPOINT_DATA_PROVIDER": { + "_id": "OAUTH2_AUTHORIZE_ENDPOINT_DATA_PROVIDER", + "_type": { + "_id": "contexts", + "collection": true, + "name": "scriptContext", + }, + "context": { + "_id": "OAUTH2_AUTHORIZE_ENDPOINT_DATA_PROVIDER", + "allowLists": [ + "java.util.LinkedHashSet", + "java.util.Map", + "java.util.LinkedHashMap$LinkedEntrySet", + "java.util.Collections$UnmodifiableMap", + "com.sun.identity.common.CaseInsensitiveHashMap", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentity", + "java.util.LinkedList", + "java.lang.Boolean", + "java.util.HashMap", + "com.google.common.collect.Sets$1", + "java.util.Locale", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "java.lang.String", + "java.lang.Math", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "org.codehaus.groovy.runtime.GStringImpl", + "org.mozilla.javascript.JavaScriptException", + "groovy.json.JsonSlurper", + "org.forgerock.oauth2.core.exceptions.ServerException", + "sun.security.ec.ECPrivateKeyImpl", + "java.lang.Double", + "org.forgerock.opendj.ldap.Rdn", + "com.sun.identity.shared.debug.Debug", + "org.forgerock.util.promise.PromiseImpl", + "java.lang.Character", + "java.util.HashMap$Entry", + "java.util.LinkedHashMap$LinkedEntryIterator", + "java.util.Collections$EmptyList", + "java.util.TreeSet", + "java.lang.Float", + "java.lang.Object", + "org.forgerock.openam.scripting.api.secrets.ScriptedSecrets", + "java.lang.Character$UnicodeBlock", + "java.util.LinkedHashMap", + "org.forgerock.http.client.*", + "java.util.HashMap$KeySet", + "org.forgerock.http.protocol.*", + "org.forgerock.openam.shared.security.crypto.CertificateService", + "java.util.AbstractMap$SimpleImmutableEntry", + "java.util.HashMap$KeyIterator", + "java.lang.Character$Subset", + "java.util.Collections$UnmodifiableSet", + "org.forgerock.json.JsonValue", + "com.sun.identity.idm.AMIdentity", + "org.forgerock.oauth.clients.oidc.Claim", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "java.lang.Short", + "java.util.HashSet", + "java.lang.Void", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "java.util.ArrayList", + "org.forgerock.http.Client", + "java.util.HashMap$Node", + "java.util.Collections$UnmodifiableCollection$1", + "groovy.json.internal.LazyMap", + "java.lang.StrictMath", + "java.lang.Long", + "java.lang.Byte", + "java.util.ArrayList$Itr", + "java.util.Collections$1", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentityRepository", + "java.util.Collections$UnmodifiableRandomAccessList", + "org.forgerock.opendj.ldap.Dn", + "java.util.TreeMap", + "java.lang.Number", + "com.iplanet.sso.providers.dpro.SessionSsoToken", + "java.lang.Integer", + "java.util.Collections$SingletonList", + "java.net.URI", + "java.util.LinkedHashMap$Entry", + "java.util.List", + ], + "bindings": [], + "evaluatorVersions": { + "GROOVY": [ + "1.0", + ], + "JAVASCRIPT": [ + "1.0", + ], + }, + }, + "defaultScript": "[Empty]", + "engineConfiguration": { + "_id": "engineConfiguration", + "_type": { + "_id": "engineConfiguration", + "collection": false, + "name": "Scripting engine configuration", + }, + "blackList": [ + "java.lang.Class", + "java.lang.Thread", + "java.lang.invoke.*", + "java.lang.reflect.*", + "java.security.AccessController", + ], + "coreThreads": { + "$int": "&{oauth2.authorize.endpoint.data.provider.script.context.core.threads|10}", + }, + "idleTimeout": 60, + "maxThreads": { + "$int": "&{oauth2.authorize.endpoint.data.provider.script.context.max.threads|50}", + }, + "propertyNamePrefix": "esv.", + "queueSize": { + "$int": "&{oauth2.authorize.endpoint.data.provider.script.context.queue.size|10}", + }, + "serverTimeout": 0, + "useSecurityManager": true, + "whiteList": [ + "com.google.common.collect.ImmutableList", + "com.google.common.collect.Sets$1", + "com.iplanet.am.sdk.AMHashMap", + "com.iplanet.sso.providers.dpro.SSOTokenIDImpl", + "com.iplanet.sso.providers.dpro.SessionSsoToken", + "com.sun.identity.authentication.callbacks.HiddenValueCallback", + "com.sun.identity.authentication.callbacks.ReCaptchaCallback", + "com.sun.identity.authentication.callbacks.ScriptTextOutputCallback", + "com.sun.identity.authentication.spi.HttpCallback", + "com.sun.identity.authentication.spi.IdentifiableCallback", + "com.sun.identity.authentication.spi.MetadataCallback", + "com.sun.identity.authentication.spi.PagePropertiesCallback", + "com.sun.identity.authentication.spi.RedirectCallback", + "com.sun.identity.authentication.spi.X509CertificateCallback", + "com.sun.identity.common.CaseInsensitiveHashMap", + "com.sun.identity.common.CaseInsensitiveHashMap$Entry", + "com.sun.identity.idm.AMIdentity", + "com.sun.identity.idm.IdType", + "com.sun.identity.saml2.assertion.impl.AttributeImpl", + "com.sun.identity.saml2.common.SAML2Exception", + "com.sun.identity.saml2.plugins.scripted.IdpAttributeMapperScriptHelper", + "com.sun.identity.shared.debug.Debug", + "groovy.json.JsonSlurper", + "groovy.json.StringEscapeUtils", + "groovy.json.internal.LazyMap", + "java.io.ByteArrayInputStream", + "java.io.ByteArrayOutputStream", + "java.io.UnsupportedEncodingException", + "java.lang.Boolean", + "java.lang.Byte", + "java.lang.Character", + "java.lang.Character$Subset", + "java.lang.Character$UnicodeBlock", + "java.lang.Double", + "java.lang.Float", + "java.lang.Integer", + "java.lang.Long", + "java.lang.Math", + "java.lang.NullPointerException", + "java.lang.Number", + "java.lang.Object", + "java.lang.RuntimeException", + "java.lang.SecurityException", + "java.lang.Short", + "java.lang.StrictMath", + "java.lang.String", + "java.lang.Void", + "java.math.BigDecimal", + "java.math.BigInteger", + "java.net.URI", + "java.security.KeyFactory", + "java.security.KeyPair", + "java.security.KeyPairGenerator", + "java.security.KeyPairGenerator$*", + "java.security.MessageDigest", + "java.security.MessageDigest$Delegate", + "java.security.MessageDigest$Delegate$CloneableDelegate", + "java.security.NoSuchAlgorithmException", + "java.security.PrivateKey", + "java.security.PublicKey", + "java.security.cert.CertificateFactory", + "java.security.cert.X509Certificate", + "java.security.spec.MGF1ParameterSpec", + "java.security.spec.PKCS8EncodedKeySpec", + "java.security.spec.X509EncodedKeySpec", + "java.text.SimpleDateFormat", + "java.time.Clock", + "java.time.Clock$FixedClock", + "java.time.Clock$OffsetClock", + "java.time.Clock$SystemClock", + "java.time.Clock$TickClock", + "java.time.temporal.ChronoUnit", + "java.util.AbstractMap$*", + "java.util.ArrayList", + "java.util.ArrayList$Itr", + "java.util.Arrays", + "java.util.Collections", + "java.util.Collections$*", + "java.util.Date", + "java.util.HashMap", + "java.util.HashMap$Entry", + "java.util.HashMap$KeyIterator", + "java.util.HashMap$KeySet", + "java.util.HashMap$Node", + "java.util.HashSet", + "java.util.LinkedHashMap", + "java.util.LinkedHashMap$Entry", + "java.util.LinkedHashMap$LinkedEntryIterator", + "java.util.LinkedHashMap$LinkedEntrySet", + "java.util.LinkedHashMap$LinkedKeySet", + "java.util.LinkedHashSet", + "java.util.LinkedList", + "java.util.List", + "java.util.Locale", + "java.util.Map", + "java.util.TreeMap", + "java.util.TreeSet", + "java.util.UUID", + "javax.crypto.Cipher", + "javax.crypto.Mac", + "javax.crypto.spec.IvParameterSpec", + "javax.crypto.spec.OAEPParameterSpec", + "javax.crypto.spec.PSource", + "javax.crypto.spec.PSource$*", + "javax.crypto.spec.SecretKeySpec", + "javax.security.auth.callback.ChoiceCallback", + "javax.security.auth.callback.ConfirmationCallback", + "javax.security.auth.callback.LanguageCallback", + "javax.security.auth.callback.NameCallback", + "javax.security.auth.callback.PasswordCallback", + "javax.security.auth.callback.TextInputCallback", + "javax.security.auth.callback.TextOutputCallback", + "org.apache.groovy.json.internal.LazyMap", + "org.codehaus.groovy.runtime.GStringImpl", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "org.forgerock.guice.core.IdentityProvider", + "org.forgerock.guice.core.InjectorHolder", + "org.forgerock.http.Client", + "org.forgerock.http.Context", + "org.forgerock.http.Handler", + "org.forgerock.http.client.*", + "org.forgerock.http.context.RootContext", + "org.forgerock.http.header.*", + "org.forgerock.http.header.authorization.*", + "org.forgerock.http.protocol.*", + "org.forgerock.json.JsonValue", + "org.forgerock.json.jose.builders.EncryptedJwtBuilder", + "org.forgerock.json.jose.builders.EncryptedThenSignedJwtBuilder", + "org.forgerock.json.jose.builders.JweHeaderBuilder", + "org.forgerock.json.jose.builders.JwsHeaderBuilder", + "org.forgerock.json.jose.builders.JwtBuilderFactory", + "org.forgerock.json.jose.builders.SignedJwtBuilderImpl", + "org.forgerock.json.jose.builders.SignedThenEncryptedJwtBuilder", + "org.forgerock.json.jose.builders.SignedThenEncryptedJwtHeaderBuilder", + "org.forgerock.json.jose.jwe.EncryptedJwt", + "org.forgerock.json.jose.jwe.EncryptionMethod", + "org.forgerock.json.jose.jwe.JweAlgorithm", + "org.forgerock.json.jose.jwe.SignedThenEncryptedJwt", + "org.forgerock.json.jose.jwk.JWKSet", + "org.forgerock.json.jose.jwk.RsaJWK", + "org.forgerock.json.jose.jws.EncryptedThenSignedJwt", + "org.forgerock.json.jose.jws.JwsAlgorithm", + "org.forgerock.json.jose.jws.JwsHeader", + "org.forgerock.json.jose.jws.SignedEncryptedJwt", + "org.forgerock.json.jose.jws.SignedJwt", + "org.forgerock.json.jose.jws.SigningManager", + "org.forgerock.json.jose.jws.handlers.HmacSigningHandler", + "org.forgerock.json.jose.jws.handlers.RSASigningHandler", + "org.forgerock.json.jose.jws.handlers.SecretHmacSigningHandler", + "org.forgerock.json.jose.jws.handlers.SecretRSASigningHandler", + "org.forgerock.json.jose.jwt.JwtClaimsSet", + "org.forgerock.macaroons.Macaroon", + "org.forgerock.oauth.clients.oidc.Claim", + "org.forgerock.oauth2.core.GrantType", + "org.forgerock.oauth2.core.StatefulAccessToken", + "org.forgerock.oauth2.core.UserInfoClaims", + "org.forgerock.oauth2.core.exceptions.InvalidRequestException", + "org.forgerock.oauth2.core.tokenexchange.ExchangeableToken", + "org.forgerock.openam.auth.node.api.Action", + "org.forgerock.openam.auth.node.api.Action$ActionBuilder", + "org.forgerock.openam.auth.node.api.NodeState", + "org.forgerock.openam.auth.node.api.SuspendedTextOutputCallback", + "org.forgerock.openam.auth.nodes.IdentityProvider", + "org.forgerock.openam.auth.nodes.InjectorHolder", + "org.forgerock.openam.authentication.callbacks.AbstractValidatedCallback", + "org.forgerock.openam.authentication.callbacks.AttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.BooleanAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.ConsentMappingCallback", + "org.forgerock.openam.authentication.callbacks.DeviceProfileCallback", + "org.forgerock.openam.authentication.callbacks.IdPCallback", + "org.forgerock.openam.authentication.callbacks.KbaCreateCallback", + "org.forgerock.openam.authentication.callbacks.NumberAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.PollingWaitCallback", + "org.forgerock.openam.authentication.callbacks.SelectIdPCallback", + "org.forgerock.openam.authentication.callbacks.StringAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.TermsAndConditionsCallback", + "org.forgerock.openam.authentication.callbacks.ValidatedPasswordCallback", + "org.forgerock.openam.authentication.callbacks.ValidatedUsernameCallback", + "org.forgerock.openam.authentication.modules.scripted.*", + "org.forgerock.openam.core.rest.authn.callbackhandlers.*", + "org.forgerock.openam.core.rest.devices.deviceprint.DeviceIdDao", + "org.forgerock.openam.core.rest.devices.profile.DeviceProfilesDao", + "org.forgerock.openam.oauth2.OpenAMAccessToken", + "org.forgerock.openam.oauth2.token.grantset.Authorization$ModifiedAccessToken", + "org.forgerock.openam.oauth2.token.macaroon.MacaroonAccessToken", + "org.forgerock.openam.oauth2.token.stateless.StatelessAccessToken", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "org.forgerock.openam.scripting.api.ScriptedIdentity", + "org.forgerock.openam.scripting.api.ScriptedSession", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentity", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentityRepository", + "org.forgerock.openam.scripting.api.secrets.ScriptedSecrets", + "org.forgerock.openam.scripting.api.secrets.Secret", + "org.forgerock.openam.scripting.idrepo.ScriptIdentityRepository", + "org.forgerock.openam.shared.security.ThreadLocalSecureRandom", + "org.forgerock.openidconnect.Claim", + "org.forgerock.openidconnect.OpenIdConnectToken", + "org.forgerock.openidconnect.ssoprovider.OpenIdConnectSSOToken", + "org.forgerock.secrets.SecretBuilder", + "org.forgerock.secrets.keys.SigningKey", + "org.forgerock.secrets.keys.VerificationKey", + "org.forgerock.util.encode.Base64", + "org.forgerock.util.encode.Base64url", + "org.forgerock.util.encode.Hex", + "org.forgerock.util.promise.NeverThrowsException", + "org.forgerock.util.promise.Promise", + "org.forgerock.util.promise.PromiseImpl", + "org.mozilla.javascript.ConsString", + "org.mozilla.javascript.JavaScriptException", + "org.mozilla.javascript.WrappedException", + "sun.security.ec.ECPrivateKeyImpl", + "sun.security.rsa.RSAPrivateCrtKeyImpl", + "sun.security.rsa.RSAPublicKeyImpl", + "sun.security.x509.X500Name", + "sun.security.x509.X509CertImpl", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.util.Collections$UnmodifiableCollection$1", + "java.util.AbstractMap$SimpleImmutableEntry", + "java.util.Collections$1", + "java.util.Collections$EmptyList", + "java.util.Collections$SingletonList", + "java.util.Collections$UnmodifiableMap", + "java.util.Collections$UnmodifiableSet", + "org.forgerock.opendj.ldap.Rdn", + "org.forgerock.opendj.ldap.Dn", + "org.forgerock.openam.auth.nodes.VerifyTransactionsHelper", + ], + }, + "isHidden": false, + "languages": [ + "JAVASCRIPT", + "GROOVY", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/scripttype/OAUTH2_EVALUATE_SCOPE.scripttype.json 1`] = ` +{ + "scripttype": { + "OAUTH2_EVALUATE_SCOPE": { + "_id": "OAUTH2_EVALUATE_SCOPE", + "_type": { + "_id": "contexts", + "collection": true, + "name": "scriptContext", + }, + "context": { + "_id": "OAUTH2_EVALUATE_SCOPE", + "allowLists": [ + "java.util.List", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.util.HashMap$Node", + "org.forgerock.oauth.clients.oidc.Claim", + "java.util.Collections$SingletonList", + "java.util.HashSet", + "com.iplanet.sso.providers.dpro.SessionSsoToken", + "org.forgerock.openam.oauth2.token.stateless.StatelessAccessToken", + "org.forgerock.oauth2.core.UserInfoClaims", + "java.net.URI", + "java.util.Collections$1", + "groovy.json.internal.LazyMap", + "java.util.LinkedHashMap", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "org.forgerock.openidconnect.Claim", + "java.lang.Number", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentity", + "java.util.LinkedList", + "java.lang.Byte", + "org.forgerock.http.Client", + "org.forgerock.oauth2.core.GrantType", + "java.lang.Character$UnicodeBlock", + "java.util.Collections$UnmodifiableSet", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "org.forgerock.openam.shared.security.crypto.CertificateService", + "java.util.Map", + "java.lang.Character$Subset", + "java.util.TreeSet", + "org.forgerock.openam.oauth2.OpenAMAccessToken", + "org.forgerock.openam.scripting.api.secrets.ScriptedSecrets", + "org.forgerock.oauth2.core.StatefulAccessToken", + "org.mozilla.javascript.JavaScriptException", + "org.forgerock.json.JsonValue", + "org.codehaus.groovy.runtime.GStringImpl", + "org.forgerock.opendj.ldap.Dn", + "com.google.common.collect.Sets$1", + "java.util.ArrayList", + "java.util.LinkedHashMap$Entry", + "org.forgerock.opendj.ldap.Rdn", + "java.lang.StrictMath", + "java.util.HashMap$Entry", + "java.util.LinkedHashSet", + "java.util.AbstractMap$SimpleImmutableEntry", + "org.forgerock.oauth2.core.exceptions.InvalidRequestException", + "java.util.Locale", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "org.forgerock.http.protocol.*", + "sun.security.ec.ECPrivateKeyImpl", + "java.lang.Float", + "java.util.Collections$EmptyList", + "java.lang.Double", + "com.sun.identity.common.CaseInsensitiveHashMap", + "groovy.json.JsonSlurper", + "com.sun.identity.idm.AMIdentity", + "org.forgerock.openam.oauth2.token.macaroon.MacaroonAccessToken", + "org.forgerock.http.client.*", + "org.forgerock.openam.oauth2.token.grantset.Authorization$ModifiedAccessToken", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentityRepository", + "java.lang.Void", + "java.util.HashMap", + "java.lang.Long", + "java.lang.Math", + "java.util.LinkedHashMap$LinkedEntryIterator", + "java.lang.Integer", + "org.forgerock.openidconnect.ssoprovider.OpenIdConnectSSOToken", + "java.util.LinkedHashMap$LinkedEntrySet", + "java.util.HashMap$KeyIterator", + "java.util.ArrayList$Itr", + "java.lang.String", + "java.util.Collections$UnmodifiableMap", + "java.lang.Object", + "java.lang.Boolean", + "org.forgerock.macaroons.Macaroon", + "org.forgerock.util.promise.PromiseImpl", + "java.lang.Short", + "java.util.TreeMap", + "java.lang.Character", + "com.sun.identity.shared.debug.Debug", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "java.util.Collections$UnmodifiableCollection$1", + "java.util.HashMap$KeySet", + ], + "bindings": [], + "evaluatorVersions": { + "GROOVY": [ + "1.0", + ], + "JAVASCRIPT": [ + "1.0", + ], + }, + }, + "defaultScript": "[Empty]", + "engineConfiguration": { + "_id": "engineConfiguration", + "_type": { + "_id": "engineConfiguration", + "collection": false, + "name": "Scripting engine configuration", + }, + "blackList": [ + "java.lang.Class", + "java.lang.Thread", + "java.lang.invoke.*", + "java.lang.reflect.*", + "java.security.AccessController", + ], + "coreThreads": { + "$int": "&{oauth2.evaluate.scope.script.context.core.threads|10}", + }, + "idleTimeout": 60, + "maxThreads": { + "$int": "&{oauth2.evaluate.scope.script.context.max.threads|50}", + }, + "propertyNamePrefix": "esv.", + "queueSize": { + "$int": "&{oauth2.evaluate.scope.script.context.queue.size|10}", + }, + "serverTimeout": 0, + "useSecurityManager": true, + "whiteList": [ + "com.google.common.collect.ImmutableList", + "com.google.common.collect.Sets$1", + "com.iplanet.am.sdk.AMHashMap", + "com.iplanet.sso.providers.dpro.SSOTokenIDImpl", + "com.iplanet.sso.providers.dpro.SessionSsoToken", + "com.sun.identity.authentication.callbacks.HiddenValueCallback", + "com.sun.identity.authentication.callbacks.ReCaptchaCallback", + "com.sun.identity.authentication.callbacks.ScriptTextOutputCallback", + "com.sun.identity.authentication.spi.HttpCallback", + "com.sun.identity.authentication.spi.IdentifiableCallback", + "com.sun.identity.authentication.spi.MetadataCallback", + "com.sun.identity.authentication.spi.PagePropertiesCallback", + "com.sun.identity.authentication.spi.RedirectCallback", + "com.sun.identity.authentication.spi.X509CertificateCallback", + "com.sun.identity.common.CaseInsensitiveHashMap", + "com.sun.identity.common.CaseInsensitiveHashMap$Entry", + "com.sun.identity.idm.AMIdentity", + "com.sun.identity.idm.IdType", + "com.sun.identity.saml2.assertion.impl.AttributeImpl", + "com.sun.identity.saml2.common.SAML2Exception", + "com.sun.identity.saml2.plugins.scripted.IdpAttributeMapperScriptHelper", + "com.sun.identity.shared.debug.Debug", + "groovy.json.JsonSlurper", + "groovy.json.StringEscapeUtils", + "groovy.json.internal.LazyMap", + "java.io.ByteArrayInputStream", + "java.io.ByteArrayOutputStream", + "java.io.UnsupportedEncodingException", + "java.lang.Boolean", + "java.lang.Byte", + "java.lang.Character", + "java.lang.Character$Subset", + "java.lang.Character$UnicodeBlock", + "java.lang.Double", + "java.lang.Float", + "java.lang.Integer", + "java.lang.Long", + "java.lang.Math", + "java.lang.NullPointerException", + "java.lang.Number", + "java.lang.Object", + "java.lang.RuntimeException", + "java.lang.SecurityException", + "java.lang.Short", + "java.lang.StrictMath", + "java.lang.String", + "java.lang.Void", + "java.math.BigDecimal", + "java.math.BigInteger", + "java.net.URI", + "java.security.KeyFactory", + "java.security.KeyPair", + "java.security.KeyPairGenerator", + "java.security.KeyPairGenerator$*", + "java.security.MessageDigest", + "java.security.MessageDigest$Delegate", + "java.security.MessageDigest$Delegate$CloneableDelegate", + "java.security.NoSuchAlgorithmException", + "java.security.PrivateKey", + "java.security.PublicKey", + "java.security.cert.CertificateFactory", + "java.security.cert.X509Certificate", + "java.security.spec.MGF1ParameterSpec", + "java.security.spec.PKCS8EncodedKeySpec", + "java.security.spec.X509EncodedKeySpec", + "java.text.SimpleDateFormat", + "java.time.Clock", + "java.time.Clock$FixedClock", + "java.time.Clock$OffsetClock", + "java.time.Clock$SystemClock", + "java.time.Clock$TickClock", + "java.time.temporal.ChronoUnit", + "java.util.AbstractMap$*", + "java.util.ArrayList", + "java.util.ArrayList$Itr", + "java.util.Arrays", + "java.util.Collections", + "java.util.Collections$*", + "java.util.Date", + "java.util.HashMap", + "java.util.HashMap$Entry", + "java.util.HashMap$KeyIterator", + "java.util.HashMap$KeySet", + "java.util.HashMap$Node", + "java.util.HashSet", + "java.util.LinkedHashMap", + "java.util.LinkedHashMap$Entry", + "java.util.LinkedHashMap$LinkedEntryIterator", + "java.util.LinkedHashMap$LinkedEntrySet", + "java.util.LinkedHashMap$LinkedKeySet", + "java.util.LinkedHashSet", + "java.util.LinkedList", + "java.util.List", + "java.util.Locale", + "java.util.Map", + "java.util.TreeMap", + "java.util.TreeSet", + "java.util.UUID", + "javax.crypto.Cipher", + "javax.crypto.Mac", + "javax.crypto.spec.IvParameterSpec", + "javax.crypto.spec.OAEPParameterSpec", + "javax.crypto.spec.PSource", + "javax.crypto.spec.PSource$*", + "javax.crypto.spec.SecretKeySpec", + "javax.security.auth.callback.ChoiceCallback", + "javax.security.auth.callback.ConfirmationCallback", + "javax.security.auth.callback.LanguageCallback", + "javax.security.auth.callback.NameCallback", + "javax.security.auth.callback.PasswordCallback", + "javax.security.auth.callback.TextInputCallback", + "javax.security.auth.callback.TextOutputCallback", + "org.apache.groovy.json.internal.LazyMap", + "org.codehaus.groovy.runtime.GStringImpl", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "org.forgerock.guice.core.IdentityProvider", + "org.forgerock.guice.core.InjectorHolder", + "org.forgerock.http.Client", + "org.forgerock.http.Context", + "org.forgerock.http.Handler", + "org.forgerock.http.client.*", + "org.forgerock.http.context.RootContext", + "org.forgerock.http.header.*", + "org.forgerock.http.header.authorization.*", + "org.forgerock.http.protocol.*", + "org.forgerock.json.JsonValue", + "org.forgerock.json.jose.builders.EncryptedJwtBuilder", + "org.forgerock.json.jose.builders.EncryptedThenSignedJwtBuilder", + "org.forgerock.json.jose.builders.JweHeaderBuilder", + "org.forgerock.json.jose.builders.JwsHeaderBuilder", + "org.forgerock.json.jose.builders.JwtBuilderFactory", + "org.forgerock.json.jose.builders.SignedJwtBuilderImpl", + "org.forgerock.json.jose.builders.SignedThenEncryptedJwtBuilder", + "org.forgerock.json.jose.builders.SignedThenEncryptedJwtHeaderBuilder", + "org.forgerock.json.jose.jwe.EncryptedJwt", + "org.forgerock.json.jose.jwe.EncryptionMethod", + "org.forgerock.json.jose.jwe.JweAlgorithm", + "org.forgerock.json.jose.jwe.SignedThenEncryptedJwt", + "org.forgerock.json.jose.jwk.JWKSet", + "org.forgerock.json.jose.jwk.RsaJWK", + "org.forgerock.json.jose.jws.EncryptedThenSignedJwt", + "org.forgerock.json.jose.jws.JwsAlgorithm", + "org.forgerock.json.jose.jws.JwsHeader", + "org.forgerock.json.jose.jws.SignedEncryptedJwt", + "org.forgerock.json.jose.jws.SignedJwt", + "org.forgerock.json.jose.jws.SigningManager", + "org.forgerock.json.jose.jws.handlers.HmacSigningHandler", + "org.forgerock.json.jose.jws.handlers.RSASigningHandler", + "org.forgerock.json.jose.jws.handlers.SecretHmacSigningHandler", + "org.forgerock.json.jose.jws.handlers.SecretRSASigningHandler", + "org.forgerock.json.jose.jwt.JwtClaimsSet", + "org.forgerock.macaroons.Macaroon", + "org.forgerock.oauth.clients.oidc.Claim", + "org.forgerock.oauth2.core.GrantType", + "org.forgerock.oauth2.core.StatefulAccessToken", + "org.forgerock.oauth2.core.UserInfoClaims", + "org.forgerock.oauth2.core.exceptions.InvalidRequestException", + "org.forgerock.oauth2.core.tokenexchange.ExchangeableToken", + "org.forgerock.openam.auth.node.api.Action", + "org.forgerock.openam.auth.node.api.Action$ActionBuilder", + "org.forgerock.openam.auth.node.api.NodeState", + "org.forgerock.openam.auth.node.api.SuspendedTextOutputCallback", + "org.forgerock.openam.auth.nodes.IdentityProvider", + "org.forgerock.openam.auth.nodes.InjectorHolder", + "org.forgerock.openam.authentication.callbacks.AbstractValidatedCallback", + "org.forgerock.openam.authentication.callbacks.AttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.BooleanAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.ConsentMappingCallback", + "org.forgerock.openam.authentication.callbacks.DeviceProfileCallback", + "org.forgerock.openam.authentication.callbacks.IdPCallback", + "org.forgerock.openam.authentication.callbacks.KbaCreateCallback", + "org.forgerock.openam.authentication.callbacks.NumberAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.PollingWaitCallback", + "org.forgerock.openam.authentication.callbacks.SelectIdPCallback", + "org.forgerock.openam.authentication.callbacks.StringAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.TermsAndConditionsCallback", + "org.forgerock.openam.authentication.callbacks.ValidatedPasswordCallback", + "org.forgerock.openam.authentication.callbacks.ValidatedUsernameCallback", + "org.forgerock.openam.authentication.modules.scripted.*", + "org.forgerock.openam.core.rest.authn.callbackhandlers.*", + "org.forgerock.openam.core.rest.devices.deviceprint.DeviceIdDao", + "org.forgerock.openam.core.rest.devices.profile.DeviceProfilesDao", + "org.forgerock.openam.oauth2.OpenAMAccessToken", + "org.forgerock.openam.oauth2.token.grantset.Authorization$ModifiedAccessToken", + "org.forgerock.openam.oauth2.token.macaroon.MacaroonAccessToken", + "org.forgerock.openam.oauth2.token.stateless.StatelessAccessToken", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "org.forgerock.openam.scripting.api.ScriptedIdentity", + "org.forgerock.openam.scripting.api.ScriptedSession", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentity", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentityRepository", + "org.forgerock.openam.scripting.api.secrets.ScriptedSecrets", + "org.forgerock.openam.scripting.api.secrets.Secret", + "org.forgerock.openam.scripting.idrepo.ScriptIdentityRepository", + "org.forgerock.openam.shared.security.ThreadLocalSecureRandom", + "org.forgerock.openidconnect.Claim", + "org.forgerock.openidconnect.OpenIdConnectToken", + "org.forgerock.openidconnect.ssoprovider.OpenIdConnectSSOToken", + "org.forgerock.secrets.SecretBuilder", + "org.forgerock.secrets.keys.SigningKey", + "org.forgerock.secrets.keys.VerificationKey", + "org.forgerock.util.encode.Base64", + "org.forgerock.util.encode.Base64url", + "org.forgerock.util.encode.Hex", + "org.forgerock.util.promise.NeverThrowsException", + "org.forgerock.util.promise.Promise", + "org.forgerock.util.promise.PromiseImpl", + "org.mozilla.javascript.ConsString", + "org.mozilla.javascript.JavaScriptException", + "org.mozilla.javascript.WrappedException", + "sun.security.ec.ECPrivateKeyImpl", + "sun.security.rsa.RSAPrivateCrtKeyImpl", + "sun.security.rsa.RSAPublicKeyImpl", + "sun.security.x509.X500Name", + "sun.security.x509.X509CertImpl", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.util.Collections$UnmodifiableCollection$1", + "java.util.AbstractMap$SimpleImmutableEntry", + "java.util.Collections$1", + "java.util.Collections$EmptyList", + "java.util.Collections$SingletonList", + "java.util.Collections$UnmodifiableMap", + "java.util.Collections$UnmodifiableSet", + "org.forgerock.opendj.ldap.Rdn", + "org.forgerock.opendj.ldap.Dn", + "org.forgerock.openam.auth.nodes.VerifyTransactionsHelper", + ], + }, + "isHidden": false, + "languages": [ + "JAVASCRIPT", + "GROOVY", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/scripttype/OAUTH2_MAY_ACT.scripttype.json 1`] = ` +{ + "scripttype": { + "OAUTH2_MAY_ACT": { + "_id": "OAUTH2_MAY_ACT", + "_type": { + "_id": "contexts", + "collection": true, + "name": "scriptContext", + }, + "context": { + "_id": "OAUTH2_MAY_ACT", + "allowLists": [ + "org.forgerock.opendj.ldap.Dn", + "java.lang.Byte", + "java.util.Map", + "com.sun.identity.shared.debug.Debug", + "java.lang.Float", + "org.forgerock.oauth2.core.tokenexchange.ExchangeableToken", + "java.lang.StrictMath", + "java.lang.Character$Subset", + "java.util.ArrayList", + "org.forgerock.openam.oauth2.token.macaroon.MacaroonAccessToken", + "org.forgerock.openam.oauth2.OpenAMAccessToken", + "org.forgerock.oauth.clients.oidc.Claim", + "java.lang.Integer", + "groovy.json.JsonSlurper", + "org.forgerock.openidconnect.ssoprovider.OpenIdConnectSSOToken", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "java.lang.Math", + "org.forgerock.json.JsonValue", + "java.util.LinkedHashMap$Entry", + "java.lang.String", + "org.forgerock.http.Client", + "java.util.AbstractMap$SimpleImmutableEntry", + "org.forgerock.macaroons.Macaroon", + "java.util.LinkedHashSet", + "java.lang.Short", + "java.util.HashMap$Node", + "java.lang.Number", + "java.util.ArrayList$Itr", + "java.lang.Double", + "java.lang.Void", + "java.util.Collections$1", + "java.lang.Character$UnicodeBlock", + "org.forgerock.openam.shared.security.crypto.CertificateService", + "java.net.URI", + "com.sun.identity.idm.AMIdentity", + "java.util.Collections$UnmodifiableCollection$1", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "java.util.TreeSet", + "java.util.Collections$UnmodifiableSet", + "java.lang.Object", + "java.util.HashSet", + "org.forgerock.oauth2.core.GrantType", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "java.util.Collections$SingletonList", + "java.util.List", + "java.util.LinkedList", + "org.forgerock.oauth2.core.exceptions.InvalidRequestException", + "org.forgerock.http.client.*", + "org.forgerock.openam.oauth2.token.grantset.Authorization$ModifiedAccessToken", + "org.mozilla.javascript.JavaScriptException", + "java.lang.Long", + "java.util.LinkedHashMap$LinkedEntrySet", + "org.forgerock.http.protocol.*", + "groovy.json.internal.LazyMap", + "java.lang.Character", + "java.util.HashMap$KeySet", + "org.forgerock.oauth2.core.StatefulAccessToken", + "org.forgerock.opendj.ldap.Rdn", + "org.forgerock.oauth2.core.UserInfoClaims", + "sun.security.ec.ECPrivateKeyImpl", + "java.util.Locale", + "java.util.LinkedHashMap", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentityRepository", + "org.forgerock.openam.scripting.api.secrets.ScriptedSecrets", + "org.forgerock.openidconnect.Claim", + "com.sun.identity.common.CaseInsensitiveHashMap", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentity", + "java.lang.Boolean", + "java.util.LinkedHashMap$LinkedEntryIterator", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.util.HashMap$Entry", + "org.codehaus.groovy.runtime.GStringImpl", + "org.forgerock.openam.oauth2.token.stateless.StatelessAccessToken", + "org.forgerock.openidconnect.OpenIdConnectToken", + "java.util.HashMap$KeyIterator", + "java.util.Collections$EmptyList", + "java.util.TreeMap", + "com.google.common.collect.Sets$1", + "java.util.Collections$UnmodifiableMap", + "java.util.HashMap", + "com.iplanet.sso.providers.dpro.SessionSsoToken", + "org.forgerock.util.promise.PromiseImpl", + ], + "bindings": [], + "evaluatorVersions": { + "GROOVY": [ + "1.0", + ], + "JAVASCRIPT": [ + "1.0", + ], + }, + }, + "defaultScript": "[Empty]", + "engineConfiguration": { + "_id": "engineConfiguration", + "_type": { + "_id": "engineConfiguration", + "collection": false, + "name": "Scripting engine configuration", + }, + "blackList": [ + "java.lang.Class", + "java.lang.Thread", + "java.lang.invoke.*", + "java.lang.reflect.*", + "java.security.AccessController", + ], + "coreThreads": { + "$int": "&{oauth2.may.act.script.context.core.threads|10}", + }, + "idleTimeout": 60, + "maxThreads": { + "$int": "&{oauth2.may.act.script.context.max.threads|50}", + }, + "propertyNamePrefix": "esv.", + "queueSize": { + "$int": "&{oauth2.may.act.script.context.queue.size|10}", + }, + "serverTimeout": 0, + "useSecurityManager": true, + "whiteList": [ + "com.google.common.collect.ImmutableList", + "com.google.common.collect.Sets$1", + "com.iplanet.am.sdk.AMHashMap", + "com.iplanet.sso.providers.dpro.SSOTokenIDImpl", + "com.iplanet.sso.providers.dpro.SessionSsoToken", + "com.sun.identity.authentication.callbacks.HiddenValueCallback", + "com.sun.identity.authentication.callbacks.ReCaptchaCallback", + "com.sun.identity.authentication.callbacks.ScriptTextOutputCallback", + "com.sun.identity.authentication.spi.HttpCallback", + "com.sun.identity.authentication.spi.IdentifiableCallback", + "com.sun.identity.authentication.spi.MetadataCallback", + "com.sun.identity.authentication.spi.PagePropertiesCallback", + "com.sun.identity.authentication.spi.RedirectCallback", + "com.sun.identity.authentication.spi.X509CertificateCallback", + "com.sun.identity.common.CaseInsensitiveHashMap", + "com.sun.identity.common.CaseInsensitiveHashMap$Entry", + "com.sun.identity.idm.AMIdentity", + "com.sun.identity.idm.IdType", + "com.sun.identity.saml2.assertion.impl.AttributeImpl", + "com.sun.identity.saml2.common.SAML2Exception", + "com.sun.identity.saml2.plugins.scripted.IdpAttributeMapperScriptHelper", + "com.sun.identity.shared.debug.Debug", + "groovy.json.JsonSlurper", + "groovy.json.StringEscapeUtils", + "groovy.json.internal.LazyMap", + "java.io.ByteArrayInputStream", + "java.io.ByteArrayOutputStream", + "java.io.UnsupportedEncodingException", + "java.lang.Boolean", + "java.lang.Byte", + "java.lang.Character", + "java.lang.Character$Subset", + "java.lang.Character$UnicodeBlock", + "java.lang.Double", + "java.lang.Float", + "java.lang.Integer", + "java.lang.Long", + "java.lang.Math", + "java.lang.NullPointerException", + "java.lang.Number", + "java.lang.Object", + "java.lang.RuntimeException", + "java.lang.SecurityException", + "java.lang.Short", + "java.lang.StrictMath", + "java.lang.String", + "java.lang.Void", + "java.math.BigDecimal", + "java.math.BigInteger", + "java.net.URI", + "java.security.KeyFactory", + "java.security.KeyPair", + "java.security.KeyPairGenerator", + "java.security.KeyPairGenerator$*", + "java.security.MessageDigest", + "java.security.MessageDigest$Delegate", + "java.security.MessageDigest$Delegate$CloneableDelegate", + "java.security.NoSuchAlgorithmException", + "java.security.PrivateKey", + "java.security.PublicKey", + "java.security.cert.CertificateFactory", + "java.security.cert.X509Certificate", + "java.security.spec.MGF1ParameterSpec", + "java.security.spec.PKCS8EncodedKeySpec", + "java.security.spec.X509EncodedKeySpec", + "java.text.SimpleDateFormat", + "java.time.Clock", + "java.time.Clock$FixedClock", + "java.time.Clock$OffsetClock", + "java.time.Clock$SystemClock", + "java.time.Clock$TickClock", + "java.time.temporal.ChronoUnit", + "java.util.AbstractMap$*", + "java.util.ArrayList", + "java.util.ArrayList$Itr", + "java.util.Arrays", + "java.util.Collections", + "java.util.Collections$*", + "java.util.Date", + "java.util.HashMap", + "java.util.HashMap$Entry", + "java.util.HashMap$KeyIterator", + "java.util.HashMap$KeySet", + "java.util.HashMap$Node", + "java.util.HashSet", + "java.util.LinkedHashMap", + "java.util.LinkedHashMap$Entry", + "java.util.LinkedHashMap$LinkedEntryIterator", + "java.util.LinkedHashMap$LinkedEntrySet", + "java.util.LinkedHashMap$LinkedKeySet", + "java.util.LinkedHashSet", + "java.util.LinkedList", + "java.util.List", + "java.util.Locale", + "java.util.Map", + "java.util.TreeMap", + "java.util.TreeSet", + "java.util.UUID", + "javax.crypto.Cipher", + "javax.crypto.Mac", + "javax.crypto.spec.IvParameterSpec", + "javax.crypto.spec.OAEPParameterSpec", + "javax.crypto.spec.PSource", + "javax.crypto.spec.PSource$*", + "javax.crypto.spec.SecretKeySpec", + "javax.security.auth.callback.ChoiceCallback", + "javax.security.auth.callback.ConfirmationCallback", + "javax.security.auth.callback.LanguageCallback", + "javax.security.auth.callback.NameCallback", + "javax.security.auth.callback.PasswordCallback", + "javax.security.auth.callback.TextInputCallback", + "javax.security.auth.callback.TextOutputCallback", + "org.apache.groovy.json.internal.LazyMap", + "org.codehaus.groovy.runtime.GStringImpl", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "org.forgerock.guice.core.IdentityProvider", + "org.forgerock.guice.core.InjectorHolder", + "org.forgerock.http.Client", + "org.forgerock.http.Context", + "org.forgerock.http.Handler", + "org.forgerock.http.client.*", + "org.forgerock.http.context.RootContext", + "org.forgerock.http.header.*", + "org.forgerock.http.header.authorization.*", + "org.forgerock.http.protocol.*", + "org.forgerock.json.JsonValue", + "org.forgerock.json.jose.builders.EncryptedJwtBuilder", + "org.forgerock.json.jose.builders.EncryptedThenSignedJwtBuilder", + "org.forgerock.json.jose.builders.JweHeaderBuilder", + "org.forgerock.json.jose.builders.JwsHeaderBuilder", + "org.forgerock.json.jose.builders.JwtBuilderFactory", + "org.forgerock.json.jose.builders.SignedJwtBuilderImpl", + "org.forgerock.json.jose.builders.SignedThenEncryptedJwtBuilder", + "org.forgerock.json.jose.builders.SignedThenEncryptedJwtHeaderBuilder", + "org.forgerock.json.jose.jwe.EncryptedJwt", + "org.forgerock.json.jose.jwe.EncryptionMethod", + "org.forgerock.json.jose.jwe.JweAlgorithm", + "org.forgerock.json.jose.jwe.SignedThenEncryptedJwt", + "org.forgerock.json.jose.jwk.JWKSet", + "org.forgerock.json.jose.jwk.RsaJWK", + "org.forgerock.json.jose.jws.EncryptedThenSignedJwt", + "org.forgerock.json.jose.jws.JwsAlgorithm", + "org.forgerock.json.jose.jws.JwsHeader", + "org.forgerock.json.jose.jws.SignedEncryptedJwt", + "org.forgerock.json.jose.jws.SignedJwt", + "org.forgerock.json.jose.jws.SigningManager", + "org.forgerock.json.jose.jws.handlers.HmacSigningHandler", + "org.forgerock.json.jose.jws.handlers.RSASigningHandler", + "org.forgerock.json.jose.jws.handlers.SecretHmacSigningHandler", + "org.forgerock.json.jose.jws.handlers.SecretRSASigningHandler", + "org.forgerock.json.jose.jwt.JwtClaimsSet", + "org.forgerock.macaroons.Macaroon", + "org.forgerock.oauth.clients.oidc.Claim", + "org.forgerock.oauth2.core.GrantType", + "org.forgerock.oauth2.core.StatefulAccessToken", + "org.forgerock.oauth2.core.UserInfoClaims", + "org.forgerock.oauth2.core.exceptions.InvalidRequestException", + "org.forgerock.oauth2.core.tokenexchange.ExchangeableToken", + "org.forgerock.openam.auth.node.api.Action", + "org.forgerock.openam.auth.node.api.Action$ActionBuilder", + "org.forgerock.openam.auth.node.api.NodeState", + "org.forgerock.openam.auth.node.api.SuspendedTextOutputCallback", + "org.forgerock.openam.auth.nodes.IdentityProvider", + "org.forgerock.openam.auth.nodes.InjectorHolder", + "org.forgerock.openam.authentication.callbacks.AbstractValidatedCallback", + "org.forgerock.openam.authentication.callbacks.AttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.BooleanAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.ConsentMappingCallback", + "org.forgerock.openam.authentication.callbacks.DeviceProfileCallback", + "org.forgerock.openam.authentication.callbacks.IdPCallback", + "org.forgerock.openam.authentication.callbacks.KbaCreateCallback", + "org.forgerock.openam.authentication.callbacks.NumberAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.PollingWaitCallback", + "org.forgerock.openam.authentication.callbacks.SelectIdPCallback", + "org.forgerock.openam.authentication.callbacks.StringAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.TermsAndConditionsCallback", + "org.forgerock.openam.authentication.callbacks.ValidatedPasswordCallback", + "org.forgerock.openam.authentication.callbacks.ValidatedUsernameCallback", + "org.forgerock.openam.authentication.modules.scripted.*", + "org.forgerock.openam.core.rest.authn.callbackhandlers.*", + "org.forgerock.openam.core.rest.devices.deviceprint.DeviceIdDao", + "org.forgerock.openam.core.rest.devices.profile.DeviceProfilesDao", + "org.forgerock.openam.oauth2.OpenAMAccessToken", + "org.forgerock.openam.oauth2.token.grantset.Authorization$ModifiedAccessToken", + "org.forgerock.openam.oauth2.token.macaroon.MacaroonAccessToken", + "org.forgerock.openam.oauth2.token.stateless.StatelessAccessToken", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "org.forgerock.openam.scripting.api.ScriptedIdentity", + "org.forgerock.openam.scripting.api.ScriptedSession", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentity", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentityRepository", + "org.forgerock.openam.scripting.api.secrets.ScriptedSecrets", + "org.forgerock.openam.scripting.api.secrets.Secret", + "org.forgerock.openam.scripting.idrepo.ScriptIdentityRepository", + "org.forgerock.openam.shared.security.ThreadLocalSecureRandom", + "org.forgerock.openidconnect.Claim", + "org.forgerock.openidconnect.OpenIdConnectToken", + "org.forgerock.openidconnect.ssoprovider.OpenIdConnectSSOToken", + "org.forgerock.secrets.SecretBuilder", + "org.forgerock.secrets.keys.SigningKey", + "org.forgerock.secrets.keys.VerificationKey", + "org.forgerock.util.encode.Base64", + "org.forgerock.util.encode.Base64url", + "org.forgerock.util.encode.Hex", + "org.forgerock.util.promise.NeverThrowsException", + "org.forgerock.util.promise.Promise", + "org.forgerock.util.promise.PromiseImpl", + "org.mozilla.javascript.ConsString", + "org.mozilla.javascript.JavaScriptException", + "org.mozilla.javascript.WrappedException", + "sun.security.ec.ECPrivateKeyImpl", + "sun.security.rsa.RSAPrivateCrtKeyImpl", + "sun.security.rsa.RSAPublicKeyImpl", + "sun.security.x509.X500Name", + "sun.security.x509.X509CertImpl", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.util.Collections$UnmodifiableCollection$1", + "java.util.AbstractMap$SimpleImmutableEntry", + "java.util.Collections$1", + "java.util.Collections$EmptyList", + "java.util.Collections$SingletonList", + "java.util.Collections$UnmodifiableMap", + "java.util.Collections$UnmodifiableSet", + "org.forgerock.opendj.ldap.Rdn", + "org.forgerock.opendj.ldap.Dn", + "org.forgerock.openam.auth.nodes.VerifyTransactionsHelper", + ], + }, + "isHidden": false, + "languages": [ + "JAVASCRIPT", + "GROOVY", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/scripttype/OAUTH2_SCRIPTED_JWT_ISSUER.scripttype.json 1`] = ` +{ + "scripttype": { + "OAUTH2_SCRIPTED_JWT_ISSUER": { + "_id": "OAUTH2_SCRIPTED_JWT_ISSUER", + "_type": { + "_id": "contexts", + "collection": true, + "name": "scriptContext", + }, + "context": { + "_id": "OAUTH2_SCRIPTED_JWT_ISSUER", + "allowLists": [ + "java.util.Collections$EmptyList", + "java.util.List", + "com.sun.identity.common.CaseInsensitiveHashMap", + "java.lang.Long", + "org.forgerock.oauth.clients.oidc.Claim", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "java.util.HashSet", + "org.forgerock.oauth2.core.exceptions.ServerException", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentityRepository", + "java.util.Map", + "org.forgerock.openam.shared.security.crypto.CertificateService", + "java.util.HashMap", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.lang.Byte", + "com.google.common.collect.Sets$1", + "groovy.json.internal.LazyMap", + "java.lang.Character$UnicodeBlock", + "java.lang.Integer", + "java.util.ArrayList$Itr", + "java.lang.Character$Subset", + "java.util.LinkedHashMap$Entry", + "java.lang.StrictMath", + "java.util.Collections$UnmodifiableSet", + "com.sun.identity.idm.AMIdentity", + "java.lang.Short", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "java.util.Collections$SingletonList", + "java.util.Locale", + "java.net.URI", + "java.util.Collections$UnmodifiableMap", + "org.forgerock.opendj.ldap.Dn", + "java.util.TreeSet", + "java.lang.Double", + "java.util.HashMap$KeyIterator", + "java.util.HashMap$Node", + "java.util.LinkedHashMap$LinkedEntryIterator", + "org.forgerock.util.promise.PromiseImpl", + "java.lang.Number", + "java.util.TreeMap", + "org.forgerock.http.protocol.*", + "com.sun.identity.shared.debug.Debug", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "java.util.Collections$1", + "java.lang.Object", + "java.lang.Boolean", + "org.forgerock.oauth2.core.TrustedJwtIssuerConfig", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "org.forgerock.opendj.ldap.Rdn", + "java.util.LinkedHashMap$LinkedEntrySet", + "groovy.json.JsonSlurper", + "org.mozilla.javascript.JavaScriptException", + "java.util.AbstractMap$SimpleImmutableEntry", + "com.iplanet.sso.providers.dpro.SessionSsoToken", + "org.forgerock.http.Client", + "java.util.ArrayList", + "java.lang.Void", + "org.forgerock.openam.scripting.api.secrets.ScriptedSecrets", + "java.util.LinkedHashSet", + "java.lang.Math", + "java.util.HashMap$Entry", + "org.forgerock.json.JsonValue", + "org.forgerock.http.client.*", + "org.codehaus.groovy.runtime.GStringImpl", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentity", + "java.util.LinkedHashMap", + "java.util.Collections$UnmodifiableCollection$1", + "java.lang.Float", + "java.util.HashMap$KeySet", + "sun.security.ec.ECPrivateKeyImpl", + "java.lang.Character", + "java.lang.String", + "java.util.LinkedList", + ], + "bindings": [], + "evaluatorVersions": { + "GROOVY": [ + "1.0", + ], + "JAVASCRIPT": [ + "1.0", + ], + }, + }, + "defaultScript": "400e48ba-3f13-4144-ac7b-f824ea8e98c5", + "engineConfiguration": { + "_id": "engineConfiguration", + "_type": { + "_id": "engineConfiguration", + "collection": false, + "name": "Scripting engine configuration", + }, + "blackList": [ + "java.lang.Class", + "java.lang.Thread", + "java.lang.invoke.*", + "java.lang.reflect.*", + "java.security.AccessController", + ], + "coreThreads": { + "$int": "&{oauth2.scripted.jwt.issuer.script.context.core.threads|10}", + }, + "idleTimeout": 60, + "maxThreads": { + "$int": "&{oauth2.scripted.jwt.issuer.script.context.max.threads|50}", + }, + "propertyNamePrefix": "esv.", + "queueSize": { + "$int": "&{oauth2.scripted.jwt.issuer.script.context.queue.size|10}", + }, + "serverTimeout": 0, + "useSecurityManager": true, + "whiteList": [ + "com.google.common.collect.Sets$1", + "com.iplanet.sso.providers.dpro.SessionSsoToken", + "com.sun.identity.common.CaseInsensitiveHashMap", + "com.sun.identity.idm.AMIdentity", + "com.sun.identity.shared.debug.Debug", + "groovy.json.JsonSlurper", + "groovy.json.internal.LazyMap", + "java.lang.Boolean", + "java.lang.Byte", + "java.lang.Character", + "java.lang.Character$Subset", + "java.lang.Character$UnicodeBlock", + "java.lang.Double", + "java.lang.Float", + "java.lang.Integer", + "java.lang.Long", + "java.lang.Math", + "java.lang.Number", + "java.lang.Object", + "java.lang.Short", + "java.lang.StrictMath", + "java.lang.String", + "java.lang.Void", + "java.net.URI", + "java.util.AbstractMap$SimpleImmutableEntry", + "java.util.ArrayList", + "java.util.ArrayList$Itr", + "java.util.Collections$1", + "java.util.Collections$EmptyList", + "java.util.Collections$SingletonList", + "java.util.Collections$UnmodifiableCollection$1", + "java.util.Collections$UnmodifiableMap", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.util.Collections$UnmodifiableSet", + "java.util.HashMap", + "java.util.HashMap$Entry", + "java.util.HashMap$KeyIterator", + "java.util.HashMap$KeySet", + "java.util.HashMap$Node", + "java.util.HashSet", + "java.util.LinkedHashMap", + "java.util.LinkedHashMap$Entry", + "java.util.LinkedHashMap$LinkedEntryIterator", + "java.util.LinkedHashMap$LinkedEntrySet", + "java.util.LinkedHashSet", + "java.util.LinkedList", + "java.util.List", + "java.util.Locale", + "java.util.Map", + "java.util.TreeMap", + "java.util.TreeSet", + "org.codehaus.groovy.runtime.GStringImpl", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "org.forgerock.http.Client", + "org.forgerock.http.client.*", + "org.forgerock.http.protocol.*", + "org.forgerock.json.JsonValue", + "org.forgerock.oauth.clients.oidc.Claim", + "org.forgerock.oauth2.core.TrustedJwtIssuerConfig", + "org.forgerock.oauth2.core.exceptions.ServerException", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentity", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentityRepository", + "org.forgerock.openam.scripting.api.secrets.ScriptedSecrets", + "org.forgerock.openam.shared.security.crypto.CertificateService", + "org.forgerock.util.promise.PromiseImpl", + "org.mozilla.javascript.JavaScriptException", + "sun.security.ec.ECPrivateKeyImpl", + "org.forgerock.openam.scripting.api.ScriptedIdentity", + "org.forgerock.opendj.ldap.Rdn", + "org.forgerock.opendj.ldap.Dn", + ], + }, + "isHidden": false, + "languages": [ + "JAVASCRIPT", + "GROOVY", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/scripttype/OAUTH2_VALIDATE_SCOPE.scripttype.json 1`] = ` +{ + "scripttype": { + "OAUTH2_VALIDATE_SCOPE": { + "_id": "OAUTH2_VALIDATE_SCOPE", + "_type": { + "_id": "contexts", + "collection": true, + "name": "scriptContext", + }, + "context": { + "_id": "OAUTH2_VALIDATE_SCOPE", + "allowLists": [ + "java.util.Collections$UnmodifiableSet", + "org.codehaus.groovy.runtime.GStringImpl", + "org.forgerock.openam.shared.security.crypto.CertificateService", + "java.util.Map", + "java.util.TreeMap", + "java.lang.Long", + "java.lang.Byte", + "java.lang.Math", + "java.util.LinkedHashMap$LinkedEntrySet", + "sun.security.ec.ECPrivateKeyImpl", + "org.forgerock.json.JsonValue", + "java.util.TreeSet", + "java.util.HashMap", + "java.lang.Boolean", + "java.util.ArrayList", + "java.util.Collections$EmptyList", + "java.util.HashSet", + "java.util.ArrayList$Itr", + "java.lang.Object", + "org.mozilla.javascript.JavaScriptException", + "java.util.Collections$1", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentityRepository", + "org.forgerock.openam.scripting.api.secrets.ScriptedSecrets", + "java.util.LinkedHashMap", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "java.lang.StrictMath", + "java.util.Collections$UnmodifiableCollection$1", + "java.util.HashMap$Node", + "java.util.LinkedHashSet", + "org.forgerock.http.protocol.*", + "java.lang.Character$UnicodeBlock", + "org.forgerock.util.promise.PromiseImpl", + "org.forgerock.http.client.*", + "org.forgerock.oauth.clients.oidc.Claim", + "java.lang.Character$Subset", + "java.lang.Double", + "java.util.LinkedHashMap$Entry", + "com.sun.identity.shared.debug.Debug", + "java.lang.Number", + "org.forgerock.oauth2.core.exceptions.InvalidScopeException", + "java.lang.String", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "java.util.HashMap$KeySet", + "java.lang.Integer", + "java.util.LinkedList", + "com.iplanet.sso.providers.dpro.SessionSsoToken", + "groovy.json.JsonSlurper", + "java.util.Collections$SingletonList", + "java.util.LinkedHashMap$LinkedEntryIterator", + "java.util.Locale", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "org.forgerock.http.Client", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "java.util.HashMap$Entry", + "com.google.common.collect.Sets$1", + "org.forgerock.opendj.ldap.Dn", + "com.sun.identity.common.CaseInsensitiveHashMap", + "org.forgerock.opendj.ldap.Rdn", + "java.lang.Character", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentity", + "java.util.List", + "java.lang.Float", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.lang.Void", + "groovy.json.internal.LazyMap", + "java.util.AbstractMap$SimpleImmutableEntry", + "java.util.Collections$UnmodifiableMap", + "java.net.URI", + "java.lang.Short", + "java.util.HashMap$KeyIterator", + ], + "bindings": [], + "evaluatorVersions": { + "GROOVY": [ + "1.0", + ], + "JAVASCRIPT": [ + "1.0", + ], + }, + }, + "defaultScript": "[Empty]", + "engineConfiguration": { + "_id": "engineConfiguration", + "_type": { + "_id": "engineConfiguration", + "collection": false, + "name": "Scripting engine configuration", + }, + "blackList": [ + "java.lang.Class", + "java.lang.Thread", + "java.lang.invoke.*", + "java.lang.reflect.*", + "java.security.AccessController", + ], + "coreThreads": { + "$int": "&{oauth2.validate.scope.script.context.core.threads|10}", + }, + "idleTimeout": 60, + "maxThreads": { + "$int": "&{oauth2.validate.scope.script.context.max.threads|50}", + }, + "propertyNamePrefix": "esv.", + "queueSize": { + "$int": "&{oauth2.validate.scope.script.context.queue.size|10}", + }, + "serverTimeout": 0, + "useSecurityManager": true, + "whiteList": [ + "com.google.common.collect.ImmutableList", + "com.google.common.collect.Sets$1", + "com.iplanet.am.sdk.AMHashMap", + "com.iplanet.sso.providers.dpro.SSOTokenIDImpl", + "com.iplanet.sso.providers.dpro.SessionSsoToken", + "com.sun.identity.authentication.callbacks.HiddenValueCallback", + "com.sun.identity.authentication.callbacks.ReCaptchaCallback", + "com.sun.identity.authentication.callbacks.ScriptTextOutputCallback", + "com.sun.identity.authentication.spi.HttpCallback", + "com.sun.identity.authentication.spi.IdentifiableCallback", + "com.sun.identity.authentication.spi.MetadataCallback", + "com.sun.identity.authentication.spi.PagePropertiesCallback", + "com.sun.identity.authentication.spi.RedirectCallback", + "com.sun.identity.authentication.spi.X509CertificateCallback", + "com.sun.identity.common.CaseInsensitiveHashMap", + "com.sun.identity.common.CaseInsensitiveHashMap$Entry", + "com.sun.identity.idm.AMIdentity", + "com.sun.identity.idm.IdType", + "com.sun.identity.saml2.assertion.impl.AttributeImpl", + "com.sun.identity.saml2.common.SAML2Exception", + "com.sun.identity.saml2.plugins.scripted.IdpAttributeMapperScriptHelper", + "com.sun.identity.shared.debug.Debug", + "groovy.json.JsonSlurper", + "groovy.json.StringEscapeUtils", + "groovy.json.internal.LazyMap", + "java.io.ByteArrayInputStream", + "java.io.ByteArrayOutputStream", + "java.io.UnsupportedEncodingException", + "java.lang.Boolean", + "java.lang.Byte", + "java.lang.Character", + "java.lang.Character$Subset", + "java.lang.Character$UnicodeBlock", + "java.lang.Double", + "java.lang.Float", + "java.lang.Integer", + "java.lang.Long", + "java.lang.Math", + "java.lang.NullPointerException", + "java.lang.Number", + "java.lang.Object", + "java.lang.RuntimeException", + "java.lang.SecurityException", + "java.lang.Short", + "java.lang.StrictMath", + "java.lang.String", + "java.lang.Void", + "java.math.BigDecimal", + "java.math.BigInteger", + "java.net.URI", + "java.security.KeyFactory", + "java.security.KeyPair", + "java.security.KeyPairGenerator", + "java.security.KeyPairGenerator$*", + "java.security.MessageDigest", + "java.security.MessageDigest$Delegate", + "java.security.MessageDigest$Delegate$CloneableDelegate", + "java.security.NoSuchAlgorithmException", + "java.security.PrivateKey", + "java.security.PublicKey", + "java.security.cert.CertificateFactory", + "java.security.cert.X509Certificate", + "java.security.spec.MGF1ParameterSpec", + "java.security.spec.PKCS8EncodedKeySpec", + "java.security.spec.X509EncodedKeySpec", + "java.text.SimpleDateFormat", + "java.time.Clock", + "java.time.Clock$FixedClock", + "java.time.Clock$OffsetClock", + "java.time.Clock$SystemClock", + "java.time.Clock$TickClock", + "java.time.temporal.ChronoUnit", + "java.util.AbstractMap$*", + "java.util.ArrayList", + "java.util.ArrayList$Itr", + "java.util.Arrays", + "java.util.Collections", + "java.util.Collections$*", + "java.util.Date", + "java.util.HashMap", + "java.util.HashMap$Entry", + "java.util.HashMap$KeyIterator", + "java.util.HashMap$KeySet", + "java.util.HashMap$Node", + "java.util.HashSet", + "java.util.LinkedHashMap", + "java.util.LinkedHashMap$Entry", + "java.util.LinkedHashMap$LinkedEntryIterator", + "java.util.LinkedHashMap$LinkedEntrySet", + "java.util.LinkedHashMap$LinkedKeySet", + "java.util.LinkedHashSet", + "java.util.LinkedList", + "java.util.List", + "java.util.Locale", + "java.util.Map", + "java.util.TreeMap", + "java.util.TreeSet", + "java.util.UUID", + "javax.crypto.Cipher", + "javax.crypto.Mac", + "javax.crypto.spec.IvParameterSpec", + "javax.crypto.spec.OAEPParameterSpec", + "javax.crypto.spec.PSource", + "javax.crypto.spec.PSource$*", + "javax.crypto.spec.SecretKeySpec", + "javax.security.auth.callback.ChoiceCallback", + "javax.security.auth.callback.ConfirmationCallback", + "javax.security.auth.callback.LanguageCallback", + "javax.security.auth.callback.NameCallback", + "javax.security.auth.callback.PasswordCallback", + "javax.security.auth.callback.TextInputCallback", + "javax.security.auth.callback.TextOutputCallback", + "org.apache.groovy.json.internal.LazyMap", + "org.codehaus.groovy.runtime.GStringImpl", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "org.forgerock.guice.core.IdentityProvider", + "org.forgerock.guice.core.InjectorHolder", + "org.forgerock.http.Client", + "org.forgerock.http.Context", + "org.forgerock.http.Handler", + "org.forgerock.http.client.*", + "org.forgerock.http.context.RootContext", + "org.forgerock.http.header.*", + "org.forgerock.http.header.authorization.*", + "org.forgerock.http.protocol.*", + "org.forgerock.json.JsonValue", + "org.forgerock.json.jose.builders.EncryptedJwtBuilder", + "org.forgerock.json.jose.builders.EncryptedThenSignedJwtBuilder", + "org.forgerock.json.jose.builders.JweHeaderBuilder", + "org.forgerock.json.jose.builders.JwsHeaderBuilder", + "org.forgerock.json.jose.builders.JwtBuilderFactory", + "org.forgerock.json.jose.builders.SignedJwtBuilderImpl", + "org.forgerock.json.jose.builders.SignedThenEncryptedJwtBuilder", + "org.forgerock.json.jose.builders.SignedThenEncryptedJwtHeaderBuilder", + "org.forgerock.json.jose.jwe.EncryptedJwt", + "org.forgerock.json.jose.jwe.EncryptionMethod", + "org.forgerock.json.jose.jwe.JweAlgorithm", + "org.forgerock.json.jose.jwe.SignedThenEncryptedJwt", + "org.forgerock.json.jose.jwk.JWKSet", + "org.forgerock.json.jose.jwk.RsaJWK", + "org.forgerock.json.jose.jws.EncryptedThenSignedJwt", + "org.forgerock.json.jose.jws.JwsAlgorithm", + "org.forgerock.json.jose.jws.JwsHeader", + "org.forgerock.json.jose.jws.SignedEncryptedJwt", + "org.forgerock.json.jose.jws.SignedJwt", + "org.forgerock.json.jose.jws.SigningManager", + "org.forgerock.json.jose.jws.handlers.HmacSigningHandler", + "org.forgerock.json.jose.jws.handlers.RSASigningHandler", + "org.forgerock.json.jose.jws.handlers.SecretHmacSigningHandler", + "org.forgerock.json.jose.jws.handlers.SecretRSASigningHandler", + "org.forgerock.json.jose.jwt.JwtClaimsSet", + "org.forgerock.macaroons.Macaroon", + "org.forgerock.oauth.clients.oidc.Claim", + "org.forgerock.oauth2.core.GrantType", + "org.forgerock.oauth2.core.StatefulAccessToken", + "org.forgerock.oauth2.core.UserInfoClaims", + "org.forgerock.oauth2.core.exceptions.InvalidRequestException", + "org.forgerock.oauth2.core.tokenexchange.ExchangeableToken", + "org.forgerock.openam.auth.node.api.Action", + "org.forgerock.openam.auth.node.api.Action$ActionBuilder", + "org.forgerock.openam.auth.node.api.NodeState", + "org.forgerock.openam.auth.node.api.SuspendedTextOutputCallback", + "org.forgerock.openam.auth.nodes.IdentityProvider", + "org.forgerock.openam.auth.nodes.InjectorHolder", + "org.forgerock.openam.authentication.callbacks.AbstractValidatedCallback", + "org.forgerock.openam.authentication.callbacks.AttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.BooleanAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.ConsentMappingCallback", + "org.forgerock.openam.authentication.callbacks.DeviceProfileCallback", + "org.forgerock.openam.authentication.callbacks.IdPCallback", + "org.forgerock.openam.authentication.callbacks.KbaCreateCallback", + "org.forgerock.openam.authentication.callbacks.NumberAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.PollingWaitCallback", + "org.forgerock.openam.authentication.callbacks.SelectIdPCallback", + "org.forgerock.openam.authentication.callbacks.StringAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.TermsAndConditionsCallback", + "org.forgerock.openam.authentication.callbacks.ValidatedPasswordCallback", + "org.forgerock.openam.authentication.callbacks.ValidatedUsernameCallback", + "org.forgerock.openam.authentication.modules.scripted.*", + "org.forgerock.openam.core.rest.authn.callbackhandlers.*", + "org.forgerock.openam.core.rest.devices.deviceprint.DeviceIdDao", + "org.forgerock.openam.core.rest.devices.profile.DeviceProfilesDao", + "org.forgerock.openam.oauth2.OpenAMAccessToken", + "org.forgerock.openam.oauth2.token.grantset.Authorization$ModifiedAccessToken", + "org.forgerock.openam.oauth2.token.macaroon.MacaroonAccessToken", + "org.forgerock.openam.oauth2.token.stateless.StatelessAccessToken", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "org.forgerock.openam.scripting.api.ScriptedIdentity", + "org.forgerock.openam.scripting.api.ScriptedSession", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentity", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentityRepository", + "org.forgerock.openam.scripting.api.secrets.ScriptedSecrets", + "org.forgerock.openam.scripting.api.secrets.Secret", + "org.forgerock.openam.scripting.idrepo.ScriptIdentityRepository", + "org.forgerock.openam.shared.security.ThreadLocalSecureRandom", + "org.forgerock.openidconnect.Claim", + "org.forgerock.openidconnect.OpenIdConnectToken", + "org.forgerock.openidconnect.ssoprovider.OpenIdConnectSSOToken", + "org.forgerock.secrets.SecretBuilder", + "org.forgerock.secrets.keys.SigningKey", + "org.forgerock.secrets.keys.VerificationKey", + "org.forgerock.util.encode.Base64", + "org.forgerock.util.encode.Base64url", + "org.forgerock.util.encode.Hex", + "org.forgerock.util.promise.NeverThrowsException", + "org.forgerock.util.promise.Promise", + "org.forgerock.util.promise.PromiseImpl", + "org.mozilla.javascript.ConsString", + "org.mozilla.javascript.JavaScriptException", + "org.mozilla.javascript.WrappedException", + "sun.security.ec.ECPrivateKeyImpl", + "sun.security.rsa.RSAPrivateCrtKeyImpl", + "sun.security.rsa.RSAPublicKeyImpl", + "sun.security.x509.X500Name", + "sun.security.x509.X509CertImpl", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.util.Collections$UnmodifiableCollection$1", + "java.util.AbstractMap$SimpleImmutableEntry", + "java.util.Collections$1", + "java.util.Collections$EmptyList", + "java.util.Collections$SingletonList", + "java.util.Collections$UnmodifiableMap", + "java.util.Collections$UnmodifiableSet", + "org.forgerock.opendj.ldap.Rdn", + "org.forgerock.opendj.ldap.Dn", + "org.forgerock.openam.auth.nodes.VerifyTransactionsHelper", + ], + }, + "isHidden": false, + "languages": [ + "JAVASCRIPT", + "GROOVY", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/scripttype/OIDC_CLAIMS.scripttype.json 1`] = ` +{ + "scripttype": { + "OIDC_CLAIMS": { + "_id": "OIDC_CLAIMS", + "_type": { + "_id": "contexts", + "collection": true, + "name": "scriptContext", + }, + "context": { + "_id": "OIDC_CLAIMS", + "allowLists": [ + "com.sun.identity.shared.debug.Debug", + "java.lang.Double", + "java.util.Collections$SingletonList", + "org.forgerock.oauth2.core.GrantType", + "org.forgerock.oauth.clients.oidc.Claim", + "org.mozilla.javascript.JavaScriptException", + "groovy.json.JsonSlurper", + "groovy.json.internal.LazyMap", + "java.lang.Void", + "java.util.AbstractMap$SimpleImmutableEntry", + "java.util.Collections$EmptyList", + "java.util.List", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentityRepository", + "org.forgerock.json.JsonValue", + "org.forgerock.http.protocol.*", + "java.util.LinkedHashMap", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "java.lang.Character", + "java.lang.Object", + "java.util.LinkedHashMap$LinkedEntryIterator", + "org.forgerock.util.promise.PromiseImpl", + "org.forgerock.opendj.ldap.Rdn", + "java.util.HashMap$KeyIterator", + "java.lang.Math", + "java.util.HashMap$KeySet", + "java.util.LinkedHashMap$Entry", + "java.util.LinkedHashMap$LinkedEntrySet", + "java.util.LinkedList", + "java.util.ArrayList", + "org.forgerock.oauth2.core.UserInfoClaims", + "java.lang.Long", + "java.util.HashSet", + "org.codehaus.groovy.runtime.GStringImpl", + "java.util.TreeSet", + "org.forgerock.openam.oauth2.OpenAMAccessToken", + "java.util.Collections$1", + "com.sun.identity.common.CaseInsensitiveHashMap", + "java.lang.Boolean", + "java.util.HashMap$Entry", + "org.forgerock.openam.oauth2.token.macaroon.MacaroonAccessToken", + "java.lang.Byte", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.lang.Integer", + "java.util.ArrayList$Itr", + "java.lang.Short", + "java.util.Collections$UnmodifiableSet", + "java.util.Locale", + "org.forgerock.openam.scripting.api.secrets.ScriptedSecrets", + "com.google.common.collect.Sets$1", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "com.sun.identity.idm.AMIdentity", + "java.lang.Character$UnicodeBlock", + "java.lang.Character$Subset", + "java.lang.String", + "java.net.URI", + "java.util.HashMap", + "org.forgerock.http.client.*", + "java.util.TreeMap", + "org.forgerock.oauth2.core.exceptions.InvalidRequestException", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "com.iplanet.sso.providers.dpro.SessionSsoToken", + "java.util.Collections$UnmodifiableMap", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentity", + "sun.security.ec.ECPrivateKeyImpl", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "org.forgerock.macaroons.Macaroon", + "java.util.Map", + "org.forgerock.opendj.ldap.Dn", + "org.forgerock.openidconnect.ssoprovider.OpenIdConnectSSOToken", + "org.forgerock.openidconnect.Claim", + "org.forgerock.openam.shared.security.crypto.CertificateService", + "java.util.Collections$UnmodifiableCollection$1", + "java.lang.Float", + "java.util.HashMap$Node", + "java.util.LinkedHashSet", + "java.lang.Number", + "java.lang.StrictMath", + "org.forgerock.http.Client", + ], + "bindings": [], + "evaluatorVersions": { + "GROOVY": [ + "1.0", + ], + "JAVASCRIPT": [ + "1.0", + ], + }, + }, + "defaultScript": "36863ffb-40ec-48b9-94b1-9a99f71cc3b5", + "engineConfiguration": { + "_id": "engineConfiguration", + "_type": { + "_id": "engineConfiguration", + "collection": false, + "name": "Scripting engine configuration", + }, + "blackList": [ + "java.lang.Class", + "java.lang.Thread", + "java.lang.invoke.*", + "java.lang.reflect.*", + "java.security.AccessController", + ], + "coreThreads": { + "$int": "&{oidc.claims.script.context.core.threads|10}", + }, + "idleTimeout": 60, + "maxThreads": { + "$int": "&{oidc.claims.script.context.max.threads|50}", + }, + "propertyNamePrefix": "esv.", + "queueSize": { + "$int": "&{oidc.claims.script.context.queue.size|10}", + }, + "serverTimeout": 0, + "useSecurityManager": true, + "whiteList": [ + "com.google.common.collect.ImmutableList", + "com.google.common.collect.Sets$1", + "com.iplanet.am.sdk.AMHashMap", + "com.iplanet.sso.providers.dpro.SSOTokenIDImpl", + "com.iplanet.sso.providers.dpro.SessionSsoToken", + "com.sun.identity.authentication.callbacks.HiddenValueCallback", + "com.sun.identity.authentication.callbacks.ReCaptchaCallback", + "com.sun.identity.authentication.callbacks.ScriptTextOutputCallback", + "com.sun.identity.authentication.spi.HttpCallback", + "com.sun.identity.authentication.spi.IdentifiableCallback", + "com.sun.identity.authentication.spi.MetadataCallback", + "com.sun.identity.authentication.spi.PagePropertiesCallback", + "com.sun.identity.authentication.spi.RedirectCallback", + "com.sun.identity.authentication.spi.X509CertificateCallback", + "com.sun.identity.common.CaseInsensitiveHashMap", + "com.sun.identity.common.CaseInsensitiveHashMap$Entry", + "com.sun.identity.idm.AMIdentity", + "com.sun.identity.idm.IdType", + "com.sun.identity.saml2.assertion.impl.AttributeImpl", + "com.sun.identity.saml2.common.SAML2Exception", + "com.sun.identity.saml2.plugins.scripted.IdpAttributeMapperScriptHelper", + "com.sun.identity.shared.debug.Debug", + "groovy.json.JsonSlurper", + "groovy.json.StringEscapeUtils", + "groovy.json.internal.LazyMap", + "java.io.ByteArrayInputStream", + "java.io.ByteArrayOutputStream", + "java.io.UnsupportedEncodingException", + "java.lang.Boolean", + "java.lang.Byte", + "java.lang.Character", + "java.lang.Character$Subset", + "java.lang.Character$UnicodeBlock", + "java.lang.Double", + "java.lang.Float", + "java.lang.Integer", + "java.lang.Long", + "java.lang.Math", + "java.lang.NullPointerException", + "java.lang.Number", + "java.lang.Object", + "java.lang.RuntimeException", + "java.lang.SecurityException", + "java.lang.Short", + "java.lang.StrictMath", + "java.lang.String", + "java.lang.Void", + "java.math.BigDecimal", + "java.math.BigInteger", + "java.net.URI", + "java.security.KeyFactory", + "java.security.KeyPair", + "java.security.KeyPairGenerator", + "java.security.KeyPairGenerator$*", + "java.security.MessageDigest", + "java.security.MessageDigest$Delegate", + "java.security.MessageDigest$Delegate$CloneableDelegate", + "java.security.NoSuchAlgorithmException", + "java.security.PrivateKey", + "java.security.PublicKey", + "java.security.cert.CertificateFactory", + "java.security.cert.X509Certificate", + "java.security.spec.MGF1ParameterSpec", + "java.security.spec.PKCS8EncodedKeySpec", + "java.security.spec.X509EncodedKeySpec", + "java.text.SimpleDateFormat", + "java.time.Clock", + "java.time.Clock$FixedClock", + "java.time.Clock$OffsetClock", + "java.time.Clock$SystemClock", + "java.time.Clock$TickClock", + "java.time.temporal.ChronoUnit", + "java.util.AbstractMap$*", + "java.util.ArrayList", + "java.util.ArrayList$Itr", + "java.util.Arrays", + "java.util.Collections", + "java.util.Collections$*", + "java.util.Date", + "java.util.HashMap", + "java.util.HashMap$Entry", + "java.util.HashMap$KeyIterator", + "java.util.HashMap$KeySet", + "java.util.HashMap$Node", + "java.util.HashSet", + "java.util.LinkedHashMap", + "java.util.LinkedHashMap$Entry", + "java.util.LinkedHashMap$LinkedEntryIterator", + "java.util.LinkedHashMap$LinkedEntrySet", + "java.util.LinkedHashMap$LinkedKeySet", + "java.util.LinkedHashSet", + "java.util.LinkedList", + "java.util.List", + "java.util.Locale", + "java.util.Map", + "java.util.TreeMap", + "java.util.TreeSet", + "java.util.UUID", + "javax.crypto.Cipher", + "javax.crypto.Mac", + "javax.crypto.spec.IvParameterSpec", + "javax.crypto.spec.OAEPParameterSpec", + "javax.crypto.spec.PSource", + "javax.crypto.spec.PSource$*", + "javax.crypto.spec.SecretKeySpec", + "javax.security.auth.callback.ChoiceCallback", + "javax.security.auth.callback.ConfirmationCallback", + "javax.security.auth.callback.LanguageCallback", + "javax.security.auth.callback.NameCallback", + "javax.security.auth.callback.PasswordCallback", + "javax.security.auth.callback.TextInputCallback", + "javax.security.auth.callback.TextOutputCallback", + "org.apache.groovy.json.internal.LazyMap", + "org.codehaus.groovy.runtime.GStringImpl", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "org.forgerock.guice.core.IdentityProvider", + "org.forgerock.guice.core.InjectorHolder", + "org.forgerock.http.Client", + "org.forgerock.http.Context", + "org.forgerock.http.Handler", + "org.forgerock.http.client.*", + "org.forgerock.http.context.RootContext", + "org.forgerock.http.header.*", + "org.forgerock.http.header.authorization.*", + "org.forgerock.http.protocol.*", + "org.forgerock.json.JsonValue", + "org.forgerock.json.jose.builders.EncryptedJwtBuilder", + "org.forgerock.json.jose.builders.EncryptedThenSignedJwtBuilder", + "org.forgerock.json.jose.builders.JweHeaderBuilder", + "org.forgerock.json.jose.builders.JwsHeaderBuilder", + "org.forgerock.json.jose.builders.JwtBuilderFactory", + "org.forgerock.json.jose.builders.SignedJwtBuilderImpl", + "org.forgerock.json.jose.builders.SignedThenEncryptedJwtBuilder", + "org.forgerock.json.jose.builders.SignedThenEncryptedJwtHeaderBuilder", + "org.forgerock.json.jose.jwe.EncryptedJwt", + "org.forgerock.json.jose.jwe.EncryptionMethod", + "org.forgerock.json.jose.jwe.JweAlgorithm", + "org.forgerock.json.jose.jwe.SignedThenEncryptedJwt", + "org.forgerock.json.jose.jwk.JWKSet", + "org.forgerock.json.jose.jwk.RsaJWK", + "org.forgerock.json.jose.jws.EncryptedThenSignedJwt", + "org.forgerock.json.jose.jws.JwsAlgorithm", + "org.forgerock.json.jose.jws.JwsHeader", + "org.forgerock.json.jose.jws.SignedEncryptedJwt", + "org.forgerock.json.jose.jws.SignedJwt", + "org.forgerock.json.jose.jws.SigningManager", + "org.forgerock.json.jose.jws.handlers.HmacSigningHandler", + "org.forgerock.json.jose.jws.handlers.RSASigningHandler", + "org.forgerock.json.jose.jws.handlers.SecretHmacSigningHandler", + "org.forgerock.json.jose.jws.handlers.SecretRSASigningHandler", + "org.forgerock.json.jose.jwt.JwtClaimsSet", + "org.forgerock.macaroons.Macaroon", + "org.forgerock.oauth.clients.oidc.Claim", + "org.forgerock.oauth2.core.GrantType", + "org.forgerock.oauth2.core.StatefulAccessToken", + "org.forgerock.oauth2.core.UserInfoClaims", + "org.forgerock.oauth2.core.exceptions.InvalidRequestException", + "org.forgerock.oauth2.core.tokenexchange.ExchangeableToken", + "org.forgerock.openam.auth.node.api.Action", + "org.forgerock.openam.auth.node.api.Action$ActionBuilder", + "org.forgerock.openam.auth.node.api.NodeState", + "org.forgerock.openam.auth.node.api.SuspendedTextOutputCallback", + "org.forgerock.openam.auth.nodes.IdentityProvider", + "org.forgerock.openam.auth.nodes.InjectorHolder", + "org.forgerock.openam.authentication.callbacks.AbstractValidatedCallback", + "org.forgerock.openam.authentication.callbacks.AttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.BooleanAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.ConsentMappingCallback", + "org.forgerock.openam.authentication.callbacks.DeviceProfileCallback", + "org.forgerock.openam.authentication.callbacks.IdPCallback", + "org.forgerock.openam.authentication.callbacks.KbaCreateCallback", + "org.forgerock.openam.authentication.callbacks.NumberAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.PollingWaitCallback", + "org.forgerock.openam.authentication.callbacks.SelectIdPCallback", + "org.forgerock.openam.authentication.callbacks.StringAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.TermsAndConditionsCallback", + "org.forgerock.openam.authentication.callbacks.ValidatedPasswordCallback", + "org.forgerock.openam.authentication.callbacks.ValidatedUsernameCallback", + "org.forgerock.openam.authentication.modules.scripted.*", + "org.forgerock.openam.core.rest.authn.callbackhandlers.*", + "org.forgerock.openam.core.rest.devices.deviceprint.DeviceIdDao", + "org.forgerock.openam.core.rest.devices.profile.DeviceProfilesDao", + "org.forgerock.openam.oauth2.OpenAMAccessToken", + "org.forgerock.openam.oauth2.token.grantset.Authorization$ModifiedAccessToken", + "org.forgerock.openam.oauth2.token.macaroon.MacaroonAccessToken", + "org.forgerock.openam.oauth2.token.stateless.StatelessAccessToken", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "org.forgerock.openam.scripting.api.ScriptedIdentity", + "org.forgerock.openam.scripting.api.ScriptedSession", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentity", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentityRepository", + "org.forgerock.openam.scripting.api.secrets.ScriptedSecrets", + "org.forgerock.openam.scripting.api.secrets.Secret", + "org.forgerock.openam.scripting.idrepo.ScriptIdentityRepository", + "org.forgerock.openam.shared.security.ThreadLocalSecureRandom", + "org.forgerock.openidconnect.Claim", + "org.forgerock.openidconnect.OpenIdConnectToken", + "org.forgerock.openidconnect.ssoprovider.OpenIdConnectSSOToken", + "org.forgerock.secrets.SecretBuilder", + "org.forgerock.secrets.keys.SigningKey", + "org.forgerock.secrets.keys.VerificationKey", + "org.forgerock.util.encode.Base64", + "org.forgerock.util.encode.Base64url", + "org.forgerock.util.encode.Hex", + "org.forgerock.util.promise.NeverThrowsException", + "org.forgerock.util.promise.Promise", + "org.forgerock.util.promise.PromiseImpl", + "org.mozilla.javascript.ConsString", + "org.mozilla.javascript.JavaScriptException", + "org.mozilla.javascript.WrappedException", + "sun.security.ec.ECPrivateKeyImpl", + "sun.security.rsa.RSAPrivateCrtKeyImpl", + "sun.security.rsa.RSAPublicKeyImpl", + "sun.security.x509.X500Name", + "sun.security.x509.X509CertImpl", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.util.Collections$UnmodifiableCollection$1", + "java.util.AbstractMap$SimpleImmutableEntry", + "java.util.Collections$1", + "java.util.Collections$EmptyList", + "java.util.Collections$SingletonList", + "java.util.Collections$UnmodifiableMap", + "java.util.Collections$UnmodifiableSet", + "org.forgerock.opendj.ldap.Rdn", + "org.forgerock.opendj.ldap.Dn", + "org.forgerock.openam.auth.nodes.VerifyTransactionsHelper", + ], + }, + "isHidden": false, + "languages": [ + "JAVASCRIPT", + "GROOVY", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/scripttype/PINGONE_VERIFY_COMPLETION_DECISION_NODE.scripttype.json 1`] = ` +{ + "scripttype": { + "PINGONE_VERIFY_COMPLETION_DECISION_NODE": { + "_id": "PINGONE_VERIFY_COMPLETION_DECISION_NODE", + "_type": { + "_id": "contexts", + "collection": true, + "name": "scriptContext", + }, + "context": { + "_id": "PINGONE_VERIFY_COMPLETION_DECISION_NODE", + "allowLists": [ + "org.forgerock.util.promise.PromiseImpl", + "org.forgerock.util.promise.Promises$*", + "java.lang.Object", + ], + "bindings": [ + { + "elements": [ + { + "elementType": "method", + "name": "send", + "parameters": [ + { + "javaScriptType": "string", + "name": "uri", + }, + { + "javaScriptType": "object", + "name": "requestOptions", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "send", + "parameters": [ + { + "javaScriptType": "string", + "name": "uri", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.scripting.wrappers.HttpClientScriptWrapper", + "javaScriptType": "object", + "name": "httpClient", + }, + { + "elements": [ + { + "elementType": "method", + "name": "remove", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "get", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "keys", + "parameters": [], + "returnType": "object", + }, + { + "elementType": "method", + "name": "getObject", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "isDefined", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + ], + "returnType": "boolean", + }, + { + "elementType": "method", + "name": "putShared", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + { + "javaScriptType": "object", + "name": "value", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "mergeShared", + "parameters": [ + { + "javaScriptType": "object", + "name": "object", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "mergeTransient", + "parameters": [ + { + "javaScriptType": "object", + "name": "object", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "putTransient", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + { + "javaScriptType": "object", + "name": "value", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.auth.node.api.NodeStateScriptWrapper", + "javaScriptType": "object", + "name": "nodeState", + }, + { + "javaScriptType": "unknown", + "name": "verifyTransactionsHelper", + }, + { + "elements": [ + { + "elementType": "field", + "elements": [ + { + "elementType": "method", + "name": "randomUUID", + "parameters": [], + "returnType": "string", + }, + { + "elementType": "method", + "name": "getRandomValues", + "parameters": [ + { + "javaScriptType": "array", + "name": "array", + }, + ], + "returnType": "array", + }, + ], + "javaClass": "org.forgerock.openam.scripting.bindings.ScriptCryptoService", + "javaScriptType": "object", + "name": "crypto", + }, + { + "elementType": "field", + "elements": [ + { + "elementType": "method", + "name": "decode", + "parameters": [ + { + "javaScriptType": "string", + "name": "toDecode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "encode", + "parameters": [ + { + "javaScriptType": "string", + "name": "toEncode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "btoa", + "parameters": [ + { + "javaScriptType": "string", + "name": "toEncode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "atob", + "parameters": [ + { + "javaScriptType": "string", + "name": "toDecode", + }, + ], + "returnType": "string", + }, + ], + "javaClass": "org.forgerock.openam.scripting.bindings.ScriptBase64Service", + "javaScriptType": "object", + "name": "base64", + }, + { + "elementType": "field", + "elements": [ + { + "elementType": "method", + "name": "decode", + "parameters": [ + { + "javaScriptType": "string", + "name": "toDecode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "encode", + "parameters": [ + { + "javaScriptType": "string", + "name": "toEncode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "btoa", + "parameters": [ + { + "javaScriptType": "string", + "name": "toEncode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "atob", + "parameters": [ + { + "javaScriptType": "string", + "name": "toDecode", + }, + ], + "returnType": "string", + }, + ], + "javaClass": "org.forgerock.openam.scripting.bindings.ScriptBase64UrlService", + "javaScriptType": "object", + "name": "base64url", + }, + ], + "javaClass": "org.forgerock.openam.scripting.bindings.ScriptUtilityService", + "javaScriptType": "object", + "name": "utils", + }, + { + "elements": [ + { + "elementType": "method", + "name": "getName", + "parameters": [], + "returnType": "string", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "isTraceEnabled", + "parameters": [], + "returnType": "boolean", + }, + { + "elementType": "method", + "name": "isDebugEnabled", + "parameters": [], + "returnType": "boolean", + }, + { + "elementType": "method", + "name": "isErrorEnabled", + "parameters": [], + "returnType": "boolean", + }, + { + "elementType": "method", + "name": "isInfoEnabled", + "parameters": [], + "returnType": "boolean", + }, + { + "elementType": "method", + "name": "isWarnEnabled", + "parameters": [], + "returnType": "boolean", + }, + ], + "javaClass": "org.forgerock.openam.scripting.logging.ScriptedLoggerWrapper", + "javaScriptType": "object", + "name": "logger", + }, + { + "elements": [ + { + "elementType": "method", + "name": "withIdentifiedUser", + "parameters": [ + { + "javaScriptType": "string", + "name": "username", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "withIdentifiedAgent", + "parameters": [ + { + "javaScriptType": "string", + "name": "agentName", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "suspend", + "parameters": [ + { + "javaScriptType": "string", + "name": "callbackTextFormat", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "suspend", + "parameters": [ + { + "javaScriptType": "string", + "name": "callbackTextFormat", + }, + { + "javaScriptType": "object", + "name": "additionalLogic", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "goTo", + "parameters": [ + { + "javaScriptType": "string", + "name": "outcome", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "removeSessionProperty", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "putSessionProperty", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + { + "javaScriptType": "string", + "name": "value", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "withHeader", + "parameters": [ + { + "javaScriptType": "string", + "name": "header", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "withDescription", + "parameters": [ + { + "javaScriptType": "string", + "name": "description", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "withStage", + "parameters": [ + { + "javaScriptType": "string", + "name": "stage", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "withErrorMessage", + "parameters": [ + { + "javaScriptType": "string", + "name": "errorMessage", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "withLockoutMessage", + "parameters": [ + { + "javaScriptType": "string", + "name": "lockoutMessage", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.auth.nodes.script.ActionWrapper", + "javaScriptType": "object", + "name": "action", + }, + { + "javaScriptType": "string", + "name": "scriptName", + }, + { + "javaScriptType": "string", + "name": "realm", + }, + { + "elements": [ + { + "elementType": "method", + "name": "update", + "parameters": [ + { + "javaScriptType": "string", + "name": "id", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "value", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "update", + "parameters": [ + { + "javaScriptType": "string", + "name": "id", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "value", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "update", + "parameters": [ + { + "javaScriptType": "string", + "name": "id", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "value", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "read", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "read", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "read", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "delete", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "delete", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "delete", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "action", + "parameters": [ + { + "javaScriptType": "string", + "name": "resource", + }, + { + "javaScriptType": "string", + "name": "actionName", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "action", + "parameters": [ + { + "javaScriptType": "string", + "name": "resource", + }, + { + "javaScriptType": "string", + "name": "actionName", + }, + { + "javaScriptType": "object", + "name": "content", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "action", + "parameters": [ + { + "javaScriptType": "string", + "name": "resource", + }, + { + "javaScriptType": "string", + "name": "actionName", + }, + { + "javaScriptType": "object", + "name": "content", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "action", + "parameters": [ + { + "javaScriptType": "string", + "name": "resource", + }, + { + "javaScriptType": "string", + "name": "actionName", + }, + { + "javaScriptType": "object", + "name": "content", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "query", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "query", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "create", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "newResourceId", + }, + { + "javaScriptType": "object", + "name": "content", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "create", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "newResourceId", + }, + { + "javaScriptType": "object", + "name": "content", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "create", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "newResourceId", + }, + { + "javaScriptType": "object", + "name": "content", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "patch", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "array", + "name": "patch", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "patch", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "array", + "name": "patch", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "patch", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "array", + "name": "patch", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.scripting.wrappers.IdmIntegrationServiceScriptWrapper", + "javaScriptType": "object", + "name": "openidm", + }, + { + "elements": [ + { + "elementType": "method", + "name": "getGenericSecret", + "parameters": [ + { + "javaScriptType": "string", + "name": "secretId", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.scripting.api.secrets.ScriptedSecrets", + "javaScriptType": "object", + "name": "secrets", + }, + { + "javaScriptType": "string", + "name": "cookieName", + }, + ], + "evaluatorVersions": { + "JAVASCRIPT": [ + "2.0", + ], + }, + }, + "defaultScript": "[Empty]", + "engineConfiguration": { + "_id": "engineConfiguration", + "_type": { + "_id": "engineConfiguration", + "collection": false, + "name": "Scripting engine configuration", + }, + "blackList": [ + "java.security.AccessController", + "java.lang.Class", + "java.lang.reflect.*", + ], + "coreThreads": 10, + "idleTimeout": 60, + "maxThreads": 50, + "propertyNamePrefix": "script", + "queueSize": 10, + "serverTimeout": 0, + "useSecurityManager": true, + "whiteList": [ + "org.forgerock.util.promise.PromiseImpl", + "org.forgerock.util.promise.Promises$*", + "java.lang.Object", + ], + }, + "isHidden": false, + "languages": [ + "JAVASCRIPT", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/scripttype/POLICY_CONDITION.scripttype.json 1`] = ` +{ + "scripttype": { + "POLICY_CONDITION": { + "_id": "POLICY_CONDITION", + "_type": { + "_id": "contexts", + "collection": true, + "name": "scriptContext", + }, + "context": { + "_id": "POLICY_CONDITION", + "allowLists": [], + "bindings": [], + "evaluatorVersions": { + "GROOVY": [ + "1.0", + ], + "JAVASCRIPT": [ + "1.0", + ], + }, + }, + "defaultScript": "9de3eb62-f131-4fac-a294-7bd170fd4acb", + "engineConfiguration": { + "_id": "engineConfiguration", + "_type": { + "_id": "engineConfiguration", + "collection": false, + "name": "Scripting engine configuration", + }, + "blackList": [ + "java.lang.Class", + "java.lang.Thread", + "java.lang.invoke.*", + "java.lang.reflect.*", + "java.security.AccessController", + ], + "coreThreads": { + "$int": "&{policy.condition.script.context.core.threads|10}", + }, + "idleTimeout": 60, + "maxThreads": { + "$int": "&{policy.condition.script.context.max.threads|50}", + }, + "propertyNamePrefix": "esv.", + "queueSize": { + "$int": "&{policy.condition.script.context.queue.size|10}", + }, + "serverTimeout": 0, + "useSecurityManager": true, + "whiteList": [ + "com.google.common.collect.ImmutableList", + "com.google.common.collect.Sets$1", + "com.iplanet.am.sdk.AMHashMap", + "com.iplanet.sso.providers.dpro.SSOTokenIDImpl", + "com.iplanet.sso.providers.dpro.SessionSsoToken", + "com.sun.identity.authentication.callbacks.HiddenValueCallback", + "com.sun.identity.authentication.callbacks.ReCaptchaCallback", + "com.sun.identity.authentication.callbacks.ScriptTextOutputCallback", + "com.sun.identity.authentication.spi.HttpCallback", + "com.sun.identity.authentication.spi.IdentifiableCallback", + "com.sun.identity.authentication.spi.MetadataCallback", + "com.sun.identity.authentication.spi.PagePropertiesCallback", + "com.sun.identity.authentication.spi.RedirectCallback", + "com.sun.identity.authentication.spi.X509CertificateCallback", + "com.sun.identity.common.CaseInsensitiveHashMap", + "com.sun.identity.common.CaseInsensitiveHashMap$Entry", + "com.sun.identity.idm.AMIdentity", + "com.sun.identity.idm.IdType", + "com.sun.identity.saml2.assertion.impl.AttributeImpl", + "com.sun.identity.saml2.common.SAML2Exception", + "com.sun.identity.saml2.plugins.scripted.IdpAttributeMapperScriptHelper", + "com.sun.identity.shared.debug.Debug", + "groovy.json.JsonSlurper", + "groovy.json.StringEscapeUtils", + "groovy.json.internal.LazyMap", + "java.io.ByteArrayInputStream", + "java.io.ByteArrayOutputStream", + "java.io.UnsupportedEncodingException", + "java.lang.Boolean", + "java.lang.Byte", + "java.lang.Character", + "java.lang.Character$Subset", + "java.lang.Character$UnicodeBlock", + "java.lang.Double", + "java.lang.Float", + "java.lang.Integer", + "java.lang.Long", + "java.lang.Math", + "java.lang.NullPointerException", + "java.lang.Number", + "java.lang.Object", + "java.lang.RuntimeException", + "java.lang.SecurityException", + "java.lang.Short", + "java.lang.StrictMath", + "java.lang.String", + "java.lang.Void", + "java.math.BigDecimal", + "java.math.BigInteger", + "java.net.URI", + "java.security.KeyFactory", + "java.security.KeyPair", + "java.security.KeyPairGenerator", + "java.security.KeyPairGenerator$*", + "java.security.MessageDigest", + "java.security.MessageDigest$Delegate", + "java.security.MessageDigest$Delegate$CloneableDelegate", + "java.security.NoSuchAlgorithmException", + "java.security.PrivateKey", + "java.security.PublicKey", + "java.security.cert.CertificateFactory", + "java.security.cert.X509Certificate", + "java.security.spec.MGF1ParameterSpec", + "java.security.spec.PKCS8EncodedKeySpec", + "java.security.spec.X509EncodedKeySpec", + "java.text.SimpleDateFormat", + "java.time.Clock", + "java.time.Clock$FixedClock", + "java.time.Clock$OffsetClock", + "java.time.Clock$SystemClock", + "java.time.Clock$TickClock", + "java.time.temporal.ChronoUnit", + "java.util.AbstractMap$*", + "java.util.ArrayList", + "java.util.ArrayList$Itr", + "java.util.Arrays", + "java.util.Collections", + "java.util.Collections$*", + "java.util.Date", + "java.util.HashMap", + "java.util.HashMap$Entry", + "java.util.HashMap$KeyIterator", + "java.util.HashMap$KeySet", + "java.util.HashMap$Node", + "java.util.HashSet", + "java.util.LinkedHashMap", + "java.util.LinkedHashMap$Entry", + "java.util.LinkedHashMap$LinkedEntryIterator", + "java.util.LinkedHashMap$LinkedEntrySet", + "java.util.LinkedHashMap$LinkedKeySet", + "java.util.LinkedHashSet", + "java.util.LinkedList", + "java.util.List", + "java.util.Locale", + "java.util.Map", + "java.util.TreeMap", + "java.util.TreeSet", + "java.util.UUID", + "javax.crypto.Cipher", + "javax.crypto.Mac", + "javax.crypto.spec.IvParameterSpec", + "javax.crypto.spec.OAEPParameterSpec", + "javax.crypto.spec.PSource", + "javax.crypto.spec.PSource$*", + "javax.crypto.spec.SecretKeySpec", + "javax.security.auth.callback.ChoiceCallback", + "javax.security.auth.callback.ConfirmationCallback", + "javax.security.auth.callback.LanguageCallback", + "javax.security.auth.callback.NameCallback", + "javax.security.auth.callback.PasswordCallback", + "javax.security.auth.callback.TextInputCallback", + "javax.security.auth.callback.TextOutputCallback", + "org.apache.groovy.json.internal.LazyMap", + "org.codehaus.groovy.runtime.GStringImpl", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "org.forgerock.guice.core.IdentityProvider", + "org.forgerock.guice.core.InjectorHolder", + "org.forgerock.http.Client", + "org.forgerock.http.Context", + "org.forgerock.http.Handler", + "org.forgerock.http.client.*", + "org.forgerock.http.context.RootContext", + "org.forgerock.http.header.*", + "org.forgerock.http.header.authorization.*", + "org.forgerock.http.protocol.*", + "org.forgerock.json.JsonValue", + "org.forgerock.json.jose.builders.EncryptedJwtBuilder", + "org.forgerock.json.jose.builders.EncryptedThenSignedJwtBuilder", + "org.forgerock.json.jose.builders.JweHeaderBuilder", + "org.forgerock.json.jose.builders.JwsHeaderBuilder", + "org.forgerock.json.jose.builders.JwtBuilderFactory", + "org.forgerock.json.jose.builders.SignedJwtBuilderImpl", + "org.forgerock.json.jose.builders.SignedThenEncryptedJwtBuilder", + "org.forgerock.json.jose.builders.SignedThenEncryptedJwtHeaderBuilder", + "org.forgerock.json.jose.jwe.EncryptedJwt", + "org.forgerock.json.jose.jwe.EncryptionMethod", + "org.forgerock.json.jose.jwe.JweAlgorithm", + "org.forgerock.json.jose.jwe.SignedThenEncryptedJwt", + "org.forgerock.json.jose.jwk.JWKSet", + "org.forgerock.json.jose.jwk.RsaJWK", + "org.forgerock.json.jose.jws.EncryptedThenSignedJwt", + "org.forgerock.json.jose.jws.JwsAlgorithm", + "org.forgerock.json.jose.jws.JwsHeader", + "org.forgerock.json.jose.jws.SignedEncryptedJwt", + "org.forgerock.json.jose.jws.SignedJwt", + "org.forgerock.json.jose.jws.SigningManager", + "org.forgerock.json.jose.jws.handlers.HmacSigningHandler", + "org.forgerock.json.jose.jws.handlers.RSASigningHandler", + "org.forgerock.json.jose.jws.handlers.SecretHmacSigningHandler", + "org.forgerock.json.jose.jws.handlers.SecretRSASigningHandler", + "org.forgerock.json.jose.jwt.JwtClaimsSet", + "org.forgerock.macaroons.Macaroon", + "org.forgerock.oauth.clients.oidc.Claim", + "org.forgerock.oauth2.core.GrantType", + "org.forgerock.oauth2.core.StatefulAccessToken", + "org.forgerock.oauth2.core.UserInfoClaims", + "org.forgerock.oauth2.core.exceptions.InvalidRequestException", + "org.forgerock.oauth2.core.tokenexchange.ExchangeableToken", + "org.forgerock.openam.auth.node.api.Action", + "org.forgerock.openam.auth.node.api.Action$ActionBuilder", + "org.forgerock.openam.auth.node.api.NodeState", + "org.forgerock.openam.auth.node.api.SuspendedTextOutputCallback", + "org.forgerock.openam.auth.nodes.IdentityProvider", + "org.forgerock.openam.auth.nodes.InjectorHolder", + "org.forgerock.openam.authentication.callbacks.AbstractValidatedCallback", + "org.forgerock.openam.authentication.callbacks.AttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.BooleanAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.ConsentMappingCallback", + "org.forgerock.openam.authentication.callbacks.DeviceProfileCallback", + "org.forgerock.openam.authentication.callbacks.IdPCallback", + "org.forgerock.openam.authentication.callbacks.KbaCreateCallback", + "org.forgerock.openam.authentication.callbacks.NumberAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.PollingWaitCallback", + "org.forgerock.openam.authentication.callbacks.SelectIdPCallback", + "org.forgerock.openam.authentication.callbacks.StringAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.TermsAndConditionsCallback", + "org.forgerock.openam.authentication.callbacks.ValidatedPasswordCallback", + "org.forgerock.openam.authentication.callbacks.ValidatedUsernameCallback", + "org.forgerock.openam.authentication.modules.scripted.*", + "org.forgerock.openam.core.rest.authn.callbackhandlers.*", + "org.forgerock.openam.core.rest.devices.deviceprint.DeviceIdDao", + "org.forgerock.openam.core.rest.devices.profile.DeviceProfilesDao", + "org.forgerock.openam.oauth2.OpenAMAccessToken", + "org.forgerock.openam.oauth2.token.grantset.Authorization$ModifiedAccessToken", + "org.forgerock.openam.oauth2.token.macaroon.MacaroonAccessToken", + "org.forgerock.openam.oauth2.token.stateless.StatelessAccessToken", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "org.forgerock.openam.scripting.api.ScriptedIdentity", + "org.forgerock.openam.scripting.api.ScriptedSession", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentity", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentityRepository", + "org.forgerock.openam.scripting.api.secrets.ScriptedSecrets", + "org.forgerock.openam.scripting.api.secrets.Secret", + "org.forgerock.openam.scripting.idrepo.ScriptIdentityRepository", + "org.forgerock.openam.shared.security.ThreadLocalSecureRandom", + "org.forgerock.openidconnect.Claim", + "org.forgerock.openidconnect.OpenIdConnectToken", + "org.forgerock.openidconnect.ssoprovider.OpenIdConnectSSOToken", + "org.forgerock.secrets.SecretBuilder", + "org.forgerock.secrets.keys.SigningKey", + "org.forgerock.secrets.keys.VerificationKey", + "org.forgerock.util.encode.Base64", + "org.forgerock.util.encode.Base64url", + "org.forgerock.util.encode.Hex", + "org.forgerock.util.promise.NeverThrowsException", + "org.forgerock.util.promise.Promise", + "org.forgerock.util.promise.PromiseImpl", + "org.mozilla.javascript.ConsString", + "org.mozilla.javascript.JavaScriptException", + "org.mozilla.javascript.WrappedException", + "sun.security.ec.ECPrivateKeyImpl", + "sun.security.rsa.RSAPrivateCrtKeyImpl", + "sun.security.rsa.RSAPublicKeyImpl", + "sun.security.x509.X500Name", + "sun.security.x509.X509CertImpl", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.util.Collections$UnmodifiableCollection$1", + "org.forgerock.opendj.ldap.Rdn", + "org.forgerock.opendj.ldap.Dn", + "org.forgerock.openam.auth.nodes.VerifyTransactionsHelper", + ], + }, + "isHidden": false, + "languages": [ + "JAVASCRIPT", + "GROOVY", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/scripttype/SAML2_IDP_ADAPTER.scripttype.json 1`] = ` +{ + "scripttype": { + "SAML2_IDP_ADAPTER": { + "_id": "SAML2_IDP_ADAPTER", + "_type": { + "_id": "contexts", + "collection": true, + "name": "scriptContext", + }, + "context": { + "_id": "SAML2_IDP_ADAPTER", + "allowLists": [ + "java.util.HashMap$Node", + "org.mozilla.javascript.JavaScriptException", + "java.util.Collections$SingletonList", + "org.codehaus.groovy.runtime.GStringImpl", + "javax.servlet.http.HttpServletResponseWrapper", + "java.util.LinkedHashSet", + "java.io.PrintWriter", + "java.lang.Byte", + "com.iplanet.am.sdk.AMHashMap", + "java.lang.Math", + "java.lang.Short", + "java.util.AbstractMap$SimpleImmutableEntry", + "java.util.ArrayList$Itr", + "java.util.Collections$1", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.lang.Number", + "com.sun.identity.saml2.protocol.*", + "javax.security.auth.Subject", + "java.lang.Integer", + "java.lang.Boolean", + "javax.servlet.http.HttpServletRequestWrapper", + "groovy.json.internal.LazyMap", + "org.forgerock.json.JsonValue", + "sun.security.ec.ECPrivateKeyImpl", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "java.lang.Character$UnicodeBlock", + "groovy.json.JsonSlurper", + "java.util.LinkedList", + "com.sun.identity.saml2.plugins.scripted.ScriptEntitlementInfo", + "java.util.HashMap$Entry", + "com.sun.identity.shared.debug.Debug", + "java.util.HashMap$KeySet", + "java.util.HashMap$KeyIterator", + "java.net.URI", + "java.util.LinkedHashMap$Entry", + "com.sun.identity.common.CaseInsensitiveHashMap", + "java.util.LinkedHashMap$LinkedEntrySet", + "java.lang.StrictMath", + "java.util.Collections$EmptyMap", + "java.lang.String", + "java.lang.Long", + "java.util.LinkedHashMap$LinkedEntryIterator", + "java.util.TreeMap", + "com.sun.identity.saml2.plugins.scripted.IdpAdapterScriptHelper", + "java.util.HashMap", + "org.forgerock.http.client.*", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "java.lang.Float", + "java.util.Collections$EmptyList", + "java.util.LinkedHashMap", + "java.util.ArrayList", + "com.sun.identity.saml2.assertion.*", + "org.forgerock.http.Client", + "com.iplanet.sso.providers.dpro.SessionSsoToken", + "com.sun.identity.saml2.protocol.impl.*", + "com.sun.identity.saml2.assertion.impl.*", + "com.sun.identity.saml2.common.SAML2Exception", + "java.lang.Character$Subset", + "java.lang.Character", + "java.lang.Double", + "java.lang.Object", + "java.util.TreeSet", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "java.lang.Void", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "org.forgerock.util.promise.PromiseImpl", + "java.util.HashSet", + "java.util.Collections$UnmodifiableCollection$1", + ], + "bindings": [], + "evaluatorVersions": { + "GROOVY": [ + "1.0", + ], + "JAVASCRIPT": [ + "1.0", + ], + }, + }, + "defaultScript": "[Empty]", + "engineConfiguration": { + "_id": "engineConfiguration", + "_type": { + "_id": "engineConfiguration", + "collection": false, + "name": "Scripting engine configuration", + }, + "blackList": [ + "java.lang.Class", + "java.lang.Thread", + "java.lang.invoke.*", + "java.lang.reflect.*", + "java.security.AccessController", + ], + "coreThreads": { + "$int": "&{saml2.idp.adapter.script.context.core.threads|10}", + }, + "idleTimeout": 60, + "maxThreads": { + "$int": "&{saml2.idp.adapter.script.context.max.threads|50}", + }, + "propertyNamePrefix": "esv.", + "queueSize": { + "$int": "&{saml2.idp.adapter.script.context.queue.size|10}", + }, + "serverTimeout": 0, + "useSecurityManager": true, + "whiteList": [ + "com.iplanet.am.sdk.AMHashMap", + "com.iplanet.sso.providers.dpro.SessionSsoToken", + "com.sun.identity.common.CaseInsensitiveHashMap", + "com.sun.identity.saml2.assertion.*", + "com.sun.identity.saml2.assertion.impl.*", + "com.sun.identity.saml2.common.SAML2Exception", + "com.sun.identity.saml2.plugins.scripted.ScriptEntitlementInfo", + "com.sun.identity.saml2.protocol.*", + "com.sun.identity.saml2.protocol.impl.*", + "com.sun.identity.shared.debug.Debug", + "java.io.PrintWriter", + "java.lang.Boolean", + "java.lang.Byte", + "java.lang.Character", + "java.lang.Character$Subset", + "java.lang.Character$UnicodeBlock", + "java.util.Collections$EmptyMap", + "java.lang.Double", + "java.lang.Float", + "java.lang.Integer", + "java.lang.Long", + "java.lang.Math", + "java.lang.Number", + "java.lang.Object", + "java.lang.Short", + "java.lang.StrictMath", + "java.lang.String", + "java.lang.Void", + "java.util.AbstractMap$SimpleImmutableEntry", + "java.util.ArrayList", + "java.util.ArrayList$Itr", + "java.util.Collections$1", + "java.util.Collections$EmptyList", + "java.util.Collections$SingletonList", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.util.Collections$UnmodifiableCollection$1", + "java.util.HashMap", + "java.util.HashMap$Entry", + "java.util.HashMap$KeyIterator", + "java.util.HashMap$KeySet", + "java.util.HashMap$Node", + "java.util.HashSet", + "java.util.LinkedHashMap", + "java.util.LinkedHashMap$Entry", + "java.util.LinkedHashMap$LinkedEntryIterator", + "java.util.LinkedHashMap$LinkedEntrySet", + "java.util.LinkedHashSet", + "java.util.LinkedList", + "java.util.TreeMap", + "java.util.TreeSet", + "java.net.URI", + "javax.security.auth.Subject", + "javax.servlet.http.HttpServletRequestWrapper", + "javax.servlet.http.HttpServletResponseWrapper", + "groovy.json.internal.LazyMap", + "groovy.json.JsonSlurper", + "org.codehaus.groovy.runtime.GStringImpl", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "org.forgerock.http.Client", + "org.forgerock.http.client.*", + "org.forgerock.json.JsonValue", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "org.forgerock.util.promise.PromiseImpl", + "org.mozilla.javascript.JavaScriptException", + "sun.security.ec.ECPrivateKeyImpl", + "com.sun.identity.saml2.plugins.scripted.IdpAdapterScriptHelper", + "java.util.List", + "java.util.Map", + "javax.servlet.http.Cookie", + "javax.xml.parsers.DocumentBuilder", + "javax.xml.parsers.DocumentBuilderFactory", + "org.w3c.dom.Document", + "org.w3c.dom.Element", + "org.xml.sax.InputSource", + "org.forgerock.opendj.ldap.Rdn", + "org.forgerock.opendj.ldap.Dn", + ], + }, + "isHidden": false, + "languages": [ + "JAVASCRIPT", + "GROOVY", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/scripttype/SAML2_IDP_ATTRIBUTE_MAPPER.scripttype.json 1`] = ` +{ + "scripttype": { + "SAML2_IDP_ATTRIBUTE_MAPPER": { + "_id": "SAML2_IDP_ATTRIBUTE_MAPPER", + "_type": { + "_id": "contexts", + "collection": true, + "name": "scriptContext", + }, + "context": { + "_id": "SAML2_IDP_ATTRIBUTE_MAPPER", + "allowLists": [ + "com.sun.identity.saml2.plugins.scripted.IdpAttributeMapperScriptHelper", + "javax.servlet.http.Cookie", + "java.lang.Character$Subset", + "java.lang.Boolean", + "java.lang.StrictMath", + "com.sun.identity.shared.debug.Debug", + "java.lang.Byte", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "java.util.Collections$UnmodifiableRandomAccessList", + "org.w3c.dom.Document", + "java.lang.Object", + "java.util.LinkedHashSet", + "com.iplanet.am.sdk.AMHashMap", + "org.codehaus.groovy.runtime.GStringImpl", + "java.util.TreeSet", + "org.forgerock.json.JsonValue", + "com.sun.identity.common.CaseInsensitiveHashMap", + "org.forgerock.http.Client", + "java.util.HashMap$KeyIterator", + "java.lang.Double", + "java.util.LinkedHashMap$Entry", + "java.lang.Integer", + "java.lang.Long", + "org.forgerock.openam.shared.security.crypto.CertificateService", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "java.util.HashMap$Entry", + "java.lang.Math", + "org.forgerock.http.client.*", + "com.sun.identity.saml2.assertion.impl.AttributeImpl", + "java.lang.Character", + "java.util.Collections$SingletonList", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "java.lang.Short", + "groovy.json.internal.LazyMap", + "java.util.Collections$EmptyMap", + "org.w3c.dom.Element", + "java.util.Collections$UnmodifiableCollection$1", + "java.util.HashMap$Node", + "java.lang.String", + "java.util.HashMap", + "java.net.URI", + "org.mozilla.javascript.JavaScriptException", + "java.util.HashMap$KeySet", + "javax.xml.parsers.DocumentBuilder", + "java.util.LinkedList", + "java.util.ArrayList$Itr", + "java.util.LinkedHashMap$LinkedEntrySet", + "java.util.ArrayList", + "java.lang.Void", + "java.util.AbstractMap$SimpleImmutableEntry", + "java.util.Collections$EmptyList", + "java.util.LinkedHashMap$LinkedEntryIterator", + "org.forgerock.util.promise.PromiseImpl", + "javax.xml.parsers.DocumentBuilderFactory", + "java.util.Collections$1", + "java.lang.Number", + "java.util.LinkedHashMap", + "java.util.TreeMap", + "com.iplanet.sso.providers.dpro.SessionSsoToken", + "groovy.json.JsonSlurper", + "com.sun.identity.saml2.common.SAML2Exception", + "java.util.HashSet", + "java.lang.Character$UnicodeBlock", + "java.lang.Float", + "org.xml.sax.InputSource", + ], + "bindings": [], + "evaluatorVersions": { + "GROOVY": [ + "1.0", + ], + "JAVASCRIPT": [ + "1.0", + ], + }, + }, + "defaultScript": "[Empty]", + "engineConfiguration": { + "_id": "engineConfiguration", + "_type": { + "_id": "engineConfiguration", + "collection": false, + "name": "Scripting engine configuration", + }, + "blackList": [ + "java.lang.Class", + "java.lang.Thread", + "java.lang.invoke.*", + "java.lang.reflect.*", + "java.security.AccessController", + ], + "coreThreads": { + "$int": "&{saml2.idp.attribute.mapper.script.context.core.threads|10}", + }, + "idleTimeout": 60, + "maxThreads": { + "$int": "&{saml2.idp.attribute.mapper.script.context.max.threads|50}", + }, + "propertyNamePrefix": "esv.", + "queueSize": { + "$int": "&{saml2.idp.attribute.mapper.script.context.queue.size|10}", + }, + "serverTimeout": 0, + "useSecurityManager": true, + "whiteList": [ + "com.google.common.collect.ImmutableList", + "com.google.common.collect.Sets$1", + "com.iplanet.am.sdk.AMHashMap", + "com.iplanet.sso.providers.dpro.SSOTokenIDImpl", + "com.iplanet.sso.providers.dpro.SessionSsoToken", + "com.sun.identity.authentication.callbacks.HiddenValueCallback", + "com.sun.identity.authentication.callbacks.ReCaptchaCallback", + "com.sun.identity.authentication.callbacks.ScriptTextOutputCallback", + "com.sun.identity.authentication.spi.HttpCallback", + "com.sun.identity.authentication.spi.IdentifiableCallback", + "com.sun.identity.authentication.spi.MetadataCallback", + "com.sun.identity.authentication.spi.PagePropertiesCallback", + "com.sun.identity.authentication.spi.RedirectCallback", + "com.sun.identity.authentication.spi.X509CertificateCallback", + "com.sun.identity.common.CaseInsensitiveHashMap", + "com.sun.identity.common.CaseInsensitiveHashMap$Entry", + "com.sun.identity.idm.AMIdentity", + "com.sun.identity.idm.IdType", + "com.sun.identity.saml2.assertion.impl.AttributeImpl", + "com.sun.identity.saml2.common.SAML2Exception", + "com.sun.identity.saml2.plugins.scripted.IdpAttributeMapperScriptHelper", + "com.sun.identity.shared.debug.Debug", + "groovy.json.JsonSlurper", + "groovy.json.StringEscapeUtils", + "groovy.json.internal.LazyMap", + "java.io.ByteArrayInputStream", + "java.io.ByteArrayOutputStream", + "java.io.UnsupportedEncodingException", + "java.lang.Boolean", + "java.lang.Byte", + "java.lang.Character", + "java.lang.Character$Subset", + "java.lang.Character$UnicodeBlock", + "java.lang.Double", + "java.lang.Float", + "java.lang.Integer", + "java.lang.Long", + "java.lang.Math", + "java.lang.NullPointerException", + "java.lang.Number", + "java.lang.Object", + "java.lang.RuntimeException", + "java.lang.SecurityException", + "java.lang.Short", + "java.lang.StrictMath", + "java.lang.String", + "java.lang.Void", + "java.math.BigDecimal", + "java.math.BigInteger", + "java.net.URI", + "java.security.KeyFactory", + "java.security.KeyPair", + "java.security.KeyPairGenerator", + "java.security.KeyPairGenerator$*", + "java.security.MessageDigest", + "java.security.MessageDigest$Delegate", + "java.security.MessageDigest$Delegate$CloneableDelegate", + "java.security.NoSuchAlgorithmException", + "java.security.PrivateKey", + "java.security.PublicKey", + "java.security.cert.CertificateFactory", + "java.security.cert.X509Certificate", + "java.security.spec.MGF1ParameterSpec", + "java.security.spec.PKCS8EncodedKeySpec", + "java.security.spec.X509EncodedKeySpec", + "java.text.SimpleDateFormat", + "java.time.Clock", + "java.time.Clock$FixedClock", + "java.time.Clock$OffsetClock", + "java.time.Clock$SystemClock", + "java.time.Clock$TickClock", + "java.time.temporal.ChronoUnit", + "java.util.AbstractMap$*", + "java.util.ArrayList", + "java.util.ArrayList$Itr", + "java.util.Arrays", + "java.util.Collections", + "java.util.Collections$*", + "java.util.Date", + "java.util.HashMap", + "java.util.HashMap$Entry", + "java.util.HashMap$KeyIterator", + "java.util.HashMap$KeySet", + "java.util.HashMap$Node", + "java.util.HashSet", + "java.util.LinkedHashMap", + "java.util.LinkedHashMap$Entry", + "java.util.LinkedHashMap$LinkedEntryIterator", + "java.util.LinkedHashMap$LinkedEntrySet", + "java.util.LinkedHashMap$LinkedKeySet", + "java.util.LinkedHashSet", + "java.util.LinkedList", + "java.util.List", + "java.util.Locale", + "java.util.Map", + "java.util.TreeMap", + "java.util.TreeSet", + "java.util.UUID", + "javax.crypto.Cipher", + "javax.crypto.Mac", + "javax.crypto.spec.IvParameterSpec", + "javax.crypto.spec.OAEPParameterSpec", + "javax.crypto.spec.PSource", + "javax.crypto.spec.PSource$*", + "javax.crypto.spec.SecretKeySpec", + "javax.security.auth.callback.ChoiceCallback", + "javax.security.auth.callback.ConfirmationCallback", + "javax.security.auth.callback.LanguageCallback", + "javax.security.auth.callback.NameCallback", + "javax.security.auth.callback.PasswordCallback", + "javax.security.auth.callback.TextInputCallback", + "javax.security.auth.callback.TextOutputCallback", + "org.apache.groovy.json.internal.LazyMap", + "org.codehaus.groovy.runtime.GStringImpl", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "org.forgerock.guice.core.IdentityProvider", + "org.forgerock.guice.core.InjectorHolder", + "org.forgerock.http.Client", + "org.forgerock.http.Context", + "org.forgerock.http.Handler", + "org.forgerock.http.client.*", + "org.forgerock.http.context.RootContext", + "org.forgerock.http.header.*", + "org.forgerock.http.header.authorization.*", + "org.forgerock.http.protocol.*", + "org.forgerock.json.JsonValue", + "org.forgerock.json.jose.builders.EncryptedJwtBuilder", + "org.forgerock.json.jose.builders.EncryptedThenSignedJwtBuilder", + "org.forgerock.json.jose.builders.JweHeaderBuilder", + "org.forgerock.json.jose.builders.JwsHeaderBuilder", + "org.forgerock.json.jose.builders.JwtBuilderFactory", + "org.forgerock.json.jose.builders.SignedJwtBuilderImpl", + "org.forgerock.json.jose.builders.SignedThenEncryptedJwtBuilder", + "org.forgerock.json.jose.builders.SignedThenEncryptedJwtHeaderBuilder", + "org.forgerock.json.jose.jwe.EncryptedJwt", + "org.forgerock.json.jose.jwe.EncryptionMethod", + "org.forgerock.json.jose.jwe.JweAlgorithm", + "org.forgerock.json.jose.jwe.SignedThenEncryptedJwt", + "org.forgerock.json.jose.jwk.JWKSet", + "org.forgerock.json.jose.jwk.RsaJWK", + "org.forgerock.json.jose.jws.EncryptedThenSignedJwt", + "org.forgerock.json.jose.jws.JwsAlgorithm", + "org.forgerock.json.jose.jws.JwsHeader", + "org.forgerock.json.jose.jws.SignedEncryptedJwt", + "org.forgerock.json.jose.jws.SignedJwt", + "org.forgerock.json.jose.jws.SigningManager", + "org.forgerock.json.jose.jws.handlers.HmacSigningHandler", + "org.forgerock.json.jose.jws.handlers.RSASigningHandler", + "org.forgerock.json.jose.jws.handlers.SecretHmacSigningHandler", + "org.forgerock.json.jose.jws.handlers.SecretRSASigningHandler", + "org.forgerock.json.jose.jwt.JwtClaimsSet", + "org.forgerock.macaroons.Macaroon", + "org.forgerock.oauth.clients.oidc.Claim", + "org.forgerock.oauth2.core.GrantType", + "org.forgerock.oauth2.core.StatefulAccessToken", + "org.forgerock.oauth2.core.UserInfoClaims", + "org.forgerock.oauth2.core.exceptions.InvalidRequestException", + "org.forgerock.oauth2.core.tokenexchange.ExchangeableToken", + "org.forgerock.openam.auth.node.api.Action", + "org.forgerock.openam.auth.node.api.Action$ActionBuilder", + "org.forgerock.openam.auth.node.api.NodeState", + "org.forgerock.openam.auth.node.api.SuspendedTextOutputCallback", + "org.forgerock.openam.auth.nodes.IdentityProvider", + "org.forgerock.openam.auth.nodes.InjectorHolder", + "org.forgerock.openam.authentication.callbacks.AbstractValidatedCallback", + "org.forgerock.openam.authentication.callbacks.AttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.BooleanAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.ConsentMappingCallback", + "org.forgerock.openam.authentication.callbacks.DeviceProfileCallback", + "org.forgerock.openam.authentication.callbacks.IdPCallback", + "org.forgerock.openam.authentication.callbacks.KbaCreateCallback", + "org.forgerock.openam.authentication.callbacks.NumberAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.PollingWaitCallback", + "org.forgerock.openam.authentication.callbacks.SelectIdPCallback", + "org.forgerock.openam.authentication.callbacks.StringAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.TermsAndConditionsCallback", + "org.forgerock.openam.authentication.callbacks.ValidatedPasswordCallback", + "org.forgerock.openam.authentication.callbacks.ValidatedUsernameCallback", + "org.forgerock.openam.authentication.modules.scripted.*", + "org.forgerock.openam.core.rest.authn.callbackhandlers.*", + "org.forgerock.openam.core.rest.devices.deviceprint.DeviceIdDao", + "org.forgerock.openam.core.rest.devices.profile.DeviceProfilesDao", + "org.forgerock.openam.oauth2.OpenAMAccessToken", + "org.forgerock.openam.oauth2.token.grantset.Authorization$ModifiedAccessToken", + "org.forgerock.openam.oauth2.token.macaroon.MacaroonAccessToken", + "org.forgerock.openam.oauth2.token.stateless.StatelessAccessToken", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "org.forgerock.openam.scripting.api.ScriptedIdentity", + "org.forgerock.openam.scripting.api.ScriptedSession", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentity", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentityRepository", + "org.forgerock.openam.scripting.api.secrets.ScriptedSecrets", + "org.forgerock.openam.scripting.api.secrets.Secret", + "org.forgerock.openam.scripting.idrepo.ScriptIdentityRepository", + "org.forgerock.openam.shared.security.ThreadLocalSecureRandom", + "org.forgerock.openidconnect.Claim", + "org.forgerock.openidconnect.OpenIdConnectToken", + "org.forgerock.openidconnect.ssoprovider.OpenIdConnectSSOToken", + "org.forgerock.secrets.SecretBuilder", + "org.forgerock.secrets.keys.SigningKey", + "org.forgerock.secrets.keys.VerificationKey", + "org.forgerock.util.encode.Base64", + "org.forgerock.util.encode.Base64url", + "org.forgerock.util.encode.Hex", + "org.forgerock.util.promise.NeverThrowsException", + "org.forgerock.util.promise.Promise", + "org.forgerock.util.promise.PromiseImpl", + "org.mozilla.javascript.ConsString", + "org.mozilla.javascript.JavaScriptException", + "org.mozilla.javascript.WrappedException", + "sun.security.ec.ECPrivateKeyImpl", + "sun.security.rsa.RSAPrivateCrtKeyImpl", + "sun.security.rsa.RSAPublicKeyImpl", + "sun.security.x509.X500Name", + "sun.security.x509.X509CertImpl", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.util.Collections$UnmodifiableCollection$1", + "org.forgerock.opendj.ldap.Rdn", + "org.forgerock.opendj.ldap.Dn", + "org.forgerock.openam.auth.nodes.VerifyTransactionsHelper", + ], + }, + "isHidden": false, + "languages": [ + "JAVASCRIPT", + "GROOVY", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/scripttype/SAML2_NAMEID_MAPPER.scripttype.json 1`] = ` +{ + "scripttype": { + "SAML2_NAMEID_MAPPER": { + "_id": "SAML2_NAMEID_MAPPER", + "_type": { + "_id": "contexts", + "collection": true, + "name": "scriptContext", + }, + "context": { + "_id": "SAML2_NAMEID_MAPPER", + "allowLists": [ + "org.forgerock.util.promise.PromiseImpl", + "org.forgerock.util.promise.Promises$*", + "java.lang.Object", + "java.lang.Byte", + "java.lang.Character", + "java.lang.Character$Subset", + "java.lang.Character$UnicodeBlock", + "java.lang.Float", + "java.lang.Long", + "java.lang.Math", + "java.lang.Number", + "java.lang.Short", + "java.lang.StrictMath", + "java.lang.Void", + "java.util.AbstractMap$SimpleImmutableEntry", + "java.util.ArrayList", + "java.util.ArrayList$Itr", + "java.util.Collections$Collections$1", + "java.util.Collections$EmptyList", + "java.util.Collections$EmptyMap", + "java.util.Collections$SingletonList", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.util.Collections$UnmodifiableCollection$1", + "java.util.HashMap", + "java.util.HashMap$Entry", + "java.util.HashMap$KeyIterator", + "java.util.HashMap$KeySet", + "java.util.HashMap$Node", + "java.util.HashSet", + "java.util.LinkedHashMap", + "java.util.LinkedHashMap$Entry", + "java.util.LinkedHashMap$LinkedEntryIterator", + "java.util.LinkedHashMap$LinkedEntrySet", + "java.util.LinkedHashSet", + "java.util.LinkedList", + "java.util.TreeMap", + "java.util.TreeSet", + "java.net.URI", + "com.sun.identity.common.CaseInsensitiveHashMap", + "org.forgerock.json.JsonValue", + "org.mozilla.javascript.JavaScriptException", + "javax.servlet.http.Cookie", + "org.xml.sax.InputSource", + "java.security.cert.CertificateFactory", + "com.iplanet.am.sdk.AMHashMap", + "com.iplanet.sso.providers.dpro.SessionSsoToken", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "java.io.PrintWriter", + "javax.security.auth.Subject", + "javax.servlet.http.HttpServletRequestWrapper", + "javax.servlet.http.HttpServletResponseWrapper", + "sun.security.ec.ECPrivateKeyImpl", + ], + "bindings": [ + { + "elements": [ + { + "elementType": "method", + "name": "send", + "parameters": [ + { + "javaScriptType": "string", + "name": "uri", + }, + { + "javaScriptType": "object", + "name": "requestOptions", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "send", + "parameters": [ + { + "javaScriptType": "string", + "name": "uri", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.scripting.wrappers.HttpClientScriptWrapper", + "javaScriptType": "object", + "name": "httpClient", + }, + { + "elements": [ + { + "elementType": "method", + "name": "getName", + "parameters": [], + "returnType": "string", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "isTraceEnabled", + "parameters": [], + "returnType": "boolean", + }, + { + "elementType": "method", + "name": "isDebugEnabled", + "parameters": [], + "returnType": "boolean", + }, + { + "elementType": "method", + "name": "isErrorEnabled", + "parameters": [], + "returnType": "boolean", + }, + { + "elementType": "method", + "name": "isInfoEnabled", + "parameters": [], + "returnType": "boolean", + }, + { + "elementType": "method", + "name": "isWarnEnabled", + "parameters": [], + "returnType": "boolean", + }, + ], + "javaClass": "org.forgerock.openam.scripting.logging.ScriptedLoggerWrapper", + "javaScriptType": "object", + "name": "logger", + }, + { + "elements": [ + { + "elementType": "method", + "name": "getGenericSecret", + "parameters": [ + { + "javaScriptType": "string", + "name": "secretId", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.scripting.api.secrets.ScriptedSecrets", + "javaScriptType": "object", + "name": "secrets", + }, + { + "javaScriptType": "unknown", + "name": "nameIDScriptHelper", + }, + { + "elements": [ + { + "elementType": "method", + "name": "getName", + "parameters": [], + "returnType": "string", + }, + { + "elementType": "method", + "name": "store", + "parameters": [], + "returnType": "void", + }, + { + "elementType": "method", + "name": "setAttribute", + "parameters": [ + { + "javaScriptType": "string", + "name": "attributeName", + }, + { + "javaScriptType": "array", + "name": "attributeValues", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "addAttribute", + "parameters": [ + { + "javaScriptType": "string", + "name": "attributeName", + }, + { + "javaScriptType": "string", + "name": "attributeValue", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "getAttributeValues", + "parameters": [ + { + "javaScriptType": "string", + "name": "attributeName", + }, + ], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getUniversalId", + "parameters": [], + "returnType": "string", + }, + ], + "javaClass": "org.forgerock.openam.scripting.api.identity.ScriptedIdentityScriptWrapper", + "javaScriptType": "object", + "name": "identity", + }, + { + "elements": [ + { + "elementType": "field", + "elements": [ + { + "elementType": "method", + "name": "randomUUID", + "parameters": [], + "returnType": "string", + }, + { + "elementType": "method", + "name": "getRandomValues", + "parameters": [ + { + "javaScriptType": "array", + "name": "array", + }, + ], + "returnType": "array", + }, + ], + "javaClass": "org.forgerock.openam.scripting.bindings.ScriptCryptoService", + "javaScriptType": "object", + "name": "crypto", + }, + { + "elementType": "field", + "elements": [ + { + "elementType": "method", + "name": "decode", + "parameters": [ + { + "javaScriptType": "string", + "name": "toDecode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "encode", + "parameters": [ + { + "javaScriptType": "string", + "name": "toEncode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "btoa", + "parameters": [ + { + "javaScriptType": "string", + "name": "toEncode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "atob", + "parameters": [ + { + "javaScriptType": "string", + "name": "toDecode", + }, + ], + "returnType": "string", + }, + ], + "javaClass": "org.forgerock.openam.scripting.bindings.ScriptBase64Service", + "javaScriptType": "object", + "name": "base64", + }, + { + "elementType": "field", + "elements": [ + { + "elementType": "method", + "name": "decode", + "parameters": [ + { + "javaScriptType": "string", + "name": "toDecode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "encode", + "parameters": [ + { + "javaScriptType": "string", + "name": "toEncode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "btoa", + "parameters": [ + { + "javaScriptType": "string", + "name": "toEncode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "atob", + "parameters": [ + { + "javaScriptType": "string", + "name": "toDecode", + }, + ], + "returnType": "string", + }, + ], + "javaClass": "org.forgerock.openam.scripting.bindings.ScriptBase64UrlService", + "javaScriptType": "object", + "name": "base64url", + }, + ], + "javaClass": "org.forgerock.openam.scripting.bindings.ScriptUtilityService", + "javaScriptType": "object", + "name": "utils", + }, + { + "javaScriptType": "string", + "name": "nameIDFormat", + }, + { + "javaScriptType": "string", + "name": "scriptName", + }, + { + "javaScriptType": "string", + "name": "realm", + }, + { + "javaScriptType": "string", + "name": "remoteEntityId", + }, + { + "elements": [ + { + "elementType": "method", + "name": "update", + "parameters": [ + { + "javaScriptType": "string", + "name": "id", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "value", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "update", + "parameters": [ + { + "javaScriptType": "string", + "name": "id", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "value", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "update", + "parameters": [ + { + "javaScriptType": "string", + "name": "id", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "value", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "read", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "read", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "read", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "delete", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "delete", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "delete", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "action", + "parameters": [ + { + "javaScriptType": "string", + "name": "resource", + }, + { + "javaScriptType": "string", + "name": "actionName", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "action", + "parameters": [ + { + "javaScriptType": "string", + "name": "resource", + }, + { + "javaScriptType": "string", + "name": "actionName", + }, + { + "javaScriptType": "object", + "name": "content", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "action", + "parameters": [ + { + "javaScriptType": "string", + "name": "resource", + }, + { + "javaScriptType": "string", + "name": "actionName", + }, + { + "javaScriptType": "object", + "name": "content", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "action", + "parameters": [ + { + "javaScriptType": "string", + "name": "resource", + }, + { + "javaScriptType": "string", + "name": "actionName", + }, + { + "javaScriptType": "object", + "name": "content", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "query", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "query", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "create", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "newResourceId", + }, + { + "javaScriptType": "object", + "name": "content", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "create", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "newResourceId", + }, + { + "javaScriptType": "object", + "name": "content", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "create", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "newResourceId", + }, + { + "javaScriptType": "object", + "name": "content", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "patch", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "array", + "name": "patch", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "patch", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "array", + "name": "patch", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "patch", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "array", + "name": "patch", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.scripting.wrappers.IdmIntegrationServiceScriptWrapper", + "javaScriptType": "object", + "name": "openidm", + }, + { + "javaScriptType": "string", + "name": "hostedEntityId", + }, + { + "javaScriptType": "string", + "name": "cookieName", + }, + ], + "evaluatorVersions": { + "JAVASCRIPT": [ + "2.0", + ], + }, + }, + "defaultScript": "[Empty]", + "engineConfiguration": { + "_id": "engineConfiguration", + "_type": { + "_id": "engineConfiguration", + "collection": false, + "name": "Scripting engine configuration", + }, + "blackList": [ + "java.lang.Class", + "java.security.AccessController", + "java.lang.reflect.*", + ], + "coreThreads": 10, + "idleTimeout": 60, + "maxThreads": 50, + "propertyNamePrefix": "script", + "queueSize": 10, + "serverTimeout": 0, + "useSecurityManager": true, + "whiteList": [ + "java.lang.Float", + "org.forgerock.http.protocol.Header", + "java.lang.Integer", + "org.forgerock.http.Client", + "java.lang.Character$UnicodeBlock", + "java.lang.Character", + "java.lang.Long", + "java.lang.Short", + "java.util.Map", + "org.forgerock.http.client.*", + "java.lang.Math", + "org.forgerock.opendj.ldap.Dn", + "java.lang.Byte", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "java.lang.StrictMath", + "org.forgerock.util.promise.PromiseImpl", + "org.forgerock.http.Context", + "java.lang.Void", + "org.codehaus.groovy.runtime.GStringImpl", + "groovy.json.JsonSlurper", + "org.forgerock.http.protocol.Request", + "org.forgerock.http.protocol.Entity", + "org.forgerock.http.context.RootContext", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentity", + "java.util.List", + "org.forgerock.http.protocol.RequestCookies", + "org.forgerock.http.protocol.Responses", + "org.forgerock.util.promise.Promise", + "java.util.HashMap$KeyIterator", + "com.sun.identity.shared.debug.Debug", + "java.lang.Double", + "org.forgerock.http.protocol.Headers", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "org.forgerock.opendj.ldap.Rdn", + "org.forgerock.http.protocol.Status", + "java.util.HashMap", + "java.lang.Character$Subset", + "java.util.TreeSet", + "java.util.ArrayList", + "java.util.HashSet", + "java.util.LinkedHashMap", + "org.forgerock.http.protocol.ResponseException", + "java.util.Collections$UnmodifiableRandomAccessList", + "org.forgerock.http.protocol.Message", + "java.lang.Boolean", + "java.lang.String", + "java.lang.Number", + "java.util.LinkedList", + "java.util.LinkedHashSet", + "org.forgerock.http.protocol.Response", + "org.forgerock.util.promise.NeverThrowsException", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "java.util.TreeMap", + "java.util.Collections$EmptyList", + "org.forgerock.openam.scripting.api.ScriptedSession", + "java.util.Collections$UnmodifiableCollection$1", + "org.forgerock.http.Handler", + "java.lang.Object", + "org.forgerock.http.protocol.Form", + ], + }, + "isHidden": false, + "languages": [ + "JAVASCRIPT", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/scripttype/SAML2_SP_ADAPTER.scripttype.json 1`] = ` +{ + "scripttype": { + "SAML2_SP_ADAPTER": { + "_id": "SAML2_SP_ADAPTER", + "_type": { + "_id": "contexts", + "collection": true, + "name": "scriptContext", + }, + "context": { + "_id": "SAML2_SP_ADAPTER", + "allowLists": [ + "java.util.HashMap$Node", + "org.mozilla.javascript.JavaScriptException", + "java.util.Collections$SingletonList", + "org.codehaus.groovy.runtime.GStringImpl", + "javax.servlet.http.HttpServletResponseWrapper", + "java.util.LinkedHashSet", + "java.io.PrintWriter", + "java.lang.Byte", + "com.iplanet.am.sdk.AMHashMap", + "java.lang.Math", + "java.lang.Short", + "java.util.AbstractMap$SimpleImmutableEntry", + "java.util.ArrayList$Itr", + "java.util.Collections$1", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.lang.Number", + "com.sun.identity.saml2.protocol.*", + "javax.security.auth.Subject", + "java.lang.Integer", + "java.lang.Boolean", + "javax.servlet.http.HttpServletRequestWrapper", + "groovy.json.internal.LazyMap", + "org.forgerock.json.JsonValue", + "sun.security.ec.ECPrivateKeyImpl", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "java.lang.Character$UnicodeBlock", + "groovy.json.JsonSlurper", + "java.util.LinkedList", + "com.sun.identity.saml2.plugins.scripted.ScriptEntitlementInfo", + "java.util.HashMap$Entry", + "com.sun.identity.shared.debug.Debug", + "java.util.HashMap$KeySet", + "java.util.HashMap$KeyIterator", + "java.net.URI", + "java.util.LinkedHashMap$Entry", + "com.sun.identity.common.CaseInsensitiveHashMap", + "java.util.LinkedHashMap$LinkedEntrySet", + "java.lang.StrictMath", + "java.util.Collections$EmptyMap", + "java.lang.String", + "java.lang.Long", + "java.util.LinkedHashMap$LinkedEntryIterator", + "java.util.TreeMap", + "com.sun.identity.saml2.plugins.scripted.SpAdapterScriptHelper", + "java.util.HashMap", + "org.forgerock.http.client.*", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "java.lang.Float", + "java.util.Collections$EmptyList", + "java.util.LinkedHashMap", + "java.util.ArrayList", + "com.sun.identity.saml2.assertion.*", + "org.forgerock.http.Client", + "com.iplanet.sso.providers.dpro.SessionSsoToken", + "com.sun.identity.saml2.protocol.impl.*", + "com.sun.identity.saml2.assertion.impl.*", + "com.sun.identity.saml2.common.SAML2Exception", + "java.lang.Character$Subset", + "java.lang.Character", + "java.lang.Double", + "java.lang.Object", + "java.util.TreeSet", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "java.lang.Void", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "org.forgerock.util.promise.PromiseImpl", + "java.util.HashSet", + "java.util.Collections$UnmodifiableCollection$1", + ], + "bindings": [], + "evaluatorVersions": { + "GROOVY": [ + "1.0", + ], + "JAVASCRIPT": [ + "1.0", + ], + }, + }, + "defaultScript": "[Empty]", + "engineConfiguration": { + "_id": "engineConfiguration", + "_type": { + "_id": "engineConfiguration", + "collection": false, + "name": "Scripting engine configuration", + }, + "blackList": [ + "java.lang.Class", + "java.lang.Thread", + "java.lang.invoke.*", + "java.lang.reflect.*", + "java.security.AccessController", + ], + "coreThreads": { + "$int": "&{saml2.sp.adapter.script.context.core.threads|10}", + }, + "idleTimeout": 60, + "maxThreads": { + "$int": "&{saml2.sp.adapter.script.context.max.threads|50}", + }, + "propertyNamePrefix": "esv.", + "queueSize": { + "$int": "&{saml2.sp.adapter.script.context.queue.size|10}", + }, + "serverTimeout": 0, + "useSecurityManager": true, + "whiteList": [ + "com.iplanet.am.sdk.AMHashMap", + "com.iplanet.sso.providers.dpro.SessionSsoToken", + "com.sun.identity.common.CaseInsensitiveHashMap", + "com.sun.identity.saml2.assertion.*", + "com.sun.identity.saml2.assertion.impl.*", + "com.sun.identity.saml2.common.SAML2Exception", + "com.sun.identity.saml2.plugins.scripted.ScriptEntitlementInfo", + "com.sun.identity.saml2.protocol.*", + "com.sun.identity.saml2.protocol.impl.*", + "com.sun.identity.shared.debug.Debug", + "java.io.PrintWriter", + "java.lang.Boolean", + "java.lang.Byte", + "java.lang.Character", + "java.lang.Character$Subset", + "java.lang.Character$UnicodeBlock", + "java.util.Collections$EmptyMap", + "java.lang.Double", + "java.lang.Float", + "java.lang.Integer", + "java.lang.Long", + "java.lang.Math", + "java.lang.Number", + "java.lang.Object", + "java.lang.Short", + "java.lang.StrictMath", + "java.lang.String", + "java.lang.Void", + "java.util.AbstractMap$SimpleImmutableEntry", + "java.util.ArrayList", + "java.util.ArrayList$Itr", + "java.util.Collections$1", + "java.util.Collections$EmptyList", + "java.util.Collections$SingletonList", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.util.Collections$UnmodifiableCollection$1", + "java.util.HashMap", + "java.util.HashMap$Entry", + "java.util.HashMap$KeyIterator", + "java.util.HashMap$KeySet", + "java.util.HashMap$Node", + "java.util.HashSet", + "java.util.LinkedHashMap", + "java.util.LinkedHashMap$Entry", + "java.util.LinkedHashMap$LinkedEntryIterator", + "java.util.LinkedHashMap$LinkedEntrySet", + "java.util.LinkedHashSet", + "java.util.LinkedList", + "java.util.TreeMap", + "java.util.TreeSet", + "java.net.URI", + "javax.security.auth.Subject", + "javax.servlet.http.HttpServletRequestWrapper", + "javax.servlet.http.HttpServletResponseWrapper", + "groovy.json.internal.LazyMap", + "groovy.json.JsonSlurper", + "org.codehaus.groovy.runtime.GStringImpl", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "org.forgerock.http.Client", + "org.forgerock.http.client.*", + "org.forgerock.json.JsonValue", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "org.forgerock.util.promise.PromiseImpl", + "org.mozilla.javascript.JavaScriptException", + "sun.security.ec.ECPrivateKeyImpl", + "com.sun.identity.saml2.plugins.scripted.SpAdapterScriptHelper", + "java.util.List", + "java.util.Map", + "org.forgerock.opendj.ldap.Rdn", + "org.forgerock.opendj.ldap.Dn", + ], + }, + "isHidden": false, + "languages": [ + "JAVASCRIPT", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/scripttype/SCRIPTED_DECISION_NODE.scripttype.json 1`] = ` +{ + "scripttype": { + "SCRIPTED_DECISION_NODE": { + "_id": "SCRIPTED_DECISION_NODE", + "_type": { + "_id": "contexts", + "collection": true, + "name": "scriptContext", + }, + "context": { + "_id": "SCRIPTED_DECISION_NODE", + "allowLists": [ + "org.forgerock.util.promise.PromiseImpl", + "org.forgerock.util.promise.Promises$*", + "java.lang.Object", + "java.lang.Byte", + "java.lang.Character", + "java.lang.Character$Subset", + "java.lang.Character$UnicodeBlock", + "java.lang.Float", + "java.lang.Long", + "java.lang.Math", + "java.lang.Number", + "java.lang.Short", + "java.lang.StrictMath", + "java.lang.Void", + "java.util.AbstractMap$*", + "java.util.ArrayList", + "java.util.Collections", + "java.util.concurrent.TimeUnit", + "java.util.Collections$*", + "java.util.HashSet", + "java.util.HashMap$KeyIterator", + "java.util.LinkedHashSet", + "java.util.LinkedList", + "java.util.TreeSet", + "java.security.KeyPair", + "java.security.KeyPairGenerator", + "java.security.KeyPairGenerator$*", + "java.security.PrivateKey", + "java.security.PublicKey", + "java.security.spec.X509EncodedKeySpec", + "java.security.spec.MGF1ParameterSpec", + "javax.crypto.SecretKeyFactory", + "javax.crypto.spec.OAEPParameterSpec", + "javax.crypto.spec.PBEKeySpec", + "javax.crypto.spec.PSource", + "javax.crypto.spec.PSource$*", + "org.forgerock.json.JsonValue", + "org.forgerock.util.promise.NeverThrowsException", + "java.util.concurrent.ExecutionException", + "java.util.concurrent.TimeoutException", + "org.forgerock.openam.core.rest.authn.callbackhandlers.*", + "com.sun.crypto.provider.PBKDF2KeyImpl", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.util.Collections$UnmodifiableCollection$1", + "sun.security.ec.ECPrivateKeyImpl", + "ch.qos.logback.classic.Logger", + "com.sun.proxy.$*", + "java.util.Date", + "java.security.spec.InvalidKeySpecException", + "org.forgerock.openam.auth.nodes.VerifyTransactionsHelper", + ], + "bindings": [ + { + "elements": [ + { + "elementType": "method", + "name": "getAuthnRequest", + "parameters": [], + "returnType": "object", + }, + { + "elementType": "method", + "name": "getFlowInitiator", + "parameters": [], + "returnType": "string", + }, + { + "elementType": "method", + "name": "getSpAttributes", + "parameters": [], + "returnType": "object", + }, + { + "elementType": "method", + "name": "getIdpAttributes", + "parameters": [], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.saml2.SAMLScriptedBindingObjectImpl", + "javaScriptType": "object", + "name": "samlApplication", + }, + { + "elements": [ + { + "elementType": "method", + "name": "send", + "parameters": [ + { + "javaScriptType": "string", + "name": "uri", + }, + { + "javaScriptType": "object", + "name": "requestOptions", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "send", + "parameters": [ + { + "javaScriptType": "string", + "name": "uri", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.scripting.wrappers.HttpClientScriptWrapper", + "javaScriptType": "object", + "name": "httpClient", + }, + { + "elements": [ + { + "elementType": "method", + "name": "getName", + "parameters": [], + "returnType": "string", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "info", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "trace", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "debug", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "error", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "array", + "name": "arguments", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + { + "javaScriptType": "object", + "name": "t", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "msg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg1", + }, + { + "javaScriptType": "object", + "name": "arg2", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "warn", + "parameters": [ + { + "javaScriptType": "string", + "name": "format", + }, + { + "javaScriptType": "object", + "name": "arg", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "isTraceEnabled", + "parameters": [], + "returnType": "boolean", + }, + { + "elementType": "method", + "name": "isDebugEnabled", + "parameters": [], + "returnType": "boolean", + }, + { + "elementType": "method", + "name": "isErrorEnabled", + "parameters": [], + "returnType": "boolean", + }, + { + "elementType": "method", + "name": "isInfoEnabled", + "parameters": [], + "returnType": "boolean", + }, + { + "elementType": "method", + "name": "isWarnEnabled", + "parameters": [], + "returnType": "boolean", + }, + ], + "javaClass": "org.forgerock.openam.scripting.logging.ScriptedLoggerWrapper", + "javaScriptType": "object", + "name": "logger", + }, + { + "elements": [], + "javaScriptType": "object", + "name": "requestParameters", + }, + { + "elements": [ + { + "elementType": "method", + "name": "getValidatedUsernameCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getHttpCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getX509CertificateCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getConsentMappingCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getDeviceProfileCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getKbaCreateCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getSelectIdPCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getTermsAndConditionsCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getTextInputCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getStringAttributeInputCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getNumberAttributeInputCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getBooleanAttributeInputCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getConfirmationCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getLanguageCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getIdpCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getValidatedPasswordCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getChoiceCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getNameCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getPasswordCallbacks", + "parameters": [], + "returnType": "array", + }, + { + "elementType": "method", + "name": "getHiddenValueCallbacks", + "parameters": [], + "returnType": "object", + }, + { + "elementType": "method", + "name": "isEmpty", + "parameters": [], + "returnType": "boolean", + }, + ], + "javaClass": "org.forgerock.openam.auth.nodes.script.ScriptedCallbacksWrapper", + "javaScriptType": "object", + "name": "callbacks", + }, + { + "elements": [ + { + "elementType": "method", + "name": "getGenericSecret", + "parameters": [ + { + "javaScriptType": "string", + "name": "secretId", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.scripting.api.secrets.ScriptedSecrets", + "javaScriptType": "object", + "name": "secrets", + }, + { + "elements": [ + { + "elementType": "method", + "name": "getIdentity", + "parameters": [ + { + "javaScriptType": "string", + "name": "userName", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.scripting.api.identity.ScriptedIdentityRepositoryScriptWrapper", + "javaScriptType": "object", + "name": "idRepository", + }, + { + "elements": [], + "javaScriptType": "object", + "name": "requestHeaders", + }, + { + "elements": [ + { + "elementType": "method", + "name": "generateJwt", + "parameters": [ + { + "javaScriptType": "object", + "name": "jwtData", + }, + ], + "returnType": "string", + }, + ], + "javaClass": "org.forgerock.openam.auth.nodes.script.JwtAssertionScriptWrapper", + "javaScriptType": "object", + "name": "jwtAssertion", + }, + { + "elements": [ + { + "elementType": "method", + "name": "remove", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "get", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "keys", + "parameters": [], + "returnType": "object", + }, + { + "elementType": "method", + "name": "getObject", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "isDefined", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + ], + "returnType": "boolean", + }, + { + "elementType": "method", + "name": "putShared", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + { + "javaScriptType": "object", + "name": "value", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "mergeShared", + "parameters": [ + { + "javaScriptType": "object", + "name": "object", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "mergeTransient", + "parameters": [ + { + "javaScriptType": "object", + "name": "object", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "putTransient", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + { + "javaScriptType": "object", + "name": "value", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.auth.node.api.NodeStateScriptWrapper", + "javaScriptType": "object", + "name": "nodeState", + }, + { + "javaScriptType": "boolean", + "name": "resumedFromSuspend", + }, + { + "elements": [ + { + "elementType": "field", + "elements": [ + { + "elementType": "method", + "name": "randomUUID", + "parameters": [], + "returnType": "string", + }, + { + "elementType": "method", + "name": "getRandomValues", + "parameters": [ + { + "javaScriptType": "array", + "name": "array", + }, + ], + "returnType": "array", + }, + ], + "javaClass": "org.forgerock.openam.scripting.bindings.ScriptCryptoService", + "javaScriptType": "object", + "name": "crypto", + }, + { + "elementType": "field", + "elements": [ + { + "elementType": "method", + "name": "decode", + "parameters": [ + { + "javaScriptType": "string", + "name": "toDecode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "encode", + "parameters": [ + { + "javaScriptType": "string", + "name": "toEncode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "btoa", + "parameters": [ + { + "javaScriptType": "string", + "name": "toEncode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "atob", + "parameters": [ + { + "javaScriptType": "string", + "name": "toDecode", + }, + ], + "returnType": "string", + }, + ], + "javaClass": "org.forgerock.openam.scripting.bindings.ScriptBase64Service", + "javaScriptType": "object", + "name": "base64", + }, + { + "elementType": "field", + "elements": [ + { + "elementType": "method", + "name": "decode", + "parameters": [ + { + "javaScriptType": "string", + "name": "toDecode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "encode", + "parameters": [ + { + "javaScriptType": "string", + "name": "toEncode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "btoa", + "parameters": [ + { + "javaScriptType": "string", + "name": "toEncode", + }, + ], + "returnType": "string", + }, + { + "elementType": "method", + "name": "atob", + "parameters": [ + { + "javaScriptType": "string", + "name": "toDecode", + }, + ], + "returnType": "string", + }, + ], + "javaClass": "org.forgerock.openam.scripting.bindings.ScriptBase64UrlService", + "javaScriptType": "object", + "name": "base64url", + }, + ], + "javaClass": "org.forgerock.openam.scripting.bindings.ScriptUtilityService", + "javaScriptType": "object", + "name": "utils", + }, + { + "elements": [ + { + "elementType": "method", + "name": "withIdentifiedUser", + "parameters": [ + { + "javaScriptType": "string", + "name": "username", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "withIdentifiedAgent", + "parameters": [ + { + "javaScriptType": "string", + "name": "agentName", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "suspend", + "parameters": [ + { + "javaScriptType": "string", + "name": "callbackTextFormat", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "suspend", + "parameters": [ + { + "javaScriptType": "string", + "name": "callbackTextFormat", + }, + { + "javaScriptType": "object", + "name": "additionalLogic", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "goTo", + "parameters": [ + { + "javaScriptType": "string", + "name": "outcome", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "removeSessionProperty", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "putSessionProperty", + "parameters": [ + { + "javaScriptType": "string", + "name": "key", + }, + { + "javaScriptType": "string", + "name": "value", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "withHeader", + "parameters": [ + { + "javaScriptType": "string", + "name": "header", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "withDescription", + "parameters": [ + { + "javaScriptType": "string", + "name": "description", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "withStage", + "parameters": [ + { + "javaScriptType": "string", + "name": "stage", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "withErrorMessage", + "parameters": [ + { + "javaScriptType": "string", + "name": "errorMessage", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "withLockoutMessage", + "parameters": [ + { + "javaScriptType": "string", + "name": "lockoutMessage", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.auth.nodes.script.ActionWrapper", + "javaScriptType": "object", + "name": "action", + }, + { + "javaScriptType": "string", + "name": "scriptName", + }, + { + "javaScriptType": "string", + "name": "realm", + }, + { + "elements": [ + { + "elementType": "method", + "name": "validateJwtClaims", + "parameters": [ + { + "javaScriptType": "object", + "name": "jwtData", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.auth.nodes.script.JwtValidatorScriptWrapper", + "javaScriptType": "object", + "name": "jwtValidator", + }, + { + "elements": [ + { + "elementType": "method", + "name": "languageCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "language", + }, + { + "javaScriptType": "string", + "name": "country", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "idPCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "provider", + }, + { + "javaScriptType": "string", + "name": "clientId", + }, + { + "javaScriptType": "string", + "name": "redirectUri", + }, + { + "javaScriptType": "array", + "name": "scope", + }, + { + "javaScriptType": "string", + "name": "nonce", + }, + { + "javaScriptType": "string", + "name": "request", + }, + { + "javaScriptType": "string", + "name": "requestUri", + }, + { + "javaScriptType": "array", + "name": "acrValues", + }, + { + "javaScriptType": "boolean", + "name": "requestNativeAppForUserInfo", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "idPCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "provider", + }, + { + "javaScriptType": "string", + "name": "clientId", + }, + { + "javaScriptType": "string", + "name": "redirectUri", + }, + { + "javaScriptType": "array", + "name": "scope", + }, + { + "javaScriptType": "string", + "name": "nonce", + }, + { + "javaScriptType": "string", + "name": "request", + }, + { + "javaScriptType": "string", + "name": "requestUri", + }, + { + "javaScriptType": "array", + "name": "acrValues", + }, + { + "javaScriptType": "boolean", + "name": "requestNativeAppForUserInfo", + }, + { + "javaScriptType": "string", + "name": "token", + }, + { + "javaScriptType": "string", + "name": "tokenType", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "stringAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "string", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "stringAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "string", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + { + "javaScriptType": "array", + "name": "failedPolicies", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "stringAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "string", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "stringAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "string", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + { + "javaScriptType": "array", + "name": "failedPolicies", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "httpCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "authorizationHeader", + }, + { + "javaScriptType": "string", + "name": "negotiationHeader", + }, + { + "javaScriptType": "string", + "name": "errorCode", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "httpCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "authRHeader", + }, + { + "javaScriptType": "string", + "name": "negoName", + }, + { + "javaScriptType": "string", + "name": "negoValue", + }, + { + "javaScriptType": "number", + "name": "errorCode", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "x509CertificateCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "object", + "name": "certificate", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "x509CertificateCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "x509CertificateCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "object", + "name": "certificate", + }, + { + "javaScriptType": "boolean", + "name": "requestSignature", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "consentMappingCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "displayName", + }, + { + "javaScriptType": "string", + "name": "icon", + }, + { + "javaScriptType": "string", + "name": "accessLevel", + }, + { + "javaScriptType": "array", + "name": "titles", + }, + { + "javaScriptType": "string", + "name": "message", + }, + { + "javaScriptType": "boolean", + "name": "isRequired", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "consentMappingCallback", + "parameters": [ + { + "javaScriptType": "object", + "name": "config", + }, + { + "javaScriptType": "string", + "name": "message", + }, + { + "javaScriptType": "boolean", + "name": "isRequired", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "deviceProfileCallback", + "parameters": [ + { + "javaScriptType": "boolean", + "name": "metadata", + }, + { + "javaScriptType": "boolean", + "name": "location", + }, + { + "javaScriptType": "string", + "name": "message", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "kbaCreateCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "array", + "name": "predefinedQuestions", + }, + { + "javaScriptType": "boolean", + "name": "allowUserDefinedQuestions", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "selectIdPCallback", + "parameters": [ + { + "javaScriptType": "object", + "name": "providers", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "termsAndConditionsCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "version", + }, + { + "javaScriptType": "string", + "name": "terms", + }, + { + "javaScriptType": "string", + "name": "createDate", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "suspendedTextOutputCallback", + "parameters": [ + { + "javaScriptType": "number", + "name": "messageType", + }, + { + "javaScriptType": "string", + "name": "message", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "textInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "textInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "string", + "name": "defaultText", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "scriptTextOutputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "message", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "metadataCallback", + "parameters": [ + { + "javaScriptType": "object", + "name": "outputValue", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "numberAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "number", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + { + "javaScriptType": "array", + "name": "failedPolicies", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "numberAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "number", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "numberAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "number", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + { + "javaScriptType": "array", + "name": "failedPolicies", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "numberAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "number", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "booleanAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "boolean", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + { + "javaScriptType": "array", + "name": "failedPolicies", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "booleanAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "boolean", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + { + "javaScriptType": "array", + "name": "failedPolicies", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "booleanAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "boolean", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "booleanAttributeInputCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "name", + }, + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "boolean", + "name": "value", + }, + { + "javaScriptType": "boolean", + "name": "required", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "confirmationCallback", + "parameters": [ + { + "javaScriptType": "number", + "name": "messageType", + }, + { + "javaScriptType": "number", + "name": "optionType", + }, + { + "javaScriptType": "number", + "name": "defaultOption", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "confirmationCallback", + "parameters": [ + { + "javaScriptType": "number", + "name": "messageType", + }, + { + "javaScriptType": "array", + "name": "options", + }, + { + "javaScriptType": "number", + "name": "defaultOption", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "confirmationCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "number", + "name": "messageType", + }, + { + "javaScriptType": "number", + "name": "optionType", + }, + { + "javaScriptType": "number", + "name": "defaultOption", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "confirmationCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "number", + "name": "messageType", + }, + { + "javaScriptType": "array", + "name": "options", + }, + { + "javaScriptType": "number", + "name": "defaultOption", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "pollingWaitCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "waitTime", + }, + { + "javaScriptType": "string", + "name": "message", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "choiceCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "array", + "name": "choices", + }, + { + "javaScriptType": "number", + "name": "defaultChoice", + }, + { + "javaScriptType": "boolean", + "name": "multipleSelectionsAllowed", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "redirectCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "redirectUrl", + }, + { + "javaScriptType": "object", + "name": "redirectData", + }, + { + "javaScriptType": "string", + "name": "method", + }, + { + "javaScriptType": "boolean", + "name": "setTrackingCookie", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "redirectCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "redirectUrl", + }, + { + "javaScriptType": "object", + "name": "redirectData", + }, + { + "javaScriptType": "string", + "name": "method", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "redirectCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "redirectUrl", + }, + { + "javaScriptType": "object", + "name": "redirectData", + }, + { + "javaScriptType": "string", + "name": "method", + }, + { + "javaScriptType": "string", + "name": "statusParameter", + }, + { + "javaScriptType": "string", + "name": "redirectBackUrlCookie", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "redirectCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "redirectUrl", + }, + { + "javaScriptType": "object", + "name": "redirectData", + }, + { + "javaScriptType": "string", + "name": "method", + }, + { + "javaScriptType": "string", + "name": "statusParameter", + }, + { + "javaScriptType": "string", + "name": "redirectBackUrlCookie", + }, + { + "javaScriptType": "boolean", + "name": "setTrackingCookie", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "validatedUsernameCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + { + "javaScriptType": "array", + "name": "failedPolicies", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "validatedUsernameCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "validatedPasswordCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "boolean", + "name": "echoOn", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "validatedPasswordCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "boolean", + "name": "echoOn", + }, + { + "javaScriptType": "object", + "name": "policies", + }, + { + "javaScriptType": "boolean", + "name": "validateOnly", + }, + { + "javaScriptType": "array", + "name": "failedPolicies", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "textOutputCallback", + "parameters": [ + { + "javaScriptType": "number", + "name": "messageType", + }, + { + "javaScriptType": "string", + "name": "message", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "hiddenValueCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "id", + }, + { + "javaScriptType": "string", + "name": "value", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "nameCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "nameCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "string", + "name": "defaultName", + }, + ], + "returnType": "void", + }, + { + "elementType": "method", + "name": "passwordCallback", + "parameters": [ + { + "javaScriptType": "string", + "name": "prompt", + }, + { + "javaScriptType": "boolean", + "name": "echoOn", + }, + ], + "returnType": "void", + }, + ], + "javaClass": "org.forgerock.openam.auth.nodes.script.ScriptedCallbacksBuilder", + "javaScriptType": "object", + "name": "callbacksBuilder", + }, + { + "elements": [ + { + "elementType": "method", + "name": "update", + "parameters": [ + { + "javaScriptType": "string", + "name": "id", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "value", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "update", + "parameters": [ + { + "javaScriptType": "string", + "name": "id", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "value", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "update", + "parameters": [ + { + "javaScriptType": "string", + "name": "id", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "value", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "read", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "read", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "read", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "delete", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "delete", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "delete", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "action", + "parameters": [ + { + "javaScriptType": "string", + "name": "resource", + }, + { + "javaScriptType": "string", + "name": "actionName", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "action", + "parameters": [ + { + "javaScriptType": "string", + "name": "resource", + }, + { + "javaScriptType": "string", + "name": "actionName", + }, + { + "javaScriptType": "object", + "name": "content", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "action", + "parameters": [ + { + "javaScriptType": "string", + "name": "resource", + }, + { + "javaScriptType": "string", + "name": "actionName", + }, + { + "javaScriptType": "object", + "name": "content", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "action", + "parameters": [ + { + "javaScriptType": "string", + "name": "resource", + }, + { + "javaScriptType": "string", + "name": "actionName", + }, + { + "javaScriptType": "object", + "name": "content", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "query", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "query", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "create", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "newResourceId", + }, + { + "javaScriptType": "object", + "name": "content", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "create", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "newResourceId", + }, + { + "javaScriptType": "object", + "name": "content", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "create", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "newResourceId", + }, + { + "javaScriptType": "object", + "name": "content", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "patch", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "array", + "name": "patch", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "patch", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "array", + "name": "patch", + }, + { + "javaScriptType": "object", + "name": "params", + }, + { + "javaScriptType": "array", + "name": "fields", + }, + ], + "returnType": "object", + }, + { + "elementType": "method", + "name": "patch", + "parameters": [ + { + "javaScriptType": "string", + "name": "resourceName", + }, + { + "javaScriptType": "string", + "name": "rev", + }, + { + "javaScriptType": "array", + "name": "patch", + }, + { + "javaScriptType": "object", + "name": "params", + }, + ], + "returnType": "object", + }, + ], + "javaClass": "org.forgerock.openam.scripting.wrappers.IdmIntegrationServiceScriptWrapper", + "javaScriptType": "object", + "name": "openidm", + }, + { + "elements": [], + "javaScriptType": "object", + "name": "requestCookies", + }, + { + "javaScriptType": "string", + "name": "cookieName", + }, + ], + "evaluatorVersions": { + "JAVASCRIPT": [ + "2.0", + ], + }, + }, + "defaultScript": "11e1a3c0-038b-4c16-956a-6c9d89328cff", + "engineConfiguration": { + "_id": "engineConfiguration", + "_type": { + "_id": "engineConfiguration", + "collection": false, + "name": "Scripting engine configuration", + }, + "blackList": [ + "java.lang.Class", + "java.lang.Thread", + "java.lang.invoke.*", + "java.lang.reflect.*", + "java.security.AccessController", + ], + "coreThreads": { + "$int": "&{scripted.decision.node.script.context.core.threads|&{authentication.tree.decision.node.script.context.core.threads|10}}", + }, + "idleTimeout": 60, + "maxThreads": { + "$int": "&{scripted.decision.node.script.context.max.threads|&{authentication.tree.decision.node.script.context.max.threads|50}}", + }, + "propertyNamePrefix": "esv.", + "queueSize": { + "$int": "&{scripted.decision.node.script.context.queue.size|&{authentication.tree.decision.node.script.context.queue.size|10}}", + }, + "serverTimeout": 0, + "useSecurityManager": true, + "whiteList": [ + "jdk.proxy*", + "org.mozilla.javascript.WrappedException", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "java.util.List", + "java.util.Map", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.util.Collections$UnmodifiableCollection$1", + "org.mozilla.javascript.JavaScriptException", + ], + }, + "isHidden": false, + "languages": [ + "JAVASCRIPT", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/scripttype/SOCIAL_IDP_PROFILE_TRANSFORMATION.scripttype.json 1`] = ` +{ + "scripttype": { + "SOCIAL_IDP_PROFILE_TRANSFORMATION": { + "_id": "SOCIAL_IDP_PROFILE_TRANSFORMATION", + "_type": { + "_id": "contexts", + "collection": true, + "name": "scriptContext", + }, + "context": { + "_id": "SOCIAL_IDP_PROFILE_TRANSFORMATION", + "allowLists": [ + "java.util.LinkedHashSet", + "java.util.AbstractMap$SimpleImmutableEntry", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "java.util.Collections$SingletonList", + "java.lang.Boolean", + "java.util.HashSet", + "java.lang.Number", + "java.lang.Object", + "java.util.LinkedHashMap$Entry", + "org.forgerock.http.protocol.Entity", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "java.lang.Character$UnicodeBlock", + "org.forgerock.http.protocol.Request", + "org.forgerock.http.protocol.Response", + "com.sun.identity.shared.debug.Debug", + "java.lang.Long", + "java.lang.String", + "java.util.LinkedList", + "org.forgerock.json.JsonValue", + "com.sun.identity.idm.AMIdentity", + "java.util.ArrayList$Itr", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.util.TreeMap", + "java.util.ArrayList", + "java.util.LinkedHashMap$LinkedEntrySet", + "java.util.LinkedHashMap", + "sun.security.ec.ECPrivateKeyImpl", + "java.lang.Void", + "java.util.LinkedHashMap$LinkedEntryIterator", + "java.lang.Integer", + "java.util.HashMap", + "java.lang.Math", + "org.mozilla.javascript.JavaScriptException", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "java.util.List", + "org.forgerock.oauth2.core.UserInfoClaims", + "java.lang.Character", + "java.lang.Float", + "groovy.json.JsonSlurper", + "java.lang.Short", + "org.forgerock.util.promise.PromiseImpl", + "java.util.Map", + "org.forgerock.openam.shared.security.crypto.CertificateService", + "java.lang.Byte", + "java.lang.Double", + "org.forgerock.http.client.*", + "java.util.HashMap$KeyIterator", + "java.lang.Character$Subset", + "java.lang.StrictMath", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "java.util.Collections$UnmodifiableCollection$1", + "org.forgerock.opendj.ldap.Rdn", + "java.util.Collections$EmptyList", + "java.util.HashMap$Node", + "org.forgerock.oauth.clients.oidc.Claim", + "java.util.HashMap$Entry", + "java.util.Locale", + "org.forgerock.opendj.ldap.Dn", + "org.forgerock.openidconnect.ssoprovider.OpenIdConnectSSOToken", + "org.codehaus.groovy.runtime.GStringImpl", + "java.util.Collections$1", + "java.util.TreeSet", + ], + "bindings": [], + "evaluatorVersions": { + "GROOVY": [ + "1.0", + ], + "JAVASCRIPT": [ + "1.0", + ], + }, + }, + "defaultScript": "1d475815-72cb-42eb-aafd-4026989d28a7", + "engineConfiguration": { + "_id": "engineConfiguration", + "_type": { + "_id": "engineConfiguration", + "collection": false, + "name": "Scripting engine configuration", + }, + "blackList": [ + "java.lang.Class", + "java.lang.Thread", + "java.lang.invoke.*", + "java.lang.reflect.*", + "java.security.AccessController", + ], + "coreThreads": { + "$int": "&{social.idp.profile.transformation.script.context.core.threads|10}", + }, + "idleTimeout": 60, + "maxThreads": { + "$int": "&{social.idp.profile.transformation.script.context.max.threads|50}", + }, + "propertyNamePrefix": "esv.", + "queueSize": { + "$int": "&{social.idp.profile.transformation.script.context.queue.size|10}", + }, + "serverTimeout": 0, + "useSecurityManager": true, + "whiteList": [ + "com.google.common.collect.ImmutableList", + "com.google.common.collect.Sets$1", + "com.iplanet.am.sdk.AMHashMap", + "com.iplanet.sso.providers.dpro.SSOTokenIDImpl", + "com.iplanet.sso.providers.dpro.SessionSsoToken", + "com.sun.identity.authentication.callbacks.HiddenValueCallback", + "com.sun.identity.authentication.callbacks.ReCaptchaCallback", + "com.sun.identity.authentication.callbacks.ScriptTextOutputCallback", + "com.sun.identity.authentication.spi.HttpCallback", + "com.sun.identity.authentication.spi.IdentifiableCallback", + "com.sun.identity.authentication.spi.MetadataCallback", + "com.sun.identity.authentication.spi.PagePropertiesCallback", + "com.sun.identity.authentication.spi.RedirectCallback", + "com.sun.identity.authentication.spi.X509CertificateCallback", + "com.sun.identity.common.CaseInsensitiveHashMap", + "com.sun.identity.common.CaseInsensitiveHashMap$Entry", + "com.sun.identity.idm.AMIdentity", + "com.sun.identity.idm.IdType", + "com.sun.identity.saml2.assertion.impl.AttributeImpl", + "com.sun.identity.saml2.common.SAML2Exception", + "com.sun.identity.saml2.plugins.scripted.IdpAttributeMapperScriptHelper", + "com.sun.identity.shared.debug.Debug", + "groovy.json.JsonSlurper", + "groovy.json.StringEscapeUtils", + "groovy.json.internal.LazyMap", + "java.io.ByteArrayInputStream", + "java.io.ByteArrayOutputStream", + "java.io.UnsupportedEncodingException", + "java.lang.Boolean", + "java.lang.Byte", + "java.lang.Character", + "java.lang.Character$Subset", + "java.lang.Character$UnicodeBlock", + "java.lang.Double", + "java.lang.Float", + "java.lang.Integer", + "java.lang.Long", + "java.lang.Math", + "java.lang.NullPointerException", + "java.lang.Number", + "java.lang.Object", + "java.lang.RuntimeException", + "java.lang.SecurityException", + "java.lang.Short", + "java.lang.StrictMath", + "java.lang.String", + "java.lang.Void", + "java.math.BigDecimal", + "java.math.BigInteger", + "java.net.URI", + "java.security.KeyFactory", + "java.security.KeyPair", + "java.security.KeyPairGenerator", + "java.security.KeyPairGenerator$*", + "java.security.MessageDigest", + "java.security.MessageDigest$Delegate", + "java.security.MessageDigest$Delegate$CloneableDelegate", + "java.security.NoSuchAlgorithmException", + "java.security.PrivateKey", + "java.security.PublicKey", + "java.security.cert.CertificateFactory", + "java.security.cert.X509Certificate", + "java.security.spec.MGF1ParameterSpec", + "java.security.spec.PKCS8EncodedKeySpec", + "java.security.spec.X509EncodedKeySpec", + "java.text.SimpleDateFormat", + "java.time.Clock", + "java.time.Clock$FixedClock", + "java.time.Clock$OffsetClock", + "java.time.Clock$SystemClock", + "java.time.Clock$TickClock", + "java.time.temporal.ChronoUnit", + "java.util.AbstractMap$*", + "java.util.ArrayList", + "java.util.ArrayList$Itr", + "java.util.Arrays", + "java.util.Collections", + "java.util.Collections$*", + "java.util.Date", + "java.util.HashMap", + "java.util.HashMap$Entry", + "java.util.HashMap$KeyIterator", + "java.util.HashMap$KeySet", + "java.util.HashMap$Node", + "java.util.HashSet", + "java.util.LinkedHashMap", + "java.util.LinkedHashMap$Entry", + "java.util.LinkedHashMap$LinkedEntryIterator", + "java.util.LinkedHashMap$LinkedEntrySet", + "java.util.LinkedHashMap$LinkedKeySet", + "java.util.LinkedHashSet", + "java.util.LinkedList", + "java.util.List", + "java.util.Locale", + "java.util.Map", + "java.util.TreeMap", + "java.util.TreeSet", + "java.util.UUID", + "javax.crypto.Cipher", + "javax.crypto.Mac", + "javax.crypto.spec.IvParameterSpec", + "javax.crypto.spec.OAEPParameterSpec", + "javax.crypto.spec.PSource", + "javax.crypto.spec.PSource$*", + "javax.crypto.spec.SecretKeySpec", + "javax.security.auth.callback.ChoiceCallback", + "javax.security.auth.callback.ConfirmationCallback", + "javax.security.auth.callback.LanguageCallback", + "javax.security.auth.callback.NameCallback", + "javax.security.auth.callback.PasswordCallback", + "javax.security.auth.callback.TextInputCallback", + "javax.security.auth.callback.TextOutputCallback", + "org.apache.groovy.json.internal.LazyMap", + "org.codehaus.groovy.runtime.GStringImpl", + "org.codehaus.groovy.runtime.ScriptBytecodeAdapter", + "org.forgerock.guice.core.IdentityProvider", + "org.forgerock.guice.core.InjectorHolder", + "org.forgerock.http.Client", + "org.forgerock.http.Context", + "org.forgerock.http.Handler", + "org.forgerock.http.client.*", + "org.forgerock.http.context.RootContext", + "org.forgerock.http.header.*", + "org.forgerock.http.header.authorization.*", + "org.forgerock.http.protocol.*", + "org.forgerock.json.JsonValue", + "org.forgerock.json.jose.builders.EncryptedJwtBuilder", + "org.forgerock.json.jose.builders.EncryptedThenSignedJwtBuilder", + "org.forgerock.json.jose.builders.JweHeaderBuilder", + "org.forgerock.json.jose.builders.JwsHeaderBuilder", + "org.forgerock.json.jose.builders.JwtBuilderFactory", + "org.forgerock.json.jose.builders.SignedJwtBuilderImpl", + "org.forgerock.json.jose.builders.SignedThenEncryptedJwtBuilder", + "org.forgerock.json.jose.builders.SignedThenEncryptedJwtHeaderBuilder", + "org.forgerock.json.jose.jwe.EncryptedJwt", + "org.forgerock.json.jose.jwe.EncryptionMethod", + "org.forgerock.json.jose.jwe.JweAlgorithm", + "org.forgerock.json.jose.jwe.SignedThenEncryptedJwt", + "org.forgerock.json.jose.jwk.JWKSet", + "org.forgerock.json.jose.jwk.RsaJWK", + "org.forgerock.json.jose.jws.EncryptedThenSignedJwt", + "org.forgerock.json.jose.jws.JwsAlgorithm", + "org.forgerock.json.jose.jws.JwsHeader", + "org.forgerock.json.jose.jws.SignedEncryptedJwt", + "org.forgerock.json.jose.jws.SignedJwt", + "org.forgerock.json.jose.jws.SigningManager", + "org.forgerock.json.jose.jws.handlers.HmacSigningHandler", + "org.forgerock.json.jose.jws.handlers.RSASigningHandler", + "org.forgerock.json.jose.jws.handlers.SecretHmacSigningHandler", + "org.forgerock.json.jose.jws.handlers.SecretRSASigningHandler", + "org.forgerock.json.jose.jwt.JwtClaimsSet", + "org.forgerock.macaroons.Macaroon", + "org.forgerock.oauth.clients.oidc.Claim", + "org.forgerock.oauth2.core.GrantType", + "org.forgerock.oauth2.core.StatefulAccessToken", + "org.forgerock.oauth2.core.UserInfoClaims", + "org.forgerock.oauth2.core.exceptions.InvalidRequestException", + "org.forgerock.oauth2.core.tokenexchange.ExchangeableToken", + "org.forgerock.openam.auth.node.api.Action", + "org.forgerock.openam.auth.node.api.Action$ActionBuilder", + "org.forgerock.openam.auth.node.api.NodeState", + "org.forgerock.openam.auth.node.api.SuspendedTextOutputCallback", + "org.forgerock.openam.auth.nodes.IdentityProvider", + "org.forgerock.openam.auth.nodes.InjectorHolder", + "org.forgerock.openam.authentication.callbacks.AbstractValidatedCallback", + "org.forgerock.openam.authentication.callbacks.AttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.BooleanAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.ConsentMappingCallback", + "org.forgerock.openam.authentication.callbacks.DeviceProfileCallback", + "org.forgerock.openam.authentication.callbacks.IdPCallback", + "org.forgerock.openam.authentication.callbacks.KbaCreateCallback", + "org.forgerock.openam.authentication.callbacks.NumberAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.PollingWaitCallback", + "org.forgerock.openam.authentication.callbacks.SelectIdPCallback", + "org.forgerock.openam.authentication.callbacks.StringAttributeInputCallback", + "org.forgerock.openam.authentication.callbacks.TermsAndConditionsCallback", + "org.forgerock.openam.authentication.callbacks.ValidatedPasswordCallback", + "org.forgerock.openam.authentication.callbacks.ValidatedUsernameCallback", + "org.forgerock.openam.authentication.modules.scripted.*", + "org.forgerock.openam.core.rest.authn.callbackhandlers.*", + "org.forgerock.openam.core.rest.devices.deviceprint.DeviceIdDao", + "org.forgerock.openam.core.rest.devices.profile.DeviceProfilesDao", + "org.forgerock.openam.oauth2.OpenAMAccessToken", + "org.forgerock.openam.oauth2.token.grantset.Authorization$ModifiedAccessToken", + "org.forgerock.openam.oauth2.token.macaroon.MacaroonAccessToken", + "org.forgerock.openam.oauth2.token.stateless.StatelessAccessToken", + "org.forgerock.openam.scripting.api.PrefixedScriptPropertyResolver", + "org.forgerock.openam.scripting.api.ScriptedIdentity", + "org.forgerock.openam.scripting.api.ScriptedSession", + "org.forgerock.openam.scripting.api.http.GroovyHttpClient", + "org.forgerock.openam.scripting.api.http.JavaScriptHttpClient", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentity", + "org.forgerock.openam.scripting.api.identity.ScriptedIdentityRepository", + "org.forgerock.openam.scripting.api.secrets.ScriptedSecrets", + "org.forgerock.openam.scripting.api.secrets.Secret", + "org.forgerock.openam.scripting.idrepo.ScriptIdentityRepository", + "org.forgerock.openam.shared.security.ThreadLocalSecureRandom", + "org.forgerock.openidconnect.Claim", + "org.forgerock.openidconnect.OpenIdConnectToken", + "org.forgerock.openidconnect.ssoprovider.OpenIdConnectSSOToken", + "org.forgerock.secrets.SecretBuilder", + "org.forgerock.secrets.keys.SigningKey", + "org.forgerock.secrets.keys.VerificationKey", + "org.forgerock.util.encode.Base64", + "org.forgerock.util.encode.Base64url", + "org.forgerock.util.encode.Hex", + "org.forgerock.util.promise.NeverThrowsException", + "org.forgerock.util.promise.Promise", + "org.forgerock.util.promise.PromiseImpl", + "org.mozilla.javascript.ConsString", + "org.mozilla.javascript.JavaScriptException", + "org.mozilla.javascript.WrappedException", + "sun.security.ec.ECPrivateKeyImpl", + "sun.security.rsa.RSAPrivateCrtKeyImpl", + "sun.security.rsa.RSAPublicKeyImpl", + "sun.security.x509.X500Name", + "sun.security.x509.X509CertImpl", + "java.util.Collections$UnmodifiableRandomAccessList", + "java.util.Collections$UnmodifiableCollection$1", + "org.forgerock.opendj.ldap.Rdn", + "org.forgerock.opendj.ldap.Dn", + "org.forgerock.openam.auth.nodes.VerifyTransactionsHelper", + ], + }, + "isHidden": false, + "languages": [ + "JAVASCRIPT", + "GROOVY", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/secret/esv-admin-token.secret.json 1`] = ` +{ + "secret": { + "esv-admin-token": { + "_id": "esv-admin-token", + "activeVersion": "1", + "description": "Long-lived admin token", + "encoding": "generic", + "lastChangeDate": "2024-03-20T14:46:13.461793Z", + "lastChangedBy": "ba58ff99-76d3-4c69-9c4a-7f150ac70e2c", + "loaded": true, + "loadedVersion": "1", + "useInPlaceholders": true, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/secret/esv-brando-pingone.secret.json 1`] = ` +{ + "secret": { + "esv-brando-pingone": { + "_id": "esv-brando-pingone", + "activeVersion": "4", + "description": "This is to show the connection between PingOne and AIC. ", + "encoding": "generic", + "lastChangeDate": "2024-06-24T00:44:06.154598Z", + "lastChangedBy": "Frodo-SA-1701393386423", + "loaded": true, + "loadedVersion": "4", + "useInPlaceholders": true, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/secret/esv-secret-import-test1.secret.json 1`] = ` +{ + "secret": { + "esv-secret-import-test1": { + "_id": "esv-secret-import-test1", + "activeVersion": "1", + "description": "Secret Import Test 1", + "encoding": "generic", + "lastChangeDate": "2024-06-22T01:13:13.904591Z", + "lastChangedBy": "volker.scheuber@forgerock.com", + "loaded": true, + "loadedVersion": "1", + "useInPlaceholders": true, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/secret/esv-secret-import-test2.secret.json 1`] = ` +{ + "secret": { + "esv-secret-import-test2": { + "_id": "esv-secret-import-test2", + "activeVersion": "1", + "description": "Secret Import Test 2", + "encoding": "generic", + "lastChangeDate": "2024-06-22T01:13:41.914076Z", + "lastChangedBy": "volker.scheuber@forgerock.com", + "loaded": true, + "loadedVersion": "1", + "useInPlaceholders": true, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/secret/esv-test-secret.secret.json 1`] = ` +{ + "secret": { + "esv-test-secret": { + "_id": "esv-test-secret", + "activeVersion": "1", + "description": "Test!234", + "encoding": "generic", + "lastChangeDate": "2024-07-05T17:53:53.682578Z", + "lastChangedBy": "Frodo-SA-1701393386423", + "loaded": true, + "loadedVersion": "1", + "useInPlaceholders": true, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/secret/esv-test-secret-cert-pem.secret.json 1`] = ` +{ + "secret": { + "esv-test-secret-cert-pem": { + "_id": "esv-test-secret-cert-pem", + "activeVersion": "1", + "description": "This is a test secret from a pem encoded cert file.", + "encoding": "pem", + "lastChangeDate": "2024-01-20T03:48:49.005574Z", + "lastChangedBy": "6bac97fb-0665-4ba9-b66c-1cf70e074d72", + "loaded": true, + "loadedVersion": "1", + "useInPlaceholders": true, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/secret/esv-test-secret-cert-pem-raw.secret.json 1`] = ` +{ + "secret": { + "esv-test-secret-cert-pem-raw": { + "_id": "esv-test-secret-cert-pem-raw", + "activeVersion": "1", + "description": "This is a test secret from a pem encoded cert file (raw).", + "encoding": "pem", + "lastChangeDate": "2024-01-20T03:49:20.270526Z", + "lastChangedBy": "6bac97fb-0665-4ba9-b66c-1cf70e074d72", + "loaded": true, + "loadedVersion": "1", + "useInPlaceholders": true, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/secret/esv-test-secret-euler.secret.json 1`] = ` +{ + "secret": { + "esv-test-secret-euler": { + "_id": "esv-test-secret-euler", + "activeVersion": "1", + "description": "A test secret containing the value of Euler's number", + "encoding": "generic", + "lastChangeDate": "2023-12-14T15:27:34.607038Z", + "lastChangedBy": "phales@trivir.com", + "loaded": true, + "loadedVersion": "1", + "useInPlaceholders": true, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/secret/esv-test-secret-file-base64hmac.secret.json 1`] = ` +{ + "secret": { + "esv-test-secret-file-base64hmac": { + "_id": "esv-test-secret-file-base64hmac", + "activeVersion": "1", + "description": "This is a test secret from base64 encoded hmac key file.", + "encoding": "base64hmac", + "lastChangeDate": "2024-01-20T03:46:37.42544Z", + "lastChangedBy": "6bac97fb-0665-4ba9-b66c-1cf70e074d72", + "loaded": true, + "loadedVersion": "1", + "useInPlaceholders": true, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/secret/esv-test-secret-file-base64hmac-raw.secret.json 1`] = ` +{ + "secret": { + "esv-test-secret-file-base64hmac-raw": { + "_id": "esv-test-secret-file-base64hmac-raw", + "activeVersion": "1", + "description": "This is a test secret from base64 encoded hmac key file (raw).", + "encoding": "base64hmac", + "lastChangeDate": "2024-01-20T03:47:03.695151Z", + "lastChangedBy": "6bac97fb-0665-4ba9-b66c-1cf70e074d72", + "loaded": true, + "loadedVersion": "1", + "useInPlaceholders": true, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/secret/esv-test-secret-pi.secret.json 1`] = ` +{ + "secret": { + "esv-test-secret-pi": { + "_id": "esv-test-secret-pi", + "activeVersion": "1", + "description": "Secret that contains the value of pi", + "encoding": "generic", + "lastChangeDate": "2023-12-14T15:22:28.519043Z", + "lastChangedBy": "phales@trivir.com", + "loaded": true, + "loadedVersion": "1", + "useInPlaceholders": true, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/secret/esv-test-secret-pi-generic.secret.json 1`] = ` +{ + "secret": { + "esv-test-secret-pi-generic": { + "_id": "esv-test-secret-pi-generic", + "activeVersion": "3", + "description": "", + "encoding": "generic", + "lastChangeDate": "2024-07-15T03:20:09.136266Z", + "lastChangedBy": "Frodo-SA-1701393386423", + "loaded": true, + "loadedVersion": "3", + "useInPlaceholders": true, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/secret/esv-volkers-test-secret.secret.json 1`] = ` +{ + "secret": { + "esv-volkers-test-secret": { + "_id": "esv-volkers-test-secret", + "activeVersion": "10", + "description": "Volker's test secret", + "encoding": "generic", + "lastChangeDate": "2024-06-26T01:37:06.116117Z", + "lastChangedBy": "Frodo-SA-1701393386423", + "loaded": true, + "loadedVersion": "10", + "useInPlaceholders": true, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/serverInformation/information.serverInformation.json 1`] = ` +{ + "serverInformation": { + "*": { + "_id": "*", + "cookieName": "6ac6499e9da2071", + "domains": [], + "fileBasedConfiguration": true, + "forgotPassword": "false", + "forgotUsername": "false", + "kbaEnabled": "false", + "lang": "en-US", + "protectedUserAttributes": [ + "telephoneNumber", + "mail", + ], + "realm": "/", + "referralsEnabled": "false", + "secureCookie": true, + "selfRegistration": "false", + "socialImplementations": [], + "successfulUserRegistrationDestination": "default", + "userIdAttributes": [], + "xuiUserSessionValidationEnabled": true, + "zeroPageLogin": { + "allowedWithoutReferer": true, + "enabled": false, + "refererWhitelist": [], + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/serverVersion/version.serverVersion.json 1`] = ` +{ + "serverVersion": { + "version": { + "_id": "version", + "date": "2024-November-15 10:51", + "fullVersion": "ForgeRock Access Management 7.6.0-SNAPSHOT Build 7cab9c08465b06ed66fff4b458eef61d6b6825da (2024-November-15 10:51)", + "revision": "7cab9c08465b06ed66fff4b458eef61d6b6825da", + "version": "7.6.0-SNAPSHOT", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/service/CorsService.service.json 1`] = ` +{ + "service": { + "CorsService": { + "_id": "", + "_type": { + "_id": "CorsService", + "collection": false, + "name": "CORS Service", + }, + "enabled": true, + "location": "global", + "nextDescendents": [], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/service/dashboard.service.json 1`] = ` +{ + "service": { + "dashboard": { + "_id": "", + "_type": { + "_id": "dashboard", + "collection": false, + "name": "Dashboard", + }, + "defaults": { + "assignedDashboard": [], + }, + "location": "global", + "nextDescendents": [ + { + "_id": "Google", + "_type": { + "_id": "instances", + "collection": true, + "name": "instance", + }, + "className": "SAML2ApplicationClass", + "displayName": "Google", + "icfIdentifier": "idm magic 34", + "icon": "images/logos/googleplus.png", + "login": "http://www.google.com", + "name": "Google", + }, + { + "_id": "SalesForce", + "_type": { + "_id": "instances", + "collection": true, + "name": "instance", + }, + "className": "SAML2ApplicationClass", + "displayName": "SalesForce", + "icfIdentifier": "idm magic 12", + "icon": "images/logos/salesforce.png", + "login": "http://www.salesforce.com", + "name": "SalesForce", + }, + { + "_id": "ZenDesk", + "_type": { + "_id": "instances", + "collection": true, + "name": "instance", + }, + "className": "SAML2ApplicationClass", + "displayName": "ZenDesk", + "icfIdentifier": "idm magic 56", + "icon": "images/logos/zendesk.png", + "login": "http://www.ZenDesk.com", + "name": "ZenDesk", + }, + { + "_id": "2e4663b7-aed2-4521-8819-d379449d91b0", + "_type": { + "_id": "instances", + "collection": true, + "name": "instance", + }, + "className": "BookmarkApplicationClass", + "displayName": "Google", + "icon": "app-bookmark.svg", + "login": "https://www.google.com/", + "name": "Google", + }, + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/sync/sync.idm.json 1`] = ` +{ + "idm": { + "sync": { + "_id": "sync", + "mappings": [], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/variable/esv-blue-piller.variable.json 1`] = ` +{ + "variable": { + "esv-blue-piller": { + "_id": "esv-blue-piller", + "description": "Zion membership criteria.", + "expressionType": "bool", + "lastChangeDate": "2024-07-05T20:01:11.78347Z", + "lastChangedBy": "Frodo-SA-1701393386423", + "loaded": true, + "value": "false", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/variable/esv-ipv4-cidr-access-rules.variable.json 1`] = ` +{ + "variable": { + "esv-ipv4-cidr-access-rules": { + "_id": "esv-ipv4-cidr-access-rules", + "description": "IPv4 CIDR access rules: { "allow": [ "address/mask" ] }", + "expressionType": "object", + "lastChangeDate": "2024-07-05T20:01:13.987057Z", + "lastChangedBy": "Frodo-SA-1701393386423", + "loaded": true, + "value": "{ "allow": [ "145.118.0.0/16", "132.35.0.0/16", "101.226.0.0/16", "99.72.28.182/32" ] }", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/variable/esv-nebuchadnezzar-crew.variable.json 1`] = ` +{ + "variable": { + "esv-nebuchadnezzar-crew": { + "_id": "esv-nebuchadnezzar-crew", + "description": "The crew of the Nebuchadnezzar hovercraft.", + "expressionType": "array", + "lastChangeDate": "2024-07-05T20:01:05.216699Z", + "lastChangedBy": "Frodo-SA-1701393386423", + "loaded": true, + "value": "["Morpheus","Trinity","Link","Tank","Dozer","Apoc","Cypher","Mouse","Neo","Switch"]", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/variable/esv-nebuchadnezzar-crew-structure.variable.json 1`] = ` +{ + "variable": { + "esv-nebuchadnezzar-crew-structure": { + "_id": "esv-nebuchadnezzar-crew-structure", + "description": "The structure of the crew of the Nebuchadnezzar hovercraft.", + "expressionType": "object", + "lastChangeDate": "2024-07-05T20:01:07.343325Z", + "lastChangedBy": "Frodo-SA-1701393386423", + "loaded": true, + "value": "{"Captain":"Morpheus","FirstMate":"Trinity","Operator":["Link","Tank"],"Medic":"Dozer","Crewmen":["Apoc","Cypher","Mouse","Neo","Switch"]}", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/variable/esv-neo-age.variable.json 1`] = ` +{ + "variable": { + "esv-neo-age": { + "_id": "esv-neo-age", + "description": "Neo's age in the matrix.", + "expressionType": "int", + "lastChangeDate": "2024-11-01T16:21:14.46187Z", + "lastChangedBy": "Frodo-SA-1730238488278", + "loaded": true, + "value": "28", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/variable/esv-number.variable.json 1`] = ` +{ + "variable": { + "esv-number": { + "_id": "esv-number", + "description": "test number", + "expressionType": "number", + "lastChangeDate": "2024-07-05T19:42:20.943131Z", + "lastChangedBy": "volker.scheuber@forgerock.com", + "loaded": true, + "value": "1.134", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/variable/esv-test.variable.json 1`] = ` +{ + "variable": { + "esv-test": { + "_id": "esv-test", + "description": "list", + "expressionType": "list", + "lastChangeDate": "2024-11-01T21:00:21.315828Z", + "lastChangedBy": "phales@trivir.com", + "loaded": true, + "value": "a,b,c,d", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/variable/esv-test-var.variable.json 1`] = ` +{ + "variable": { + "esv-test-var": { + "_id": "esv-test-var", + "description": "this is a test description", + "expressionType": "string", + "lastChangeDate": "2024-11-01T16:21:15.469328Z", + "lastChangedBy": "Frodo-SA-1730238488278", + "loaded": true, + "value": "this is a test variable", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/variable/esv-test-var-pi.variable.json 1`] = ` +{ + "variable": { + "esv-test-var-pi": { + "_id": "esv-test-var-pi", + "description": "This is another test variable.", + "expressionType": "number", + "lastChangeDate": "2024-07-12T17:40:41.283412Z", + "lastChangedBy": "Frodo-SA-1720799681233", + "loaded": true, + "value": "3.1415926", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/variable/esv-test-var-pi-string.variable.json 1`] = ` +{ + "variable": { + "esv-test-var-pi-string": { + "_id": "esv-test-var-pi-string", + "description": "This is another test variable.", + "expressionType": "string", + "lastChangeDate": "2024-07-05T20:01:16.11117Z", + "lastChangedBy": "Frodo-SA-1701393386423", + "loaded": true, + "value": "3.1415926", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/variable/esv-test-variable-light.variable.json 1`] = ` +{ + "variable": { + "esv-test-variable-light": { + "_id": "esv-test-variable-light", + "description": "Test variable containing the speed of light in meters per second (as an int).", + "expressionType": "int", + "lastChangeDate": "2023-12-14T15:34:13.446903Z", + "lastChangedBy": "phales@trivir.com", + "loaded": true, + "value": "299792458", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/global/variable/esv-trinity-phone.variable.json 1`] = ` +{ + "variable": { + "esv-trinity-phone": { + "_id": "esv-trinity-phone", + "description": "In the opening of The Matrix (1999), the phone number Trinity is calling from is traced to (312)-555-0690", + "expressionType": "string", + "lastChangeDate": "2024-07-05T20:01:03.141204Z", + "lastChangedBy": "Frodo-SA-1701393386423", + "loaded": true, + "value": "(312)-555-0690", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/agent/cdsso-ig-agent.agent.json 1`] = ` +{ + "agent": { + "cdsso-ig-agent": { + "_id": "cdsso-ig-agent", + "_type": { + "_id": "IdentityGatewayAgent", + "collection": true, + "name": "Identity Gateway Agents", + }, + "agentgroup": null, + "igCdssoLoginUrlTemplate": null, + "igCdssoRedirectUrls": [ + "https://volker-demo.encore.forgerock.com:443/apps/hrlite/redirect", + "https://volker-demo.encore.forgerock.com/apps/hrlite/redirect", + "https://volker-demo.encore.forgerock.com:443/apps/hrlite-rest/redirect", + "https://volker-demo.encore.forgerock.com:443/apps/contractor/redirect", + "https://volker-demo.encore.forgerock.com/apps/hrlite-rest/redirect", + "https://volker-demo.encore.forgerock.com/apps/contractor/redirect", + ], + "igTokenIntrospection": "Realm_Subs", + "secretLabelIdentifier": null, + "status": "Active", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/agent/frodo-test-ig-agent.agent.json 1`] = ` +{ + "agent": { + "frodo-test-ig-agent": { + "_id": "frodo-test-ig-agent", + "_type": { + "_id": "IdentityGatewayAgent", + "collection": true, + "name": "Identity Gateway Agents", + }, + "agentgroup": "test_ig_group", + "igCdssoLoginUrlTemplate": "http://testurl.com:8080/frodo", + "igCdssoRedirectUrls": [ + "http://testurl.com:8080/frodo", + ], + "igTokenIntrospection": "Realm", + "secretLabelIdentifier": null, + "status": "Inactive", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/agent/frodo-test-ig-agent2.agent.json 1`] = ` +{ + "agent": { + "frodo-test-ig-agent2": { + "_id": "frodo-test-ig-agent2", + "_type": { + "_id": "IdentityGatewayAgent", + "collection": true, + "name": "Identity Gateway Agents", + }, + "agentgroup": null, + "igCdssoLoginUrlTemplate": "http://testurl.com:8080/frodo", + "igCdssoRedirectUrls": [ + "http://testurl.com:8080/frodo", + ], + "igTokenIntrospection": "Realm", + "secretLabelIdentifier": null, + "status": "Inactive", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/agent/frodo-test-java-agent.agent.json 1`] = ` +{ + "agent": { + "frodo-test-java-agent": { + "_id": "frodo-test-java-agent", + "_type": { + "_id": "J2EEAgent", + "collection": true, + "name": "J2EE Agents", + }, + "advancedJ2EEAgentConfig": { + "alternativeAgentHostname": null, + "alternativeAgentPort": null, + "alternativeAgentProtocol": null, + "clientHostnameHeader": null, + "clientIpHeader": null, + "customProperties": [], + "expiredSessionCacheSize": 500, + "expiredSessionCacheTTL": 20, + "fragmentRelayUri": null, + "idleTimeRefreshWindow": 1, + "jwtCacheSize": 5000, + "jwtCacheTTL": 30, + "missingPostDataPreservationEntryUri": [ + "", + ], + "monitoringToCSV": false, + "policyCachePerUser": 50, + "policyCacheSize": 5000, + "policyClientPollingInterval": 3, + "possibleXssCodeElements": [ + "", + ], + "postDataCacheTtlMin": 5, + "postDataPreservation": false, + "postDataPreserveCacheEntryMaxEntries": 1000, + "postDataPreserveCacheEntryMaxTotalSizeMb": -1, + "postDataPreserveMultipartLimitBytes": 104857600, + "postDataPreserveMultipartParameterLimitBytes": 104857600, + "postDataStickySessionKeyValue": null, + "postDataStickySessionMode": "URL", + "retainPreviousOverrideBehavior": true, + "sessionCacheTTL": 15, + "ssoExchangeCacheSize": 100, + "ssoExchangeCacheTTL": 5, + "xssDetectionRedirectUri": {}, + }, + "amServicesJ2EEAgent": { + "agentAdviceEncode": false, + "amLoginUrl": [], + "authServiceHost": "testurl.com", + "authServicePort": 8080, + "authServiceProtocol": "http", + "authSuccessRedirectUrl": false, + "conditionalLoginUrl": [ + "", + ], + "conditionalLogoutUrl": [ + "", + ], + "customLoginEnabled": false, + "legacyLoginUrlList": [ + "", + ], + "overridePolicyEvaluationRealmEnabled": false, + "policyEvaluationApplication": "iPlanetAMWebAgentService", + "policyEvaluationRealm": "/", + "policyNotifications": true, + "restrictToRealm": {}, + "strategyWhenAMUnavailable": "EVAL_NER_USE_CACHE_UNTIL_EXPIRED_ELSE_503", + "urlPolicyEnvGetParameters": [ + "", + ], + "urlPolicyEnvJsessionParameters": [ + "", + ], + "urlPolicyEnvPostParameters": [ + "", + ], + }, + "applicationJ2EEAgentConfig": { + "applicationLogoutUris": {}, + "clientIpValidationMode": { + "": "OFF", + }, + "clientIpValidationRange": {}, + "continuousSecurityCookies": {}, + "continuousSecurityHeaders": {}, + "cookieAttributeMultiValueSeparator": "|", + "cookieAttributeUrlEncoded": true, + "headerAttributeDateFormat": "EEE, d MMM yyyy hh:mm:ss z", + "invertNotEnforcedIps": false, + "invertNotEnforcedUris": false, + "logoutEntryUri": {}, + "logoutIntrospection": false, + "logoutRequestParameters": {}, + "notEnforcedFavicon": true, + "notEnforcedIps": [ + "", + ], + "notEnforcedIpsCacheEnabled": true, + "notEnforcedIpsCacheSize": 1000, + "notEnforcedRuleCompoundSeparator": "|", + "notEnforcedUris": [ + "", + ], + "notEnforcedUrisCacheEnabled": true, + "notEnforcedUrisCacheSize": 1000, + "profileAttributeFetchMode": "NONE", + "profileAttributeMap": {}, + "resourceAccessDeniedUri": {}, + "responseAttributeFetchMode": "NONE", + "responseAttributeMap": {}, + "sessionAttributeFetchMode": "NONE", + "sessionAttributeMap": {}, + }, + "globalJ2EEAgentConfig": { + "agentConfigChangeNotificationsEnabled": true, + "agentgroup": null, + "auditAccessType": "LOG_NONE", + "auditLogLocation": "REMOTE", + "cdssoRootUrl": [ + "agentRootURL=http://testurl.com:8080/", + ], + "configurationReloadInterval": 0, + "customResponseHeader": {}, + "debugLevel": "error", + "debugLogfilePrefix": null, + "debugLogfileRetentionCount": -1, + "debugLogfileRotationMinutes": -1, + "debugLogfileRotationSize": 52428800, + "debugLogfileSuffix": "-yyyy.MM.dd-HH.mm.ss", + "filterMode": { + "": "ALL", + }, + "fqdnCheck": false, + "fqdnDefault": "testurl.com", + "fqdnMapping": {}, + "httpSessionBinding": true, + "jwtName": "am-auth-jwt", + "lbCookieEnabled": false, + "lbCookieName": "amlbcookie", + "localAuditLogRotation": false, + "localAuditLogfileRetentionCount": -1, + "localAuditRotationSize": 52428800, + "loginAttemptLimit": 0, + "loginAttemptLimitCookieName": "amFilterParam", + "preAuthCookieMaxAge": 300, + "preAuthCookieName": "amFilterCDSSORequest", + "recheckAmUnavailabilityInSeconds": 5, + "redirectAttemptLimit": 0, + "redirectAttemptLimitCookieName": "amFilterRDParam", + "repositoryLocation": "centralized", + "secretLabelIdentifier": null, + "status": "Inactive", + "userAttributeName": "employeenumber", + "userMappingMode": "USER_ID", + "userPrincipalFlag": false, + "userTokenName": "UserToken", + "webSocketConnectionIntervalInMinutes": 30, + }, + "miscJ2EEAgentConfig": { + "agent302RedirectContentType": "application/json", + "agent302RedirectEnabled": true, + "agent302RedirectHttpData": "{redirect:{requestUri:%REQUEST_URI%,requestUrl:%REQUEST_URL%,targetUrl:%TARGET%}}", + "agent302RedirectInvertEnabled": false, + "agent302RedirectNerList": [ + "", + ], + "agent302RedirectStatusCode": 200, + "authFailReasonParameterName": null, + "authFailReasonParameterRemapper": {}, + "authFailReasonUrl": null, + "gotoParameterName": "goto", + "gotoUrl": null, + "ignorePathInfo": false, + "legacyRedirectUri": "/agent/sunwLegacySupportURI", + "legacyUserAgentList": [ + "Mozilla/4.7*", + ], + "legacyUserAgentSupport": false, + "localeCountry": "US", + "localeLanguage": "en", + "loginReasonMap": {}, + "loginReasonParameterName": null, + "portCheckEnabled": false, + "portCheckFile": "PortCheckContent.txt", + "portCheckSetting": { + "8080": "http", + }, + "unwantedHttpUrlParams": [ + "", + ], + "unwantedHttpUrlRegexParams": [ + "", + ], + "wantedHttpUrlParams": [ + "", + ], + "wantedHttpUrlRegexParams": [ + "", + ], + }, + "ssoJ2EEAgentConfig": { + "acceptIPDPCookie": false, + "acceptSsoTokenDomainList": [ + "", + ], + "acceptSsoTokenEnabled": false, + "authExchangeCookieName": null, + "authExchangeUri": null, + "cdssoDomainList": [ + "", + ], + "cdssoRedirectUri": "/agent/post-authn-redirect", + "cdssoSecureCookies": false, + "cookieResetDomains": {}, + "cookieResetEnabled": false, + "cookieResetNames": [ + "", + ], + "cookieResetPaths": {}, + "encodeCookies": false, + "excludedUserAgentsList": [], + "httpOnly": true, + "setCookieAttributeMap": {}, + "setCookieInternalMap": {}, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/agent/frodo-test-java-agent2.agent.json 1`] = ` +{ + "agent": { + "frodo-test-java-agent2": { + "_id": "frodo-test-java-agent2", + "_type": { + "_id": "J2EEAgent", + "collection": true, + "name": "J2EE Agents", + }, + "advancedJ2EEAgentConfig": { + "alternativeAgentHostname": null, + "alternativeAgentPort": null, + "alternativeAgentProtocol": null, + "clientHostnameHeader": null, + "clientIpHeader": null, + "customProperties": [], + "expiredSessionCacheSize": 500, + "expiredSessionCacheTTL": 20, + "fragmentRelayUri": null, + "idleTimeRefreshWindow": 1, + "jwtCacheSize": 5000, + "jwtCacheTTL": 30, + "missingPostDataPreservationEntryUri": [ + "", + ], + "monitoringToCSV": false, + "policyCachePerUser": 50, + "policyCacheSize": 5000, + "policyClientPollingInterval": 3, + "possibleXssCodeElements": [ + "", + ], + "postDataCacheTtlMin": 5, + "postDataPreservation": false, + "postDataPreserveCacheEntryMaxEntries": 1000, + "postDataPreserveCacheEntryMaxTotalSizeMb": -1, + "postDataPreserveMultipartLimitBytes": 104857600, + "postDataPreserveMultipartParameterLimitBytes": 104857600, + "postDataStickySessionKeyValue": null, + "postDataStickySessionMode": "URL", + "retainPreviousOverrideBehavior": true, + "sessionCacheTTL": 15, + "ssoExchangeCacheSize": 100, + "ssoExchangeCacheTTL": 5, + "xssDetectionRedirectUri": {}, + }, + "amServicesJ2EEAgent": { + "agentAdviceEncode": false, + "amLoginUrl": [], + "authServiceHost": "testurl.com", + "authServicePort": 8080, + "authServiceProtocol": "http", + "authSuccessRedirectUrl": false, + "conditionalLoginUrl": [ + "", + ], + "conditionalLogoutUrl": [ + "", + ], + "customLoginEnabled": false, + "legacyLoginUrlList": [ + "", + ], + "overridePolicyEvaluationRealmEnabled": false, + "policyEvaluationApplication": "iPlanetAMWebAgentService", + "policyEvaluationRealm": "/", + "policyNotifications": true, + "restrictToRealm": {}, + "strategyWhenAMUnavailable": "EVAL_NER_USE_CACHE_UNTIL_EXPIRED_ELSE_503", + "urlPolicyEnvGetParameters": [ + "", + ], + "urlPolicyEnvJsessionParameters": [ + "", + ], + "urlPolicyEnvPostParameters": [ + "", + ], + }, + "applicationJ2EEAgentConfig": { + "applicationLogoutUris": {}, + "clientIpValidationMode": { + "": "OFF", + }, + "clientIpValidationRange": {}, + "continuousSecurityCookies": {}, + "continuousSecurityHeaders": {}, + "cookieAttributeMultiValueSeparator": "|", + "cookieAttributeUrlEncoded": true, + "headerAttributeDateFormat": "EEE, d MMM yyyy hh:mm:ss z", + "invertNotEnforcedIps": false, + "invertNotEnforcedUris": false, + "logoutEntryUri": {}, + "logoutIntrospection": false, + "logoutRequestParameters": {}, + "notEnforcedFavicon": true, + "notEnforcedIps": [ + "", + ], + "notEnforcedIpsCacheEnabled": true, + "notEnforcedIpsCacheSize": 1000, + "notEnforcedRuleCompoundSeparator": "|", + "notEnforcedUris": [ + "", + ], + "notEnforcedUrisCacheEnabled": true, + "notEnforcedUrisCacheSize": 1000, + "profileAttributeFetchMode": "NONE", + "profileAttributeMap": {}, + "resourceAccessDeniedUri": {}, + "responseAttributeFetchMode": "NONE", + "responseAttributeMap": {}, + "sessionAttributeFetchMode": "NONE", + "sessionAttributeMap": {}, + }, + "globalJ2EEAgentConfig": { + "agentConfigChangeNotificationsEnabled": true, + "agentgroup": null, + "auditAccessType": "LOG_NONE", + "auditLogLocation": "REMOTE", + "cdssoRootUrl": [ + "agentRootURL=http://testurl.com:8080/", + ], + "configurationReloadInterval": 0, + "customResponseHeader": {}, + "debugLevel": "error", + "debugLogfilePrefix": null, + "debugLogfileRetentionCount": -1, + "debugLogfileRotationMinutes": -1, + "debugLogfileRotationSize": 52428800, + "debugLogfileSuffix": "-yyyy.MM.dd-HH.mm.ss", + "filterMode": { + "": "ALL", + }, + "fqdnCheck": false, + "fqdnDefault": "testurl.com", + "fqdnMapping": {}, + "httpSessionBinding": true, + "jwtName": "am-auth-jwt", + "lbCookieEnabled": false, + "lbCookieName": "amlbcookie", + "localAuditLogRotation": false, + "localAuditLogfileRetentionCount": -1, + "localAuditRotationSize": 52428800, + "loginAttemptLimit": 0, + "loginAttemptLimitCookieName": "amFilterParam", + "preAuthCookieMaxAge": 300, + "preAuthCookieName": "amFilterCDSSORequest", + "recheckAmUnavailabilityInSeconds": 5, + "redirectAttemptLimit": 0, + "redirectAttemptLimitCookieName": "amFilterRDParam", + "repositoryLocation": "centralized", + "secretLabelIdentifier": null, + "status": "Inactive", + "userAttributeName": "employeenumber", + "userMappingMode": "USER_ID", + "userPrincipalFlag": false, + "userTokenName": "UserToken", + "webSocketConnectionIntervalInMinutes": 30, + }, + "miscJ2EEAgentConfig": { + "agent302RedirectContentType": "application/json", + "agent302RedirectEnabled": true, + "agent302RedirectHttpData": "{redirect:{requestUri:%REQUEST_URI%,requestUrl:%REQUEST_URL%,targetUrl:%TARGET%}}", + "agent302RedirectInvertEnabled": false, + "agent302RedirectNerList": [ + "", + ], + "agent302RedirectStatusCode": 200, + "authFailReasonParameterName": null, + "authFailReasonParameterRemapper": {}, + "authFailReasonUrl": null, + "gotoParameterName": "goto", + "gotoUrl": null, + "ignorePathInfo": false, + "legacyRedirectUri": "/agent/sunwLegacySupportURI", + "legacyUserAgentList": [ + "Mozilla/4.7*", + ], + "legacyUserAgentSupport": false, + "localeCountry": "US", + "localeLanguage": "en", + "loginReasonMap": {}, + "loginReasonParameterName": null, + "portCheckEnabled": false, + "portCheckFile": "PortCheckContent.txt", + "portCheckSetting": { + "8080": "http", + }, + "unwantedHttpUrlParams": [ + "", + ], + "unwantedHttpUrlRegexParams": [ + "", + ], + "wantedHttpUrlParams": [ + "", + ], + "wantedHttpUrlRegexParams": [ + "", + ], + }, + "ssoJ2EEAgentConfig": { + "acceptIPDPCookie": false, + "acceptSsoTokenDomainList": [ + "", + ], + "acceptSsoTokenEnabled": false, + "authExchangeCookieName": null, + "authExchangeUri": null, + "cdssoDomainList": [ + "", + ], + "cdssoRedirectUri": "/agent/post-authn-redirect", + "cdssoSecureCookies": false, + "cookieResetDomains": {}, + "cookieResetEnabled": false, + "cookieResetNames": [ + "", + ], + "cookieResetPaths": {}, + "encodeCookies": false, + "excludedUserAgentsList": [], + "httpOnly": true, + "setCookieAttributeMap": {}, + "setCookieInternalMap": {}, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/agent/frodo-test-web-agent.agent.json 1`] = ` +{ + "agent": { + "frodo-test-web-agent": { + "_id": "frodo-test-web-agent", + "_type": { + "_id": "WebAgent", + "collection": true, + "name": "Web Agents", + }, + "advancedWebAgentConfig": { + "apacheAuthDirectives": null, + "clientHostnameHeader": null, + "clientIpHeader": null, + "customProperties": [], + "fragmentRedirectEnabled": false, + "hostnameToIpAddress": [], + "logonAndImpersonation": false, + "overrideRequestHost": false, + "overrideRequestPort": false, + "overrideRequestProtocol": false, + "pdpJavascriptRepost": false, + "pdpSkipPostUrl": [ + "", + ], + "pdpStickySessionCookieName": null, + "pdpStickySessionMode": "OFF", + "pdpStickySessionValue": null, + "postDataCachePeriod": 10, + "postDataPreservation": false, + "replayPasswordKey": null, + "retainSessionCache": false, + "showPasswordInHeader": false, + }, + "amServicesWebAgent": { + "amLoginUrl": [], + "amLogoutUrl": [ + "http://testserverurl.com:8080/UI/Logout", + ], + "applicationLogoutUrls": [ + "", + ], + "conditionalLoginUrl": [ + "", + ], + "customLoginMode": 0, + "enableLogoutRegex": false, + "fetchPoliciesFromRootResource": false, + "invalidateLogoutSession": true, + "logoutRedirectDisabled": false, + "logoutRedirectUrl": null, + "logoutResetCookies": [ + "", + ], + "logoutUrlRegex": null, + "policyCachePollingInterval": 3, + "policyClockSkew": 0, + "policyEvaluationApplication": "iPlanetAMWebAgentService", + "policyEvaluationRealm": "/", + "publicAmUrl": null, + "regexConditionalLoginPattern": [ + "", + ], + "regexConditionalLoginUrl": [ + "", + ], + "retrieveClientHostname": false, + "ssoCachePollingInterval": 3, + "userIdParameter": "UserToken", + "userIdParameterType": "session", + }, + "applicationWebAgentConfig": { + "attributeMultiValueSeparator": "|", + "clientIpValidation": false, + "continuousSecurityCookies": {}, + "continuousSecurityHeaders": {}, + "fetchAttributesForNotEnforcedUrls": false, + "ignorePathInfoForNotEnforcedUrls": true, + "invertNotEnforcedUrls": false, + "notEnforcedIps": [ + "", + ], + "notEnforcedIpsList": [ + "", + ], + "notEnforcedIpsRegex": false, + "notEnforcedUrls": [ + "", + ], + "notEnforcedUrlsRegex": false, + "profileAttributeFetchMode": "NONE", + "profileAttributeMap": {}, + "responseAttributeFetchMode": "NONE", + "responseAttributeMap": {}, + "sessionAttributeFetchMode": "NONE", + "sessionAttributeMap": {}, + }, + "globalWebAgentConfig": { + "accessDeniedUrl": null, + "agentConfigChangeNotificationsEnabled": true, + "agentDebugLevel": "Error", + "agentUriPrefix": "http://testagenturl.com:8080/amagent", + "agentgroup": null, + "amLbCookieEnable": false, + "auditAccessType": "LOG_NONE", + "auditLogLocation": "REMOTE", + "cdssoRootUrl": [ + "agentRootURL=http://testagenturl.com:8080/", + ], + "configurationPollingInterval": 60, + "disableJwtAudit": false, + "fqdnCheck": false, + "fqdnDefault": "testagenturl.com", + "fqdnMapping": {}, + "jwtAuditWhitelist": null, + "jwtName": "am-auth-jwt", + "notificationsEnabled": true, + "repositoryLocation": "centralized", + "resetIdleTime": false, + "secretLabelIdentifier": null, + "ssoOnlyMode": false, + "status": "Inactive", + "webSocketConnectionIntervalInMinutes": 30, + }, + "miscWebAgentConfig": { + "addCacheControlHeader": false, + "anonymousUserEnabled": false, + "anonymousUserId": "anonymous", + "caseInsensitiveUrlComparison": true, + "compositeAdviceEncode": false, + "compositeAdviceRedirect": false, + "encodeSpecialCharsInCookies": false, + "encodeUrlSpecialCharacters": false, + "gotoParameterName": "goto", + "headerJsonResponse": {}, + "ignorePathInfo": false, + "invalidUrlRegex": null, + "invertUrlJsonResponse": false, + "mineEncodeHeader": 0, + "profileAttributesCookieMaxAge": 300, + "profileAttributesCookiePrefix": "HTTP_", + "statusCodeJsonResponse": 202, + "urlJsonResponse": [ + "", + ], + }, + "ssoWebAgentConfig": { + "acceptSsoToken": false, + "cdssoCookieDomain": [ + "", + ], + "cdssoRedirectUri": "agent/cdsso-oauth2", + "cookieName": "iPlanetDirectoryPro", + "cookieResetEnabled": false, + "cookieResetList": [ + "", + ], + "cookieResetOnRedirect": false, + "httpOnly": true, + "multivaluePreAuthnCookie": false, + "persistentJwtCookie": false, + "sameSite": null, + "secureCookies": false, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/agent/frodo-test-web-agent2.agent.json 1`] = ` +{ + "agent": { + "frodo-test-web-agent2": { + "_id": "frodo-test-web-agent2", + "_type": { + "_id": "WebAgent", + "collection": true, + "name": "Web Agents", + }, + "advancedWebAgentConfig": { + "apacheAuthDirectives": null, + "clientHostnameHeader": null, + "clientIpHeader": null, + "customProperties": [], + "fragmentRedirectEnabled": false, + "hostnameToIpAddress": [], + "logonAndImpersonation": false, + "overrideRequestHost": false, + "overrideRequestPort": false, + "overrideRequestProtocol": false, + "pdpJavascriptRepost": false, + "pdpSkipPostUrl": [ + "", + ], + "pdpStickySessionCookieName": null, + "pdpStickySessionMode": "OFF", + "pdpStickySessionValue": null, + "postDataCachePeriod": 10, + "postDataPreservation": false, + "replayPasswordKey": null, + "retainSessionCache": false, + "showPasswordInHeader": false, + }, + "amServicesWebAgent": { + "amLoginUrl": [], + "amLogoutUrl": [ + "http://testserverurl.com:8080/UI/Logout", + ], + "applicationLogoutUrls": [ + "", + ], + "conditionalLoginUrl": [ + "", + ], + "customLoginMode": 0, + "enableLogoutRegex": false, + "fetchPoliciesFromRootResource": false, + "invalidateLogoutSession": true, + "logoutRedirectDisabled": false, + "logoutRedirectUrl": null, + "logoutResetCookies": [ + "", + ], + "logoutUrlRegex": null, + "policyCachePollingInterval": 3, + "policyClockSkew": 0, + "policyEvaluationApplication": "iPlanetAMWebAgentService", + "policyEvaluationRealm": "/", + "publicAmUrl": null, + "regexConditionalLoginPattern": [ + "", + ], + "regexConditionalLoginUrl": [ + "", + ], + "retrieveClientHostname": false, + "ssoCachePollingInterval": 3, + "userIdParameter": "UserToken", + "userIdParameterType": "session", + }, + "applicationWebAgentConfig": { + "attributeMultiValueSeparator": "|", + "clientIpValidation": false, + "continuousSecurityCookies": {}, + "continuousSecurityHeaders": {}, + "fetchAttributesForNotEnforcedUrls": false, + "ignorePathInfoForNotEnforcedUrls": true, + "invertNotEnforcedUrls": false, + "notEnforcedIps": [ + "", + ], + "notEnforcedIpsList": [ + "", + ], + "notEnforcedIpsRegex": false, + "notEnforcedUrls": [ + "", + ], + "notEnforcedUrlsRegex": false, + "profileAttributeFetchMode": "NONE", + "profileAttributeMap": {}, + "responseAttributeFetchMode": "NONE", + "responseAttributeMap": {}, + "sessionAttributeFetchMode": "NONE", + "sessionAttributeMap": {}, + }, + "globalWebAgentConfig": { + "accessDeniedUrl": null, + "agentConfigChangeNotificationsEnabled": true, + "agentDebugLevel": "Error", + "agentUriPrefix": "http://testagenturl.com:8080/amagent", + "agentgroup": null, + "amLbCookieEnable": false, + "auditAccessType": "LOG_NONE", + "auditLogLocation": "REMOTE", + "cdssoRootUrl": [ + "agentRootURL=http://testagenturl.com:8080/", + ], + "configurationPollingInterval": 60, + "disableJwtAudit": false, + "fqdnCheck": false, + "fqdnDefault": "testagenturl.com", + "fqdnMapping": {}, + "jwtAuditWhitelist": null, + "jwtName": "am-auth-jwt", + "notificationsEnabled": true, + "repositoryLocation": "centralized", + "resetIdleTime": false, + "secretLabelIdentifier": null, + "ssoOnlyMode": false, + "status": "Inactive", + "webSocketConnectionIntervalInMinutes": 30, + }, + "miscWebAgentConfig": { + "addCacheControlHeader": false, + "anonymousUserEnabled": false, + "anonymousUserId": "anonymous", + "caseInsensitiveUrlComparison": true, + "compositeAdviceEncode": false, + "compositeAdviceRedirect": false, + "encodeSpecialCharsInCookies": false, + "encodeUrlSpecialCharacters": false, + "gotoParameterName": "goto", + "headerJsonResponse": {}, + "ignorePathInfo": false, + "invalidUrlRegex": null, + "invertUrlJsonResponse": false, + "mineEncodeHeader": 0, + "profileAttributesCookieMaxAge": 300, + "profileAttributesCookiePrefix": "HTTP_", + "statusCodeJsonResponse": 202, + "urlJsonResponse": [ + "", + ], + }, + "ssoWebAgentConfig": { + "acceptSsoToken": false, + "cdssoCookieDomain": [ + "", + ], + "cdssoRedirectUri": "agent/cdsso-oauth2", + "cookieName": "iPlanetDirectoryPro", + "cookieResetEnabled": false, + "cookieResetList": [ + "", + ], + "cookieResetOnRedirect": false, + "httpOnly": true, + "multivaluePreAuthnCookie": false, + "persistentJwtCookie": false, + "sameSite": null, + "secureCookies": false, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/agent/ig-agent.agent.json 1`] = ` +{ + "agent": { + "ig-agent": { + "_id": "ig-agent", + "_type": { + "_id": "IdentityGatewayAgent", + "collection": true, + "name": "Identity Gateway Agents", + }, + "agentgroup": null, + "igCdssoLoginUrlTemplate": null, + "igCdssoRedirectUrls": [], + "igTokenIntrospection": "Realm_Subs", + "secretLabelIdentifier": null, + "status": "Active", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/agent/my-policy-agent.agent.json 1`] = ` +{ + "agent": { + "my-policy-agent": { + "_id": "my-policy-agent", + "_type": { + "_id": "2.2_Agent", + "collection": true, + "name": "Policy Agents", + }, + "cdssoRootUrl": [], + "description": null, + "status": "Active", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/agent/test.agent.json 1`] = ` +{ + "agent": { + "test": { + "_id": "test", + "_type": { + "_id": "RemoteConsentAgent", + "collection": true, + "name": "OAuth2 Remote Consent Service", + }, + "agentgroup": null, + "jwkSet": null, + "jwkStoreCacheMissCacheTime": 60000, + "jwksCacheTimeout": 3600000, + "jwksUri": null, + "publicKeyLocation": "jwks_uri", + "remoteConsentRedirectUrl": null, + "remoteConsentRequestEncryptionAlgorithm": "RSA-OAEP-256", + "remoteConsentRequestEncryptionEnabled": true, + "remoteConsentRequestEncryptionMethod": "A128GCM", + "remoteConsentRequestSigningAlgorithm": "RS256", + "remoteConsentResponseEncryptionAlgorithm": "RSA-OAEP-256", + "remoteConsentResponseEncryptionMethod": "A128GCM", + "remoteConsentResponseSigningAlg": "RS256", + "requestTimeLimit": 180, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/agent/test-software-publisher.agent.json 1`] = ` +{ + "agent": { + "test software publisher": { + "_id": "test software publisher", + "_type": { + "_id": "SoftwarePublisher", + "collection": true, + "name": "OAuth2 Software Publisher", + }, + "agentgroup": null, + "issuer": null, + "jwkSet": null, + "jwkStoreCacheMissCacheTime": 60000, + "jwksCacheTimeout": 3600000, + "jwksUri": null, + "publicKeyLocation": "jwks_uri", + "softwareStatementSigningAlgorithm": "RS256", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/agentGroup/test_ig_group.agentGroup.json 1`] = ` +{ + "agentGroup": { + "test_ig_group": { + "_id": "test_ig_group", + "_type": { + "_id": "IdentityGatewayAgent", + "collection": true, + "name": "Identity Gateway Agents", + }, + "igCdssoLoginUrlTemplate": null, + "igCdssoRedirectUrls": [], + "igTokenIntrospection": "None", + "status": "Active", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/agentGroup/test_java_group.agentGroup.json 1`] = ` +{ + "agentGroup": { + "test_java_group": { + "_id": "test_java_group", + "_type": { + "_id": "J2EEAgent", + "collection": true, + "name": "J2EE Agents", + }, + "advancedJ2EEAgentConfig": { + "alternativeAgentHostname": null, + "alternativeAgentPort": null, + "alternativeAgentProtocol": null, + "clientHostnameHeader": null, + "clientIpHeader": null, + "customProperties": [], + "expiredSessionCacheSize": 500, + "expiredSessionCacheTTL": 20, + "fragmentRelayUri": null, + "idleTimeRefreshWindow": 1, + "jwtCacheSize": 5000, + "jwtCacheTTL": 30, + "missingPostDataPreservationEntryUri": [ + "", + ], + "monitoringToCSV": false, + "policyCachePerUser": 50, + "policyCacheSize": 5000, + "policyClientPollingInterval": 3, + "possibleXssCodeElements": [ + "", + ], + "postDataCacheTtlMin": 5, + "postDataPreservation": false, + "postDataPreserveCacheEntryMaxEntries": 1000, + "postDataPreserveCacheEntryMaxTotalSizeMb": -1, + "postDataPreserveMultipartLimitBytes": 104857600, + "postDataPreserveMultipartParameterLimitBytes": 104857600, + "postDataStickySessionKeyValue": null, + "postDataStickySessionMode": "URL", + "retainPreviousOverrideBehavior": true, + "sessionCacheTTL": 15, + "ssoExchangeCacheSize": 100, + "ssoExchangeCacheTTL": 5, + "xssDetectionRedirectUri": {}, + }, + "amServicesJ2EEAgent": { + "agentAdviceEncode": false, + "amLoginUrl": [], + "authServiceHost": "testurl.com", + "authServicePort": 8080, + "authServiceProtocol": "http", + "authSuccessRedirectUrl": false, + "conditionalLoginUrl": [ + "", + ], + "conditionalLogoutUrl": [ + "", + ], + "customLoginEnabled": false, + "legacyLoginUrlList": [ + "", + ], + "overridePolicyEvaluationRealmEnabled": false, + "policyEvaluationApplication": "iPlanetAMWebAgentService", + "policyEvaluationRealm": "/", + "policyNotifications": true, + "restrictToRealm": {}, + "strategyWhenAMUnavailable": "EVAL_NER_USE_CACHE_UNTIL_EXPIRED_ELSE_503", + "urlPolicyEnvGetParameters": [ + "", + ], + "urlPolicyEnvJsessionParameters": [ + "", + ], + "urlPolicyEnvPostParameters": [ + "", + ], + }, + "applicationJ2EEAgentConfig": { + "applicationLogoutUris": {}, + "clientIpValidationMode": { + "": "OFF", + }, + "clientIpValidationRange": {}, + "continuousSecurityCookies": {}, + "continuousSecurityHeaders": {}, + "cookieAttributeMultiValueSeparator": "|", + "cookieAttributeUrlEncoded": true, + "headerAttributeDateFormat": "EEE, d MMM yyyy hh:mm:ss z", + "invertNotEnforcedIps": false, + "invertNotEnforcedUris": false, + "logoutEntryUri": {}, + "logoutIntrospection": false, + "logoutRequestParameters": {}, + "notEnforcedFavicon": true, + "notEnforcedIps": [ + "", + ], + "notEnforcedIpsCacheEnabled": true, + "notEnforcedIpsCacheSize": 1000, + "notEnforcedRuleCompoundSeparator": "|", + "notEnforcedUris": [ + "", + ], + "notEnforcedUrisCacheEnabled": true, + "notEnforcedUrisCacheSize": 1000, + "profileAttributeFetchMode": "NONE", + "profileAttributeMap": {}, + "resourceAccessDeniedUri": {}, + "responseAttributeFetchMode": "NONE", + "responseAttributeMap": {}, + "sessionAttributeFetchMode": "NONE", + "sessionAttributeMap": {}, + }, + "globalJ2EEAgentConfig": { + "agentConfigChangeNotificationsEnabled": true, + "auditAccessType": "LOG_NONE", + "auditLogLocation": "REMOTE", + "cdssoRootUrl": [], + "configurationReloadInterval": 0, + "customResponseHeader": {}, + "debugLevel": "error", + "debugLogfilePrefix": null, + "debugLogfileRetentionCount": -1, + "debugLogfileRotationMinutes": -1, + "debugLogfileRotationSize": 52428800, + "debugLogfileSuffix": "-yyyy.MM.dd-HH.mm.ss", + "filterMode": { + "": "ALL", + }, + "fqdnCheck": false, + "fqdnDefault": null, + "fqdnMapping": {}, + "httpSessionBinding": true, + "jwtName": "am-auth-jwt", + "lbCookieEnabled": false, + "lbCookieName": "amlbcookie", + "localAuditLogRotation": false, + "localAuditLogfileRetentionCount": -1, + "localAuditRotationSize": 52428800, + "loginAttemptLimit": 0, + "loginAttemptLimitCookieName": "amFilterParam", + "preAuthCookieMaxAge": 300, + "preAuthCookieName": "amFilterCDSSORequest", + "recheckAmUnavailabilityInSeconds": 5, + "redirectAttemptLimit": 0, + "redirectAttemptLimitCookieName": "amFilterRDParam", + "status": "Active", + "userAttributeName": "employeenumber", + "userMappingMode": "USER_ID", + "userPrincipalFlag": false, + "userTokenName": "UserToken", + "webSocketConnectionIntervalInMinutes": 30, + }, + "miscJ2EEAgentConfig": { + "agent302RedirectContentType": "application/json", + "agent302RedirectEnabled": true, + "agent302RedirectHttpData": "{redirect:{requestUri:%REQUEST_URI%,requestUrl:%REQUEST_URL%,targetUrl:%TARGET%}}", + "agent302RedirectInvertEnabled": false, + "agent302RedirectNerList": [ + "", + ], + "agent302RedirectStatusCode": 200, + "authFailReasonParameterName": null, + "authFailReasonParameterRemapper": {}, + "authFailReasonUrl": null, + "gotoParameterName": "goto", + "gotoUrl": null, + "ignorePathInfo": false, + "legacyRedirectUri": null, + "legacyUserAgentList": [ + "Mozilla/4.7*", + ], + "legacyUserAgentSupport": false, + "localeCountry": "US", + "localeLanguage": "en", + "loginReasonMap": {}, + "loginReasonParameterName": null, + "portCheckEnabled": false, + "portCheckFile": "PortCheckContent.txt", + "portCheckSetting": {}, + "unwantedHttpUrlParams": [ + "", + ], + "unwantedHttpUrlRegexParams": [ + "", + ], + "wantedHttpUrlParams": [ + "", + ], + "wantedHttpUrlRegexParams": [ + "", + ], + }, + "ssoJ2EEAgentConfig": { + "acceptIPDPCookie": false, + "acceptSsoTokenDomainList": [ + "", + ], + "acceptSsoTokenEnabled": false, + "authExchangeCookieName": null, + "authExchangeUri": null, + "cdssoDomainList": [ + "", + ], + "cdssoRedirectUri": null, + "cdssoSecureCookies": false, + "cookieResetDomains": {}, + "cookieResetEnabled": false, + "cookieResetNames": [ + "", + ], + "cookieResetPaths": {}, + "encodeCookies": false, + "excludedUserAgentsList": [], + "httpOnly": true, + "setCookieAttributeMap": {}, + "setCookieInternalMap": {}, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/agentGroup/test_web_agent_group.agentGroup.json 1`] = ` +{ + "agentGroup": { + "test_web_agent_group": { + "_id": "test_web_agent_group", + "_type": { + "_id": "WebAgent", + "collection": true, + "name": "Web Agents", + }, + "advancedWebAgentConfig": { + "apacheAuthDirectives": null, + "clientHostnameHeader": null, + "clientIpHeader": null, + "customProperties": [], + "fragmentRedirectEnabled": false, + "hostnameToIpAddress": [], + "logonAndImpersonation": false, + "overrideRequestHost": false, + "overrideRequestPort": false, + "overrideRequestProtocol": false, + "pdpJavascriptRepost": false, + "pdpSkipPostUrl": [ + "", + ], + "pdpStickySessionCookieName": null, + "pdpStickySessionMode": "OFF", + "pdpStickySessionValue": null, + "postDataCachePeriod": 10, + "postDataPreservation": false, + "replayPasswordKey": null, + "retainSessionCache": false, + "showPasswordInHeader": false, + }, + "amServicesWebAgent": { + "amLoginUrl": [], + "amLogoutUrl": [ + "http://testurl.com:8080/UI/Logout", + ], + "applicationLogoutUrls": [ + "", + ], + "conditionalLoginUrl": [ + "", + ], + "customLoginMode": 0, + "enableLogoutRegex": false, + "fetchPoliciesFromRootResource": false, + "invalidateLogoutSession": true, + "logoutRedirectDisabled": false, + "logoutRedirectUrl": null, + "logoutResetCookies": [ + "", + ], + "logoutUrlRegex": null, + "policyCachePollingInterval": 3, + "policyClockSkew": 0, + "policyEvaluationApplication": "iPlanetAMWebAgentService", + "policyEvaluationRealm": "/", + "publicAmUrl": null, + "regexConditionalLoginPattern": [ + "", + ], + "regexConditionalLoginUrl": [ + "", + ], + "retrieveClientHostname": false, + "ssoCachePollingInterval": 3, + "userIdParameter": "UserToken", + "userIdParameterType": "session", + }, + "applicationWebAgentConfig": { + "attributeMultiValueSeparator": "|", + "clientIpValidation": false, + "continuousSecurityCookies": {}, + "continuousSecurityHeaders": {}, + "fetchAttributesForNotEnforcedUrls": false, + "ignorePathInfoForNotEnforcedUrls": true, + "invertNotEnforcedUrls": false, + "notEnforcedIps": [ + "", + ], + "notEnforcedIpsList": [ + "", + ], + "notEnforcedIpsRegex": false, + "notEnforcedUrls": [ + "", + ], + "notEnforcedUrlsRegex": false, + "profileAttributeFetchMode": "NONE", + "profileAttributeMap": {}, + "responseAttributeFetchMode": "NONE", + "responseAttributeMap": {}, + "sessionAttributeFetchMode": "NONE", + "sessionAttributeMap": {}, + }, + "globalWebAgentConfig": { + "accessDeniedUrl": null, + "agentConfigChangeNotificationsEnabled": true, + "agentDebugLevel": "Error", + "agentUriPrefix": null, + "amLbCookieEnable": false, + "auditAccessType": "LOG_NONE", + "auditLogLocation": "REMOTE", + "cdssoRootUrl": [], + "configurationPollingInterval": 60, + "disableJwtAudit": false, + "fqdnCheck": false, + "fqdnDefault": null, + "fqdnMapping": {}, + "jwtAuditWhitelist": null, + "jwtName": "am-auth-jwt", + "notificationsEnabled": true, + "resetIdleTime": false, + "ssoOnlyMode": false, + "status": "Active", + "webSocketConnectionIntervalInMinutes": 30, + }, + "miscWebAgentConfig": { + "addCacheControlHeader": false, + "anonymousUserEnabled": false, + "anonymousUserId": "anonymous", + "caseInsensitiveUrlComparison": true, + "compositeAdviceEncode": false, + "compositeAdviceRedirect": false, + "encodeSpecialCharsInCookies": false, + "encodeUrlSpecialCharacters": false, + "gotoParameterName": "goto", + "headerJsonResponse": {}, + "ignorePathInfo": false, + "invalidUrlRegex": null, + "invertUrlJsonResponse": false, + "mineEncodeHeader": 0, + "profileAttributesCookieMaxAge": 300, + "profileAttributesCookiePrefix": "HTTP_", + "statusCodeJsonResponse": 202, + "urlJsonResponse": [ + "", + ], + }, + "ssoWebAgentConfig": { + "acceptSsoToken": false, + "cdssoCookieDomain": [ + "", + ], + "cdssoRedirectUri": "agent/cdsso-oauth2", + "cookieName": "iPlanetDirectoryPro", + "cookieResetEnabled": false, + "cookieResetList": [ + "", + ], + "cookieResetOnRedirect": false, + "httpOnly": true, + "multivaluePreAuthnCookie": false, + "persistentJwtCookie": false, + "sameSite": null, + "secureCookies": false, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/application/Azure.application.json 1`] = ` +{ + "managedApplication": { + "0f357b7e-6c54-4351-a094-43916877d7e5": { + "_id": "0f357b7e-6c54-4351-a094-43916877d7e5", + "authoritative": false, + "connectorId": "Azure", + "description": "Azure", + "icon": "", + "mappingNames": [ + "systemAzureUser_managedAlpha_user", + "managedAlpha_user_systemAzureUser", + "systemAzure__group___managedAlpha_assignment", + "systemAzureDirectoryrole_managedAlpha_assignment", + "systemAzureServiceplan_managedAlpha_assignment", + ], + "name": "Azure", + "templateName": "azure.ad", + "templateVersion": "3.3", + "uiConfig": { + "objectTypes": { + "User": { + "properties": { + "__PASSWORD__": { + "displayName": "Password", + "order": 17, + "userSpecific": true, + }, + "__roles__": { + "displayName": "Roles", + "nonAccountObject": "directoryRole", + "order": 3, + "userSpecific": true, + }, + "__servicePlanIds__": { + "displayName": "Service Plan Ids", + "nonAccountObject": "servicePlan", + "order": 27, + "userSpecific": true, + }, + "accountEnabled": { + "displayName": "Account Enabled", + "order": 0, + "userSpecific": true, + }, + "city": { + "displayName": "City", + "order": 5, + "userSpecific": true, + }, + "companyName": { + "displayName": "Company Name", + "order": 4, + "userSpecific": true, + }, + "country": { + "displayName": "Country", + "order": 6, + "userSpecific": true, + }, + "department": { + "displayName": "Department", + "order": 7, + "userSpecific": true, + }, + "displayName": { + "displayName": "Display Name", + "order": 8, + "userSpecific": true, + }, + "givenName": { + "displayName": "Given Name", + "order": 9, + "userSpecific": true, + }, + "jobTitle": { + "displayName": "Job Title", + "order": 11, + "userSpecific": true, + }, + "mail": { + "displayName": "Mail", + "isDisplay": true, + "isMail": true, + "order": 1, + "userSpecific": true, + }, + "mailNickname": { + "displayName": "Mail Nickname", + "order": 12, + "userSpecific": true, + }, + "manager": { + "displayName": "Manager", + "order": 13, + "userSpecific": true, + }, + "memberOf": { + "displayName": "Member Of", + "nonAccountObject": "__GROUP__", + "order": 2, + "userSpecific": true, + }, + "mobilePhone": { + "displayName": "Mobile Phone", + "order": 14, + "userSpecific": true, + }, + "onPremisesImmutableId": { + "displayName": "On Premises Immutable Id", + "order": 10, + "userSpecific": true, + }, + "onPremisesSecurityIdentifier": { + "displayName": "On Premises Security Identifier", + "order": 15, + "userSpecific": true, + }, + "otherMails": { + "displayName": "Other Mails", + "order": 16, + "userSpecific": true, + }, + "postalCode": { + "displayName": "Postal Code", + "order": 18, + "userSpecific": true, + }, + "preferredLanguage": { + "displayName": "Preferred Language", + "order": 19, + "userSpecific": true, + }, + "proxyAddresses": { + "displayName": "Proxy Addresses", + "order": 20, + "userSpecific": true, + }, + "state": { + "displayName": "State", + "order": 21, + "userSpecific": true, + }, + "streetAddress": { + "displayName": "Street Address", + "order": 22, + "userSpecific": true, + }, + "surname": { + "displayName": "Surname", + "order": 23, + "userSpecific": true, + }, + "usageLocation": { + "displayName": "Usage Location", + "order": 24, + "userSpecific": true, + }, + "userPrincipalName": { + "displayName": "User Principal Name", + "isUsername": true, + "order": 25, + "userSpecific": true, + }, + "userType": { + "displayName": "User Type", + "order": 26, + "userSpecific": true, + }, + }, + }, + "__GROUP__": { + "properties": { + "__NAME__": { + "displayName": "Name", + "order": 2, + "userSpecific": true, + }, + "description": { + "displayName": "Description", + "order": 4, + "userSpecific": true, + }, + "displayName": { + "displayName": "Display Name", + "order": 3, + "userSpecific": true, + }, + "groupTypes": { + "displayName": "Group Types", + "order": 10, + "userSpecific": true, + }, + "id": { + "displayName": "Id", + "order": 0, + "userSpecific": true, + }, + "mail": { + "displayName": "Mail", + "order": 5, + "userSpecific": true, + }, + "mailEnabled": { + "displayName": "Mail Enabled", + "order": 6, + "userSpecific": true, + }, + "onPremisesSecurityIdentifier": { + "displayName": "On Premises Security Identifier", + "order": 7, + "userSpecific": true, + }, + "proxyAddresses": { + "displayName": "Proxy Addresses", + "order": 8, + "userSpecific": true, + }, + "securityEnabled": { + "displayName": "Security Enabled", + "order": 9, + "userSpecific": true, + }, + "type": { + "displayName": "Type", + "order": 1, + "userSpecific": true, + }, + }, + }, + "directoryRole": { + "properties": { + "description": { + "displayName": "description", + "order": 0, + "userSpecific": true, + }, + "displayName": { + "displayName": "displayName", + "order": 1, + "userSpecific": true, + }, + }, + }, + "servicePlan": { + "properties": { + "__NAME__": { + "displayName": "__NAME__", + "order": 5, + "userSpecific": true, + }, + "appliesTo": { + "displayName": "appliesTo", + "order": 0, + "userSpecific": true, + }, + "provisioningStatus": { + "displayName": "provisioningStatus", + "order": 2, + "userSpecific": true, + }, + "servicePlanId": { + "displayName": "servicePlanId", + "order": 1, + "userSpecific": true, + }, + "servicePlanName": { + "displayName": "servicePlanName", + "order": 4, + "userSpecific": true, + }, + "subscriberSkuId": { + "displayName": "subscriberSkuId", + "order": 3, + "userSpecific": true, + }, + }, + }, + }, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/application/Google.application.json 1`] = ` +{ + "managedApplication": { + "2e4663b7-aed2-4521-8819-d379449d91b0": { + "_id": "2e4663b7-aed2-4521-8819-d379449d91b0", + "description": "Link to Google", + "name": "Google", + "ssoEntities": {}, + "templateName": "bookmark", + "templateVersion": "1.0", + "url": "https://www.google.com/", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/application/testLDAP.application.json 1`] = ` +{ + "managedApplication": { + "e124e6f6-e25a-4180-a6c3-ff8b782a422c": { + "_id": "e124e6f6-e25a-4180-a6c3-ff8b782a422c", + "authoritative": true, + "description": "desc", + "icon": "", + "name": "testLDAP", + "templateName": "ldap", + "templateVersion": "2.1", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/application/testmeout.application.json 1`] = ` +{ + "managedApplication": { + "bf9e7fcc-cb00-4a96-8ee5-c8de5daf10b8": { + "_id": "bf9e7fcc-cb00-4a96-8ee5-c8de5daf10b8", + "name": "testmeout", + "ssoEntities": { + "oidcId": "testmeout", + }, + "templateName": "native", + "templateVersion": "1.0", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/applicationTypes/iPlanetAMWebAgentService.applicationTypes.json 1`] = ` +{ + "applicationTypes": { + "iPlanetAMWebAgentService": { + "_id": "iPlanetAMWebAgentService", + "actions": { + "DELETE": true, + "GET": true, + "HEAD": true, + "OPTIONS": true, + "PATCH": true, + "POST": true, + "PUT": true, + }, + "applicationClassName": "com.sun.identity.entitlement.Application", + "name": "iPlanetAMWebAgentService", + "resourceComparator": "com.sun.identity.entitlement.URLResourceName", + "saveIndex": "org.forgerock.openam.entitlement.indextree.TreeSaveIndex", + "searchIndex": "org.forgerock.openam.entitlement.indextree.TreeSearchIndex", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/applicationTypes/sunAMDelegationService.applicationTypes.json 1`] = ` +{ + "applicationTypes": { + "sunAMDelegationService": { + "_id": "sunAMDelegationService", + "actions": { + "DELEGATE": true, + "MODIFY": true, + "READ": true, + }, + "applicationClassName": "com.sun.identity.entitlement.Application", + "name": "sunAMDelegationService", + "resourceComparator": "com.sun.identity.entitlement.RegExResourceName", + "saveIndex": "com.sun.identity.entitlement.opensso.DelegationResourceNameIndexGenerator", + "searchIndex": "com.sun.identity.entitlement.opensso.DelegationResourceNameSplitter", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/applicationTypes/umaApplicationType.applicationTypes.json 1`] = ` +{ + "applicationTypes": { + "umaApplicationType": { + "_id": "umaApplicationType", + "actions": {}, + "applicationClassName": "com.sun.identity.entitlement.Application", + "name": "umaApplicationType", + "resourceComparator": "org.forgerock.openam.uma.UmaPolicyResourceMatcher", + "saveIndex": "org.forgerock.openam.uma.UmaPolicySaveIndex", + "searchIndex": "org.forgerock.openam.uma.UmaPolicySearchIndex", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/authentication/root-alpha.authentication.settings.json 1`] = ` +{ + "authentication": { + "_id": "", + "_type": { + "_id": "EMPTY", + "collection": false, + "name": "Core", + }, + "accountlockout": { + "lockoutDuration": 0, + "lockoutDurationMultiplier": 1, + "lockoutWarnUserCount": 0, + "loginFailureCount": 5, + "loginFailureDuration": 300, + "loginFailureLockoutMode": false, + "storeInvalidAttemptsInDataStore": true, + }, + "core": { + "adminAuthModule": "Login", + "orgConfig": "Login", + }, + "general": { + "defaultAuthLevel": 0, + "externalLoginPageUrl": "https://volker-demo.encore.forgerock.com/demo/webapp/en/home/redirect", + "identityType": [ + "agent", + "user", + ], + "locale": "en_US", + "statelessSessionsEnabled": false, + "twoFactorRequired": false, + "userStatusCallbackPlugins": [], + }, + "postauthprocess": { + "loginFailureUrl": [], + "loginPostProcessClass": [], + "loginSuccessUrl": [ + "/enduser/?realm=/alpha", + ], + "userAttributeSessionMapping": [], + "usernameGeneratorClass": "com.sun.identity.authentication.spi.DefaultUserIDGenerator", + "usernameGeneratorEnabled": true, + }, + "security": { + "addClearSiteDataHeader": true, + "keyAlias": "test", + "moduleBasedAuthEnabled": false, + "sharedSecret": { + "$string": "&{am.authentication.shared.secret}", + }, + "zeroPageLoginAllowedWithoutReferrer": true, + "zeroPageLoginEnabled": false, + "zeroPageLoginReferrerWhiteList": [], + }, + "trees": { + "authenticationSessionsMaxDuration": 5, + "authenticationSessionsStateManagement": "JWT", + "authenticationSessionsWhitelist": false, + "authenticationTreeCookieHttpOnly": true, + "suspendedAuthenticationTimeout": 1440, + }, + "userprofile": { + "aliasAttributeName": [ + "uid", + ], + "defaultRole": [], + "dynamicProfileCreation": "false", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/authenticationModules/amster.authenticationModules.json 1`] = ` +{ + "authenticationModules": { + "amster": { + "_id": "amster", + "_type": { + "_id": "amster", + "collection": true, + "name": "ForgeRock Amster", + }, + "authenticationLevel": 0, + "authorizedKeys": "/home/forgerock/openam/security/keys/amster/authorized_keys", + "enabled": true, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/authenticationModules/datastore.authenticationModules.json 1`] = ` +{ + "authenticationModules": { + "datastore": { + "_id": "datastore", + "_type": { + "_id": "datastore", + "collection": true, + "name": "Data Store", + }, + "authenticationLevel": 0, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/authenticationModules/federation.authenticationModules.json 1`] = ` +{ + "authenticationModules": { + "federation": { + "_id": "federation", + "_type": { + "_id": "federation", + "collection": true, + "name": "Federation", + }, + "authenticationLevel": 0, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/authenticationModules/hotp.authenticationModules.json 1`] = ` +{ + "authenticationModules": { + "hotp": { + "_id": "hotp", + "_type": { + "_id": "hotp", + "collection": true, + "name": "HOTP", + }, + "authenticationLevel": 0, + "autoSendOTP": false, + "otpDeliveryMethod": "SMS and E-mail", + "otpLength": "8", + "otpMaxRetry": 3, + "otpValidityDuration": 5, + "smsGatewayClass": "com.sun.identity.authentication.modules.hotp.DefaultSMSGatewayImpl", + "smtpFromAddress": "no-reply@openam.org", + "smtpHostPort": 465, + "smtpHostname": "smtp.gmail.com", + "smtpSslEnabled": "SSL", + "smtpUserPassword": null, + "smtpUsername": "opensso.sun", + "userProfileEmailAttribute": "mail", + "userProfileTelephoneAttribute": "telephoneNumber", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/authenticationModules/ldap.authenticationModules.json 1`] = ` +{ + "authenticationModules": { + "ldap": { + "_id": "ldap", + "_type": { + "_id": "ldap", + "collection": true, + "name": "LDAP", + }, + "authenticationLevel": 0, + "beheraPasswordPolicySupportEnabled": true, + "connectionHeartbeatInterval": 10, + "connectionHeartbeatTimeUnit": "SECONDS", + "minimumPasswordLength": "8", + "openam-auth-ldap-connection-mode": "LDAP", + "operationTimeout": 0, + "primaryLdapServer": [ + "userstore-1.userstore:1389", + "userstore-0.userstore:1389", + "userstore-2.userstore:1389", + ], + "profileAttributeMappings": [], + "returnUserDN": true, + "searchScope": "SUBTREE", + "secondaryLdapServer": [], + "stopLdapbindAfterInmemoryLockedEnabled": false, + "trustAllServerCertificates": false, + "userBindDN": "uid=admin", + "userBindPassword": null, + "userProfileRetrievalAttribute": "uid", + "userSearchAttributes": [ + "uid", + ], + "userSearchStartDN": [ + "ou=identities", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/authenticationModules/oath.authenticationModules.json 1`] = ` +{ + "authenticationModules": { + "oath": { + "_id": "oath", + "_type": { + "_id": "oath", + "collection": true, + "name": "OATH", + }, + "addChecksum": "False", + "authenticationLevel": 0, + "forgerock-oath-maximum-clock-drift": 0, + "forgerock-oath-sharedsecret-implementation-class": "org.forgerock.openam.authentication.modules.oath.plugins.DefaultSharedSecretProvider", + "hotpWindowSize": 100, + "minimumSecretKeyLength": "32", + "oathAlgorithm": "HOTP", + "oathOtpMaxRetry": 3, + "passwordLength": "6", + "stepsInWindow": 2, + "timeStepSize": 30, + "truncationOffset": -1, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/authenticationModules/sae.authenticationModules.json 1`] = ` +{ + "authenticationModules": { + "sae": { + "_id": "sae", + "_type": { + "_id": "sae", + "collection": true, + "name": "SAE", + }, + "authenticationLevel": 0, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/conditionTypes/AMIdentityMembership.conditionTypes.json 1`] = ` +{ + "conditionTypes": { + "AMIdentityMembership": { + "_id": "AMIdentityMembership", + "config": { + "properties": { + "amIdentityName": { + "items": { + "type": "string", + }, + "type": "array", + }, + }, + "type": "object", + }, + "logical": false, + "title": "AMIdentityMembership", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/conditionTypes/AND.conditionTypes.json 1`] = ` +{ + "conditionTypes": { + "AND": { + "_id": "AND", + "config": { + "properties": { + "conditions": { + "type": "array", + }, + }, + "type": "object", + }, + "logical": true, + "title": "AND", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/conditionTypes/AuthLevel.conditionTypes.json 1`] = ` +{ + "conditionTypes": { + "AuthLevel": { + "_id": "AuthLevel", + "config": { + "properties": { + "authLevel": { + "type": "integer", + }, + }, + "type": "object", + }, + "logical": false, + "title": "AuthLevel", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/conditionTypes/AuthScheme.conditionTypes.json 1`] = ` +{ + "conditionTypes": { + "AuthScheme": { + "_id": "AuthScheme", + "config": { + "properties": { + "applicationIdleTimeout": { + "type": "integer", + }, + "applicationName": { + "type": "string", + }, + "authScheme": { + "items": { + "type": "string", + }, + "type": "array", + }, + }, + "type": "object", + }, + "logical": false, + "title": "AuthScheme", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/conditionTypes/AuthenticateToRealm.conditionTypes.json 1`] = ` +{ + "conditionTypes": { + "AuthenticateToRealm": { + "_id": "AuthenticateToRealm", + "config": { + "properties": { + "authenticateToRealm": { + "type": "string", + }, + }, + "type": "object", + }, + "logical": false, + "title": "AuthenticateToRealm", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/conditionTypes/AuthenticateToService.conditionTypes.json 1`] = ` +{ + "conditionTypes": { + "AuthenticateToService": { + "_id": "AuthenticateToService", + "config": { + "properties": { + "authenticateToService": { + "type": "string", + }, + }, + "type": "object", + }, + "logical": false, + "title": "AuthenticateToService", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/conditionTypes/IPv4.conditionTypes.json 1`] = ` +{ + "conditionTypes": { + "IPv4": { + "_id": "IPv4", + "config": { + "properties": { + "dnsName": { + "items": { + "type": "string", + }, + "type": "array", + }, + "endIp": { + "type": "string", + }, + "startIp": { + "type": "string", + }, + }, + "type": "object", + }, + "logical": false, + "title": "IPv4", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/conditionTypes/IPv6.conditionTypes.json 1`] = ` +{ + "conditionTypes": { + "IPv6": { + "_id": "IPv6", + "config": { + "properties": { + "dnsName": { + "items": { + "type": "string", + }, + "type": "array", + }, + "endIp": { + "type": "string", + }, + "startIp": { + "type": "string", + }, + }, + "type": "object", + }, + "logical": false, + "title": "IPv6", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/conditionTypes/LDAPFilter.conditionTypes.json 1`] = ` +{ + "conditionTypes": { + "LDAPFilter": { + "_id": "LDAPFilter", + "config": { + "properties": { + "ldapFilter": { + "type": "string", + }, + }, + "type": "object", + }, + "logical": false, + "title": "LDAPFilter", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/conditionTypes/LEAuthLevel.conditionTypes.json 1`] = ` +{ + "conditionTypes": { + "LEAuthLevel": { + "_id": "LEAuthLevel", + "config": { + "properties": { + "authLevel": { + "type": "integer", + }, + }, + "type": "object", + }, + "logical": false, + "title": "LEAuthLevel", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/conditionTypes/NOT.conditionTypes.json 1`] = ` +{ + "conditionTypes": { + "NOT": { + "_id": "NOT", + "config": { + "properties": { + "condition": { + "properties": {}, + "type": "object", + }, + }, + "type": "object", + }, + "logical": true, + "title": "NOT", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/conditionTypes/OAuth2Scope.conditionTypes.json 1`] = ` +{ + "conditionTypes": { + "OAuth2Scope": { + "_id": "OAuth2Scope", + "config": { + "properties": { + "requiredScopes": { + "items": { + "type": "string", + }, + "type": "array", + }, + }, + "type": "object", + }, + "logical": false, + "title": "OAuth2Scope", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/conditionTypes/OR.conditionTypes.json 1`] = ` +{ + "conditionTypes": { + "OR": { + "_id": "OR", + "config": { + "properties": { + "conditions": { + "type": "array", + }, + }, + "type": "object", + }, + "logical": true, + "title": "OR", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/conditionTypes/Policy.conditionTypes.json 1`] = ` +{ + "conditionTypes": { + "Policy": { + "_id": "Policy", + "config": { + "properties": { + "className": { + "type": "string", + }, + "properties": { + "type": "object", + }, + }, + "type": "object", + }, + "logical": false, + "title": "Policy", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/conditionTypes/ResourceEnvIP.conditionTypes.json 1`] = ` +{ + "conditionTypes": { + "ResourceEnvIP": { + "_id": "ResourceEnvIP", + "config": { + "properties": { + "resourceEnvIPConditionValue": { + "items": { + "type": "string", + }, + "type": "array", + }, + }, + "type": "object", + }, + "logical": false, + "title": "ResourceEnvIP", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/conditionTypes/Script.conditionTypes.json 1`] = ` +{ + "conditionTypes": { + "Script": { + "_id": "Script", + "config": { + "properties": { + "scriptId": { + "type": "string", + }, + }, + "type": "object", + }, + "logical": false, + "title": "Script", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/conditionTypes/Session.conditionTypes.json 1`] = ` +{ + "conditionTypes": { + "Session": { + "_id": "Session", + "config": { + "properties": { + "maxSessionTime": { + "type": "integer", + }, + "terminateSession": { + "required": true, + "type": "boolean", + }, + }, + "type": "object", + }, + "logical": false, + "title": "Session", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/conditionTypes/SessionProperty.conditionTypes.json 1`] = ` +{ + "conditionTypes": { + "SessionProperty": { + "_id": "SessionProperty", + "config": { + "properties": { + "ignoreValueCase": { + "required": true, + "type": "boolean", + }, + "properties": { + "type": "object", + }, + }, + "type": "object", + }, + "logical": false, + "title": "SessionProperty", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/conditionTypes/SimpleTime.conditionTypes.json 1`] = ` +{ + "conditionTypes": { + "SimpleTime": { + "_id": "SimpleTime", + "config": { + "properties": { + "endDate": { + "type": "string", + }, + "endDay": { + "type": "string", + }, + "endTime": { + "type": "string", + }, + "enforcementTimeZone": { + "type": "string", + }, + "startDate": { + "type": "string", + }, + "startDay": { + "type": "string", + }, + "startTime": { + "type": "string", + }, + }, + "type": "object", + }, + "logical": false, + "title": "SimpleTime", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/conditionTypes/Transaction.conditionTypes.json 1`] = ` +{ + "conditionTypes": { + "Transaction": { + "_id": "Transaction", + "config": { + "properties": { + "authenticationStrategy": { + "type": "string", + }, + "strategySpecifier": { + "type": "string", + }, + }, + "type": "object", + }, + "logical": false, + "title": "Transaction", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/cot/2f04818d-561e-4f8a-82e8-af2426112138.cot.saml.json 1`] = ` +{ + "saml": { + "cot": { + "2f04818d-561e-4f8a-82e8-af2426112138": { + "_id": "2f04818d-561e-4f8a-82e8-af2426112138", + "_type": { + "_id": "circlesoftrust", + "collection": true, + "name": "Circle of Trust", + }, + "status": "active", + "trustedProviders": [ + "benefits-IDP|saml2", + "iSPAzure|saml2", + ], + }, + }, + "hosted": {}, + "metadata": {}, + "remote": {}, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/cot/AzureCOT.cot.saml.json 1`] = ` +{ + "saml": { + "cot": { + "AzureCOT": { + "_id": "AzureCOT", + "_type": { + "_id": "circlesoftrust", + "collection": true, + "name": "Circle of Trust", + }, + "status": "active", + "trustedProviders": [ + "iSPAzure|saml2", + "urn:federation:MicrosoftOnline|saml2", + "https://sts.windows.net/711ffa9c-5972-4713-ace3-688c9732614a/|saml2", + "SPAzure|saml2", + "https://idc.scheuber.io/am/saml2/IDPAzure|saml2", + ], + }, + }, + "hosted": {}, + "metadata": {}, + "remote": {}, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/cot/affiliation-test.cot.saml.json 1`] = ` +{ + "saml": { + "cot": { + "affiliation-test": { + "_id": "affiliation-test", + "_type": { + "_id": "circlesoftrust", + "collection": true, + "name": "Circle of Trust", + }, + "status": "active", + "trustedProviders": [], + }, + }, + "hosted": {}, + "metadata": {}, + "remote": {}, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/decisionCombiners/DenyOverride.decisionCombiners.json 1`] = ` +{ + "decisionCombiners": { + "DenyOverride": { + "_id": "DenyOverride", + "title": "DenyOverride", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/idp/adfs.idp.json 1`] = ` +{ + "idp": { + "adfs": { + "_id": "adfs", + "_type": { + "_id": "oidcConfig", + "collection": true, + "name": "Client configuration for providers that implement the OpenID Connect specification.", + }, + "acrValues": [], + "authenticationIdKey": "sub", + "authorizationEndpoint": "https://adfs.mytestrun.com/adfs/oauth2/authorize", + "clientAuthenticationMethod": "CLIENT_SECRET_POST", + "clientId": "aa9a179e-cdba-4db8-8477-3d1069d5ec04", + "enableNativeNonce": true, + "enabled": true, + "encryptJwtRequestParameter": false, + "encryptedIdTokens": false, + "issuer": "https://adfs.mytestrun.com/adfs", + "issuerComparisonCheckType": "EXACT", + "jwksUriEndpoint": "https://adfs.mytestrun.com/adfs/discovery/keys", + "jwtEncryptionAlgorithm": "NONE", + "jwtEncryptionMethod": "NONE", + "jwtRequestParameterOption": "NONE", + "jwtSigningAlgorithm": "RS256", + "pkceMethod": "S256", + "privateKeyJwtExpTime": 600, + "redirectURI": "https://idc.scheuber.io/login", + "responseMode": "DEFAULT", + "revocationCheckOptions": [], + "scopeDelimiter": " ", + "scopes": [ + "openid", + "profile", + "email", + ], + "tokenEndpoint": "https://adfs.mytestrun.com/adfs/oauth2/token", + "transform": "dbe0bf9a-72aa-49d5-8483-9db147985a47", + "uiConfig": { + "buttonClass": "", + "buttonCustomStyle": "background-color: #fff; border-color: #8b8b8b; color: #8b8b8b;", + "buttonCustomStyleHover": "background-color: #fff; border-color: #8b8b8b; color: #8b8b8b;", + "buttonDisplayName": "Microsoft ADFS", + "buttonImage": "/login/images/microsoft-logo.png", + "iconBackground": "#0078d7", + "iconClass": "fa-windows", + "iconFontColor": "white", + }, + "useCustomTrustStore": false, + "userInfoResponseType": "JSON", + "wellKnownEndpoint": "https://adfs.mytestrun.com/adfs/.well-known/openid-configuration", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/idp/apple_web.idp.json 1`] = ` +{ + "idp": { + "apple_web": { + "_id": "apple_web", + "_type": { + "_id": "appleConfig", + "collection": true, + "name": "Client configuration for Apple.", + }, + "acrValues": [], + "authenticationIdKey": "sub", + "authorizationEndpoint": "https://appleid.apple.com/auth/authorize", + "clientAuthenticationMethod": "CLIENT_SECRET_POST", + "clientId": "io.scheuber.idc.signinWithApple.service", + "enableNativeNonce": true, + "enabled": true, + "encryptJwtRequestParameter": false, + "encryptedIdTokens": false, + "issuer": "https://appleid.apple.com", + "issuerComparisonCheckType": "EXACT", + "jwksUriEndpoint": "https://appleid.apple.com/auth/keys", + "jwtEncryptionAlgorithm": "NONE", + "jwtEncryptionMethod": "NONE", + "jwtRequestParameterOption": "NONE", + "jwtSigningAlgorithm": "NONE", + "pkceMethod": "S256", + "privateKeyJwtExpTime": 600, + "redirectAfterFormPostURI": "https://idc.scheuber.io/login", + "redirectURI": "https://idc.scheuber.io/am/oauth2/client/form_post/apple_web", + "requestNativeAppForUserInfo": false, + "responseMode": "FORM_POST", + "revocationCheckOptions": [], + "scopeDelimiter": " ", + "scopes": [ + "name", + "email", + ], + "tokenEndpoint": "https://appleid.apple.com/auth/token", + "transform": "484e6246-dbc6-4288-97e6-54e55431402e", + "uiConfig": { + "buttonClass": "", + "buttonCustomStyle": "background-color: #000000; color: #ffffff; border-color: #000000;", + "buttonCustomStyleHover": "background-color: #000000; color: #ffffff; border-color: #000000;", + "buttonDisplayName": "Apple", + "buttonImage": "/login/images/apple-logo.png", + "iconBackground": "#000000", + "iconClass": "fa-apple", + "iconFontColor": "white", + }, + "useCustomTrustStore": false, + "userInfoResponseType": "JSON", + "wellKnownEndpoint": "https://appleid.apple.com/.well-known/openid-configuration", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/idp/apple-stoyan.idp.json 1`] = ` +{ + "idp": { + "apple-stoyan": { + "_id": "apple-stoyan", + "_type": { + "_id": "appleConfig", + "collection": true, + "name": "Client configuration for Apple.", + }, + "acrValues": [], + "authenticationIdKey": "sub", + "authorizationEndpoint": "https://appleid.apple.com/auth/authorize", + "clientAuthenticationMethod": "CLIENT_SECRET_POST", + "clientId": "CHANGE ME", + "enableNativeNonce": true, + "enabled": false, + "encryptJwtRequestParameter": false, + "encryptedIdTokens": false, + "issuer": "https://appleid.apple.com", + "issuerComparisonCheckType": "EXACT", + "jwksUriEndpoint": "https://appleid.apple.com/auth/keys", + "jwtEncryptionAlgorithm": "NONE", + "jwtEncryptionMethod": "NONE", + "jwtRequestParameterOption": "NONE", + "jwtSigningAlgorithm": "NONE", + "pkceMethod": "S256", + "privateKeyJwtExpTime": 600, + "redirectAfterFormPostURI": "https://openam-volker-dev.forgeblocks.com/login", + "redirectURI": "https://openam-volker-dev.forgeblocks.com/am/oauth2/alpha/client/form_post/apple-stoyan", + "requestNativeAppForUserInfo": false, + "responseMode": "FORM_POST", + "revocationCheckOptions": [], + "scopeDelimiter": " ", + "scopes": [ + "name", + "email", + ], + "tokenEndpoint": "https://appleid.apple.com/auth/token", + "transform": "484e6246-dbc6-4288-97e6-54e55431402e", + "uiConfig": { + "buttonClass": "", + "buttonCustomStyle": "background-color: #000000; color: #ffffff; border-color: #000000;", + "buttonCustomStyleHover": "background-color: #000000; color: #ffffff; border-color: #000000;", + "buttonDisplayName": "Apple", + "buttonImage": "/login/images/apple-logo.png", + "iconBackground": "#000000", + "iconClass": "fa-apple", + "iconFontColor": "white", + }, + "useCustomTrustStore": false, + "userInfoResponseType": "JSON", + "wellKnownEndpoint": "https://appleid.apple.com/.well-known/openid-configuration", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/idp/azure.idp.json 1`] = ` +{ + "idp": { + "azure": { + "_id": "azure", + "_type": { + "_id": "microsoftConfig", + "collection": true, + "name": "Client configuration for Microsoft.", + }, + "authenticationIdKey": "id", + "authorizationEndpoint": "https://login.microsoftonline.com/711ffa9c-5972-4713-ace3-688c9732614a/oauth2/v2.0/authorize", + "clientAuthenticationMethod": "CLIENT_SECRET_POST", + "clientId": "c42a3dc8-f276-496b-a722-269f131cc21c", + "enabled": true, + "issuerComparisonCheckType": "EXACT", + "jwtEncryptionAlgorithm": "NONE", + "jwtEncryptionMethod": "NONE", + "jwtSigningAlgorithm": "NONE", + "pkceMethod": "S256", + "privateKeyJwtExpTime": 600, + "redirectURI": "https://idc.scheuber.io/login", + "responseMode": "DEFAULT", + "revocationCheckOptions": [], + "scopeDelimiter": " ", + "scopes": [ + "User.Read", + "openid", + ], + "tokenEndpoint": "https://login.microsoftonline.com/711ffa9c-5972-4713-ace3-688c9732614a/oauth2/v2.0/token", + "transform": "73cecbfc-dad0-4395-be6a-6858ee3a80e5", + "uiConfig": { + "buttonClass": "", + "buttonCustomStyle": "background-color: #fff; border-color: #8b8b8b; color: #8b8b8b;", + "buttonCustomStyleHover": "background-color: #fff; border-color: #8b8b8b; color: #8b8b8b;", + "buttonDisplayName": "Microsoft Azure", + "buttonImage": "/login/images/microsoft-logo.png", + "iconBackground": "#0078d7", + "iconClass": "fa-windows", + "iconFontColor": "white", + }, + "useCustomTrustStore": false, + "userInfoEndpoint": "https://graph.microsoft.com/v1.0/me", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/idp/github.idp.json 1`] = ` +{ + "idp": { + "github": { + "_id": "github", + "_type": { + "_id": "oauth2Config", + "collection": true, + "name": "Client configuration for providers that implement the OAuth2 specification.", + }, + "authenticationIdKey": "id", + "authorizationEndpoint": "https://github.com/login/oauth/authorize", + "clientAuthenticationMethod": "CLIENT_SECRET_POST", + "clientId": "bdae6d141d4dcf95a630", + "enabled": true, + "issuerComparisonCheckType": "EXACT", + "jwtEncryptionAlgorithm": "NONE", + "jwtEncryptionMethod": "NONE", + "jwtSigningAlgorithm": "NONE", + "pkceMethod": "S256", + "privateKeyJwtExpTime": 600, + "redirectURI": "https://idc.scheuber.io/login", + "responseMode": "DEFAULT", + "revocationCheckOptions": [], + "scopeDelimiter": " ", + "scopes": [ + "user", + ], + "tokenEndpoint": "https://ig.mytestrun.com/login/oauth/access_token", + "transform": "23143919-6b78-40c3-b25e-beca19b229e0", + "uiConfig": { + "buttonCustomStyle": "background-color: #fff; color: #757575; border-color: #ddd;", + "buttonCustomStyleHover": "color: #6d6d6d; background-color: #eee; border-color: #ccc;", + "buttonDisplayName": "GitHub", + "buttonImage": "https://cdn-icons-png.flaticon.com/512/25/25231.png", + "iconBackground": "#4184f3", + "iconFontColor": "white", + }, + "useCustomTrustStore": false, + "userInfoEndpoint": "https://ig.mytestrun.com/user", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/idp/google.idp.json 1`] = ` +{ + "idp": { + "google": { + "_id": "google", + "_type": { + "_id": "googleConfig", + "collection": true, + "name": "Client configuration for Google.", + }, + "acrValues": [], + "authenticationIdKey": "sub", + "authorizationEndpoint": "https://accounts.google.com/o/oauth2/v2/auth", + "clientAuthenticationMethod": "CLIENT_SECRET_POST", + "clientId": "297338177925-mho17cgnm540s2gre8h27feb6sbs1msd.apps.googleusercontent.com", + "enableNativeNonce": true, + "enabled": true, + "encryptJwtRequestParameter": false, + "encryptedIdTokens": false, + "issuer": "https://accounts.google.com", + "issuerComparisonCheckType": "EXACT", + "jwtEncryptionAlgorithm": "NONE", + "jwtEncryptionMethod": "NONE", + "jwtRequestParameterOption": "NONE", + "jwtSigningAlgorithm": "NONE", + "pkceMethod": "S256", + "privateKeyJwtExpTime": 600, + "redirectURI": "https://idc.scheuber.io/login", + "responseMode": "DEFAULT", + "revocationCheckOptions": [], + "scopeDelimiter": " ", + "scopes": [ + "openid", + "profile", + "email", + ], + "tokenEndpoint": "https://www.googleapis.com/oauth2/v4/token", + "transform": "58d29080-4563-480b-89bb-1e7719776a21", + "uiConfig": { + "buttonClass": "", + "buttonCustomStyle": "background-color: #fff; color: #757575; border-color: #ddd;", + "buttonCustomStyleHover": "color: #6d6d6d; background-color: #eee; border-color: #ccc;", + "buttonDisplayName": "Google", + "buttonImage": "images/g-logo.png", + "iconBackground": "#4184f3", + "iconClass": "fa-google", + "iconFontColor": "white", + }, + "useCustomTrustStore": false, + "userInfoEndpoint": "https://www.googleapis.com/oauth2/v3/userinfo", + "userInfoResponseType": "JSON", + "wellKnownEndpoint": "https://accounts.google.com/.well-known/openid-configuration", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/idp/okta-trial-5735851.idp.json 1`] = ` +{ + "idp": { + "okta-trial-5735851": { + "_id": "okta-trial-5735851", + "_type": { + "_id": "oidcConfig", + "collection": true, + "name": "Client configuration for providers that implement the OpenID Connect specification.", + }, + "acrValues": [], + "authenticationIdKey": "id", + "authorizationEndpoint": "https://trial-5735851.okta.com/oauth2/v1/authorize", + "clientAuthenticationMethod": "CLIENT_SECRET_POST", + "clientId": "0oa13r2cp29Rynmyw697", + "enableNativeNonce": true, + "enabled": true, + "encryptJwtRequestParameter": false, + "encryptedIdTokens": false, + "issuer": "https://trial-5735851.okta.com", + "issuerComparisonCheckType": "EXACT", + "jwtEncryptionAlgorithm": "NONE", + "jwtEncryptionMethod": "NONE", + "jwtRequestParameterOption": "NONE", + "jwtSigningAlgorithm": "NONE", + "pkceMethod": "S256", + "privateKeyJwtExpTime": 600, + "redirectURI": "https://idc.scheuber.io/login", + "responseMode": "DEFAULT", + "revocationCheckOptions": [], + "scopeDelimiter": " ", + "scopes": [ + "openid", + "profile", + "email", + ], + "tokenEndpoint": "https://trial-5735851.okta.com/oauth2/v1/token", + "transform": "6325cf19-a49b-471e-8d26-7e4df76df0e2", + "uiConfig": { + "buttonDisplayName": "Okta", + }, + "useCustomTrustStore": false, + "userInfoEndpoint": "https://trial-5735851.okta.com/oauth2/v1/userinfo", + "userInfoResponseType": "JSON", + "wellKnownEndpoint": "https://trial-5735851.okta.com/.well-known/openid-configuration", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/journey/ForgottenUsername.journey.json 1`] = ` +{ + "trees": { + "ForgottenUsername": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": { + "9f1e8d94-4922-481b-9e14-212b66548900": { + "_id": "9f1e8d94-4922-481b-9e14-212b66548900", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "AttributeCollectorNode", + "collection": true, + "name": "Attribute Collector", + }, + "attributesToCollect": [ + "mail", + ], + "identityAttribute": "mail", + "required": true, + "validateInputs": false, + }, + }, + "nodes": { + "5e2a7c95-94af-4b23-8724-deb13853726a": { + "_id": "5e2a7c95-94af-4b23-8724-deb13853726a", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "PageNode", + "collection": true, + "name": "Page Node", + }, + "nodes": [ + { + "_id": "9f1e8d94-4922-481b-9e14-212b66548900", + "displayName": "Attribute Collector", + "nodeType": "AttributeCollectorNode", + }, + ], + "pageDescription": { + "en": "Enter your email address or Sign in", + }, + "pageHeader": { + "en": "Forgotten Username", + }, + }, + "b93ce36e-1976-4610-b24f-8d6760b5463b": { + "_id": "b93ce36e-1976-4610-b24f-8d6760b5463b", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "Login", + }, + "bf9ea8d5-9802-4f26-9664-a21840faac23": { + "_id": "bf9ea8d5-9802-4f26-9664-a21840faac23", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "IdentifyExistingUserNode", + "collection": true, + "name": "Identify Existing User", + }, + "identifier": "userName", + "identityAttribute": "mail", + }, + "d9a79f01-2ce3-4be2-a28a-975f35c3c8ca": { + "_id": "d9a79f01-2ce3-4be2-a28a-975f35c3c8ca", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "EmailSuspendNode", + "collection": true, + "name": "Email Suspend Node", + }, + "emailAttribute": "mail", + "emailSuspendMessage": { + "en": "An email has been sent to the address you entered. Click the link in that email to proceed.", + }, + "emailTemplateName": "forgottenUsername", + "identityAttribute": "mail", + "objectLookup": true, + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "ForgottenUsername", + "description": "Forgotten Username Tree", + "enabled": true, + "entryNodeId": "5e2a7c95-94af-4b23-8724-deb13853726a", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "mustRun": false, + "nodes": { + "5e2a7c95-94af-4b23-8724-deb13853726a": { + "connections": { + "outcome": "bf9ea8d5-9802-4f26-9664-a21840faac23", + }, + "displayName": "Page Node", + "nodeType": "PageNode", + }, + "b93ce36e-1976-4610-b24f-8d6760b5463b": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "70e691a5-1e33-4ac3-a356-e7b6d60d92e0", + }, + "displayName": "Inner Tree Evaluator", + "nodeType": "InnerTreeEvaluatorNode", + }, + "bf9ea8d5-9802-4f26-9664-a21840faac23": { + "connections": { + "false": "d9a79f01-2ce3-4be2-a28a-975f35c3c8ca", + "true": "d9a79f01-2ce3-4be2-a28a-975f35c3c8ca", + }, + "displayName": "Identify Existing User", + "nodeType": "IdentifyExistingUserNode", + }, + "d9a79f01-2ce3-4be2-a28a-975f35c3c8ca": { + "connections": { + "outcome": "b93ce36e-1976-4610-b24f-8d6760b5463b", + }, + "displayName": "Email Suspend Node", + "nodeType": "EmailSuspendNode", + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": {}, + "e301438c-0bd0-429c-ab0c-66126501069a": {}, + "startNode": {}, + }, + "uiConfig": { + "categories": "["Username Reset"]", + }, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/journey/FrodoTest.journey.json 1`] = ` +{ + "trees": { + "FrodoTest": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": { + "038f9b2a-36b2-489b-9e03-386c9a62ea21": { + "_id": "038f9b2a-36b2-489b-9e03-386c9a62ea21", + "_outcomes": [ + { + "displayName": "Social Authentication", + "id": "socialAuthentication", + }, + { + "displayName": "Local Authentication", + "id": "localAuthentication", + }, + ], + "_type": { + "_id": "SelectIdPNode", + "collection": true, + "name": "Select Identity Provider", + }, + "filteredProviders": [], + "identityAttribute": "mail", + "includeLocalAuthentication": true, + "offerOnlyExisting": false, + "passwordAttribute": "password", + }, + "228a44d5-fd78-4278-8999-fdd470ea7ebf": { + "_id": "228a44d5-fd78-4278-8999-fdd470ea7ebf", + "_outcomes": [ + { + "displayName": "Social Authentication", + "id": "socialAuthentication", + }, + { + "displayName": "Local Authentication", + "id": "localAuthentication", + }, + ], + "_type": { + "_id": "SelectIdPNode", + "collection": true, + "name": "Select Identity Provider", + }, + "filteredProviders": [], + "identityAttribute": "mail", + "includeLocalAuthentication": true, + "offerOnlyExisting": false, + "passwordAttribute": "password", + }, + "7a351800-fb7e-4145-903c-388554747556": { + "_id": "7a351800-fb7e-4145-903c-388554747556", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "ValidatedUsernameNode", + "collection": true, + "name": "Platform Username", + }, + "usernameAttribute": "userName", + "validateInput": false, + }, + "804e6a68-1720-442b-926a-007e90f02782": { + "_id": "804e6a68-1720-442b-926a-007e90f02782", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "ValidatedPasswordNode", + "collection": true, + "name": "Platform Password", + }, + "passwordAttribute": "password", + "validateInput": false, + }, + "dd16c8d4-baca-4ae0-bcd8-fb98b9040524": { + "_id": "dd16c8d4-baca-4ae0-bcd8-fb98b9040524", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "ValidatedPasswordNode", + "collection": true, + "name": "Platform Password", + }, + "passwordAttribute": "password", + "validateInput": false, + }, + }, + "nodes": { + "278bf084-9eea-46fe-8ce9-2600dde3b046": { + "_id": "278bf084-9eea-46fe-8ce9-2600dde3b046", + "_outcomes": [ + { + "displayName": "Social Authentication", + "id": "socialAuthentication", + }, + { + "displayName": "Local Authentication", + "id": "localAuthentication", + }, + ], + "_type": { + "_id": "PageNode", + "collection": true, + "name": "Page Node", + }, + "nodes": [ + { + "_id": "7a351800-fb7e-4145-903c-388554747556", + "displayName": "Username", + "nodeType": "ValidatedUsernameNode", + }, + { + "_id": "804e6a68-1720-442b-926a-007e90f02782", + "displayName": "Password", + "nodeType": "ValidatedPasswordNode", + }, + { + "_id": "228a44d5-fd78-4278-8999-fdd470ea7ebf", + "displayName": "Select IDP", + "nodeType": "SelectIdPNode", + }, + ], + "pageDescription": {}, + "pageHeader": {}, + }, + "64157fca-bd5b-4405-a4c8-64ffd98a5461": { + "_id": "64157fca-bd5b-4405-a4c8-64ffd98a5461", + "_outcomes": [ + { + "displayName": "Account exists", + "id": "ACCOUNT_EXISTS", + }, + { + "displayName": "No account exists", + "id": "NO_ACCOUNT", + }, + ], + "_type": { + "_id": "product-Saml2Node", + "collection": true, + "name": "SAML2 Authentication", + }, + "allowCreate": true, + "authComparison": "MINIMUM", + "authnContextClassRef": [], + "authnContextDeclRef": [], + "binding": "HTTP_ARTIFACT", + "forceAuthn": false, + "idpEntityId": "urn:federation:MicrosoftOnline", + "isPassive": false, + "metaAlias": "/alpha/iSPAzure", + "nameIdFormat": "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", + "requestBinding": "HTTP_REDIRECT", + }, + "731c5810-020b-45c8-a7fc-3c21903ae2b3": { + "_id": "731c5810-020b-45c8-a7fc-3c21903ae2b3", + "_outcomes": [ + { + "displayName": "Social Authentication", + "id": "socialAuthentication", + }, + { + "displayName": "Local Authentication", + "id": "localAuthentication", + }, + ], + "_type": { + "_id": "PageNode", + "collection": true, + "name": "Page Node", + }, + "nodes": [ + { + "_id": "dd16c8d4-baca-4ae0-bcd8-fb98b9040524", + "displayName": "Password", + "nodeType": "ValidatedPasswordNode", + }, + { + "_id": "038f9b2a-36b2-489b-9e03-386c9a62ea21", + "displayName": "Select IDP", + "nodeType": "SelectIdPNode", + }, + ], + "pageDescription": {}, + "pageHeader": {}, + }, + "bf153f37-83dd-4f39-aa0c-74135430242e": { + "_id": "bf153f37-83dd-4f39-aa0c-74135430242e", + "_outcomes": [ + { + "displayName": "Email Sent", + "id": "EMAIL_SENT", + }, + { + "displayName": "Email Not Sent", + "id": "EMAIL_NOT_SENT", + }, + ], + "_type": { + "_id": "EmailTemplateNode", + "collection": true, + "name": "Email Template Node", + }, + "emailAttribute": "mail", + "emailTemplateName": "welcome", + "identityAttribute": "userName", + }, + "d5cc2d52-6ce4-452d-85ea-3a5b50218b67": { + "_id": "d5cc2d52-6ce4-452d-85ea-3a5b50218b67", + "_outcomes": [ + { + "displayName": "Account exists", + "id": "ACCOUNT_EXISTS", + }, + { + "displayName": "No account exists", + "id": "NO_ACCOUNT", + }, + ], + "_type": { + "_id": "SocialProviderHandlerNode", + "collection": true, + "name": "Legacy Social Provider Handler Node", + }, + "clientType": "BROWSER", + "script": "58c824ae-84ed-4724-82cd-db128fc3f6c", + "usernameAttribute": "userName", + }, + "e2c39477-847a-4df2-9c5d-b449a752638b": { + "_id": "e2c39477-847a-4df2-9c5d-b449a752638b", + "_outcomes": [ + { + "displayName": "known", + "id": "known", + }, + { + "displayName": "unknown", + "id": "unknown", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "known", + "unknown", + ], + "outputs": [ + "*", + ], + "script": "739bdc48-fd24-4c52-b353-88706d75558a", + }, + "fc7e47cd-c679-4211-8e05-a36654f23c67": { + "_id": "fc7e47cd-c679-4211-8e05-a36654f23c67", + "_outcomes": [ + { + "displayName": "True", + "id": "TRUE", + }, + { + "displayName": "False", + "id": "FALSE", + }, + { + "displayName": "Locked", + "id": "LOCKED", + }, + { + "displayName": "Cancelled", + "id": "CANCELLED", + }, + { + "displayName": "Expired", + "id": "EXPIRED", + }, + ], + "_type": { + "_id": "IdentityStoreDecisionNode", + "collection": true, + "name": "Identity Store Decision", + }, + "minimumPasswordLength": 8, + "mixedCaseForPasswordChangeMessages": false, + "useUniversalIdForUsername": true, + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "FrodoTest", + "description": "Frodo test journey utilizing a variety of nodes and dependencies to test support for complex journeys.", + "enabled": true, + "entryNodeId": "e2c39477-847a-4df2-9c5d-b449a752638b", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "mustRun": false, + "nodes": { + "278bf084-9eea-46fe-8ce9-2600dde3b046": { + "connections": { + "localAuthentication": "fc7e47cd-c679-4211-8e05-a36654f23c67", + "socialAuthentication": "d5cc2d52-6ce4-452d-85ea-3a5b50218b67", + }, + "displayName": "Login Page", + "nodeType": "PageNode", + }, + "64157fca-bd5b-4405-a4c8-64ffd98a5461": { + "connections": { + "ACCOUNT_EXISTS": "70e691a5-1e33-4ac3-a356-e7b6d60d92e0", + "NO_ACCOUNT": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "SAML2 Authentication", + "nodeType": "product-Saml2Node", + }, + "731c5810-020b-45c8-a7fc-3c21903ae2b3": { + "connections": { + "localAuthentication": "fc7e47cd-c679-4211-8e05-a36654f23c67", + "socialAuthentication": "d5cc2d52-6ce4-452d-85ea-3a5b50218b67", + }, + "displayName": "Login Page", + "nodeType": "PageNode", + }, + "bf153f37-83dd-4f39-aa0c-74135430242e": { + "connections": { + "EMAIL_NOT_SENT": "e301438c-0bd0-429c-ab0c-66126501069a", + "EMAIL_SENT": "64157fca-bd5b-4405-a4c8-64ffd98a5461", + }, + "displayName": "Email Template Node", + "nodeType": "EmailTemplateNode", + }, + "d5cc2d52-6ce4-452d-85ea-3a5b50218b67": { + "connections": { + "ACCOUNT_EXISTS": "70e691a5-1e33-4ac3-a356-e7b6d60d92e0", + "NO_ACCOUNT": "bf153f37-83dd-4f39-aa0c-74135430242e", + }, + "displayName": "Social Login", + "nodeType": "SocialProviderHandlerNode", + }, + "e2c39477-847a-4df2-9c5d-b449a752638b": { + "connections": { + "known": "731c5810-020b-45c8-a7fc-3c21903ae2b3", + "unknown": "278bf084-9eea-46fe-8ce9-2600dde3b046", + }, + "displayName": "Check Username", + "nodeType": "ScriptedDecisionNode", + }, + "fc7e47cd-c679-4211-8e05-a36654f23c67": { + "connections": { + "CANCELLED": "70e691a5-1e33-4ac3-a356-e7b6d60d92e0", + "EXPIRED": "70e691a5-1e33-4ac3-a356-e7b6d60d92e0", + "FALSE": "e301438c-0bd0-429c-ab0c-66126501069a", + "LOCKED": "e301438c-0bd0-429c-ab0c-66126501069a", + "TRUE": "70e691a5-1e33-4ac3-a356-e7b6d60d92e0", + }, + "displayName": "Validate Creds", + "nodeType": "IdentityStoreDecisionNode", + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": {}, + "e301438c-0bd0-429c-ab0c-66126501069a": {}, + "startNode": {}, + }, + "uiConfig": { + "categories": "["Frodo","Prototype"]", + }, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/journey/Login.journey.json 1`] = ` +{ + "trees": { + "Login": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": { + "0c80c39b-4813-4e67-b4fb-5a0bba85f994": { + "_id": "0c80c39b-4813-4e67-b4fb-5a0bba85f994", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "ValidatedPasswordNode", + "collection": true, + "name": "Platform Password", + }, + "passwordAttribute": "password", + "validateInput": false, + }, + "7354982f-57b6-4b04-9ddc-f1dd1e1e07d0": { + "_id": "7354982f-57b6-4b04-9ddc-f1dd1e1e07d0", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "ValidatedUsernameNode", + "collection": true, + "name": "Platform Username", + }, + "usernameAttribute": "userName", + "validateInput": false, + }, + }, + "nodes": { + "2119f332-0f69-4088-a7a1-6582bf0f2001": { + "_id": "2119f332-0f69-4088-a7a1-6582bf0f2001", + "_outcomes": [ + { + "displayName": "Retry", + "id": "Retry", + }, + { + "displayName": "Reject", + "id": "Reject", + }, + ], + "_type": { + "_id": "RetryLimitDecisionNode", + "collection": true, + "name": "Retry Limit Decision", + }, + "incrementUserAttributeOnFailure": true, + "retryLimit": 5, + }, + "33b24514-3e50-4180-8f08-ab6f4e51b07e": { + "_id": "33b24514-3e50-4180-8f08-ab6f4e51b07e", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "ProgressiveProfile", + }, + "51e8c4c1-3509-4635-90e6-d2cc31c4a6a5": { + "_id": "51e8c4c1-3509-4635-90e6-d2cc31c4a6a5", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "AccountLockoutNode", + "collection": true, + "name": "Account Lockout", + }, + "lockAction": "LOCK", + }, + "7f0c2aee-8c74-4d02-82a6-9d4ed9d11708": { + "_id": "7f0c2aee-8c74-4d02-82a6-9d4ed9d11708", + "_outcomes": [ + { + "displayName": "True", + "id": "TRUE", + }, + { + "displayName": "False", + "id": "FALSE", + }, + { + "displayName": "Locked", + "id": "LOCKED", + }, + { + "displayName": "Cancelled", + "id": "CANCELLED", + }, + { + "displayName": "Expired", + "id": "EXPIRED", + }, + ], + "_type": { + "_id": "IdentityStoreDecisionNode", + "collection": true, + "name": "Identity Store Decision", + }, + "minimumPasswordLength": 8, + "mixedCaseForPasswordChangeMessages": false, + "useUniversalIdForUsername": false, + }, + "a12bc72f-ad97-4f1e-a789-a1fa3dd566c8": { + "_id": "a12bc72f-ad97-4f1e-a789-a1fa3dd566c8", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "PageNode", + "collection": true, + "name": "Page Node", + }, + "nodes": [ + { + "_id": "7354982f-57b6-4b04-9ddc-f1dd1e1e07d0", + "displayName": "Platform Username", + "nodeType": "ValidatedUsernameNode", + }, + { + "_id": "0c80c39b-4813-4e67-b4fb-5a0bba85f994", + "displayName": "Platform Password", + "nodeType": "ValidatedPasswordNode", + }, + ], + "pageDescription": { + "en": "New here? Create an account
Forgot username? Forgot password?", + }, + "pageHeader": { + "en": "Sign In", + }, + }, + "bba3e0d8-8525-4e82-bf48-ac17f7988917": { + "_id": "bba3e0d8-8525-4e82-bf48-ac17f7988917", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "IncrementLoginCountNode", + "collection": true, + "name": "Increment Login Count", + }, + "identityAttribute": "userName", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "Login", + "description": "Platform Login Tree", + "enabled": true, + "entryNodeId": "a12bc72f-ad97-4f1e-a789-a1fa3dd566c8", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "mustRun": false, + "nodes": { + "2119f332-0f69-4088-a7a1-6582bf0f2001": { + "connections": { + "Reject": "51e8c4c1-3509-4635-90e6-d2cc31c4a6a5", + "Retry": "a12bc72f-ad97-4f1e-a789-a1fa3dd566c8", + }, + "displayName": "Retry Limit Decision", + "nodeType": "RetryLimitDecisionNode", + }, + "33b24514-3e50-4180-8f08-ab6f4e51b07e": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "70e691a5-1e33-4ac3-a356-e7b6d60d92e0", + }, + "displayName": "Inner Tree Evaluator", + "nodeType": "InnerTreeEvaluatorNode", + }, + "51e8c4c1-3509-4635-90e6-d2cc31c4a6a5": { + "connections": { + "outcome": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "Account Lockout", + "nodeType": "AccountLockoutNode", + }, + "7f0c2aee-8c74-4d02-82a6-9d4ed9d11708": { + "connections": { + "CANCELLED": "e301438c-0bd0-429c-ab0c-66126501069a", + "EXPIRED": "e301438c-0bd0-429c-ab0c-66126501069a", + "FALSE": "2119f332-0f69-4088-a7a1-6582bf0f2001", + "LOCKED": "e301438c-0bd0-429c-ab0c-66126501069a", + "TRUE": "bba3e0d8-8525-4e82-bf48-ac17f7988917", + }, + "displayName": "Identity Store Decision", + "nodeType": "IdentityStoreDecisionNode", + }, + "a12bc72f-ad97-4f1e-a789-a1fa3dd566c8": { + "connections": { + "outcome": "7f0c2aee-8c74-4d02-82a6-9d4ed9d11708", + }, + "displayName": "Page Node", + "nodeType": "PageNode", + }, + "bba3e0d8-8525-4e82-bf48-ac17f7988917": { + "connections": { + "outcome": "33b24514-3e50-4180-8f08-ab6f4e51b07e", + }, + "displayName": "Increment Login Count", + "nodeType": "IncrementLoginCountNode", + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": {}, + "e301438c-0bd0-429c-ab0c-66126501069a": {}, + "startNode": {}, + }, + "uiConfig": { + "categories": "["Authentication"]", + }, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/journey/OrphanedTest.journey.json 1`] = ` +{ + "trees": { + "OrphanedTest": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "343e745f-923a-43c4-8675-649a490fd0a3": { + "_id": "343e745f-923a-43c4-8675-649a490fd0a3", + "_outcomes": [ + { + "displayName": "True", + "id": "TRUE", + }, + { + "displayName": "False", + "id": "FALSE", + }, + { + "displayName": "Locked", + "id": "LOCKED", + }, + { + "displayName": "Cancelled", + "id": "CANCELLED", + }, + { + "displayName": "Expired", + "id": "EXPIRED", + }, + ], + "_type": { + "_id": "IdentityStoreDecisionNode", + "collection": true, + "name": "Identity Store Decision", + }, + "minimumPasswordLength": 8, + "mixedCaseForPasswordChangeMessages": false, + "useUniversalIdForUsername": false, + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "OrphanedTest", + "description": "Test orphaned nodes", + "enabled": true, + "entryNodeId": "343e745f-923a-43c4-8675-649a490fd0a3", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "mustRun": false, + "nodes": { + "343e745f-923a-43c4-8675-649a490fd0a3": { + "connections": { + "CANCELLED": "70e691a5-1e33-4ac3-a356-e7b6d60d92e0", + "EXPIRED": "70e691a5-1e33-4ac3-a356-e7b6d60d92e0", + "FALSE": "e301438c-0bd0-429c-ab0c-66126501069a", + "LOCKED": "e301438c-0bd0-429c-ab0c-66126501069a", + "TRUE": "70e691a5-1e33-4ac3-a356-e7b6d60d92e0", + }, + "displayName": "Identity Store Decision", + "nodeType": "IdentityStoreDecisionNode", + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": {}, + "e301438c-0bd0-429c-ab0c-66126501069a": {}, + "startNode": {}, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/journey/ProgressiveProfile.journey.json 1`] = ` +{ + "trees": { + "ProgressiveProfile": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": { + "0a042e10-b22e-4e02-86c4-65e26e775f7a": { + "_id": "0a042e10-b22e-4e02-86c4-65e26e775f7a", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "AttributeCollectorNode", + "collection": true, + "name": "Attribute Collector", + }, + "attributesToCollect": [ + "preferences/updates", + "preferences/marketing", + ], + "identityAttribute": "userName", + "required": false, + "validateInputs": false, + }, + }, + "nodes": { + "423a959a-a1b9-498a-b0f7-596b6b6e775a": { + "_id": "423a959a-a1b9-498a-b0f7-596b6b6e775a", + "_outcomes": [ + { + "displayName": "Patched", + "id": "PATCHED", + }, + { + "displayName": "Failed", + "id": "FAILURE", + }, + ], + "_type": { + "_id": "PatchObjectNode", + "collection": true, + "name": "Patch Object", + }, + "identityAttribute": "userName", + "identityResource": "managed/alpha_user", + "ignoredFields": [], + "patchAsObject": false, + }, + "8afdaec3-275e-4301-bb53-34f03e6a4b29": { + "_id": "8afdaec3-275e-4301-bb53-34f03e6a4b29", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "LoginCountDecisionNode", + "collection": true, + "name": "Login Count Decision", + }, + "amount": 3, + "identityAttribute": "userName", + "interval": "AT", + }, + "a1f45b44-5bf7-4c57-aa3f-75c619c7db8e": { + "_id": "a1f45b44-5bf7-4c57-aa3f-75c619c7db8e", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "QueryFilterDecisionNode", + "collection": true, + "name": "Query Filter Decision", + }, + "identityAttribute": "userName", + "queryFilter": "!(/preferences pr) or /preferences/marketing eq false or /preferences/updates eq false", + }, + "a5aecad8-854a-4ed5-b719-ff6c90e858c0": { + "_id": "a5aecad8-854a-4ed5-b719-ff6c90e858c0", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "PageNode", + "collection": true, + "name": "Page Node", + }, + "nodes": [ + { + "_id": "0a042e10-b22e-4e02-86c4-65e26e775f7a", + "displayName": "Attribute Collector", + "nodeType": "AttributeCollectorNode", + }, + ], + "pageDescription": {}, + "pageHeader": { + "en": "Please select your preferences", + }, + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "ProgressiveProfile", + "description": "Prompt for missing preferences on 3rd login", + "enabled": true, + "entryNodeId": "8afdaec3-275e-4301-bb53-34f03e6a4b29", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "mustRun": false, + "nodes": { + "423a959a-a1b9-498a-b0f7-596b6b6e775a": { + "connections": { + "FAILURE": "e301438c-0bd0-429c-ab0c-66126501069a", + "PATCHED": "70e691a5-1e33-4ac3-a356-e7b6d60d92e0", + }, + "displayName": "Patch Object", + "nodeType": "PatchObjectNode", + }, + "8afdaec3-275e-4301-bb53-34f03e6a4b29": { + "connections": { + "false": "70e691a5-1e33-4ac3-a356-e7b6d60d92e0", + "true": "a1f45b44-5bf7-4c57-aa3f-75c619c7db8e", + }, + "displayName": "Login Count Decision", + "nodeType": "LoginCountDecisionNode", + }, + "a1f45b44-5bf7-4c57-aa3f-75c619c7db8e": { + "connections": { + "false": "70e691a5-1e33-4ac3-a356-e7b6d60d92e0", + "true": "a5aecad8-854a-4ed5-b719-ff6c90e858c0", + }, + "displayName": "Query Filter Decision", + "nodeType": "QueryFilterDecisionNode", + }, + "a5aecad8-854a-4ed5-b719-ff6c90e858c0": { + "connections": { + "outcome": "423a959a-a1b9-498a-b0f7-596b6b6e775a", + }, + "displayName": "Page Node", + "nodeType": "PageNode", + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": {}, + "e301438c-0bd0-429c-ab0c-66126501069a": {}, + "startNode": {}, + }, + "uiConfig": { + "categories": "["Progressive Profile"]", + }, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/journey/RadioChoice.journey.json 1`] = ` +{ + "trees": { + "RadioChoice": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": { + "a566e474-99f3-46e4-9e70-682402bfaa84": { + "_id": "a566e474-99f3-46e4-9e70-682402bfaa84", + "_outcomes": [ + { + "displayName": "one", + "id": "one", + }, + { + "displayName": "two", + "id": "two", + }, + { + "displayName": "three", + "id": "three", + }, + ], + "_type": { + "_id": "ChoiceCollectorNode", + "collection": true, + "name": "Choice Collector", + }, + "choices": [ + "one", + "two", + "three", + ], + "defaultChoice": "one", + "prompt": "Choice?", + }, + }, + "nodes": { + "5d6cd20e-5074-43de-8832-fddd95fb078e": { + "_id": "5d6cd20e-5074-43de-8832-fddd95fb078e", + "_outcomes": [ + { + "displayName": "one", + "id": "one", + }, + { + "displayName": "two", + "id": "two", + }, + { + "displayName": "three", + "id": "three", + }, + ], + "_type": { + "_id": "PageNode", + "collection": true, + "name": "Page Node", + }, + "nodes": [ + { + "_id": "a566e474-99f3-46e4-9e70-682402bfaa84", + "displayName": "Choice Collector", + "nodeType": "ChoiceCollectorNode", + }, + ], + "pageDescription": {}, + "pageHeader": {}, + "stage": "{"ChoiceCallback":[{"id":"a566e474-99f3-46e4-9e70-682402bfaa84","displayType":"radio"}]}", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "RadioChoice", + "enabled": true, + "entryNodeId": "5d6cd20e-5074-43de-8832-fddd95fb078e", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "mustRun": false, + "nodes": { + "5d6cd20e-5074-43de-8832-fddd95fb078e": { + "connections": { + "one": "e301438c-0bd0-429c-ab0c-66126501069a", + "three": "e301438c-0bd0-429c-ab0c-66126501069a", + "two": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "Page Node", + "nodeType": "PageNode", + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": {}, + "e301438c-0bd0-429c-ab0c-66126501069a": {}, + "startNode": {}, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/journey/Registration.journey.json 1`] = ` +{ + "trees": { + "Registration": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": { + "120c69d3-90b4-4ad4-b7af-380e8b119340": { + "_id": "120c69d3-90b4-4ad4-b7af-380e8b119340", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "KbaCreateNode", + "collection": true, + "name": "KBA Definition", + }, + "allowUserDefinedQuestions": true, + "message": { + "en": "Select a security question", + }, + }, + "3d8709a1-f09f-4d1f-8094-2850e472c1db": { + "_id": "3d8709a1-f09f-4d1f-8094-2850e472c1db", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "ValidatedPasswordNode", + "collection": true, + "name": "Platform Password", + }, + "passwordAttribute": "password", + "validateInput": true, + }, + "7fcaf48e-a754-4959-858b-05b2933b825f": { + "_id": "7fcaf48e-a754-4959-858b-05b2933b825f", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "ValidatedUsernameNode", + "collection": true, + "name": "Platform Username", + }, + "usernameAttribute": "userName", + "validateInput": true, + }, + "b4a0e915-c15d-4b83-9c9d-18347d645976": { + "_id": "b4a0e915-c15d-4b83-9c9d-18347d645976", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "AcceptTermsAndConditionsNode", + "collection": true, + "name": "Accept Terms and Conditions", + }, + }, + "d3ce2036-1523-4ce8-b1a2-895a2a036667": { + "_id": "d3ce2036-1523-4ce8-b1a2-895a2a036667", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "AttributeCollectorNode", + "collection": true, + "name": "Attribute Collector", + }, + "attributesToCollect": [ + "givenName", + "sn", + "mail", + "preferences/marketing", + "preferences/updates", + ], + "identityAttribute": "userName", + "required": true, + "validateInputs": true, + }, + }, + "nodes": { + "0c091c49-f3af-48fb-ac6f-07fba0499dd6": { + "_id": "0c091c49-f3af-48fb-ac6f-07fba0499dd6", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "PageNode", + "collection": true, + "name": "Page Node", + }, + "nodes": [ + { + "_id": "7fcaf48e-a754-4959-858b-05b2933b825f", + "displayName": "Platform Username", + "nodeType": "ValidatedUsernameNode", + }, + { + "_id": "d3ce2036-1523-4ce8-b1a2-895a2a036667", + "displayName": "Attribute Collector", + "nodeType": "AttributeCollectorNode", + }, + { + "_id": "3d8709a1-f09f-4d1f-8094-2850e472c1db", + "displayName": "Platform Password", + "nodeType": "ValidatedPasswordNode", + }, + { + "_id": "120c69d3-90b4-4ad4-b7af-380e8b119340", + "displayName": "KBA Definition", + "nodeType": "KbaCreateNode", + }, + { + "_id": "b4a0e915-c15d-4b83-9c9d-18347d645976", + "displayName": "Accept Terms and Conditions", + "nodeType": "AcceptTermsAndConditionsNode", + }, + ], + "pageDescription": { + "en": "Signing up is fast and easy.
Already have an account? Sign In", + }, + "pageHeader": { + "en": "Sign Up", + }, + "stage": "{"ValidatedCreatePasswordCallback":[{"id":"3d8709a1-f09f-4d1f-8094-2850e472c1db","confirmPassword":true,"policyDisplayCheckmark":true}]}", + }, + "466f8b54-07fb-4e31-a11d-a6842618cc37": { + "_id": "466f8b54-07fb-4e31-a11d-a6842618cc37", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "EmailSuspendNode", + "collection": true, + "name": "Email Suspend Node", + }, + "emailAttribute": "mail", + "emailSuspendMessage": { + "en": "An email has been sent to the address you entered. Click the link in that email to proceed.", + }, + "emailTemplateName": "registration", + "identityAttribute": "userName", + "objectLookup": false, + }, + "97a15eb2-a015-4b6d-81a0-be78c3aa1a3b": { + "_id": "97a15eb2-a015-4b6d-81a0-be78c3aa1a3b", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "IncrementLoginCountNode", + "collection": true, + "name": "Increment Login Count", + }, + "identityAttribute": "userName", + }, + "ad5dcbb3-7335-49b7-b3e7-7d850bb88237": { + "_id": "ad5dcbb3-7335-49b7-b3e7-7d850bb88237", + "_outcomes": [ + { + "displayName": "Created", + "id": "CREATED", + }, + { + "displayName": "Failed", + "id": "FAILURE", + }, + ], + "_type": { + "_id": "CreateObjectNode", + "collection": true, + "name": "Create Object", + }, + "identityResource": "managed/alpha_user", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "Registration", + "description": "Platform Registration Tree", + "enabled": true, + "entryNodeId": "0c091c49-f3af-48fb-ac6f-07fba0499dd6", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "mustRun": false, + "nodes": { + "0c091c49-f3af-48fb-ac6f-07fba0499dd6": { + "connections": { + "outcome": "466f8b54-07fb-4e31-a11d-a6842618cc37", + }, + "displayName": "Page Node", + "nodeType": "PageNode", + }, + "466f8b54-07fb-4e31-a11d-a6842618cc37": { + "connections": { + "outcome": "ad5dcbb3-7335-49b7-b3e7-7d850bb88237", + }, + "displayName": "Email Suspend Node", + "nodeType": "EmailSuspendNode", + }, + "97a15eb2-a015-4b6d-81a0-be78c3aa1a3b": { + "connections": { + "outcome": "70e691a5-1e33-4ac3-a356-e7b6d60d92e0", + }, + "displayName": "Increment Login Count", + "nodeType": "IncrementLoginCountNode", + }, + "ad5dcbb3-7335-49b7-b3e7-7d850bb88237": { + "connections": { + "CREATED": "97a15eb2-a015-4b6d-81a0-be78c3aa1a3b", + "FAILURE": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "Create Object", + "nodeType": "CreateObjectNode", + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": {}, + "e301438c-0bd0-429c-ab0c-66126501069a": {}, + "startNode": {}, + }, + "uiConfig": { + "categories": "["Registration"]", + }, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/journey/ResetPassword.journey.json 1`] = ` +{ + "trees": { + "ResetPassword": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": { + "009c19c8-9572-47bb-adb2-1f092c559a43": { + "_id": "009c19c8-9572-47bb-adb2-1f092c559a43", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "ValidatedPasswordNode", + "collection": true, + "name": "Platform Password", + }, + "passwordAttribute": "password", + "validateInput": true, + }, + "276afa7c-a680-4cf4-a5f6-d6c78191f5c9": { + "_id": "276afa7c-a680-4cf4-a5f6-d6c78191f5c9", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "AttributeCollectorNode", + "collection": true, + "name": "Attribute Collector", + }, + "attributesToCollect": [ + "mail", + ], + "identityAttribute": "mail", + "required": true, + "validateInputs": false, + }, + }, + "nodes": { + "06c97be5-7fdd-4739-aea1-ecc7fe082865": { + "_id": "06c97be5-7fdd-4739-aea1-ecc7fe082865", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "EmailSuspendNode", + "collection": true, + "name": "Email Suspend Node", + }, + "emailAttribute": "mail", + "emailSuspendMessage": { + "en": "An email has been sent to the address you entered. Click the link in that email to proceed.", + }, + "emailTemplateName": "resetPassword", + "identityAttribute": "mail", + "objectLookup": true, + }, + "21b8ddf3-0203-4ae1-ab05-51cf3a3a707a": { + "_id": "21b8ddf3-0203-4ae1-ab05-51cf3a3a707a", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "IdentifyExistingUserNode", + "collection": true, + "name": "Identify Existing User", + }, + "identifier": "userName", + "identityAttribute": "mail", + }, + "989f0bf8-a328-4217-b82b-5275d79ca8bd": { + "_id": "989f0bf8-a328-4217-b82b-5275d79ca8bd", + "_outcomes": [ + { + "displayName": "Patched", + "id": "PATCHED", + }, + { + "displayName": "Failed", + "id": "FAILURE", + }, + ], + "_type": { + "_id": "PatchObjectNode", + "collection": true, + "name": "Patch Object", + }, + "identityAttribute": "mail", + "identityResource": "managed/alpha_user", + "ignoredFields": [], + "patchAsObject": false, + }, + "cc3e1ed2-25f1-47bf-83c6-17084f8b2b2b": { + "_id": "cc3e1ed2-25f1-47bf-83c6-17084f8b2b2b", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "PageNode", + "collection": true, + "name": "Page Node", + }, + "nodes": [ + { + "_id": "276afa7c-a680-4cf4-a5f6-d6c78191f5c9", + "displayName": "Attribute Collector", + "nodeType": "AttributeCollectorNode", + }, + ], + "pageDescription": { + "en": "Enter your email address or Sign in", + }, + "pageHeader": { + "en": "Reset Password", + }, + }, + "e4c752f9-c625-48c9-9644-a58802fa9e9c": { + "_id": "e4c752f9-c625-48c9-9644-a58802fa9e9c", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "PageNode", + "collection": true, + "name": "Page Node", + }, + "nodes": [ + { + "_id": "009c19c8-9572-47bb-adb2-1f092c559a43", + "displayName": "Platform Password", + "nodeType": "ValidatedPasswordNode", + }, + ], + "pageDescription": { + "en": "Change password", + }, + "pageHeader": { + "en": "Reset Password", + }, + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "ResetPassword", + "description": "Reset Password Tree", + "enabled": true, + "entryNodeId": "cc3e1ed2-25f1-47bf-83c6-17084f8b2b2b", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "mustRun": false, + "nodes": { + "06c97be5-7fdd-4739-aea1-ecc7fe082865": { + "connections": { + "outcome": "e4c752f9-c625-48c9-9644-a58802fa9e9c", + }, + "displayName": "Email Suspend Node", + "nodeType": "EmailSuspendNode", + }, + "21b8ddf3-0203-4ae1-ab05-51cf3a3a707a": { + "connections": { + "false": "06c97be5-7fdd-4739-aea1-ecc7fe082865", + "true": "06c97be5-7fdd-4739-aea1-ecc7fe082865", + }, + "displayName": "Identify Existing User", + "nodeType": "IdentifyExistingUserNode", + }, + "989f0bf8-a328-4217-b82b-5275d79ca8bd": { + "connections": { + "FAILURE": "e301438c-0bd0-429c-ab0c-66126501069a", + "PATCHED": "70e691a5-1e33-4ac3-a356-e7b6d60d92e0", + }, + "displayName": "Patch Object", + "nodeType": "PatchObjectNode", + }, + "cc3e1ed2-25f1-47bf-83c6-17084f8b2b2b": { + "connections": { + "outcome": "21b8ddf3-0203-4ae1-ab05-51cf3a3a707a", + }, + "displayName": "Page Node", + "nodeType": "PageNode", + }, + "e4c752f9-c625-48c9-9644-a58802fa9e9c": { + "connections": { + "outcome": "989f0bf8-a328-4217-b82b-5275d79ca8bd", + }, + "displayName": "Page Node", + "nodeType": "PageNode", + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": {}, + "e301438c-0bd0-429c-ab0c-66126501069a": {}, + "startNode": {}, + }, + "uiConfig": { + "categories": "["Password Reset"]", + }, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/journey/UpdatePassword.journey.json 1`] = ` +{ + "trees": { + "UpdatePassword": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": { + "21a99653-a7a7-47ee-b650-f493a84bba09": { + "_id": "21a99653-a7a7-47ee-b650-f493a84bba09", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "ValidatedPasswordNode", + "collection": true, + "name": "Platform Password", + }, + "passwordAttribute": "password", + "validateInput": true, + }, + "fe2962fc-4db3-4066-8624-553649afc438": { + "_id": "fe2962fc-4db3-4066-8624-553649afc438", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "ValidatedPasswordNode", + "collection": true, + "name": "Platform Password", + }, + "passwordAttribute": "password", + "validateInput": false, + }, + }, + "nodes": { + "0f0904e6-1da3-4cdb-9abf-0d2545016fab": { + "_id": "0f0904e6-1da3-4cdb-9abf-0d2545016fab", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "AttributePresentDecisionNode", + "collection": true, + "name": "Attribute Present Decision", + }, + "identityAttribute": "userName", + "presentAttribute": "password", + }, + "20237b34-26cb-4a0b-958f-abb422290d42": { + "_id": "20237b34-26cb-4a0b-958f-abb422290d42", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "PageNode", + "collection": true, + "name": "Page Node", + }, + "nodes": [ + { + "_id": "fe2962fc-4db3-4066-8624-553649afc438", + "displayName": "Platform Password", + "nodeType": "ValidatedPasswordNode", + }, + ], + "pageDescription": { + "en": "Enter current password", + }, + "pageHeader": { + "en": "Verify Existing Password", + }, + }, + "3990ce1f-cce6-435b-ae1c-f138e89411c1": { + "_id": "3990ce1f-cce6-435b-ae1c-f138e89411c1", + "_outcomes": [ + { + "displayName": "Patched", + "id": "PATCHED", + }, + { + "displayName": "Failed", + "id": "FAILURE", + }, + ], + "_type": { + "_id": "PatchObjectNode", + "collection": true, + "name": "Patch Object", + }, + "identityAttribute": "userName", + "identityResource": "managed/alpha_user", + "ignoredFields": [ + "userName", + ], + "patchAsObject": false, + }, + "7d1deabe-cd98-49c8-943f-ca12305775f3": { + "_id": "7d1deabe-cd98-49c8-943f-ca12305775f3", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "DataStoreDecisionNode", + "collection": true, + "name": "Data Store Decision", + }, + }, + "a3d97b53-e38a-4b24-aed0-a021050eb744": { + "_id": "a3d97b53-e38a-4b24-aed0-a021050eb744", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "EmailSuspendNode", + "collection": true, + "name": "Email Suspend Node", + }, + "emailAttribute": "mail", + "emailSuspendMessage": { + "en": "An email has been sent to your address, please verify your email address to update your password. Click the link in that email to proceed.", + }, + "emailTemplateName": "updatePassword", + "identityAttribute": "userName", + "objectLookup": true, + }, + "d018fcd1-4e22-4160-8c41-63bee51c9cb3": { + "_id": "d018fcd1-4e22-4160-8c41-63bee51c9cb3", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "PageNode", + "collection": true, + "name": "Page Node", + }, + "nodes": [ + { + "_id": "21a99653-a7a7-47ee-b650-f493a84bba09", + "displayName": "Platform Password", + "nodeType": "ValidatedPasswordNode", + }, + ], + "pageDescription": { + "en": "Enter new password", + }, + "pageHeader": { + "en": "Update Password", + }, + }, + "d1b79744-493a-44fe-bc26-7d324a8caa4e": { + "_id": "d1b79744-493a-44fe-bc26-7d324a8caa4e", + "_outcomes": [ + { + "displayName": "Outcome", + "id": "outcome", + }, + ], + "_type": { + "_id": "SessionDataNode", + "collection": true, + "name": "Get Session Data", + }, + "sessionDataKey": "UserToken", + "sharedStateKey": "userName", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "UpdatePassword", + "description": "Update password using active session", + "enabled": true, + "entryNodeId": "d1b79744-493a-44fe-bc26-7d324a8caa4e", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "mustRun": false, + "nodes": { + "0f0904e6-1da3-4cdb-9abf-0d2545016fab": { + "connections": { + "false": "a3d97b53-e38a-4b24-aed0-a021050eb744", + "true": "20237b34-26cb-4a0b-958f-abb422290d42", + }, + "displayName": "Attribute Present Decision", + "nodeType": "AttributePresentDecisionNode", + }, + "20237b34-26cb-4a0b-958f-abb422290d42": { + "connections": { + "outcome": "7d1deabe-cd98-49c8-943f-ca12305775f3", + }, + "displayName": "Page Node", + "nodeType": "PageNode", + }, + "3990ce1f-cce6-435b-ae1c-f138e89411c1": { + "connections": { + "FAILURE": "e301438c-0bd0-429c-ab0c-66126501069a", + "PATCHED": "70e691a5-1e33-4ac3-a356-e7b6d60d92e0", + }, + "displayName": "Patch Object", + "nodeType": "PatchObjectNode", + }, + "7d1deabe-cd98-49c8-943f-ca12305775f3": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "d018fcd1-4e22-4160-8c41-63bee51c9cb3", + }, + "displayName": "Data Store Decision", + "nodeType": "DataStoreDecisionNode", + }, + "a3d97b53-e38a-4b24-aed0-a021050eb744": { + "connections": { + "outcome": "d018fcd1-4e22-4160-8c41-63bee51c9cb3", + }, + "displayName": "Email Suspend Node", + "nodeType": "EmailSuspendNode", + }, + "d018fcd1-4e22-4160-8c41-63bee51c9cb3": { + "connections": { + "outcome": "3990ce1f-cce6-435b-ae1c-f138e89411c1", + }, + "displayName": "Page Node", + "nodeType": "PageNode", + }, + "d1b79744-493a-44fe-bc26-7d324a8caa4e": { + "connections": { + "outcome": "0f0904e6-1da3-4cdb-9abf-0d2545016fab", + }, + "displayName": "Get Session Data", + "nodeType": "SessionDataNode", + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": {}, + "e301438c-0bd0-429c-ab0c-66126501069a": {}, + "startNode": {}, + }, + "uiConfig": { + "categories": "["Password Reset"]", + }, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/journey/j00.journey.json 1`] = ` +{ + "trees": { + "j00": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "01d3785f-7fb4-44a7-9458-72c380a9818f": { + "_id": "01d3785f-7fb4-44a7-9458-72c380a9818f", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "39b48197-f4be-42b9-800a-866587b4b9b5": { + "_id": "39b48197-f4be-42b9-800a-866587b4b9b5", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "3c1e8d61-0c48-44ba-86dc-52e9555b6aeb": { + "_id": "3c1e8d61-0c48-44ba-86dc-52e9555b6aeb", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "513a2ab4-f0b8-4f94-b840-6fe14796cc84": { + "_id": "513a2ab4-f0b8-4f94-b840-6fe14796cc84", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "ba503a1e-633e-4d0d-ba18-c9a9b1105b5b": { + "_id": "ba503a1e-633e-4d0d-ba18-c9a9b1105b5b", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "3cb43516-ae69-433a-8787-501d45db14e9", + }, + "d17ffaa1-2c61-4abd-9bb1-2559160d0a5c": { + "_id": "d17ffaa1-2c61-4abd-9bb1-2559160d0a5c", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j00", + "enabled": true, + "entryNodeId": "513a2ab4-f0b8-4f94-b840-6fe14796cc84", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "mustRun": false, + "nodes": { + "01d3785f-7fb4-44a7-9458-72c380a9818f": { + "connections": { + "true": "3c1e8d61-0c48-44ba-86dc-52e9555b6aeb", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + }, + "39b48197-f4be-42b9-800a-866587b4b9b5": { + "connections": { + "true": "ba503a1e-633e-4d0d-ba18-c9a9b1105b5b", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + }, + "3c1e8d61-0c48-44ba-86dc-52e9555b6aeb": { + "connections": { + "true": "ba503a1e-633e-4d0d-ba18-c9a9b1105b5b", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + }, + "513a2ab4-f0b8-4f94-b840-6fe14796cc84": { + "connections": { + "level only": "39b48197-f4be-42b9-800a-866587b4b9b5", + "none": "ba503a1e-633e-4d0d-ba18-c9a9b1105b5b", + "shared and level": "01d3785f-7fb4-44a7-9458-72c380a9818f", + "shared only": "d17ffaa1-2c61-4abd-9bb1-2559160d0a5c", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + }, + "ba503a1e-633e-4d0d-ba18-c9a9b1105b5b": { + "connections": { + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "debug", + "nodeType": "ScriptedDecisionNode", + }, + "d17ffaa1-2c61-4abd-9bb1-2559160d0a5c": { + "connections": { + "true": "ba503a1e-633e-4d0d-ba18-c9a9b1105b5b", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": {}, + "e301438c-0bd0-429c-ab0c-66126501069a": {}, + "startNode": {}, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/journey/j01.journey.json 1`] = ` +{ + "trees": { + "j01": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "6674b4ac-dd89-4e13-9440-6f81194e3a22": { + "_id": "6674b4ac-dd89-4e13-9440-6f81194e3a22", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "89ce5d57-82fa-4d58-8d15-0329f7dbd7e7": { + "_id": "89ce5d57-82fa-4d58-8d15-0329f7dbd7e7", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "bb1e96af-f316-4eb0-b1c6-36b3f1af9e35": { + "_id": "bb1e96af-f316-4eb0-b1c6-36b3f1af9e35", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j00", + }, + "bdfbe97c-1ff4-4162-85bc-47f6f14b2c66": { + "_id": "bdfbe97c-1ff4-4162-85bc-47f6f14b2c66", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "e92d5139-b8a6-43dc-9b13-95ba1d0dc53c": { + "_id": "e92d5139-b8a6-43dc-9b13-95ba1d0dc53c", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "f129f0df-b49e-453b-97fb-db508e3893ce": { + "_id": "f129f0df-b49e-453b-97fb-db508e3893ce", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j01", + "enabled": true, + "entryNodeId": "f129f0df-b49e-453b-97fb-db508e3893ce", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "mustRun": false, + "nodes": { + "6674b4ac-dd89-4e13-9440-6f81194e3a22": { + "connections": { + "true": "bb1e96af-f316-4eb0-b1c6-36b3f1af9e35", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + }, + "89ce5d57-82fa-4d58-8d15-0329f7dbd7e7": { + "connections": { + "true": "bdfbe97c-1ff4-4162-85bc-47f6f14b2c66", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + }, + "bb1e96af-f316-4eb0-b1c6-36b3f1af9e35": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + }, + "bdfbe97c-1ff4-4162-85bc-47f6f14b2c66": { + "connections": { + "true": "bb1e96af-f316-4eb0-b1c6-36b3f1af9e35", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + }, + "e92d5139-b8a6-43dc-9b13-95ba1d0dc53c": { + "connections": { + "true": "bb1e96af-f316-4eb0-b1c6-36b3f1af9e35", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + }, + "f129f0df-b49e-453b-97fb-db508e3893ce": { + "connections": { + "level only": "e92d5139-b8a6-43dc-9b13-95ba1d0dc53c", + "none": "bb1e96af-f316-4eb0-b1c6-36b3f1af9e35", + "shared and level": "89ce5d57-82fa-4d58-8d15-0329f7dbd7e7", + "shared only": "6674b4ac-dd89-4e13-9440-6f81194e3a22", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": {}, + "e301438c-0bd0-429c-ab0c-66126501069a": {}, + "startNode": {}, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/journey/j02.journey.json 1`] = ` +{ + "trees": { + "j02": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "2dbd2d37-c659-48cf-8357-c9fc1166e3a7": { + "_id": "2dbd2d37-c659-48cf-8357-c9fc1166e3a7", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "4416aff7-3ebd-47e6-9831-c2f6bbe3ae24": { + "_id": "4416aff7-3ebd-47e6-9831-c2f6bbe3ae24", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "56899fef-92a1-4f2a-ade3-973c81eb3af1": { + "_id": "56899fef-92a1-4f2a-ade3-973c81eb3af1", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j01", + }, + "59b06306-a886-443d-92df-7a27a60c394e": { + "_id": "59b06306-a886-443d-92df-7a27a60c394e", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "cbb3d506-b267-4b99-9edd-363e90aac997": { + "_id": "cbb3d506-b267-4b99-9edd-363e90aac997", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "e0983ead-4918-48f6-858d-9aff0f03759c": { + "_id": "e0983ead-4918-48f6-858d-9aff0f03759c", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j02", + "enabled": true, + "entryNodeId": "59b06306-a886-443d-92df-7a27a60c394e", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "mustRun": false, + "nodes": { + "2dbd2d37-c659-48cf-8357-c9fc1166e3a7": { + "connections": { + "true": "56899fef-92a1-4f2a-ade3-973c81eb3af1", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + }, + "4416aff7-3ebd-47e6-9831-c2f6bbe3ae24": { + "connections": { + "true": "56899fef-92a1-4f2a-ade3-973c81eb3af1", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + }, + "56899fef-92a1-4f2a-ade3-973c81eb3af1": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + }, + "59b06306-a886-443d-92df-7a27a60c394e": { + "connections": { + "level only": "4416aff7-3ebd-47e6-9831-c2f6bbe3ae24", + "none": "56899fef-92a1-4f2a-ade3-973c81eb3af1", + "shared and level": "e0983ead-4918-48f6-858d-9aff0f03759c", + "shared only": "cbb3d506-b267-4b99-9edd-363e90aac997", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + }, + "cbb3d506-b267-4b99-9edd-363e90aac997": { + "connections": { + "true": "56899fef-92a1-4f2a-ade3-973c81eb3af1", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + }, + "e0983ead-4918-48f6-858d-9aff0f03759c": { + "connections": { + "true": "2dbd2d37-c659-48cf-8357-c9fc1166e3a7", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": {}, + "e301438c-0bd0-429c-ab0c-66126501069a": {}, + "startNode": {}, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/journey/j03.journey.json 1`] = ` +{ + "trees": { + "j03": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "35a4f94b-c895-46b9-bc0a-93cf59233759": { + "_id": "35a4f94b-c895-46b9-bc0a-93cf59233759", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "3a92300d-6d64-451d-8156-30cb51781026": { + "_id": "3a92300d-6d64-451d-8156-30cb51781026", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "6f9de973-9ed4-41f5-b43d-4036041e2b96": { + "_id": "6f9de973-9ed4-41f5-b43d-4036041e2b96", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "bcb8c535-5ecd-4d3d-b970-26816de96bf2": { + "_id": "bcb8c535-5ecd-4d3d-b970-26816de96bf2", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j02", + }, + "e0cfbd13-6f1e-4924-9d2d-0f7c23507172": { + "_id": "e0cfbd13-6f1e-4924-9d2d-0f7c23507172", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "fae7424e-13c9-45bd-b3a2-045773671a3f": { + "_id": "fae7424e-13c9-45bd-b3a2-045773671a3f", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j03", + "enabled": true, + "entryNodeId": "e0cfbd13-6f1e-4924-9d2d-0f7c23507172", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "mustRun": false, + "nodes": { + "35a4f94b-c895-46b9-bc0a-93cf59233759": { + "connections": { + "true": "bcb8c535-5ecd-4d3d-b970-26816de96bf2", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + }, + "3a92300d-6d64-451d-8156-30cb51781026": { + "connections": { + "true": "bcb8c535-5ecd-4d3d-b970-26816de96bf2", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + }, + "6f9de973-9ed4-41f5-b43d-4036041e2b96": { + "connections": { + "true": "3a92300d-6d64-451d-8156-30cb51781026", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + }, + "bcb8c535-5ecd-4d3d-b970-26816de96bf2": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + }, + "e0cfbd13-6f1e-4924-9d2d-0f7c23507172": { + "connections": { + "level only": "35a4f94b-c895-46b9-bc0a-93cf59233759", + "none": "bcb8c535-5ecd-4d3d-b970-26816de96bf2", + "shared and level": "6f9de973-9ed4-41f5-b43d-4036041e2b96", + "shared only": "fae7424e-13c9-45bd-b3a2-045773671a3f", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + }, + "fae7424e-13c9-45bd-b3a2-045773671a3f": { + "connections": { + "true": "bcb8c535-5ecd-4d3d-b970-26816de96bf2", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": {}, + "e301438c-0bd0-429c-ab0c-66126501069a": {}, + "startNode": {}, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/journey/j04.journey.json 1`] = ` +{ + "trees": { + "j04": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "00e75aa0-2f9b-4895-9257-d515286fd64b": { + "_id": "00e75aa0-2f9b-4895-9257-d515286fd64b", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j03", + }, + "040b6c89-313b-4664-92e0-6732017384b8": { + "_id": "040b6c89-313b-4664-92e0-6732017384b8", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "69ae8ec1-de43-44ac-98e5-733db80ac176": { + "_id": "69ae8ec1-de43-44ac-98e5-733db80ac176", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "9603ef52-30f0-4ddc-b3c0-28dac83c7bdb": { + "_id": "9603ef52-30f0-4ddc-b3c0-28dac83c7bdb", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "d10104e9-1f8d-4da6-a110-28d879d13959": { + "_id": "d10104e9-1f8d-4da6-a110-28d879d13959", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "f5c317ce-fabd-4a10-9907-c71cea037844": { + "_id": "f5c317ce-fabd-4a10-9907-c71cea037844", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j04", + "enabled": true, + "entryNodeId": "040b6c89-313b-4664-92e0-6732017384b8", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "mustRun": false, + "nodes": { + "00e75aa0-2f9b-4895-9257-d515286fd64b": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + }, + "040b6c89-313b-4664-92e0-6732017384b8": { + "connections": { + "level only": "d10104e9-1f8d-4da6-a110-28d879d13959", + "none": "00e75aa0-2f9b-4895-9257-d515286fd64b", + "shared and level": "f5c317ce-fabd-4a10-9907-c71cea037844", + "shared only": "9603ef52-30f0-4ddc-b3c0-28dac83c7bdb", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + }, + "69ae8ec1-de43-44ac-98e5-733db80ac176": { + "connections": { + "true": "00e75aa0-2f9b-4895-9257-d515286fd64b", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + }, + "9603ef52-30f0-4ddc-b3c0-28dac83c7bdb": { + "connections": { + "true": "00e75aa0-2f9b-4895-9257-d515286fd64b", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + }, + "d10104e9-1f8d-4da6-a110-28d879d13959": { + "connections": { + "true": "00e75aa0-2f9b-4895-9257-d515286fd64b", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + }, + "f5c317ce-fabd-4a10-9907-c71cea037844": { + "connections": { + "true": "69ae8ec1-de43-44ac-98e5-733db80ac176", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": {}, + "e301438c-0bd0-429c-ab0c-66126501069a": {}, + "startNode": {}, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/journey/j05.journey.json 1`] = ` +{ + "trees": { + "j05": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "11f1c31c-50a9-4717-8213-420f6932481f": { + "_id": "11f1c31c-50a9-4717-8213-420f6932481f", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "3c106772-ace7-4808-8f3a-9840de8f67f0": { + "_id": "3c106772-ace7-4808-8f3a-9840de8f67f0", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "622179cb-98f1-484a-820d-9a0df6e45e95": { + "_id": "622179cb-98f1-484a-820d-9a0df6e45e95", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "a0782616-84b7-4bf5-87ed-a01fb3018563": { + "_id": "a0782616-84b7-4bf5-87ed-a01fb3018563", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "e90ae257-c279-46e0-9b43-5ecd89784d77": { + "_id": "e90ae257-c279-46e0-9b43-5ecd89784d77", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "f17ecb7c-abc3-4523-9943-4cbdd90305cb": { + "_id": "f17ecb7c-abc3-4523-9943-4cbdd90305cb", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j04", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j05", + "enabled": true, + "entryNodeId": "622179cb-98f1-484a-820d-9a0df6e45e95", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "mustRun": false, + "nodes": { + "11f1c31c-50a9-4717-8213-420f6932481f": { + "connections": { + "true": "e90ae257-c279-46e0-9b43-5ecd89784d77", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + }, + "3c106772-ace7-4808-8f3a-9840de8f67f0": { + "connections": { + "true": "f17ecb7c-abc3-4523-9943-4cbdd90305cb", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + }, + "622179cb-98f1-484a-820d-9a0df6e45e95": { + "connections": { + "level only": "3c106772-ace7-4808-8f3a-9840de8f67f0", + "none": "f17ecb7c-abc3-4523-9943-4cbdd90305cb", + "shared and level": "11f1c31c-50a9-4717-8213-420f6932481f", + "shared only": "a0782616-84b7-4bf5-87ed-a01fb3018563", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + }, + "a0782616-84b7-4bf5-87ed-a01fb3018563": { + "connections": { + "true": "f17ecb7c-abc3-4523-9943-4cbdd90305cb", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + }, + "e90ae257-c279-46e0-9b43-5ecd89784d77": { + "connections": { + "true": "f17ecb7c-abc3-4523-9943-4cbdd90305cb", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + }, + "f17ecb7c-abc3-4523-9943-4cbdd90305cb": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": {}, + "e301438c-0bd0-429c-ab0c-66126501069a": {}, + "startNode": {}, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/journey/j06.journey.json 1`] = ` +{ + "trees": { + "j06": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "1d59caff-243c-45bd-b7d0-6dcc563989c5": { + "_id": "1d59caff-243c-45bd-b7d0-6dcc563989c5", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "2de08e9e-bf7b-4fa1-8265-59a8e4a3f7c3": { + "_id": "2de08e9e-bf7b-4fa1-8265-59a8e4a3f7c3", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "409c251f-c23b-411d-9009-d3b3d26d1b90": { + "_id": "409c251f-c23b-411d-9009-d3b3d26d1b90", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j05", + }, + "44b8651c-7c1e-41f1-b9a6-2e441b0ce05a": { + "_id": "44b8651c-7c1e-41f1-b9a6-2e441b0ce05a", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "da878771-421c-463f-aad7-4d5f2ad5e59a": { + "_id": "da878771-421c-463f-aad7-4d5f2ad5e59a", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "fe8f27df-8a27-4d88-9196-834ce398b2b7": { + "_id": "fe8f27df-8a27-4d88-9196-834ce398b2b7", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j06", + "enabled": true, + "entryNodeId": "44b8651c-7c1e-41f1-b9a6-2e441b0ce05a", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "mustRun": false, + "nodes": { + "1d59caff-243c-45bd-b7d0-6dcc563989c5": { + "connections": { + "true": "2de08e9e-bf7b-4fa1-8265-59a8e4a3f7c3", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + }, + "2de08e9e-bf7b-4fa1-8265-59a8e4a3f7c3": { + "connections": { + "true": "409c251f-c23b-411d-9009-d3b3d26d1b90", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + }, + "409c251f-c23b-411d-9009-d3b3d26d1b90": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + }, + "44b8651c-7c1e-41f1-b9a6-2e441b0ce05a": { + "connections": { + "level only": "fe8f27df-8a27-4d88-9196-834ce398b2b7", + "none": "409c251f-c23b-411d-9009-d3b3d26d1b90", + "shared and level": "1d59caff-243c-45bd-b7d0-6dcc563989c5", + "shared only": "da878771-421c-463f-aad7-4d5f2ad5e59a", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + }, + "da878771-421c-463f-aad7-4d5f2ad5e59a": { + "connections": { + "true": "409c251f-c23b-411d-9009-d3b3d26d1b90", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + }, + "fe8f27df-8a27-4d88-9196-834ce398b2b7": { + "connections": { + "true": "409c251f-c23b-411d-9009-d3b3d26d1b90", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": {}, + "e301438c-0bd0-429c-ab0c-66126501069a": {}, + "startNode": {}, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/journey/j07.journey.json 1`] = ` +{ + "trees": { + "j07": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "13b12fe6-cf53-46a4-a83d-0a3c1fda814f": { + "_id": "13b12fe6-cf53-46a4-a83d-0a3c1fda814f", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "ac6ee166-73c0-4f73-b8db-4fe8ff6a25c0": { + "_id": "ac6ee166-73c0-4f73-b8db-4fe8ff6a25c0", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "d90dd9f8-8b12-4e90-abaf-228ecc0174a7": { + "_id": "d90dd9f8-8b12-4e90-abaf-228ecc0174a7", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "d9a06d3a-7e3f-4244-9a32-63ffa0d26e00": { + "_id": "d9a06d3a-7e3f-4244-9a32-63ffa0d26e00", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "e62d7a4d-2012-4a2a-a6ef-d6a0e0d552d9": { + "_id": "e62d7a4d-2012-4a2a-a6ef-d6a0e0d552d9", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j06", + }, + "f2fe740c-cd75-460a-8baa-fe4b52ecc947": { + "_id": "f2fe740c-cd75-460a-8baa-fe4b52ecc947", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j07", + "enabled": true, + "entryNodeId": "13b12fe6-cf53-46a4-a83d-0a3c1fda814f", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "mustRun": false, + "nodes": { + "13b12fe6-cf53-46a4-a83d-0a3c1fda814f": { + "connections": { + "level only": "d90dd9f8-8b12-4e90-abaf-228ecc0174a7", + "none": "e62d7a4d-2012-4a2a-a6ef-d6a0e0d552d9", + "shared and level": "d9a06d3a-7e3f-4244-9a32-63ffa0d26e00", + "shared only": "ac6ee166-73c0-4f73-b8db-4fe8ff6a25c0", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + }, + "ac6ee166-73c0-4f73-b8db-4fe8ff6a25c0": { + "connections": { + "true": "e62d7a4d-2012-4a2a-a6ef-d6a0e0d552d9", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + }, + "d90dd9f8-8b12-4e90-abaf-228ecc0174a7": { + "connections": { + "true": "e62d7a4d-2012-4a2a-a6ef-d6a0e0d552d9", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + }, + "d9a06d3a-7e3f-4244-9a32-63ffa0d26e00": { + "connections": { + "true": "f2fe740c-cd75-460a-8baa-fe4b52ecc947", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + }, + "e62d7a4d-2012-4a2a-a6ef-d6a0e0d552d9": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + }, + "f2fe740c-cd75-460a-8baa-fe4b52ecc947": { + "connections": { + "true": "e62d7a4d-2012-4a2a-a6ef-d6a0e0d552d9", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": {}, + "e301438c-0bd0-429c-ab0c-66126501069a": {}, + "startNode": {}, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/journey/j08.journey.json 1`] = ` +{ + "trees": { + "j08": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "042b600b-71cb-45a8-93ae-a6f57b16a6e5": { + "_id": "042b600b-71cb-45a8-93ae-a6f57b16a6e5", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "66026170-5088-4fcd-a6c8-ed89d7a5c79d": { + "_id": "66026170-5088-4fcd-a6c8-ed89d7a5c79d", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j07", + }, + "8096649e-973e-4209-88ce-e1d87ae2bb96": { + "_id": "8096649e-973e-4209-88ce-e1d87ae2bb96", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "87ced99b-bfa5-40d4-ba07-c8fc31f6cc6d": { + "_id": "87ced99b-bfa5-40d4-ba07-c8fc31f6cc6d", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "948e21f4-c512-450a-9d42-e0d629217834": { + "_id": "948e21f4-c512-450a-9d42-e0d629217834", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "d429b2b5-b215-46a5-b239-4994df65cb8b": { + "_id": "d429b2b5-b215-46a5-b239-4994df65cb8b", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j08", + "enabled": true, + "entryNodeId": "d429b2b5-b215-46a5-b239-4994df65cb8b", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "mustRun": false, + "nodes": { + "042b600b-71cb-45a8-93ae-a6f57b16a6e5": { + "connections": { + "true": "87ced99b-bfa5-40d4-ba07-c8fc31f6cc6d", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + }, + "66026170-5088-4fcd-a6c8-ed89d7a5c79d": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + }, + "8096649e-973e-4209-88ce-e1d87ae2bb96": { + "connections": { + "true": "66026170-5088-4fcd-a6c8-ed89d7a5c79d", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + }, + "87ced99b-bfa5-40d4-ba07-c8fc31f6cc6d": { + "connections": { + "true": "66026170-5088-4fcd-a6c8-ed89d7a5c79d", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + }, + "948e21f4-c512-450a-9d42-e0d629217834": { + "connections": { + "true": "66026170-5088-4fcd-a6c8-ed89d7a5c79d", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + }, + "d429b2b5-b215-46a5-b239-4994df65cb8b": { + "connections": { + "level only": "8096649e-973e-4209-88ce-e1d87ae2bb96", + "none": "66026170-5088-4fcd-a6c8-ed89d7a5c79d", + "shared and level": "042b600b-71cb-45a8-93ae-a6f57b16a6e5", + "shared only": "948e21f4-c512-450a-9d42-e0d629217834", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": {}, + "e301438c-0bd0-429c-ab0c-66126501069a": {}, + "startNode": {}, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/journey/j09.journey.json 1`] = ` +{ + "trees": { + "j09": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "251f35c3-1a32-4520-be10-1f4af9600935": { + "_id": "251f35c3-1a32-4520-be10-1f4af9600935", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + "56b82371-0c61-4dc3-8d06-c1158415b8f9": { + "_id": "56b82371-0c61-4dc3-8d06-c1158415b8f9", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "6df24fdd-0b6c-4def-bf42-77af998f28b8": { + "_id": "6df24fdd-0b6c-4def-bf42-77af998f28b8", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j08", + }, + "8c5e9cb5-471b-4dd6-b150-ecaaeda98195": { + "_id": "8c5e9cb5-471b-4dd6-b150-ecaaeda98195", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "bb294e05-6b6b-4478-b46f-b8d9e7711c66": { + "_id": "bb294e05-6b6b-4478-b46f-b8d9e7711c66", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "f57cf53c-b4c6-48f7-84e8-91f535a2e8f8": { + "_id": "f57cf53c-b4c6-48f7-84e8-91f535a2e8f8", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j09", + "enabled": true, + "entryNodeId": "251f35c3-1a32-4520-be10-1f4af9600935", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "mustRun": false, + "nodes": { + "251f35c3-1a32-4520-be10-1f4af9600935": { + "connections": { + "level only": "56b82371-0c61-4dc3-8d06-c1158415b8f9", + "none": "6df24fdd-0b6c-4def-bf42-77af998f28b8", + "shared and level": "8c5e9cb5-471b-4dd6-b150-ecaaeda98195", + "shared only": "f57cf53c-b4c6-48f7-84e8-91f535a2e8f8", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + }, + "56b82371-0c61-4dc3-8d06-c1158415b8f9": { + "connections": { + "true": "6df24fdd-0b6c-4def-bf42-77af998f28b8", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + }, + "6df24fdd-0b6c-4def-bf42-77af998f28b8": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + }, + "8c5e9cb5-471b-4dd6-b150-ecaaeda98195": { + "connections": { + "true": "bb294e05-6b6b-4478-b46f-b8d9e7711c66", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + }, + "bb294e05-6b6b-4478-b46f-b8d9e7711c66": { + "connections": { + "true": "6df24fdd-0b6c-4def-bf42-77af998f28b8", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + }, + "f57cf53c-b4c6-48f7-84e8-91f535a2e8f8": { + "connections": { + "true": "6df24fdd-0b6c-4def-bf42-77af998f28b8", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": {}, + "e301438c-0bd0-429c-ab0c-66126501069a": {}, + "startNode": {}, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/journey/j10.journey.json 1`] = ` +{ + "trees": { + "j10": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": { + "300feda0-3248-49a9-b60f-01df802b2229": { + "_id": "300feda0-3248-49a9-b60f-01df802b2229", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "40afb384-e9b6-4dcb-acde-04de109474c8": { + "_id": "40afb384-e9b6-4dcb-acde-04de109474c8", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "8d7d64ee-da20-461f-a2ca-206b7479dd67": { + "_id": "8d7d64ee-da20-461f-a2ca-206b7479dd67", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "41c24257-d7fc-4654-8b46-c2666dc5b56d", + }, + "97ef9d96-99e7-4d2d-b6c6-4177b5397ead": { + "_id": "97ef9d96-99e7-4d2d-b6c6-4177b5397ead", + "_outcomes": [ + { + "displayName": "true", + "id": "true", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + ], + "outcomes": [ + "true", + ], + "outputs": [ + "*", + ], + "script": "1b52a7e0-4019-40fa-958a-15a49870e901", + }, + "c7fcf7ae-1ab5-474b-b5b0-272e10468fbd": { + "_id": "c7fcf7ae-1ab5-474b-b5b0-272e10468fbd", + "_outcomes": [ + { + "displayName": "True", + "id": "true", + }, + { + "displayName": "False", + "id": "false", + }, + ], + "_type": { + "_id": "InnerTreeEvaluatorNode", + "collection": true, + "name": "Inner Tree Evaluator", + }, + "tree": "j09", + }, + "c91d626e-1156-41bd-b1fb-d292f640fba6": { + "_id": "c91d626e-1156-41bd-b1fb-d292f640fba6", + "_outcomes": [ + { + "displayName": "shared and level", + "id": "shared and level", + }, + { + "displayName": "shared only", + "id": "shared only", + }, + { + "displayName": "level only", + "id": "level only", + }, + { + "displayName": "none", + "id": "none", + }, + ], + "_type": { + "_id": "ScriptedDecisionNode", + "collection": true, + "name": "Scripted Decision", + }, + "inputs": [ + "*", + "mode", + "level", + ], + "outcomes": [ + "shared and level", + "shared only", + "level only", + "none", + ], + "outputs": [ + "*", + "mode", + "level", + ], + "script": "5bbdaeff-ddee-44b9-b608-8d413d7d65a6", + }, + }, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "j10", + "enabled": true, + "entryNodeId": "c91d626e-1156-41bd-b1fb-d292f640fba6", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "mustRun": false, + "nodes": { + "300feda0-3248-49a9-b60f-01df802b2229": { + "connections": { + "true": "c7fcf7ae-1ab5-474b-b5b0-272e10468fbd", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + }, + "40afb384-e9b6-4dcb-acde-04de109474c8": { + "connections": { + "true": "c7fcf7ae-1ab5-474b-b5b0-272e10468fbd", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + }, + "8d7d64ee-da20-461f-a2ca-206b7479dd67": { + "connections": { + "true": "c7fcf7ae-1ab5-474b-b5b0-272e10468fbd", + }, + "displayName": "level", + "nodeType": "ScriptedDecisionNode", + }, + "97ef9d96-99e7-4d2d-b6c6-4177b5397ead": { + "connections": { + "true": "8d7d64ee-da20-461f-a2ca-206b7479dd67", + }, + "displayName": "shared", + "nodeType": "ScriptedDecisionNode", + }, + "c7fcf7ae-1ab5-474b-b5b0-272e10468fbd": { + "connections": { + "false": "e301438c-0bd0-429c-ab0c-66126501069a", + "true": "e301438c-0bd0-429c-ab0c-66126501069a", + }, + "displayName": "nest", + "nodeType": "InnerTreeEvaluatorNode", + }, + "c91d626e-1156-41bd-b1fb-d292f640fba6": { + "connections": { + "level only": "300feda0-3248-49a9-b60f-01df802b2229", + "none": "c7fcf7ae-1ab5-474b-b5b0-272e10468fbd", + "shared and level": "97ef9d96-99e7-4d2d-b6c6-4177b5397ead", + "shared only": "40afb384-e9b6-4dcb-acde-04de109474c8", + }, + "displayName": "mode", + "nodeType": "ScriptedDecisionNode", + }, + }, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": {}, + "e301438c-0bd0-429c-ab0c-66126501069a": {}, + "startNode": {}, + }, + "uiConfig": { + "categories": "[]", + }, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/journey/test.journey.json 1`] = ` +{ + "trees": { + "test": { + "circlesOfTrust": {}, + "emailTemplates": {}, + "innerNodes": {}, + "nodes": {}, + "saml2Entities": {}, + "scripts": {}, + "socialIdentityProviders": {}, + "themes": [], + "tree": { + "_id": "test", + "enabled": true, + "entryNodeId": "d26176be-ea6f-4f2a-81cd-3d41dd6cee4d", + "identityResource": "managed/alpha_user", + "innerTreeOnly": false, + "mustRun": false, + "nodes": {}, + "staticNodes": { + "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": {}, + "e301438c-0bd0-429c-ab0c-66126501069a": {}, + "startNode": {}, + }, + "uiConfig": {}, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/oauth2.app/0b48992b-a2dd-4ed5-8b07-1fc5d7306da8.oauth2.app.json 1`] = ` +{ + "application": { + "0b48992b-a2dd-4ed5-8b07-1fc5d7306da8": { + "_id": "0b48992b-a2dd-4ed5-8b07-1fc5d7306da8", + "_provider": { + "_id": "", + "_type": { + "_id": "oauth-oidc", + "collection": false, + "name": "OAuth2 Provider", + }, + "advancedOAuth2Config": { + "allowClientCredentialsInTokenRequestQueryParameters": true, + "allowedAudienceValues": [], + "authenticationAttributes": [ + "uid", + ], + "codeVerifierEnforced": "false", + "defaultScopes": [ + "address", + "phone", + "openid", + "profile", + "email", + ], + "displayNameAttribute": "cn", + "expClaimRequiredInRequestObject": false, + "grantTypes": [ + "implicit", + "urn:ietf:params:oauth:grant-type:saml2-bearer", + "refresh_token", + "password", + "client_credentials", + "urn:ietf:params:oauth:grant-type:device_code", + "authorization_code", + "urn:openid:params:grant-type:ciba", + "urn:ietf:params:oauth:grant-type:uma-ticket", + "urn:ietf:params:oauth:grant-type:jwt-bearer", + ], + "hashSalt": "&{am.oidc.client.subject.identifier.hash.salt}", + "includeClientIdClaimInStatelessTokens": true, + "includeSubnameInTokenClaims": true, + "macaroonTokenFormat": "V2", + "maxAgeOfRequestObjectNbfClaim": 0, + "maxDifferenceBetweenRequestObjectNbfAndExp": 0, + "moduleMessageEnabledInPasswordGrant": false, + "nbfClaimRequiredInRequestObject": false, + "parRequestUriLifetime": 90, + "passwordGrantAuthService": "Login", + "persistentClaims": [], + "refreshTokenGracePeriod": 0, + "requestObjectProcessing": "OIDC", + "requirePushedAuthorizationRequests": false, + "responseTypeClasses": [ + "code|org.forgerock.oauth2.core.AuthorizationCodeResponseTypeHandler", + "device_code|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "token|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "id_token|org.forgerock.openidconnect.IdTokenResponseTypeHandler", + ], + "supportedScopes": [ + "email|Your email address", + "openid|", + "address|Your postal address", + "phone|Your telephone number(s)", + "profile|Your personal information", + "fr:idm:*", + "am-introspect-all-tokens", + ], + "supportedSubjectTypes": [ + "public", + "pairwise", + ], + "tlsCertificateBoundAccessTokensEnabled": true, + "tlsCertificateRevocationCheckingEnabled": false, + "tlsClientCertificateHeaderFormat": "URLENCODED_PEM", + "tokenCompressionEnabled": false, + "tokenEncryptionEnabled": false, + "tokenExchangeClasses": [ + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToAccessTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToAccessTokenExchanger", + ], + "tokenSigningAlgorithm": "HS256", + "tokenValidatorClasses": [ + "urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.OidcIdTokenValidator", + "urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.OAuth2AccessTokenValidator", + ], + }, + "advancedOIDCConfig": { + "alwaysAddClaimsToToken": true, + "amrMappings": {}, + "authorisedIdmDelegationClients": [], + "authorisedOpenIdConnectSSOClients": [], + "claimsParameterSupported": false, + "defaultACR": [], + "idTokenInfoClientAuthenticationEnabled": true, + "includeAllKtyAlgCombinationsInJwksUri": false, + "loaMapping": {}, + "storeOpsTokens": true, + "supportedAuthorizationResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedAuthorizationResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedAuthorizationResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRequestParameterEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRequestParameterEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRequestParameterSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenEndpointAuthenticationSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenIntrospectionResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedTokenIntrospectionResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedTokenIntrospectionResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedUserInfoEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedUserInfoEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedUserInfoSigningAlgorithms": [ + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + ], + "useForceAuthnForMaxAge": false, + "useForceAuthnForPromptLogin": false, + }, + "cibaConfig": { + "cibaAuthReqIdLifetime": 600, + "cibaMinimumPollingInterval": 2, + "supportedCibaSigningAlgorithms": [ + "ES256", + "PS256", + ], + }, + "clientDynamicRegistrationConfig": { + "allowDynamicRegistration": false, + "dynamicClientRegistrationScope": "dynamic_client_registration", + "dynamicClientRegistrationSoftwareStatementRequired": false, + "generateRegistrationAccessTokens": true, + "requiredSoftwareStatementAttestedAttributes": [ + "redirect_uris", + ], + }, + "consent": { + "clientsCanSkipConsent": true, + "enableRemoteConsent": false, + "supportedRcsRequestEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsRequestEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsRequestSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRcsResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsResponseEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsResponseSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "coreOAuth2Config": { + "accessTokenLifetime": 3600, + "accessTokenMayActScript": "[Empty]", + "codeLifetime": 120, + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "macaroonTokensEnabled": false, + "oidcMayActScript": "[Empty]", + "refreshTokenLifetime": 604800, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": true, + "usePolicyEngineForScope": false, + }, + "coreOIDCConfig": { + "jwtTokenLifetime": 3600, + "oidcDiscoveryEndpointEnabled": true, + "overrideableOIDCClaims": [], + "supportedClaims": [], + "supportedIDTokenEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedIDTokenEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedIDTokenSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "deviceCodeConfig": { + "deviceCodeLifetime": 300, + "devicePollInterval": 5, + "deviceUserCodeCharacterSet": "234567ACDEFGHJKLMNPQRSTWXYZabcdefhijkmnopqrstwxyz", + "deviceUserCodeLength": 8, + }, + "pluginsConfig": { + "accessTokenEnricherClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "accessTokenModificationPluginType": "SCRIPTED", + "accessTokenModificationScript": "39c08084-1238-43e8-857f-2e11005eac49", + "accessTokenModifierClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderPluginType": "JAVA", + "authorizeEndpointDataProviderScript": "[Empty]", + "evaluateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "evaluateScopePluginType": "JAVA", + "evaluateScopeScript": "[Empty]", + "oidcClaimsClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "oidcClaimsPluginType": "SCRIPTED", + "oidcClaimsScript": "cf3515f0-8278-4ee3-a530-1bad7424c416", + "userCodeGeneratorClass": "org.forgerock.oauth2.core.plugins.registry.DefaultUserCodeGenerator", + "validateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "validateScopePluginType": "JAVA", + "validateScopeScript": "[Empty]", + }, + }, + "_type": { + "_id": "OAuth2Client", + "collection": true, + "name": "OAuth2 Clients", + }, + "advancedOAuth2ClientConfig": { + "clientUri": [], + "contacts": [], + "customProperties": [], + "descriptions": [ + "Created by Frodo on 3/20/2024, 9:30:37 AM", + ], + "grantTypes": [ + "client_credentials", + ], + "isConsentImplied": true, + "javascriptOrigins": [], + "logoUri": [], + "mixUpMitigation": false, + "name": [], + "policyUri": [], + "refreshTokenGracePeriod": 0, + "requestUris": [], + "require_pushed_authorization_requests": false, + "responseTypes": [ + "token", + ], + "sectorIdentifierUri": null, + "softwareIdentity": null, + "softwareVersion": null, + "subjectType": "Public", + "tokenEndpointAuthMethod": "client_secret_basic", + "tokenExchangeAuthLevel": 0, + "tosURI": [], + "updateAccessToken": null, + }, + "coreOAuth2ClientConfig": { + "accessTokenLifetime": 315360000, + "authorizationCodeLifetime": 120, + "clientName": [ + "0b48992b-a2dd-4ed5-8b07-1fc5d7306da8", + ], + "clientType": "Confidential", + "defaultScopes": [ + "fr:idm:*", + ], + "loopbackInterfaceRedirection": false, + "redirectionUris": [], + "refreshTokenLifetime": 604800, + "scopes": [ + "fr:idm:*", + "fr:idc:esv:*", + "dynamic_client_registration", + ], + "status": "Active", + "userpassword": null, + }, + "coreOpenIDClientConfig": { + "backchannel_logout_session_required": false, + "backchannel_logout_uri": null, + "claims": [], + "clientSessionUri": null, + "defaultAcrValues": [], + "defaultMaxAge": 600, + "defaultMaxAgeEnabled": false, + "jwtTokenLifetime": 3600, + "postLogoutRedirectUri": [], + }, + "coreUmaClientConfig": { + "claimsRedirectionUris": [], + }, + "overrideOAuth2ClientConfig": { + "accessTokenMayActScript": "[Empty]", + "accessTokenModificationPluginType": "PROVIDER", + "accessTokenModificationScript": "[Empty]", + "authorizeEndpointDataProviderClass": "org.forgerock.oauth2.core.plugins.registry.DefaultEndpointDataProvider", + "authorizeEndpointDataProviderPluginType": "PROVIDER", + "authorizeEndpointDataProviderScript": "[Empty]", + "clientsCanSkipConsent": false, + "enableRemoteConsent": false, + "evaluateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeEvaluator", + "evaluateScopePluginType": "PROVIDER", + "evaluateScopeScript": "[Empty]", + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "oidcClaimsPluginType": "PROVIDER", + "oidcClaimsScript": "[Empty]", + "oidcMayActScript": "[Empty]", + "overrideableOIDCClaims": [], + "providerOverridesEnabled": false, + "remoteConsentServiceId": null, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": false, + "tokenEncryptionEnabled": false, + "useForceAuthnForMaxAge": false, + "usePolicyEngineForScope": false, + "validateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeValidator", + "validateScopePluginType": "PROVIDER", + "validateScopeScript": "[Empty]", + }, + "signEncOAuth2ClientConfig": { + "authorizationResponseEncryptionAlgorithm": null, + "authorizationResponseEncryptionMethod": null, + "authorizationResponseSigningAlgorithm": "RS256", + "clientJwtPublicKey": null, + "idTokenEncryptionAlgorithm": "RSA-OAEP-256", + "idTokenEncryptionEnabled": false, + "idTokenEncryptionMethod": "A128CBC-HS256", + "idTokenPublicEncryptionKey": null, + "idTokenSignedResponseAlg": "RS256", + "jwkSet": null, + "jwkStoreCacheMissCacheTime": 60000, + "jwksCacheTimeout": 3600000, + "jwksUri": null, + "mTLSCertificateBoundAccessTokens": false, + "mTLSSubjectDN": null, + "mTLSTrustedCert": null, + "publicKeyLocation": "jwks_uri", + "requestParameterEncryptedAlg": null, + "requestParameterEncryptedEncryptionAlgorithm": "A128CBC-HS256", + "requestParameterSignedAlg": null, + "tokenEndpointAuthSigningAlgorithm": "RS256", + "tokenIntrospectionEncryptedResponseAlg": "RSA-OAEP-256", + "tokenIntrospectionEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "tokenIntrospectionResponseFormat": "JSON", + "tokenIntrospectionSignedResponseAlg": "RS256", + "userinfoEncryptedResponseAlg": null, + "userinfoEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "userinfoResponseFormat": "JSON", + "userinfoSignedResponseAlg": null, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/oauth2.app/49a2981c-e192-4739-a0e6-c7582168bdf5.oauth2.app.json 1`] = ` +{ + "application": { + "49a2981c-e192-4739-a0e6-c7582168bdf5": { + "_id": "49a2981c-e192-4739-a0e6-c7582168bdf5", + "_provider": { + "_id": "", + "_type": { + "_id": "oauth-oidc", + "collection": false, + "name": "OAuth2 Provider", + }, + "advancedOAuth2Config": { + "allowClientCredentialsInTokenRequestQueryParameters": true, + "allowedAudienceValues": [], + "authenticationAttributes": [ + "uid", + ], + "codeVerifierEnforced": "false", + "defaultScopes": [ + "address", + "phone", + "openid", + "profile", + "email", + ], + "displayNameAttribute": "cn", + "expClaimRequiredInRequestObject": false, + "grantTypes": [ + "implicit", + "urn:ietf:params:oauth:grant-type:saml2-bearer", + "refresh_token", + "password", + "client_credentials", + "urn:ietf:params:oauth:grant-type:device_code", + "authorization_code", + "urn:openid:params:grant-type:ciba", + "urn:ietf:params:oauth:grant-type:uma-ticket", + "urn:ietf:params:oauth:grant-type:jwt-bearer", + ], + "hashSalt": "&{am.oidc.client.subject.identifier.hash.salt}", + "includeClientIdClaimInStatelessTokens": true, + "includeSubnameInTokenClaims": true, + "macaroonTokenFormat": "V2", + "maxAgeOfRequestObjectNbfClaim": 0, + "maxDifferenceBetweenRequestObjectNbfAndExp": 0, + "moduleMessageEnabledInPasswordGrant": false, + "nbfClaimRequiredInRequestObject": false, + "parRequestUriLifetime": 90, + "passwordGrantAuthService": "Login", + "persistentClaims": [], + "refreshTokenGracePeriod": 0, + "requestObjectProcessing": "OIDC", + "requirePushedAuthorizationRequests": false, + "responseTypeClasses": [ + "code|org.forgerock.oauth2.core.AuthorizationCodeResponseTypeHandler", + "device_code|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "token|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "id_token|org.forgerock.openidconnect.IdTokenResponseTypeHandler", + ], + "supportedScopes": [ + "email|Your email address", + "openid|", + "address|Your postal address", + "phone|Your telephone number(s)", + "profile|Your personal information", + "fr:idm:*", + "am-introspect-all-tokens", + ], + "supportedSubjectTypes": [ + "public", + "pairwise", + ], + "tlsCertificateBoundAccessTokensEnabled": true, + "tlsCertificateRevocationCheckingEnabled": false, + "tlsClientCertificateHeaderFormat": "URLENCODED_PEM", + "tokenCompressionEnabled": false, + "tokenEncryptionEnabled": false, + "tokenExchangeClasses": [ + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToAccessTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToAccessTokenExchanger", + ], + "tokenSigningAlgorithm": "HS256", + "tokenValidatorClasses": [ + "urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.OidcIdTokenValidator", + "urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.OAuth2AccessTokenValidator", + ], + }, + "advancedOIDCConfig": { + "alwaysAddClaimsToToken": true, + "amrMappings": {}, + "authorisedIdmDelegationClients": [], + "authorisedOpenIdConnectSSOClients": [], + "claimsParameterSupported": false, + "defaultACR": [], + "idTokenInfoClientAuthenticationEnabled": true, + "includeAllKtyAlgCombinationsInJwksUri": false, + "loaMapping": {}, + "storeOpsTokens": true, + "supportedAuthorizationResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedAuthorizationResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedAuthorizationResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRequestParameterEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRequestParameterEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRequestParameterSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenEndpointAuthenticationSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenIntrospectionResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedTokenIntrospectionResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedTokenIntrospectionResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedUserInfoEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedUserInfoEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedUserInfoSigningAlgorithms": [ + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + ], + "useForceAuthnForMaxAge": false, + "useForceAuthnForPromptLogin": false, + }, + "cibaConfig": { + "cibaAuthReqIdLifetime": 600, + "cibaMinimumPollingInterval": 2, + "supportedCibaSigningAlgorithms": [ + "ES256", + "PS256", + ], + }, + "clientDynamicRegistrationConfig": { + "allowDynamicRegistration": false, + "dynamicClientRegistrationScope": "dynamic_client_registration", + "dynamicClientRegistrationSoftwareStatementRequired": false, + "generateRegistrationAccessTokens": true, + "requiredSoftwareStatementAttestedAttributes": [ + "redirect_uris", + ], + }, + "consent": { + "clientsCanSkipConsent": true, + "enableRemoteConsent": false, + "supportedRcsRequestEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsRequestEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsRequestSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRcsResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsResponseEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsResponseSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "coreOAuth2Config": { + "accessTokenLifetime": 3600, + "accessTokenMayActScript": "[Empty]", + "codeLifetime": 120, + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "macaroonTokensEnabled": false, + "oidcMayActScript": "[Empty]", + "refreshTokenLifetime": 604800, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": true, + "usePolicyEngineForScope": false, + }, + "coreOIDCConfig": { + "jwtTokenLifetime": 3600, + "oidcDiscoveryEndpointEnabled": true, + "overrideableOIDCClaims": [], + "supportedClaims": [], + "supportedIDTokenEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedIDTokenEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedIDTokenSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "deviceCodeConfig": { + "deviceCodeLifetime": 300, + "devicePollInterval": 5, + "deviceUserCodeCharacterSet": "234567ACDEFGHJKLMNPQRSTWXYZabcdefhijkmnopqrstwxyz", + "deviceUserCodeLength": 8, + }, + "pluginsConfig": { + "accessTokenEnricherClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "accessTokenModificationPluginType": "SCRIPTED", + "accessTokenModificationScript": "39c08084-1238-43e8-857f-2e11005eac49", + "accessTokenModifierClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderPluginType": "JAVA", + "authorizeEndpointDataProviderScript": "[Empty]", + "evaluateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "evaluateScopePluginType": "JAVA", + "evaluateScopeScript": "[Empty]", + "oidcClaimsClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "oidcClaimsPluginType": "SCRIPTED", + "oidcClaimsScript": "cf3515f0-8278-4ee3-a530-1bad7424c416", + "userCodeGeneratorClass": "org.forgerock.oauth2.core.plugins.registry.DefaultUserCodeGenerator", + "validateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "validateScopePluginType": "JAVA", + "validateScopeScript": "[Empty]", + }, + }, + "_type": { + "_id": "OAuth2Client", + "collection": true, + "name": "OAuth2 Clients", + }, + "advancedOAuth2ClientConfig": { + "clientUri": [], + "contacts": [], + "customProperties": [], + "descriptions": [ + "Created by Frodo on 5/13/2023, 8:07:37 PM", + ], + "grantTypes": [ + "client_credentials", + ], + "isConsentImplied": true, + "javascriptOrigins": [], + "logoUri": [], + "mixUpMitigation": false, + "name": [], + "policyUri": [], + "refreshTokenGracePeriod": 0, + "requestUris": [], + "require_pushed_authorization_requests": false, + "responseTypes": [ + "token", + ], + "sectorIdentifierUri": null, + "softwareIdentity": null, + "softwareVersion": null, + "subjectType": "Public", + "tokenEndpointAuthMethod": "client_secret_basic", + "tokenExchangeAuthLevel": 0, + "tosURI": [], + "updateAccessToken": null, + }, + "coreOAuth2ClientConfig": { + "accessTokenLifetime": 3600, + "agentgroup": null, + "authorizationCodeLifetime": 120, + "clientName": [ + "49a2981c-e192-4739-a0e6-c7582168bdf5", + ], + "clientType": "Confidential", + "defaultScopes": [ + "fr:idm:*", + ], + "loopbackInterfaceRedirection": false, + "redirectionUris": [], + "refreshTokenLifetime": 604800, + "scopes": [ + "fr:idm:*", + "fr:idc:esv:*", + "dynamic_client_registration", + ], + "status": "Active", + }, + "coreOpenIDClientConfig": { + "backchannel_logout_session_required": false, + "backchannel_logout_uri": null, + "claims": [], + "clientSessionUri": null, + "defaultAcrValues": [], + "defaultMaxAge": 600, + "defaultMaxAgeEnabled": false, + "jwtTokenLifetime": 3600, + "postLogoutRedirectUri": [], + }, + "coreUmaClientConfig": { + "claimsRedirectionUris": [], + }, + "overrideOAuth2ClientConfig": { + "accessTokenMayActScript": "[Empty]", + "accessTokenModificationPluginType": "PROVIDER", + "accessTokenModificationScript": "[Empty]", + "accessTokenModifierClass": null, + "authorizeEndpointDataProviderClass": "org.forgerock.oauth2.core.plugins.registry.DefaultEndpointDataProvider", + "authorizeEndpointDataProviderPluginType": "PROVIDER", + "authorizeEndpointDataProviderScript": "[Empty]", + "clientsCanSkipConsent": false, + "customLoginUrlTemplate": null, + "enableRemoteConsent": false, + "evaluateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeEvaluator", + "evaluateScopePluginType": "PROVIDER", + "evaluateScopeScript": "[Empty]", + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "oidcClaimsClass": null, + "oidcClaimsPluginType": "PROVIDER", + "oidcClaimsScript": "[Empty]", + "oidcMayActScript": "[Empty]", + "overrideableOIDCClaims": [], + "providerOverridesEnabled": false, + "remoteConsentServiceId": null, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": false, + "tokenEncryptionEnabled": false, + "useForceAuthnForMaxAge": false, + "usePolicyEngineForScope": false, + "validateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeValidator", + "validateScopePluginType": "PROVIDER", + "validateScopeScript": "[Empty]", + }, + "signEncOAuth2ClientConfig": { + "authorizationResponseEncryptionAlgorithm": null, + "authorizationResponseEncryptionMethod": null, + "authorizationResponseSigningAlgorithm": "RS256", + "clientJwtPublicKey": null, + "idTokenEncryptionAlgorithm": "RSA-OAEP-256", + "idTokenEncryptionEnabled": false, + "idTokenEncryptionMethod": "A128CBC-HS256", + "idTokenPublicEncryptionKey": null, + "idTokenSignedResponseAlg": "RS256", + "jwkSet": null, + "jwkStoreCacheMissCacheTime": 60000, + "jwksCacheTimeout": 3600000, + "jwksUri": null, + "mTLSCertificateBoundAccessTokens": false, + "mTLSSubjectDN": null, + "mTLSTrustedCert": null, + "publicKeyLocation": "jwks_uri", + "requestParameterEncryptedAlg": null, + "requestParameterEncryptedEncryptionAlgorithm": "A128CBC-HS256", + "requestParameterSignedAlg": null, + "tokenEndpointAuthSigningAlgorithm": "RS256", + "tokenIntrospectionEncryptedResponseAlg": "RSA-OAEP-256", + "tokenIntrospectionEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "tokenIntrospectionResponseFormat": "JSON", + "tokenIntrospectionSignedResponseAlg": "RS256", + "userinfoEncryptedResponseAlg": null, + "userinfoEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "userinfoResponseFormat": "JSON", + "userinfoSignedResponseAlg": null, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/oauth2.app/60b7b032-68fc-45ed-98ca-262c1985fb7e.oauth2.app.json 1`] = ` +{ + "application": { + "60b7b032-68fc-45ed-98ca-262c1985fb7e": { + "_id": "60b7b032-68fc-45ed-98ca-262c1985fb7e", + "_provider": { + "_id": "", + "_type": { + "_id": "oauth-oidc", + "collection": false, + "name": "OAuth2 Provider", + }, + "advancedOAuth2Config": { + "allowClientCredentialsInTokenRequestQueryParameters": true, + "allowedAudienceValues": [], + "authenticationAttributes": [ + "uid", + ], + "codeVerifierEnforced": "false", + "defaultScopes": [ + "address", + "phone", + "openid", + "profile", + "email", + ], + "displayNameAttribute": "cn", + "expClaimRequiredInRequestObject": false, + "grantTypes": [ + "implicit", + "urn:ietf:params:oauth:grant-type:saml2-bearer", + "refresh_token", + "password", + "client_credentials", + "urn:ietf:params:oauth:grant-type:device_code", + "authorization_code", + "urn:openid:params:grant-type:ciba", + "urn:ietf:params:oauth:grant-type:uma-ticket", + "urn:ietf:params:oauth:grant-type:jwt-bearer", + ], + "hashSalt": "&{am.oidc.client.subject.identifier.hash.salt}", + "includeClientIdClaimInStatelessTokens": true, + "includeSubnameInTokenClaims": true, + "macaroonTokenFormat": "V2", + "maxAgeOfRequestObjectNbfClaim": 0, + "maxDifferenceBetweenRequestObjectNbfAndExp": 0, + "moduleMessageEnabledInPasswordGrant": false, + "nbfClaimRequiredInRequestObject": false, + "parRequestUriLifetime": 90, + "passwordGrantAuthService": "Login", + "persistentClaims": [], + "refreshTokenGracePeriod": 0, + "requestObjectProcessing": "OIDC", + "requirePushedAuthorizationRequests": false, + "responseTypeClasses": [ + "code|org.forgerock.oauth2.core.AuthorizationCodeResponseTypeHandler", + "device_code|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "token|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "id_token|org.forgerock.openidconnect.IdTokenResponseTypeHandler", + ], + "supportedScopes": [ + "email|Your email address", + "openid|", + "address|Your postal address", + "phone|Your telephone number(s)", + "profile|Your personal information", + "fr:idm:*", + "am-introspect-all-tokens", + ], + "supportedSubjectTypes": [ + "public", + "pairwise", + ], + "tlsCertificateBoundAccessTokensEnabled": true, + "tlsCertificateRevocationCheckingEnabled": false, + "tlsClientCertificateHeaderFormat": "URLENCODED_PEM", + "tokenCompressionEnabled": false, + "tokenEncryptionEnabled": false, + "tokenExchangeClasses": [ + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToAccessTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToAccessTokenExchanger", + ], + "tokenSigningAlgorithm": "HS256", + "tokenValidatorClasses": [ + "urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.OidcIdTokenValidator", + "urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.OAuth2AccessTokenValidator", + ], + }, + "advancedOIDCConfig": { + "alwaysAddClaimsToToken": true, + "amrMappings": {}, + "authorisedIdmDelegationClients": [], + "authorisedOpenIdConnectSSOClients": [], + "claimsParameterSupported": false, + "defaultACR": [], + "idTokenInfoClientAuthenticationEnabled": true, + "includeAllKtyAlgCombinationsInJwksUri": false, + "loaMapping": {}, + "storeOpsTokens": true, + "supportedAuthorizationResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedAuthorizationResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedAuthorizationResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRequestParameterEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRequestParameterEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRequestParameterSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenEndpointAuthenticationSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenIntrospectionResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedTokenIntrospectionResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedTokenIntrospectionResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedUserInfoEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedUserInfoEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedUserInfoSigningAlgorithms": [ + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + ], + "useForceAuthnForMaxAge": false, + "useForceAuthnForPromptLogin": false, + }, + "cibaConfig": { + "cibaAuthReqIdLifetime": 600, + "cibaMinimumPollingInterval": 2, + "supportedCibaSigningAlgorithms": [ + "ES256", + "PS256", + ], + }, + "clientDynamicRegistrationConfig": { + "allowDynamicRegistration": false, + "dynamicClientRegistrationScope": "dynamic_client_registration", + "dynamicClientRegistrationSoftwareStatementRequired": false, + "generateRegistrationAccessTokens": true, + "requiredSoftwareStatementAttestedAttributes": [ + "redirect_uris", + ], + }, + "consent": { + "clientsCanSkipConsent": true, + "enableRemoteConsent": false, + "supportedRcsRequestEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsRequestEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsRequestSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRcsResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsResponseEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsResponseSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "coreOAuth2Config": { + "accessTokenLifetime": 3600, + "accessTokenMayActScript": "[Empty]", + "codeLifetime": 120, + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "macaroonTokensEnabled": false, + "oidcMayActScript": "[Empty]", + "refreshTokenLifetime": 604800, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": true, + "usePolicyEngineForScope": false, + }, + "coreOIDCConfig": { + "jwtTokenLifetime": 3600, + "oidcDiscoveryEndpointEnabled": true, + "overrideableOIDCClaims": [], + "supportedClaims": [], + "supportedIDTokenEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedIDTokenEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedIDTokenSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "deviceCodeConfig": { + "deviceCodeLifetime": 300, + "devicePollInterval": 5, + "deviceUserCodeCharacterSet": "234567ACDEFGHJKLMNPQRSTWXYZabcdefhijkmnopqrstwxyz", + "deviceUserCodeLength": 8, + }, + "pluginsConfig": { + "accessTokenEnricherClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "accessTokenModificationPluginType": "SCRIPTED", + "accessTokenModificationScript": "39c08084-1238-43e8-857f-2e11005eac49", + "accessTokenModifierClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderPluginType": "JAVA", + "authorizeEndpointDataProviderScript": "[Empty]", + "evaluateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "evaluateScopePluginType": "JAVA", + "evaluateScopeScript": "[Empty]", + "oidcClaimsClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "oidcClaimsPluginType": "SCRIPTED", + "oidcClaimsScript": "cf3515f0-8278-4ee3-a530-1bad7424c416", + "userCodeGeneratorClass": "org.forgerock.oauth2.core.plugins.registry.DefaultUserCodeGenerator", + "validateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "validateScopePluginType": "JAVA", + "validateScopeScript": "[Empty]", + }, + }, + "_type": { + "_id": "OAuth2Client", + "collection": true, + "name": "OAuth2 Clients", + }, + "advancedOAuth2ClientConfig": { + "clientUri": [], + "contacts": [], + "customProperties": [], + "descriptions": [ + "Created by Frodo on 3/20/2024, 8:09:47 AM", + ], + "grantTypes": [ + "client_credentials", + ], + "isConsentImplied": true, + "javascriptOrigins": [], + "logoUri": [], + "mixUpMitigation": false, + "name": [], + "policyUri": [], + "refreshTokenGracePeriod": 0, + "requestUris": [], + "require_pushed_authorization_requests": false, + "responseTypes": [ + "token", + ], + "sectorIdentifierUri": null, + "softwareIdentity": null, + "softwareVersion": null, + "subjectType": "Public", + "tokenEndpointAuthMethod": "client_secret_basic", + "tokenExchangeAuthLevel": 0, + "tosURI": [], + "updateAccessToken": null, + }, + "coreOAuth2ClientConfig": { + "accessTokenLifetime": 315360000, + "authorizationCodeLifetime": 120, + "clientName": [ + "60b7b032-68fc-45ed-98ca-262c1985fb7e", + ], + "clientType": "Confidential", + "defaultScopes": [ + "fr:idm:*", + ], + "loopbackInterfaceRedirection": false, + "redirectionUris": [], + "refreshTokenLifetime": 604800, + "scopes": [ + "fr:idm:*", + "fr:idc:esv:*", + "dynamic_client_registration", + ], + "status": "Active", + "userpassword": null, + }, + "coreOpenIDClientConfig": { + "backchannel_logout_session_required": false, + "backchannel_logout_uri": null, + "claims": [], + "clientSessionUri": null, + "defaultAcrValues": [], + "defaultMaxAge": 600, + "defaultMaxAgeEnabled": false, + "jwtTokenLifetime": 3600, + "postLogoutRedirectUri": [], + }, + "coreUmaClientConfig": { + "claimsRedirectionUris": [], + }, + "overrideOAuth2ClientConfig": { + "accessTokenMayActScript": "[Empty]", + "accessTokenModificationPluginType": "PROVIDER", + "accessTokenModificationScript": "[Empty]", + "authorizeEndpointDataProviderClass": "org.forgerock.oauth2.core.plugins.registry.DefaultEndpointDataProvider", + "authorizeEndpointDataProviderPluginType": "PROVIDER", + "authorizeEndpointDataProviderScript": "[Empty]", + "clientsCanSkipConsent": false, + "enableRemoteConsent": false, + "evaluateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeEvaluator", + "evaluateScopePluginType": "PROVIDER", + "evaluateScopeScript": "[Empty]", + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "oidcClaimsPluginType": "PROVIDER", + "oidcClaimsScript": "[Empty]", + "oidcMayActScript": "[Empty]", + "overrideableOIDCClaims": [], + "providerOverridesEnabled": false, + "remoteConsentServiceId": null, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": false, + "tokenEncryptionEnabled": false, + "useForceAuthnForMaxAge": false, + "usePolicyEngineForScope": false, + "validateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeValidator", + "validateScopePluginType": "PROVIDER", + "validateScopeScript": "[Empty]", + }, + "signEncOAuth2ClientConfig": { + "authorizationResponseEncryptionAlgorithm": null, + "authorizationResponseEncryptionMethod": null, + "authorizationResponseSigningAlgorithm": "RS256", + "clientJwtPublicKey": null, + "idTokenEncryptionAlgorithm": "RSA-OAEP-256", + "idTokenEncryptionEnabled": false, + "idTokenEncryptionMethod": "A128CBC-HS256", + "idTokenPublicEncryptionKey": null, + "idTokenSignedResponseAlg": "RS256", + "jwkSet": null, + "jwkStoreCacheMissCacheTime": 60000, + "jwksCacheTimeout": 3600000, + "jwksUri": null, + "mTLSCertificateBoundAccessTokens": false, + "mTLSSubjectDN": null, + "mTLSTrustedCert": null, + "publicKeyLocation": "jwks_uri", + "requestParameterEncryptedAlg": null, + "requestParameterEncryptedEncryptionAlgorithm": "A128CBC-HS256", + "requestParameterSignedAlg": null, + "tokenEndpointAuthSigningAlgorithm": "RS256", + "tokenIntrospectionEncryptedResponseAlg": "RSA-OAEP-256", + "tokenIntrospectionEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "tokenIntrospectionResponseFormat": "JSON", + "tokenIntrospectionSignedResponseAlg": "RS256", + "userinfoEncryptedResponseAlg": null, + "userinfoEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "userinfoResponseFormat": "JSON", + "userinfoSignedResponseAlg": null, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/oauth2.app/EncoreRCSClient.oauth2.app.json 1`] = ` +{ + "application": { + "EncoreRCSClient": { + "_id": "EncoreRCSClient", + "_provider": { + "_id": "", + "_type": { + "_id": "oauth-oidc", + "collection": false, + "name": "OAuth2 Provider", + }, + "advancedOAuth2Config": { + "allowClientCredentialsInTokenRequestQueryParameters": true, + "allowedAudienceValues": [], + "authenticationAttributes": [ + "uid", + ], + "codeVerifierEnforced": "false", + "defaultScopes": [ + "address", + "phone", + "openid", + "profile", + "email", + ], + "displayNameAttribute": "cn", + "expClaimRequiredInRequestObject": false, + "grantTypes": [ + "implicit", + "urn:ietf:params:oauth:grant-type:saml2-bearer", + "refresh_token", + "password", + "client_credentials", + "urn:ietf:params:oauth:grant-type:device_code", + "authorization_code", + "urn:openid:params:grant-type:ciba", + "urn:ietf:params:oauth:grant-type:uma-ticket", + "urn:ietf:params:oauth:grant-type:jwt-bearer", + ], + "hashSalt": "&{am.oidc.client.subject.identifier.hash.salt}", + "includeClientIdClaimInStatelessTokens": true, + "includeSubnameInTokenClaims": true, + "macaroonTokenFormat": "V2", + "maxAgeOfRequestObjectNbfClaim": 0, + "maxDifferenceBetweenRequestObjectNbfAndExp": 0, + "moduleMessageEnabledInPasswordGrant": false, + "nbfClaimRequiredInRequestObject": false, + "parRequestUriLifetime": 90, + "passwordGrantAuthService": "Login", + "persistentClaims": [], + "refreshTokenGracePeriod": 0, + "requestObjectProcessing": "OIDC", + "requirePushedAuthorizationRequests": false, + "responseTypeClasses": [ + "code|org.forgerock.oauth2.core.AuthorizationCodeResponseTypeHandler", + "device_code|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "token|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "id_token|org.forgerock.openidconnect.IdTokenResponseTypeHandler", + ], + "supportedScopes": [ + "email|Your email address", + "openid|", + "address|Your postal address", + "phone|Your telephone number(s)", + "profile|Your personal information", + "fr:idm:*", + "am-introspect-all-tokens", + ], + "supportedSubjectTypes": [ + "public", + "pairwise", + ], + "tlsCertificateBoundAccessTokensEnabled": true, + "tlsCertificateRevocationCheckingEnabled": false, + "tlsClientCertificateHeaderFormat": "URLENCODED_PEM", + "tokenCompressionEnabled": false, + "tokenEncryptionEnabled": false, + "tokenExchangeClasses": [ + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToAccessTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToAccessTokenExchanger", + ], + "tokenSigningAlgorithm": "HS256", + "tokenValidatorClasses": [ + "urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.OidcIdTokenValidator", + "urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.OAuth2AccessTokenValidator", + ], + }, + "advancedOIDCConfig": { + "alwaysAddClaimsToToken": true, + "amrMappings": {}, + "authorisedIdmDelegationClients": [], + "authorisedOpenIdConnectSSOClients": [], + "claimsParameterSupported": false, + "defaultACR": [], + "idTokenInfoClientAuthenticationEnabled": true, + "includeAllKtyAlgCombinationsInJwksUri": false, + "loaMapping": {}, + "storeOpsTokens": true, + "supportedAuthorizationResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedAuthorizationResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedAuthorizationResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRequestParameterEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRequestParameterEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRequestParameterSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenEndpointAuthenticationSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenIntrospectionResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedTokenIntrospectionResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedTokenIntrospectionResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedUserInfoEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedUserInfoEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedUserInfoSigningAlgorithms": [ + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + ], + "useForceAuthnForMaxAge": false, + "useForceAuthnForPromptLogin": false, + }, + "cibaConfig": { + "cibaAuthReqIdLifetime": 600, + "cibaMinimumPollingInterval": 2, + "supportedCibaSigningAlgorithms": [ + "ES256", + "PS256", + ], + }, + "clientDynamicRegistrationConfig": { + "allowDynamicRegistration": false, + "dynamicClientRegistrationScope": "dynamic_client_registration", + "dynamicClientRegistrationSoftwareStatementRequired": false, + "generateRegistrationAccessTokens": true, + "requiredSoftwareStatementAttestedAttributes": [ + "redirect_uris", + ], + }, + "consent": { + "clientsCanSkipConsent": true, + "enableRemoteConsent": false, + "supportedRcsRequestEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsRequestEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsRequestSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRcsResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsResponseEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsResponseSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "coreOAuth2Config": { + "accessTokenLifetime": 3600, + "accessTokenMayActScript": "[Empty]", + "codeLifetime": 120, + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "macaroonTokensEnabled": false, + "oidcMayActScript": "[Empty]", + "refreshTokenLifetime": 604800, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": true, + "usePolicyEngineForScope": false, + }, + "coreOIDCConfig": { + "jwtTokenLifetime": 3600, + "oidcDiscoveryEndpointEnabled": true, + "overrideableOIDCClaims": [], + "supportedClaims": [], + "supportedIDTokenEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedIDTokenEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedIDTokenSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "deviceCodeConfig": { + "deviceCodeLifetime": 300, + "devicePollInterval": 5, + "deviceUserCodeCharacterSet": "234567ACDEFGHJKLMNPQRSTWXYZabcdefhijkmnopqrstwxyz", + "deviceUserCodeLength": 8, + }, + "pluginsConfig": { + "accessTokenEnricherClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "accessTokenModificationPluginType": "SCRIPTED", + "accessTokenModificationScript": "39c08084-1238-43e8-857f-2e11005eac49", + "accessTokenModifierClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderPluginType": "JAVA", + "authorizeEndpointDataProviderScript": "[Empty]", + "evaluateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "evaluateScopePluginType": "JAVA", + "evaluateScopeScript": "[Empty]", + "oidcClaimsClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "oidcClaimsPluginType": "SCRIPTED", + "oidcClaimsScript": "cf3515f0-8278-4ee3-a530-1bad7424c416", + "userCodeGeneratorClass": "org.forgerock.oauth2.core.plugins.registry.DefaultUserCodeGenerator", + "validateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "validateScopePluginType": "JAVA", + "validateScopeScript": "[Empty]", + }, + }, + "_type": { + "_id": "OAuth2Client", + "collection": true, + "name": "OAuth2 Clients", + }, + "advancedOAuth2ClientConfig": { + "clientUri": [], + "contacts": [], + "customProperties": [], + "descriptions": [], + "grantTypes": [ + "client_credentials", + ], + "isConsentImplied": false, + "javascriptOrigins": [], + "logoUri": [], + "mixUpMitigation": false, + "name": [], + "policyUri": [], + "refreshTokenGracePeriod": 0, + "requestUris": [], + "require_pushed_authorization_requests": false, + "responseTypes": [ + "code", + "token", + "id_token", + "code token", + "token id_token", + "code id_token", + "code token id_token", + "device_code", + "device_code id_token", + ], + "sectorIdentifierUri": null, + "softwareIdentity": null, + "softwareVersion": null, + "subjectType": "pairwise", + "tokenEndpointAuthMethod": "client_secret_basic", + "tokenExchangeAuthLevel": 0, + "tosURI": [], + "updateAccessToken": null, + }, + "coreOAuth2ClientConfig": { + "accessTokenLifetime": 0, + "authorizationCodeLifetime": 0, + "clientName": [], + "clientType": "Confidential", + "defaultScopes": [], + "loopbackInterfaceRedirection": false, + "redirectionUris": [], + "refreshTokenLifetime": 0, + "scopes": [ + "fr:idm:*", + ], + "status": "Active", + }, + "coreOpenIDClientConfig": { + "backchannel_logout_session_required": false, + "backchannel_logout_uri": null, + "claims": [], + "clientSessionUri": null, + "defaultAcrValues": [], + "defaultMaxAge": 600, + "defaultMaxAgeEnabled": false, + "jwtTokenLifetime": 0, + "postLogoutRedirectUri": [], + }, + "coreUmaClientConfig": { + "claimsRedirectionUris": [], + }, + "overrideOAuth2ClientConfig": { + "accessTokenMayActScript": "[Empty]", + "accessTokenModificationPluginType": "PROVIDER", + "accessTokenModificationScript": "[Empty]", + "authorizeEndpointDataProviderClass": "org.forgerock.oauth2.core.plugins.registry.DefaultEndpointDataProvider", + "authorizeEndpointDataProviderPluginType": "PROVIDER", + "authorizeEndpointDataProviderScript": "[Empty]", + "clientsCanSkipConsent": false, + "enableRemoteConsent": false, + "evaluateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeEvaluator", + "evaluateScopePluginType": "PROVIDER", + "evaluateScopeScript": "[Empty]", + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "oidcClaimsPluginType": "PROVIDER", + "oidcClaimsScript": "[Empty]", + "oidcMayActScript": "[Empty]", + "overrideableOIDCClaims": [], + "providerOverridesEnabled": false, + "remoteConsentServiceId": null, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": false, + "tokenEncryptionEnabled": false, + "useForceAuthnForMaxAge": false, + "usePolicyEngineForScope": false, + "validateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeValidator", + "validateScopePluginType": "PROVIDER", + "validateScopeScript": "[Empty]", + }, + "signEncOAuth2ClientConfig": { + "authorizationResponseEncryptionAlgorithm": null, + "authorizationResponseEncryptionMethod": null, + "authorizationResponseSigningAlgorithm": "RS256", + "clientJwtPublicKey": null, + "idTokenEncryptionAlgorithm": "RSA-OAEP-256", + "idTokenEncryptionEnabled": false, + "idTokenEncryptionMethod": "A128CBC-HS256", + "idTokenPublicEncryptionKey": null, + "idTokenSignedResponseAlg": "RS256", + "jwkSet": null, + "jwkStoreCacheMissCacheTime": 60000, + "jwksCacheTimeout": 3600000, + "jwksUri": null, + "mTLSCertificateBoundAccessTokens": false, + "mTLSSubjectDN": null, + "mTLSTrustedCert": null, + "publicKeyLocation": "jwks_uri", + "requestParameterEncryptedAlg": null, + "requestParameterEncryptedEncryptionAlgorithm": "A128CBC-HS256", + "requestParameterSignedAlg": null, + "tokenEndpointAuthSigningAlgorithm": "RS256", + "tokenIntrospectionEncryptedResponseAlg": "RSA-OAEP-256", + "tokenIntrospectionEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "tokenIntrospectionResponseFormat": "JSON", + "tokenIntrospectionSignedResponseAlg": "RS256", + "userinfoEncryptedResponseAlg": null, + "userinfoEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "userinfoResponseFormat": "JSON", + "userinfoSignedResponseAlg": null, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/oauth2.app/EncoreWindowsRCSClient.oauth2.app.json 1`] = ` +{ + "application": { + "EncoreWindowsRCSClient": { + "_id": "EncoreWindowsRCSClient", + "_provider": { + "_id": "", + "_type": { + "_id": "oauth-oidc", + "collection": false, + "name": "OAuth2 Provider", + }, + "advancedOAuth2Config": { + "allowClientCredentialsInTokenRequestQueryParameters": true, + "allowedAudienceValues": [], + "authenticationAttributes": [ + "uid", + ], + "codeVerifierEnforced": "false", + "defaultScopes": [ + "address", + "phone", + "openid", + "profile", + "email", + ], + "displayNameAttribute": "cn", + "expClaimRequiredInRequestObject": false, + "grantTypes": [ + "implicit", + "urn:ietf:params:oauth:grant-type:saml2-bearer", + "refresh_token", + "password", + "client_credentials", + "urn:ietf:params:oauth:grant-type:device_code", + "authorization_code", + "urn:openid:params:grant-type:ciba", + "urn:ietf:params:oauth:grant-type:uma-ticket", + "urn:ietf:params:oauth:grant-type:jwt-bearer", + ], + "hashSalt": "&{am.oidc.client.subject.identifier.hash.salt}", + "includeClientIdClaimInStatelessTokens": true, + "includeSubnameInTokenClaims": true, + "macaroonTokenFormat": "V2", + "maxAgeOfRequestObjectNbfClaim": 0, + "maxDifferenceBetweenRequestObjectNbfAndExp": 0, + "moduleMessageEnabledInPasswordGrant": false, + "nbfClaimRequiredInRequestObject": false, + "parRequestUriLifetime": 90, + "passwordGrantAuthService": "Login", + "persistentClaims": [], + "refreshTokenGracePeriod": 0, + "requestObjectProcessing": "OIDC", + "requirePushedAuthorizationRequests": false, + "responseTypeClasses": [ + "code|org.forgerock.oauth2.core.AuthorizationCodeResponseTypeHandler", + "device_code|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "token|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "id_token|org.forgerock.openidconnect.IdTokenResponseTypeHandler", + ], + "supportedScopes": [ + "email|Your email address", + "openid|", + "address|Your postal address", + "phone|Your telephone number(s)", + "profile|Your personal information", + "fr:idm:*", + "am-introspect-all-tokens", + ], + "supportedSubjectTypes": [ + "public", + "pairwise", + ], + "tlsCertificateBoundAccessTokensEnabled": true, + "tlsCertificateRevocationCheckingEnabled": false, + "tlsClientCertificateHeaderFormat": "URLENCODED_PEM", + "tokenCompressionEnabled": false, + "tokenEncryptionEnabled": false, + "tokenExchangeClasses": [ + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToAccessTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToAccessTokenExchanger", + ], + "tokenSigningAlgorithm": "HS256", + "tokenValidatorClasses": [ + "urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.OidcIdTokenValidator", + "urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.OAuth2AccessTokenValidator", + ], + }, + "advancedOIDCConfig": { + "alwaysAddClaimsToToken": true, + "amrMappings": {}, + "authorisedIdmDelegationClients": [], + "authorisedOpenIdConnectSSOClients": [], + "claimsParameterSupported": false, + "defaultACR": [], + "idTokenInfoClientAuthenticationEnabled": true, + "includeAllKtyAlgCombinationsInJwksUri": false, + "loaMapping": {}, + "storeOpsTokens": true, + "supportedAuthorizationResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedAuthorizationResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedAuthorizationResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRequestParameterEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRequestParameterEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRequestParameterSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenEndpointAuthenticationSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenIntrospectionResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedTokenIntrospectionResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedTokenIntrospectionResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedUserInfoEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedUserInfoEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedUserInfoSigningAlgorithms": [ + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + ], + "useForceAuthnForMaxAge": false, + "useForceAuthnForPromptLogin": false, + }, + "cibaConfig": { + "cibaAuthReqIdLifetime": 600, + "cibaMinimumPollingInterval": 2, + "supportedCibaSigningAlgorithms": [ + "ES256", + "PS256", + ], + }, + "clientDynamicRegistrationConfig": { + "allowDynamicRegistration": false, + "dynamicClientRegistrationScope": "dynamic_client_registration", + "dynamicClientRegistrationSoftwareStatementRequired": false, + "generateRegistrationAccessTokens": true, + "requiredSoftwareStatementAttestedAttributes": [ + "redirect_uris", + ], + }, + "consent": { + "clientsCanSkipConsent": true, + "enableRemoteConsent": false, + "supportedRcsRequestEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsRequestEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsRequestSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRcsResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsResponseEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsResponseSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "coreOAuth2Config": { + "accessTokenLifetime": 3600, + "accessTokenMayActScript": "[Empty]", + "codeLifetime": 120, + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "macaroonTokensEnabled": false, + "oidcMayActScript": "[Empty]", + "refreshTokenLifetime": 604800, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": true, + "usePolicyEngineForScope": false, + }, + "coreOIDCConfig": { + "jwtTokenLifetime": 3600, + "oidcDiscoveryEndpointEnabled": true, + "overrideableOIDCClaims": [], + "supportedClaims": [], + "supportedIDTokenEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedIDTokenEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedIDTokenSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "deviceCodeConfig": { + "deviceCodeLifetime": 300, + "devicePollInterval": 5, + "deviceUserCodeCharacterSet": "234567ACDEFGHJKLMNPQRSTWXYZabcdefhijkmnopqrstwxyz", + "deviceUserCodeLength": 8, + }, + "pluginsConfig": { + "accessTokenEnricherClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "accessTokenModificationPluginType": "SCRIPTED", + "accessTokenModificationScript": "39c08084-1238-43e8-857f-2e11005eac49", + "accessTokenModifierClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderPluginType": "JAVA", + "authorizeEndpointDataProviderScript": "[Empty]", + "evaluateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "evaluateScopePluginType": "JAVA", + "evaluateScopeScript": "[Empty]", + "oidcClaimsClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "oidcClaimsPluginType": "SCRIPTED", + "oidcClaimsScript": "cf3515f0-8278-4ee3-a530-1bad7424c416", + "userCodeGeneratorClass": "org.forgerock.oauth2.core.plugins.registry.DefaultUserCodeGenerator", + "validateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "validateScopePluginType": "JAVA", + "validateScopeScript": "[Empty]", + }, + }, + "_type": { + "_id": "OAuth2Client", + "collection": true, + "name": "OAuth2 Clients", + }, + "advancedOAuth2ClientConfig": { + "clientUri": [], + "contacts": [], + "customProperties": [], + "descriptions": [], + "grantTypes": [ + "client_credentials", + ], + "isConsentImplied": false, + "javascriptOrigins": [], + "logoUri": [], + "mixUpMitigation": false, + "name": [], + "policyUri": [], + "refreshTokenGracePeriod": 0, + "requestUris": [], + "require_pushed_authorization_requests": false, + "responseTypes": [ + "code", + "token", + "id_token", + "code token", + "token id_token", + "code id_token", + "code token id_token", + "device_code", + "device_code id_token", + ], + "sectorIdentifierUri": null, + "softwareIdentity": null, + "softwareVersion": null, + "subjectType": "pairwise", + "tokenEndpointAuthMethod": "client_secret_basic", + "tokenExchangeAuthLevel": 0, + "tosURI": [], + "updateAccessToken": null, + }, + "coreOAuth2ClientConfig": { + "accessTokenLifetime": 0, + "authorizationCodeLifetime": 0, + "clientName": [], + "clientType": "Confidential", + "defaultScopes": [], + "loopbackInterfaceRedirection": false, + "redirectionUris": [], + "refreshTokenLifetime": 0, + "scopes": [ + "fr:idm:*", + ], + "status": "Active", + }, + "coreOpenIDClientConfig": { + "backchannel_logout_session_required": false, + "backchannel_logout_uri": null, + "claims": [], + "clientSessionUri": null, + "defaultAcrValues": [], + "defaultMaxAge": 600, + "defaultMaxAgeEnabled": false, + "jwtTokenLifetime": 0, + "postLogoutRedirectUri": [], + }, + "coreUmaClientConfig": { + "claimsRedirectionUris": [], + }, + "overrideOAuth2ClientConfig": { + "accessTokenMayActScript": "[Empty]", + "accessTokenModificationPluginType": "PROVIDER", + "accessTokenModificationScript": "[Empty]", + "authorizeEndpointDataProviderClass": "org.forgerock.oauth2.core.plugins.registry.DefaultEndpointDataProvider", + "authorizeEndpointDataProviderPluginType": "PROVIDER", + "authorizeEndpointDataProviderScript": "[Empty]", + "clientsCanSkipConsent": false, + "enableRemoteConsent": false, + "evaluateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeEvaluator", + "evaluateScopePluginType": "PROVIDER", + "evaluateScopeScript": "[Empty]", + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "oidcClaimsPluginType": "PROVIDER", + "oidcClaimsScript": "[Empty]", + "oidcMayActScript": "[Empty]", + "overrideableOIDCClaims": [], + "providerOverridesEnabled": false, + "remoteConsentServiceId": null, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": false, + "tokenEncryptionEnabled": false, + "useForceAuthnForMaxAge": false, + "usePolicyEngineForScope": false, + "validateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeValidator", + "validateScopePluginType": "PROVIDER", + "validateScopeScript": "[Empty]", + }, + "signEncOAuth2ClientConfig": { + "authorizationResponseEncryptionAlgorithm": null, + "authorizationResponseEncryptionMethod": null, + "authorizationResponseSigningAlgorithm": "RS256", + "clientJwtPublicKey": null, + "idTokenEncryptionAlgorithm": "RSA-OAEP-256", + "idTokenEncryptionEnabled": false, + "idTokenEncryptionMethod": "A128CBC-HS256", + "idTokenPublicEncryptionKey": null, + "idTokenSignedResponseAlg": "RS256", + "jwkSet": null, + "jwkStoreCacheMissCacheTime": 60000, + "jwksCacheTimeout": 3600000, + "jwksUri": null, + "mTLSCertificateBoundAccessTokens": false, + "mTLSSubjectDN": null, + "mTLSTrustedCert": null, + "publicKeyLocation": "jwks_uri", + "requestParameterEncryptedAlg": null, + "requestParameterEncryptedEncryptionAlgorithm": "A128CBC-HS256", + "requestParameterSignedAlg": null, + "tokenEndpointAuthSigningAlgorithm": "RS256", + "tokenIntrospectionEncryptedResponseAlg": "RSA-OAEP-256", + "tokenIntrospectionEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "tokenIntrospectionResponseFormat": "JSON", + "tokenIntrospectionSignedResponseAlg": "RS256", + "userinfoEncryptedResponseAlg": null, + "userinfoEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "userinfoResponseFormat": "JSON", + "userinfoSignedResponseAlg": null, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/oauth2.app/RCSClient.oauth2.app.json 1`] = ` +{ + "application": { + "RCSClient": { + "_id": "RCSClient", + "_provider": { + "_id": "", + "_type": { + "_id": "oauth-oidc", + "collection": false, + "name": "OAuth2 Provider", + }, + "advancedOAuth2Config": { + "allowClientCredentialsInTokenRequestQueryParameters": true, + "allowedAudienceValues": [], + "authenticationAttributes": [ + "uid", + ], + "codeVerifierEnforced": "false", + "defaultScopes": [ + "address", + "phone", + "openid", + "profile", + "email", + ], + "displayNameAttribute": "cn", + "expClaimRequiredInRequestObject": false, + "grantTypes": [ + "implicit", + "urn:ietf:params:oauth:grant-type:saml2-bearer", + "refresh_token", + "password", + "client_credentials", + "urn:ietf:params:oauth:grant-type:device_code", + "authorization_code", + "urn:openid:params:grant-type:ciba", + "urn:ietf:params:oauth:grant-type:uma-ticket", + "urn:ietf:params:oauth:grant-type:jwt-bearer", + ], + "hashSalt": "&{am.oidc.client.subject.identifier.hash.salt}", + "includeClientIdClaimInStatelessTokens": true, + "includeSubnameInTokenClaims": true, + "macaroonTokenFormat": "V2", + "maxAgeOfRequestObjectNbfClaim": 0, + "maxDifferenceBetweenRequestObjectNbfAndExp": 0, + "moduleMessageEnabledInPasswordGrant": false, + "nbfClaimRequiredInRequestObject": false, + "parRequestUriLifetime": 90, + "passwordGrantAuthService": "Login", + "persistentClaims": [], + "refreshTokenGracePeriod": 0, + "requestObjectProcessing": "OIDC", + "requirePushedAuthorizationRequests": false, + "responseTypeClasses": [ + "code|org.forgerock.oauth2.core.AuthorizationCodeResponseTypeHandler", + "device_code|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "token|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "id_token|org.forgerock.openidconnect.IdTokenResponseTypeHandler", + ], + "supportedScopes": [ + "email|Your email address", + "openid|", + "address|Your postal address", + "phone|Your telephone number(s)", + "profile|Your personal information", + "fr:idm:*", + "am-introspect-all-tokens", + ], + "supportedSubjectTypes": [ + "public", + "pairwise", + ], + "tlsCertificateBoundAccessTokensEnabled": true, + "tlsCertificateRevocationCheckingEnabled": false, + "tlsClientCertificateHeaderFormat": "URLENCODED_PEM", + "tokenCompressionEnabled": false, + "tokenEncryptionEnabled": false, + "tokenExchangeClasses": [ + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToAccessTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToAccessTokenExchanger", + ], + "tokenSigningAlgorithm": "HS256", + "tokenValidatorClasses": [ + "urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.OidcIdTokenValidator", + "urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.OAuth2AccessTokenValidator", + ], + }, + "advancedOIDCConfig": { + "alwaysAddClaimsToToken": true, + "amrMappings": {}, + "authorisedIdmDelegationClients": [], + "authorisedOpenIdConnectSSOClients": [], + "claimsParameterSupported": false, + "defaultACR": [], + "idTokenInfoClientAuthenticationEnabled": true, + "includeAllKtyAlgCombinationsInJwksUri": false, + "loaMapping": {}, + "storeOpsTokens": true, + "supportedAuthorizationResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedAuthorizationResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedAuthorizationResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRequestParameterEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRequestParameterEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRequestParameterSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenEndpointAuthenticationSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenIntrospectionResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedTokenIntrospectionResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedTokenIntrospectionResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedUserInfoEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedUserInfoEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedUserInfoSigningAlgorithms": [ + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + ], + "useForceAuthnForMaxAge": false, + "useForceAuthnForPromptLogin": false, + }, + "cibaConfig": { + "cibaAuthReqIdLifetime": 600, + "cibaMinimumPollingInterval": 2, + "supportedCibaSigningAlgorithms": [ + "ES256", + "PS256", + ], + }, + "clientDynamicRegistrationConfig": { + "allowDynamicRegistration": false, + "dynamicClientRegistrationScope": "dynamic_client_registration", + "dynamicClientRegistrationSoftwareStatementRequired": false, + "generateRegistrationAccessTokens": true, + "requiredSoftwareStatementAttestedAttributes": [ + "redirect_uris", + ], + }, + "consent": { + "clientsCanSkipConsent": true, + "enableRemoteConsent": false, + "supportedRcsRequestEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsRequestEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsRequestSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRcsResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsResponseEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsResponseSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "coreOAuth2Config": { + "accessTokenLifetime": 3600, + "accessTokenMayActScript": "[Empty]", + "codeLifetime": 120, + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "macaroonTokensEnabled": false, + "oidcMayActScript": "[Empty]", + "refreshTokenLifetime": 604800, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": true, + "usePolicyEngineForScope": false, + }, + "coreOIDCConfig": { + "jwtTokenLifetime": 3600, + "oidcDiscoveryEndpointEnabled": true, + "overrideableOIDCClaims": [], + "supportedClaims": [], + "supportedIDTokenEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedIDTokenEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedIDTokenSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "deviceCodeConfig": { + "deviceCodeLifetime": 300, + "devicePollInterval": 5, + "deviceUserCodeCharacterSet": "234567ACDEFGHJKLMNPQRSTWXYZabcdefhijkmnopqrstwxyz", + "deviceUserCodeLength": 8, + }, + "pluginsConfig": { + "accessTokenEnricherClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "accessTokenModificationPluginType": "SCRIPTED", + "accessTokenModificationScript": "39c08084-1238-43e8-857f-2e11005eac49", + "accessTokenModifierClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderPluginType": "JAVA", + "authorizeEndpointDataProviderScript": "[Empty]", + "evaluateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "evaluateScopePluginType": "JAVA", + "evaluateScopeScript": "[Empty]", + "oidcClaimsClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "oidcClaimsPluginType": "SCRIPTED", + "oidcClaimsScript": "cf3515f0-8278-4ee3-a530-1bad7424c416", + "userCodeGeneratorClass": "org.forgerock.oauth2.core.plugins.registry.DefaultUserCodeGenerator", + "validateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "validateScopePluginType": "JAVA", + "validateScopeScript": "[Empty]", + }, + }, + "_type": { + "_id": "OAuth2Client", + "collection": true, + "name": "OAuth2 Clients", + }, + "advancedOAuth2ClientConfig": { + "clientUri": [], + "contacts": [], + "customProperties": [], + "descriptions": [], + "grantTypes": [ + "client_credentials", + ], + "isConsentImplied": false, + "javascriptOrigins": [], + "logoUri": [], + "mixUpMitigation": false, + "name": [], + "policyUri": [], + "refreshTokenGracePeriod": 0, + "requestUris": [], + "require_pushed_authorization_requests": false, + "responseTypes": [ + "code", + "token", + "id_token", + "code token", + "token id_token", + "code id_token", + "code token id_token", + "device_code", + "device_code id_token", + ], + "sectorIdentifierUri": null, + "softwareIdentity": null, + "softwareVersion": null, + "subjectType": "Public", + "tokenEndpointAuthMethod": "client_secret_basic", + "tokenExchangeAuthLevel": 0, + "tosURI": [], + "updateAccessToken": null, + }, + "coreOAuth2ClientConfig": { + "accessTokenLifetime": 0, + "agentgroup": null, + "authorizationCodeLifetime": 0, + "clientName": [], + "clientType": "Confidential", + "defaultScopes": [], + "loopbackInterfaceRedirection": false, + "redirectionUris": [], + "refreshTokenLifetime": 0, + "scopes": [ + "fr:idm:*", + ], + "status": "Active", + }, + "coreOpenIDClientConfig": { + "backchannel_logout_session_required": false, + "backchannel_logout_uri": null, + "claims": [], + "clientSessionUri": null, + "defaultAcrValues": [], + "defaultMaxAge": 600, + "defaultMaxAgeEnabled": false, + "jwtTokenLifetime": 0, + "postLogoutRedirectUri": [], + }, + "coreUmaClientConfig": { + "claimsRedirectionUris": [], + }, + "overrideOAuth2ClientConfig": { + "accessTokenMayActScript": "[Empty]", + "accessTokenModificationPluginType": "SCRIPTED", + "accessTokenModificationScript": "c234ba0b-58a1-4cfd-9567-09edde980745", + "accessTokenModifierClass": null, + "authorizeEndpointDataProviderClass": "org.forgerock.oauth2.core.plugins.registry.DefaultEndpointDataProvider", + "authorizeEndpointDataProviderPluginType": "PROVIDER", + "authorizeEndpointDataProviderScript": "[Empty]", + "clientsCanSkipConsent": true, + "customLoginUrlTemplate": null, + "enableRemoteConsent": false, + "evaluateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeEvaluator", + "evaluateScopePluginType": "PROVIDER", + "evaluateScopeScript": "[Empty]", + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "oidcClaimsClass": null, + "oidcClaimsPluginType": "SCRIPTED", + "oidcClaimsScript": "1f389a3d-21cf-417c-a6d3-42ea620071f0", + "oidcMayActScript": "[Empty]", + "overrideableOIDCClaims": [], + "providerOverridesEnabled": true, + "remoteConsentServiceId": null, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": true, + "tokenEncryptionEnabled": false, + "useForceAuthnForMaxAge": false, + "usePolicyEngineForScope": false, + "validateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeValidator", + "validateScopePluginType": "PROVIDER", + "validateScopeScript": "[Empty]", + }, + "signEncOAuth2ClientConfig": { + "authorizationResponseEncryptionAlgorithm": null, + "authorizationResponseEncryptionMethod": null, + "authorizationResponseSigningAlgorithm": "RS256", + "clientJwtPublicKey": null, + "idTokenEncryptionAlgorithm": "RSA-OAEP-256", + "idTokenEncryptionEnabled": false, + "idTokenEncryptionMethod": "A128CBC-HS256", + "idTokenPublicEncryptionKey": null, + "idTokenSignedResponseAlg": "RS256", + "jwkSet": null, + "jwkStoreCacheMissCacheTime": 60000, + "jwksCacheTimeout": 3600000, + "jwksUri": "http://am.fr-platform:80/am/oauth2/connect/jwk_uri", + "mTLSCertificateBoundAccessTokens": false, + "mTLSSubjectDN": null, + "mTLSTrustedCert": null, + "publicKeyLocation": "jwks_uri", + "requestParameterEncryptedAlg": null, + "requestParameterEncryptedEncryptionAlgorithm": "A128CBC-HS256", + "requestParameterSignedAlg": null, + "tokenEndpointAuthSigningAlgorithm": "RS256", + "tokenIntrospectionEncryptedResponseAlg": "RSA-OAEP-256", + "tokenIntrospectionEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "tokenIntrospectionResponseFormat": "JSON", + "tokenIntrospectionSignedResponseAlg": "RS256", + "userinfoEncryptedResponseAlg": null, + "userinfoEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "userinfoResponseFormat": "JSON", + "userinfoSignedResponseAlg": null, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/oauth2.app/baseline-ciba.oauth2.app.json 1`] = ` +{ + "application": { + "baseline-ciba": { + "_id": "baseline-ciba", + "_provider": { + "_id": "", + "_type": { + "_id": "oauth-oidc", + "collection": false, + "name": "OAuth2 Provider", + }, + "advancedOAuth2Config": { + "allowClientCredentialsInTokenRequestQueryParameters": true, + "allowedAudienceValues": [], + "authenticationAttributes": [ + "uid", + ], + "codeVerifierEnforced": "false", + "defaultScopes": [ + "address", + "phone", + "openid", + "profile", + "email", + ], + "displayNameAttribute": "cn", + "expClaimRequiredInRequestObject": false, + "grantTypes": [ + "implicit", + "urn:ietf:params:oauth:grant-type:saml2-bearer", + "refresh_token", + "password", + "client_credentials", + "urn:ietf:params:oauth:grant-type:device_code", + "authorization_code", + "urn:openid:params:grant-type:ciba", + "urn:ietf:params:oauth:grant-type:uma-ticket", + "urn:ietf:params:oauth:grant-type:jwt-bearer", + ], + "hashSalt": "&{am.oidc.client.subject.identifier.hash.salt}", + "includeClientIdClaimInStatelessTokens": true, + "includeSubnameInTokenClaims": true, + "macaroonTokenFormat": "V2", + "maxAgeOfRequestObjectNbfClaim": 0, + "maxDifferenceBetweenRequestObjectNbfAndExp": 0, + "moduleMessageEnabledInPasswordGrant": false, + "nbfClaimRequiredInRequestObject": false, + "parRequestUriLifetime": 90, + "passwordGrantAuthService": "Login", + "persistentClaims": [], + "refreshTokenGracePeriod": 0, + "requestObjectProcessing": "OIDC", + "requirePushedAuthorizationRequests": false, + "responseTypeClasses": [ + "code|org.forgerock.oauth2.core.AuthorizationCodeResponseTypeHandler", + "device_code|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "token|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "id_token|org.forgerock.openidconnect.IdTokenResponseTypeHandler", + ], + "supportedScopes": [ + "email|Your email address", + "openid|", + "address|Your postal address", + "phone|Your telephone number(s)", + "profile|Your personal information", + "fr:idm:*", + "am-introspect-all-tokens", + ], + "supportedSubjectTypes": [ + "public", + "pairwise", + ], + "tlsCertificateBoundAccessTokensEnabled": true, + "tlsCertificateRevocationCheckingEnabled": false, + "tlsClientCertificateHeaderFormat": "URLENCODED_PEM", + "tokenCompressionEnabled": false, + "tokenEncryptionEnabled": false, + "tokenExchangeClasses": [ + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToAccessTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToAccessTokenExchanger", + ], + "tokenSigningAlgorithm": "HS256", + "tokenValidatorClasses": [ + "urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.OidcIdTokenValidator", + "urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.OAuth2AccessTokenValidator", + ], + }, + "advancedOIDCConfig": { + "alwaysAddClaimsToToken": true, + "amrMappings": {}, + "authorisedIdmDelegationClients": [], + "authorisedOpenIdConnectSSOClients": [], + "claimsParameterSupported": false, + "defaultACR": [], + "idTokenInfoClientAuthenticationEnabled": true, + "includeAllKtyAlgCombinationsInJwksUri": false, + "loaMapping": {}, + "storeOpsTokens": true, + "supportedAuthorizationResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedAuthorizationResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedAuthorizationResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRequestParameterEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRequestParameterEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRequestParameterSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenEndpointAuthenticationSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenIntrospectionResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedTokenIntrospectionResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedTokenIntrospectionResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedUserInfoEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedUserInfoEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedUserInfoSigningAlgorithms": [ + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + ], + "useForceAuthnForMaxAge": false, + "useForceAuthnForPromptLogin": false, + }, + "cibaConfig": { + "cibaAuthReqIdLifetime": 600, + "cibaMinimumPollingInterval": 2, + "supportedCibaSigningAlgorithms": [ + "ES256", + "PS256", + ], + }, + "clientDynamicRegistrationConfig": { + "allowDynamicRegistration": false, + "dynamicClientRegistrationScope": "dynamic_client_registration", + "dynamicClientRegistrationSoftwareStatementRequired": false, + "generateRegistrationAccessTokens": true, + "requiredSoftwareStatementAttestedAttributes": [ + "redirect_uris", + ], + }, + "consent": { + "clientsCanSkipConsent": true, + "enableRemoteConsent": false, + "supportedRcsRequestEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsRequestEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsRequestSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRcsResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsResponseEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsResponseSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "coreOAuth2Config": { + "accessTokenLifetime": 3600, + "accessTokenMayActScript": "[Empty]", + "codeLifetime": 120, + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "macaroonTokensEnabled": false, + "oidcMayActScript": "[Empty]", + "refreshTokenLifetime": 604800, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": true, + "usePolicyEngineForScope": false, + }, + "coreOIDCConfig": { + "jwtTokenLifetime": 3600, + "oidcDiscoveryEndpointEnabled": true, + "overrideableOIDCClaims": [], + "supportedClaims": [], + "supportedIDTokenEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedIDTokenEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedIDTokenSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "deviceCodeConfig": { + "deviceCodeLifetime": 300, + "devicePollInterval": 5, + "deviceUserCodeCharacterSet": "234567ACDEFGHJKLMNPQRSTWXYZabcdefhijkmnopqrstwxyz", + "deviceUserCodeLength": 8, + }, + "pluginsConfig": { + "accessTokenEnricherClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "accessTokenModificationPluginType": "SCRIPTED", + "accessTokenModificationScript": "39c08084-1238-43e8-857f-2e11005eac49", + "accessTokenModifierClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderPluginType": "JAVA", + "authorizeEndpointDataProviderScript": "[Empty]", + "evaluateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "evaluateScopePluginType": "JAVA", + "evaluateScopeScript": "[Empty]", + "oidcClaimsClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "oidcClaimsPluginType": "SCRIPTED", + "oidcClaimsScript": "cf3515f0-8278-4ee3-a530-1bad7424c416", + "userCodeGeneratorClass": "org.forgerock.oauth2.core.plugins.registry.DefaultUserCodeGenerator", + "validateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "validateScopePluginType": "JAVA", + "validateScopeScript": "[Empty]", + }, + }, + "_type": { + "_id": "OAuth2Client", + "collection": true, + "name": "OAuth2 Clients", + }, + "advancedOAuth2ClientConfig": { + "clientUri": [], + "contacts": [], + "customProperties": [], + "descriptions": [], + "grantTypes": [ + "urn:openid:params:grant-type:ciba", + "authorization_code", + ], + "isConsentImplied": false, + "javascriptOrigins": [], + "logoUri": [], + "mixUpMitigation": false, + "name": [], + "policyUri": [], + "refreshTokenGracePeriod": 0, + "requestUris": [], + "require_pushed_authorization_requests": false, + "responseTypes": [ + "token", + "id_token", + ], + "sectorIdentifierUri": null, + "softwareIdentity": null, + "softwareVersion": null, + "subjectType": "public", + "tokenEndpointAuthMethod": "client_secret_basic", + "tokenExchangeAuthLevel": 0, + "tosURI": [], + "updateAccessToken": null, + }, + "coreOAuth2ClientConfig": { + "accessTokenLifetime": 0, + "agentgroup": null, + "authorizationCodeLifetime": 0, + "clientName": [], + "clientType": "Confidential", + "defaultScopes": [], + "loopbackInterfaceRedirection": false, + "redirectionUris": [], + "refreshTokenLifetime": 0, + "scopes": [ + "openid", + "profile", + ], + "status": "Active", + }, + "coreOpenIDClientConfig": { + "backchannel_logout_session_required": false, + "backchannel_logout_uri": null, + "claims": [], + "clientSessionUri": null, + "defaultAcrValues": [], + "defaultMaxAge": 600, + "defaultMaxAgeEnabled": false, + "jwtTokenLifetime": 0, + "postLogoutRedirectUri": [], + }, + "coreUmaClientConfig": { + "claimsRedirectionUris": [], + }, + "overrideOAuth2ClientConfig": { + "accessTokenMayActScript": "[Empty]", + "accessTokenModificationPluginType": "PROVIDER", + "accessTokenModificationScript": "[Empty]", + "accessTokenModifierClass": null, + "authorizeEndpointDataProviderClass": "org.forgerock.oauth2.core.plugins.registry.DefaultEndpointDataProvider", + "authorizeEndpointDataProviderPluginType": "PROVIDER", + "authorizeEndpointDataProviderScript": "[Empty]", + "clientsCanSkipConsent": false, + "customLoginUrlTemplate": null, + "enableRemoteConsent": false, + "evaluateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeEvaluator", + "evaluateScopePluginType": "PROVIDER", + "evaluateScopeScript": "[Empty]", + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "oidcClaimsClass": null, + "oidcClaimsPluginType": "PROVIDER", + "oidcClaimsScript": "[Empty]", + "oidcMayActScript": "[Empty]", + "overrideableOIDCClaims": [], + "providerOverridesEnabled": false, + "remoteConsentServiceId": null, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": false, + "tokenEncryptionEnabled": false, + "useForceAuthnForMaxAge": false, + "usePolicyEngineForScope": false, + "validateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeValidator", + "validateScopePluginType": "PROVIDER", + "validateScopeScript": "[Empty]", + }, + "signEncOAuth2ClientConfig": { + "authorizationResponseEncryptionAlgorithm": null, + "authorizationResponseEncryptionMethod": null, + "authorizationResponseSigningAlgorithm": "RS256", + "clientJwtPublicKey": null, + "idTokenEncryptionAlgorithm": "RSA-OAEP-256", + "idTokenEncryptionEnabled": false, + "idTokenEncryptionMethod": "A128CBC-HS256", + "idTokenPublicEncryptionKey": null, + "idTokenSignedResponseAlg": "RS256", + "jwkSet": "{"keys" :[{ "kty": "EC", "d": "bXhBnmXPav9lgPPs6zavwlqbSmaMpdyeh564d0uNI8k", "use": "sig", "crv": "P-256", "kid": "mykey", "x": "E8IyIrUIBdMVAFhRIcNtDVUI8OTDDSs-LRziuBthM4s", "y": "1jH5o5B5hBeqARhYTMPl5l8CVNOFIVrvYd_TiFH6FkQ" }]}", + "jwkStoreCacheMissCacheTime": 60000, + "jwksCacheTimeout": 3600000, + "jwksUri": null, + "mTLSCertificateBoundAccessTokens": false, + "mTLSSubjectDN": null, + "mTLSTrustedCert": null, + "publicKeyLocation": "jwks", + "requestParameterEncryptedAlg": null, + "requestParameterEncryptedEncryptionAlgorithm": "A128CBC-HS256", + "requestParameterSignedAlg": null, + "tokenEndpointAuthSigningAlgorithm": "RS256", + "tokenIntrospectionEncryptedResponseAlg": "RSA-OAEP-256", + "tokenIntrospectionEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "tokenIntrospectionResponseFormat": "JSON", + "tokenIntrospectionSignedResponseAlg": "RS256", + "userinfoEncryptedResponseAlg": null, + "userinfoEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "userinfoResponseFormat": "JSON", + "userinfoSignedResponseAlg": null, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/oauth2.app/baseline-device.oauth2.app.json 1`] = ` +{ + "application": { + "baseline-device": { + "_id": "baseline-device", + "_provider": { + "_id": "", + "_type": { + "_id": "oauth-oidc", + "collection": false, + "name": "OAuth2 Provider", + }, + "advancedOAuth2Config": { + "allowClientCredentialsInTokenRequestQueryParameters": true, + "allowedAudienceValues": [], + "authenticationAttributes": [ + "uid", + ], + "codeVerifierEnforced": "false", + "defaultScopes": [ + "address", + "phone", + "openid", + "profile", + "email", + ], + "displayNameAttribute": "cn", + "expClaimRequiredInRequestObject": false, + "grantTypes": [ + "implicit", + "urn:ietf:params:oauth:grant-type:saml2-bearer", + "refresh_token", + "password", + "client_credentials", + "urn:ietf:params:oauth:grant-type:device_code", + "authorization_code", + "urn:openid:params:grant-type:ciba", + "urn:ietf:params:oauth:grant-type:uma-ticket", + "urn:ietf:params:oauth:grant-type:jwt-bearer", + ], + "hashSalt": "&{am.oidc.client.subject.identifier.hash.salt}", + "includeClientIdClaimInStatelessTokens": true, + "includeSubnameInTokenClaims": true, + "macaroonTokenFormat": "V2", + "maxAgeOfRequestObjectNbfClaim": 0, + "maxDifferenceBetweenRequestObjectNbfAndExp": 0, + "moduleMessageEnabledInPasswordGrant": false, + "nbfClaimRequiredInRequestObject": false, + "parRequestUriLifetime": 90, + "passwordGrantAuthService": "Login", + "persistentClaims": [], + "refreshTokenGracePeriod": 0, + "requestObjectProcessing": "OIDC", + "requirePushedAuthorizationRequests": false, + "responseTypeClasses": [ + "code|org.forgerock.oauth2.core.AuthorizationCodeResponseTypeHandler", + "device_code|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "token|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "id_token|org.forgerock.openidconnect.IdTokenResponseTypeHandler", + ], + "supportedScopes": [ + "email|Your email address", + "openid|", + "address|Your postal address", + "phone|Your telephone number(s)", + "profile|Your personal information", + "fr:idm:*", + "am-introspect-all-tokens", + ], + "supportedSubjectTypes": [ + "public", + "pairwise", + ], + "tlsCertificateBoundAccessTokensEnabled": true, + "tlsCertificateRevocationCheckingEnabled": false, + "tlsClientCertificateHeaderFormat": "URLENCODED_PEM", + "tokenCompressionEnabled": false, + "tokenEncryptionEnabled": false, + "tokenExchangeClasses": [ + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToAccessTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToAccessTokenExchanger", + ], + "tokenSigningAlgorithm": "HS256", + "tokenValidatorClasses": [ + "urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.OidcIdTokenValidator", + "urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.OAuth2AccessTokenValidator", + ], + }, + "advancedOIDCConfig": { + "alwaysAddClaimsToToken": true, + "amrMappings": {}, + "authorisedIdmDelegationClients": [], + "authorisedOpenIdConnectSSOClients": [], + "claimsParameterSupported": false, + "defaultACR": [], + "idTokenInfoClientAuthenticationEnabled": true, + "includeAllKtyAlgCombinationsInJwksUri": false, + "loaMapping": {}, + "storeOpsTokens": true, + "supportedAuthorizationResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedAuthorizationResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedAuthorizationResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRequestParameterEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRequestParameterEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRequestParameterSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenEndpointAuthenticationSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenIntrospectionResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedTokenIntrospectionResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedTokenIntrospectionResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedUserInfoEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedUserInfoEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedUserInfoSigningAlgorithms": [ + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + ], + "useForceAuthnForMaxAge": false, + "useForceAuthnForPromptLogin": false, + }, + "cibaConfig": { + "cibaAuthReqIdLifetime": 600, + "cibaMinimumPollingInterval": 2, + "supportedCibaSigningAlgorithms": [ + "ES256", + "PS256", + ], + }, + "clientDynamicRegistrationConfig": { + "allowDynamicRegistration": false, + "dynamicClientRegistrationScope": "dynamic_client_registration", + "dynamicClientRegistrationSoftwareStatementRequired": false, + "generateRegistrationAccessTokens": true, + "requiredSoftwareStatementAttestedAttributes": [ + "redirect_uris", + ], + }, + "consent": { + "clientsCanSkipConsent": true, + "enableRemoteConsent": false, + "supportedRcsRequestEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsRequestEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsRequestSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRcsResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsResponseEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsResponseSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "coreOAuth2Config": { + "accessTokenLifetime": 3600, + "accessTokenMayActScript": "[Empty]", + "codeLifetime": 120, + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "macaroonTokensEnabled": false, + "oidcMayActScript": "[Empty]", + "refreshTokenLifetime": 604800, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": true, + "usePolicyEngineForScope": false, + }, + "coreOIDCConfig": { + "jwtTokenLifetime": 3600, + "oidcDiscoveryEndpointEnabled": true, + "overrideableOIDCClaims": [], + "supportedClaims": [], + "supportedIDTokenEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedIDTokenEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedIDTokenSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "deviceCodeConfig": { + "deviceCodeLifetime": 300, + "devicePollInterval": 5, + "deviceUserCodeCharacterSet": "234567ACDEFGHJKLMNPQRSTWXYZabcdefhijkmnopqrstwxyz", + "deviceUserCodeLength": 8, + }, + "pluginsConfig": { + "accessTokenEnricherClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "accessTokenModificationPluginType": "SCRIPTED", + "accessTokenModificationScript": "39c08084-1238-43e8-857f-2e11005eac49", + "accessTokenModifierClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderPluginType": "JAVA", + "authorizeEndpointDataProviderScript": "[Empty]", + "evaluateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "evaluateScopePluginType": "JAVA", + "evaluateScopeScript": "[Empty]", + "oidcClaimsClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "oidcClaimsPluginType": "SCRIPTED", + "oidcClaimsScript": "cf3515f0-8278-4ee3-a530-1bad7424c416", + "userCodeGeneratorClass": "org.forgerock.oauth2.core.plugins.registry.DefaultUserCodeGenerator", + "validateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "validateScopePluginType": "JAVA", + "validateScopeScript": "[Empty]", + }, + }, + "_type": { + "_id": "OAuth2Client", + "collection": true, + "name": "OAuth2 Clients", + }, + "advancedOAuth2ClientConfig": { + "clientUri": [], + "contacts": [], + "customProperties": [], + "descriptions": [], + "grantTypes": [ + "urn:ietf:params:oauth:grant-type:device_code", + ], + "isConsentImplied": true, + "javascriptOrigins": [], + "logoUri": [], + "mixUpMitigation": false, + "name": [], + "policyUri": [], + "refreshTokenGracePeriod": 0, + "requestUris": [], + "require_pushed_authorization_requests": false, + "responseTypes": [ + "code", + "token", + "id_token", + "code token", + "token id_token", + "code id_token", + "code token id_token", + "device_code", + "device_code id_token", + ], + "sectorIdentifierUri": null, + "softwareIdentity": null, + "softwareVersion": null, + "subjectType": "public", + "tokenEndpointAuthMethod": "none", + "tokenExchangeAuthLevel": 0, + "tosURI": [], + "updateAccessToken": null, + }, + "coreOAuth2ClientConfig": { + "accessTokenLifetime": 0, + "agentgroup": null, + "authorizationCodeLifetime": 0, + "clientName": [ + "Streaming Services", + ], + "clientType": "Public", + "defaultScopes": [], + "loopbackInterfaceRedirection": false, + "redirectionUris": [], + "refreshTokenLifetime": 0, + "scopes": [ + "openid", + "profile", + ], + "status": "Active", + }, + "coreOpenIDClientConfig": { + "backchannel_logout_session_required": false, + "backchannel_logout_uri": null, + "claims": [], + "clientSessionUri": null, + "defaultAcrValues": [], + "defaultMaxAge": 600, + "defaultMaxAgeEnabled": false, + "jwtTokenLifetime": 0, + "postLogoutRedirectUri": [], + }, + "coreUmaClientConfig": { + "claimsRedirectionUris": [], + }, + "overrideOAuth2ClientConfig": { + "accessTokenMayActScript": "[Empty]", + "accessTokenModificationPluginType": "PROVIDER", + "accessTokenModificationScript": "[Empty]", + "accessTokenModifierClass": null, + "authorizeEndpointDataProviderClass": "org.forgerock.oauth2.core.plugins.registry.DefaultEndpointDataProvider", + "authorizeEndpointDataProviderPluginType": "PROVIDER", + "authorizeEndpointDataProviderScript": "[Empty]", + "clientsCanSkipConsent": false, + "customLoginUrlTemplate": null, + "enableRemoteConsent": false, + "evaluateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeEvaluator", + "evaluateScopePluginType": "PROVIDER", + "evaluateScopeScript": "[Empty]", + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "oidcClaimsClass": null, + "oidcClaimsPluginType": "PROVIDER", + "oidcClaimsScript": "[Empty]", + "oidcMayActScript": "[Empty]", + "overrideableOIDCClaims": [], + "providerOverridesEnabled": false, + "remoteConsentServiceId": null, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": false, + "tokenEncryptionEnabled": false, + "useForceAuthnForMaxAge": false, + "usePolicyEngineForScope": false, + "validateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeValidator", + "validateScopePluginType": "PROVIDER", + "validateScopeScript": "[Empty]", + }, + "signEncOAuth2ClientConfig": { + "authorizationResponseEncryptionAlgorithm": null, + "authorizationResponseEncryptionMethod": null, + "authorizationResponseSigningAlgorithm": "RS256", + "clientJwtPublicKey": null, + "idTokenEncryptionAlgorithm": "RSA-OAEP-256", + "idTokenEncryptionEnabled": false, + "idTokenEncryptionMethod": "A128CBC-HS256", + "idTokenPublicEncryptionKey": null, + "idTokenSignedResponseAlg": "RS256", + "jwkSet": null, + "jwkStoreCacheMissCacheTime": 60000, + "jwksCacheTimeout": 3600000, + "jwksUri": null, + "mTLSCertificateBoundAccessTokens": false, + "mTLSSubjectDN": null, + "mTLSTrustedCert": null, + "publicKeyLocation": "jwks_uri", + "requestParameterEncryptedAlg": null, + "requestParameterEncryptedEncryptionAlgorithm": "A128CBC-HS256", + "requestParameterSignedAlg": null, + "tokenEndpointAuthSigningAlgorithm": "RS256", + "tokenIntrospectionEncryptedResponseAlg": "RSA-OAEP-256", + "tokenIntrospectionEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "tokenIntrospectionResponseFormat": "JSON", + "tokenIntrospectionSignedResponseAlg": "RS256", + "userinfoEncryptedResponseAlg": null, + "userinfoEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "userinfoResponseFormat": "JSON", + "userinfoSignedResponseAlg": null, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/oauth2.app/baseline-ios-sdk.oauth2.app.json 1`] = ` +{ + "application": { + "baseline-ios-sdk": { + "_id": "baseline-ios-sdk", + "_provider": { + "_id": "", + "_type": { + "_id": "oauth-oidc", + "collection": false, + "name": "OAuth2 Provider", + }, + "advancedOAuth2Config": { + "allowClientCredentialsInTokenRequestQueryParameters": true, + "allowedAudienceValues": [], + "authenticationAttributes": [ + "uid", + ], + "codeVerifierEnforced": "false", + "defaultScopes": [ + "address", + "phone", + "openid", + "profile", + "email", + ], + "displayNameAttribute": "cn", + "expClaimRequiredInRequestObject": false, + "grantTypes": [ + "implicit", + "urn:ietf:params:oauth:grant-type:saml2-bearer", + "refresh_token", + "password", + "client_credentials", + "urn:ietf:params:oauth:grant-type:device_code", + "authorization_code", + "urn:openid:params:grant-type:ciba", + "urn:ietf:params:oauth:grant-type:uma-ticket", + "urn:ietf:params:oauth:grant-type:jwt-bearer", + ], + "hashSalt": "&{am.oidc.client.subject.identifier.hash.salt}", + "includeClientIdClaimInStatelessTokens": true, + "includeSubnameInTokenClaims": true, + "macaroonTokenFormat": "V2", + "maxAgeOfRequestObjectNbfClaim": 0, + "maxDifferenceBetweenRequestObjectNbfAndExp": 0, + "moduleMessageEnabledInPasswordGrant": false, + "nbfClaimRequiredInRequestObject": false, + "parRequestUriLifetime": 90, + "passwordGrantAuthService": "Login", + "persistentClaims": [], + "refreshTokenGracePeriod": 0, + "requestObjectProcessing": "OIDC", + "requirePushedAuthorizationRequests": false, + "responseTypeClasses": [ + "code|org.forgerock.oauth2.core.AuthorizationCodeResponseTypeHandler", + "device_code|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "token|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "id_token|org.forgerock.openidconnect.IdTokenResponseTypeHandler", + ], + "supportedScopes": [ + "email|Your email address", + "openid|", + "address|Your postal address", + "phone|Your telephone number(s)", + "profile|Your personal information", + "fr:idm:*", + "am-introspect-all-tokens", + ], + "supportedSubjectTypes": [ + "public", + "pairwise", + ], + "tlsCertificateBoundAccessTokensEnabled": true, + "tlsCertificateRevocationCheckingEnabled": false, + "tlsClientCertificateHeaderFormat": "URLENCODED_PEM", + "tokenCompressionEnabled": false, + "tokenEncryptionEnabled": false, + "tokenExchangeClasses": [ + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToAccessTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToAccessTokenExchanger", + ], + "tokenSigningAlgorithm": "HS256", + "tokenValidatorClasses": [ + "urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.OidcIdTokenValidator", + "urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.OAuth2AccessTokenValidator", + ], + }, + "advancedOIDCConfig": { + "alwaysAddClaimsToToken": true, + "amrMappings": {}, + "authorisedIdmDelegationClients": [], + "authorisedOpenIdConnectSSOClients": [], + "claimsParameterSupported": false, + "defaultACR": [], + "idTokenInfoClientAuthenticationEnabled": true, + "includeAllKtyAlgCombinationsInJwksUri": false, + "loaMapping": {}, + "storeOpsTokens": true, + "supportedAuthorizationResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedAuthorizationResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedAuthorizationResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRequestParameterEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRequestParameterEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRequestParameterSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenEndpointAuthenticationSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenIntrospectionResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedTokenIntrospectionResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedTokenIntrospectionResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedUserInfoEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedUserInfoEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedUserInfoSigningAlgorithms": [ + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + ], + "useForceAuthnForMaxAge": false, + "useForceAuthnForPromptLogin": false, + }, + "cibaConfig": { + "cibaAuthReqIdLifetime": 600, + "cibaMinimumPollingInterval": 2, + "supportedCibaSigningAlgorithms": [ + "ES256", + "PS256", + ], + }, + "clientDynamicRegistrationConfig": { + "allowDynamicRegistration": false, + "dynamicClientRegistrationScope": "dynamic_client_registration", + "dynamicClientRegistrationSoftwareStatementRequired": false, + "generateRegistrationAccessTokens": true, + "requiredSoftwareStatementAttestedAttributes": [ + "redirect_uris", + ], + }, + "consent": { + "clientsCanSkipConsent": true, + "enableRemoteConsent": false, + "supportedRcsRequestEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsRequestEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsRequestSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRcsResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsResponseEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsResponseSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "coreOAuth2Config": { + "accessTokenLifetime": 3600, + "accessTokenMayActScript": "[Empty]", + "codeLifetime": 120, + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "macaroonTokensEnabled": false, + "oidcMayActScript": "[Empty]", + "refreshTokenLifetime": 604800, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": true, + "usePolicyEngineForScope": false, + }, + "coreOIDCConfig": { + "jwtTokenLifetime": 3600, + "oidcDiscoveryEndpointEnabled": true, + "overrideableOIDCClaims": [], + "supportedClaims": [], + "supportedIDTokenEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedIDTokenEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedIDTokenSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "deviceCodeConfig": { + "deviceCodeLifetime": 300, + "devicePollInterval": 5, + "deviceUserCodeCharacterSet": "234567ACDEFGHJKLMNPQRSTWXYZabcdefhijkmnopqrstwxyz", + "deviceUserCodeLength": 8, + }, + "pluginsConfig": { + "accessTokenEnricherClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "accessTokenModificationPluginType": "SCRIPTED", + "accessTokenModificationScript": "39c08084-1238-43e8-857f-2e11005eac49", + "accessTokenModifierClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderPluginType": "JAVA", + "authorizeEndpointDataProviderScript": "[Empty]", + "evaluateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "evaluateScopePluginType": "JAVA", + "evaluateScopeScript": "[Empty]", + "oidcClaimsClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "oidcClaimsPluginType": "SCRIPTED", + "oidcClaimsScript": "cf3515f0-8278-4ee3-a530-1bad7424c416", + "userCodeGeneratorClass": "org.forgerock.oauth2.core.plugins.registry.DefaultUserCodeGenerator", + "validateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "validateScopePluginType": "JAVA", + "validateScopeScript": "[Empty]", + }, + }, + "_type": { + "_id": "OAuth2Client", + "collection": true, + "name": "OAuth2 Clients", + }, + "advancedOAuth2ClientConfig": { + "clientUri": [], + "contacts": [], + "customProperties": [], + "descriptions": [], + "grantTypes": [ + "authorization_code", + "refresh_token", + ], + "isConsentImplied": true, + "javascriptOrigins": [ + "forgerock://oidc_callback", + ], + "logoUri": [], + "mixUpMitigation": false, + "name": [], + "policyUri": [], + "refreshTokenGracePeriod": 0, + "requestUris": [], + "require_pushed_authorization_requests": false, + "responseTypes": [ + "code", + "token", + "id_token", + ], + "sectorIdentifierUri": null, + "softwareIdentity": null, + "softwareVersion": null, + "subjectType": "public", + "tokenEndpointAuthMethod": "none", + "tokenExchangeAuthLevel": 0, + "tosURI": [], + "updateAccessToken": null, + }, + "coreOAuth2ClientConfig": { + "accessTokenLifetime": 0, + "agentgroup": null, + "authorizationCodeLifetime": 0, + "clientName": [], + "clientType": "Public", + "defaultScopes": [], + "loopbackInterfaceRedirection": false, + "redirectionUris": [ + "forgerock://oidc_callback", + ], + "refreshTokenLifetime": 0, + "scopes": [ + "openid", + "profile", + "address", + "phone", + "email", + "fr:idm:*", + ], + "status": "Active", + }, + "coreOpenIDClientConfig": { + "backchannel_logout_session_required": false, + "backchannel_logout_uri": null, + "claims": [], + "clientSessionUri": null, + "defaultAcrValues": [], + "defaultMaxAge": 600, + "defaultMaxAgeEnabled": false, + "jwtTokenLifetime": 0, + "postLogoutRedirectUri": [], + }, + "coreUmaClientConfig": { + "claimsRedirectionUris": [], + }, + "overrideOAuth2ClientConfig": { + "accessTokenMayActScript": "[Empty]", + "accessTokenModificationPluginType": "PROVIDER", + "accessTokenModificationScript": "[Empty]", + "accessTokenModifierClass": null, + "authorizeEndpointDataProviderClass": "org.forgerock.oauth2.core.plugins.registry.DefaultEndpointDataProvider", + "authorizeEndpointDataProviderPluginType": "PROVIDER", + "authorizeEndpointDataProviderScript": "[Empty]", + "clientsCanSkipConsent": false, + "customLoginUrlTemplate": null, + "enableRemoteConsent": false, + "evaluateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeEvaluator", + "evaluateScopePluginType": "PROVIDER", + "evaluateScopeScript": "[Empty]", + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "oidcClaimsClass": null, + "oidcClaimsPluginType": "PROVIDER", + "oidcClaimsScript": "[Empty]", + "oidcMayActScript": "[Empty]", + "overrideableOIDCClaims": [], + "providerOverridesEnabled": false, + "remoteConsentServiceId": null, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": false, + "tokenEncryptionEnabled": false, + "useForceAuthnForMaxAge": false, + "usePolicyEngineForScope": false, + "validateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeValidator", + "validateScopePluginType": "PROVIDER", + "validateScopeScript": "[Empty]", + }, + "signEncOAuth2ClientConfig": { + "authorizationResponseEncryptionAlgorithm": null, + "authorizationResponseEncryptionMethod": null, + "authorizationResponseSigningAlgorithm": "RS256", + "clientJwtPublicKey": null, + "idTokenEncryptionAlgorithm": "RSA-OAEP-256", + "idTokenEncryptionEnabled": false, + "idTokenEncryptionMethod": "A128CBC-HS256", + "idTokenPublicEncryptionKey": null, + "idTokenSignedResponseAlg": "RS256", + "jwkSet": null, + "jwkStoreCacheMissCacheTime": 60000, + "jwksCacheTimeout": 3600000, + "jwksUri": null, + "mTLSCertificateBoundAccessTokens": false, + "mTLSSubjectDN": null, + "mTLSTrustedCert": null, + "publicKeyLocation": "jwks_uri", + "requestParameterEncryptedAlg": null, + "requestParameterEncryptedEncryptionAlgorithm": "A128CBC-HS256", + "requestParameterSignedAlg": null, + "tokenEndpointAuthSigningAlgorithm": "RS256", + "tokenIntrospectionEncryptedResponseAlg": "RSA-OAEP-256", + "tokenIntrospectionEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "tokenIntrospectionResponseFormat": "JSON", + "tokenIntrospectionSignedResponseAlg": "RS256", + "userinfoEncryptedResponseAlg": null, + "userinfoEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "userinfoResponseFormat": "JSON", + "userinfoSignedResponseAlg": null, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/oauth2.app/baseline-web.oauth2.app.json 1`] = ` +{ + "application": { + "baseline-web": { + "_id": "baseline-web", + "_provider": { + "_id": "", + "_type": { + "_id": "oauth-oidc", + "collection": false, + "name": "OAuth2 Provider", + }, + "advancedOAuth2Config": { + "allowClientCredentialsInTokenRequestQueryParameters": true, + "allowedAudienceValues": [], + "authenticationAttributes": [ + "uid", + ], + "codeVerifierEnforced": "false", + "defaultScopes": [ + "address", + "phone", + "openid", + "profile", + "email", + ], + "displayNameAttribute": "cn", + "expClaimRequiredInRequestObject": false, + "grantTypes": [ + "implicit", + "urn:ietf:params:oauth:grant-type:saml2-bearer", + "refresh_token", + "password", + "client_credentials", + "urn:ietf:params:oauth:grant-type:device_code", + "authorization_code", + "urn:openid:params:grant-type:ciba", + "urn:ietf:params:oauth:grant-type:uma-ticket", + "urn:ietf:params:oauth:grant-type:jwt-bearer", + ], + "hashSalt": "&{am.oidc.client.subject.identifier.hash.salt}", + "includeClientIdClaimInStatelessTokens": true, + "includeSubnameInTokenClaims": true, + "macaroonTokenFormat": "V2", + "maxAgeOfRequestObjectNbfClaim": 0, + "maxDifferenceBetweenRequestObjectNbfAndExp": 0, + "moduleMessageEnabledInPasswordGrant": false, + "nbfClaimRequiredInRequestObject": false, + "parRequestUriLifetime": 90, + "passwordGrantAuthService": "Login", + "persistentClaims": [], + "refreshTokenGracePeriod": 0, + "requestObjectProcessing": "OIDC", + "requirePushedAuthorizationRequests": false, + "responseTypeClasses": [ + "code|org.forgerock.oauth2.core.AuthorizationCodeResponseTypeHandler", + "device_code|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "token|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "id_token|org.forgerock.openidconnect.IdTokenResponseTypeHandler", + ], + "supportedScopes": [ + "email|Your email address", + "openid|", + "address|Your postal address", + "phone|Your telephone number(s)", + "profile|Your personal information", + "fr:idm:*", + "am-introspect-all-tokens", + ], + "supportedSubjectTypes": [ + "public", + "pairwise", + ], + "tlsCertificateBoundAccessTokensEnabled": true, + "tlsCertificateRevocationCheckingEnabled": false, + "tlsClientCertificateHeaderFormat": "URLENCODED_PEM", + "tokenCompressionEnabled": false, + "tokenEncryptionEnabled": false, + "tokenExchangeClasses": [ + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToAccessTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToAccessTokenExchanger", + ], + "tokenSigningAlgorithm": "HS256", + "tokenValidatorClasses": [ + "urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.OidcIdTokenValidator", + "urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.OAuth2AccessTokenValidator", + ], + }, + "advancedOIDCConfig": { + "alwaysAddClaimsToToken": true, + "amrMappings": {}, + "authorisedIdmDelegationClients": [], + "authorisedOpenIdConnectSSOClients": [], + "claimsParameterSupported": false, + "defaultACR": [], + "idTokenInfoClientAuthenticationEnabled": true, + "includeAllKtyAlgCombinationsInJwksUri": false, + "loaMapping": {}, + "storeOpsTokens": true, + "supportedAuthorizationResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedAuthorizationResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedAuthorizationResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRequestParameterEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRequestParameterEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRequestParameterSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenEndpointAuthenticationSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenIntrospectionResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedTokenIntrospectionResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedTokenIntrospectionResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedUserInfoEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedUserInfoEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedUserInfoSigningAlgorithms": [ + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + ], + "useForceAuthnForMaxAge": false, + "useForceAuthnForPromptLogin": false, + }, + "cibaConfig": { + "cibaAuthReqIdLifetime": 600, + "cibaMinimumPollingInterval": 2, + "supportedCibaSigningAlgorithms": [ + "ES256", + "PS256", + ], + }, + "clientDynamicRegistrationConfig": { + "allowDynamicRegistration": false, + "dynamicClientRegistrationScope": "dynamic_client_registration", + "dynamicClientRegistrationSoftwareStatementRequired": false, + "generateRegistrationAccessTokens": true, + "requiredSoftwareStatementAttestedAttributes": [ + "redirect_uris", + ], + }, + "consent": { + "clientsCanSkipConsent": true, + "enableRemoteConsent": false, + "supportedRcsRequestEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsRequestEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsRequestSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRcsResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsResponseEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsResponseSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "coreOAuth2Config": { + "accessTokenLifetime": 3600, + "accessTokenMayActScript": "[Empty]", + "codeLifetime": 120, + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "macaroonTokensEnabled": false, + "oidcMayActScript": "[Empty]", + "refreshTokenLifetime": 604800, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": true, + "usePolicyEngineForScope": false, + }, + "coreOIDCConfig": { + "jwtTokenLifetime": 3600, + "oidcDiscoveryEndpointEnabled": true, + "overrideableOIDCClaims": [], + "supportedClaims": [], + "supportedIDTokenEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedIDTokenEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedIDTokenSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "deviceCodeConfig": { + "deviceCodeLifetime": 300, + "devicePollInterval": 5, + "deviceUserCodeCharacterSet": "234567ACDEFGHJKLMNPQRSTWXYZabcdefhijkmnopqrstwxyz", + "deviceUserCodeLength": 8, + }, + "pluginsConfig": { + "accessTokenEnricherClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "accessTokenModificationPluginType": "SCRIPTED", + "accessTokenModificationScript": "39c08084-1238-43e8-857f-2e11005eac49", + "accessTokenModifierClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderPluginType": "JAVA", + "authorizeEndpointDataProviderScript": "[Empty]", + "evaluateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "evaluateScopePluginType": "JAVA", + "evaluateScopeScript": "[Empty]", + "oidcClaimsClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "oidcClaimsPluginType": "SCRIPTED", + "oidcClaimsScript": "cf3515f0-8278-4ee3-a530-1bad7424c416", + "userCodeGeneratorClass": "org.forgerock.oauth2.core.plugins.registry.DefaultUserCodeGenerator", + "validateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "validateScopePluginType": "JAVA", + "validateScopeScript": "[Empty]", + }, + }, + "_type": { + "_id": "OAuth2Client", + "collection": true, + "name": "OAuth2 Clients", + }, + "advancedOAuth2ClientConfig": { + "clientUri": [], + "contacts": [], + "customProperties": [], + "descriptions": [], + "grantTypes": [ + "authorization_code", + "refresh_token", + ], + "isConsentImplied": true, + "javascriptOrigins": [], + "logoUri": [], + "mixUpMitigation": false, + "name": [], + "policyUri": [], + "refreshTokenGracePeriod": 0, + "requestUris": [], + "require_pushed_authorization_requests": false, + "responseTypes": [ + "code", + "token", + "id_token", + ], + "sectorIdentifierUri": null, + "softwareIdentity": null, + "softwareVersion": null, + "subjectType": "public", + "tokenEndpointAuthMethod": "none", + "tokenExchangeAuthLevel": 0, + "tosURI": [], + "updateAccessToken": null, + }, + "coreOAuth2ClientConfig": { + "accessTokenLifetime": 0, + "agentgroup": null, + "authorizationCodeLifetime": 0, + "clientName": [], + "clientType": "Public", + "defaultScopes": [], + "loopbackInterfaceRedirection": false, + "redirectionUris": [ + "https://sdkapp.example.com:8443", + "https://volker-demo.encore.forgerock.com/demo/webapp/en/home", + "https://volker-demo.encore.forgerock.com/demo/sdks", + "forgerock://oidc_callback", + ], + "refreshTokenLifetime": 0, + "scopes": [ + "openid", + "profile", + "address", + "phone", + "email", + "fr:idm:*", + ], + "status": "Active", + }, + "coreOpenIDClientConfig": { + "backchannel_logout_session_required": false, + "backchannel_logout_uri": null, + "claims": [], + "clientSessionUri": null, + "defaultAcrValues": [], + "defaultMaxAge": 600, + "defaultMaxAgeEnabled": false, + "jwtTokenLifetime": 0, + "postLogoutRedirectUri": [ + "https://sdkapp.example.com:8443", + "https://volker-demo.encore.forgerock.com/demo/webapp/en/home", + "https://volker-demo.encore.forgerock.com/demo/sdks", + "forgerock://oidc_callback", + ], + }, + "coreUmaClientConfig": { + "claimsRedirectionUris": [], + }, + "overrideOAuth2ClientConfig": { + "accessTokenMayActScript": "[Empty]", + "accessTokenModificationPluginType": "PROVIDER", + "accessTokenModificationScript": "[Empty]", + "accessTokenModifierClass": null, + "authorizeEndpointDataProviderClass": "org.forgerock.oauth2.core.plugins.registry.DefaultEndpointDataProvider", + "authorizeEndpointDataProviderPluginType": "PROVIDER", + "authorizeEndpointDataProviderScript": "[Empty]", + "clientsCanSkipConsent": false, + "customLoginUrlTemplate": null, + "enableRemoteConsent": false, + "evaluateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeEvaluator", + "evaluateScopePluginType": "PROVIDER", + "evaluateScopeScript": "[Empty]", + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "oidcClaimsClass": null, + "oidcClaimsPluginType": "PROVIDER", + "oidcClaimsScript": "[Empty]", + "oidcMayActScript": "[Empty]", + "overrideableOIDCClaims": [], + "providerOverridesEnabled": false, + "remoteConsentServiceId": null, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": false, + "tokenEncryptionEnabled": false, + "useForceAuthnForMaxAge": false, + "usePolicyEngineForScope": false, + "validateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeValidator", + "validateScopePluginType": "PROVIDER", + "validateScopeScript": "[Empty]", + }, + "signEncOAuth2ClientConfig": { + "authorizationResponseEncryptionAlgorithm": null, + "authorizationResponseEncryptionMethod": null, + "authorizationResponseSigningAlgorithm": "RS256", + "clientJwtPublicKey": null, + "idTokenEncryptionAlgorithm": "RSA-OAEP-256", + "idTokenEncryptionEnabled": false, + "idTokenEncryptionMethod": "A128CBC-HS256", + "idTokenPublicEncryptionKey": null, + "idTokenSignedResponseAlg": "RS256", + "jwkSet": null, + "jwkStoreCacheMissCacheTime": 60000, + "jwksCacheTimeout": 3600000, + "jwksUri": null, + "mTLSCertificateBoundAccessTokens": false, + "mTLSSubjectDN": null, + "mTLSTrustedCert": null, + "publicKeyLocation": "jwks_uri", + "requestParameterEncryptedAlg": null, + "requestParameterEncryptedEncryptionAlgorithm": "A128CBC-HS256", + "requestParameterSignedAlg": null, + "tokenEndpointAuthSigningAlgorithm": "RS256", + "tokenIntrospectionEncryptedResponseAlg": "RSA-OAEP-256", + "tokenIntrospectionEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "tokenIntrospectionResponseFormat": "JSON", + "tokenIntrospectionSignedResponseAlg": "RS256", + "userinfoEncryptedResponseAlg": null, + "userinfoEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "userinfoResponseFormat": "JSON", + "userinfoSignedResponseAlg": null, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/oauth2.app/da190d6b-0fcc-42aa-b890-0cef7486e6d4.oauth2.app.json 1`] = ` +{ + "application": { + "da190d6b-0fcc-42aa-b890-0cef7486e6d4": { + "_id": "da190d6b-0fcc-42aa-b890-0cef7486e6d4", + "_provider": { + "_id": "", + "_type": { + "_id": "oauth-oidc", + "collection": false, + "name": "OAuth2 Provider", + }, + "advancedOAuth2Config": { + "allowClientCredentialsInTokenRequestQueryParameters": true, + "allowedAudienceValues": [], + "authenticationAttributes": [ + "uid", + ], + "codeVerifierEnforced": "false", + "defaultScopes": [ + "address", + "phone", + "openid", + "profile", + "email", + ], + "displayNameAttribute": "cn", + "expClaimRequiredInRequestObject": false, + "grantTypes": [ + "implicit", + "urn:ietf:params:oauth:grant-type:saml2-bearer", + "refresh_token", + "password", + "client_credentials", + "urn:ietf:params:oauth:grant-type:device_code", + "authorization_code", + "urn:openid:params:grant-type:ciba", + "urn:ietf:params:oauth:grant-type:uma-ticket", + "urn:ietf:params:oauth:grant-type:jwt-bearer", + ], + "hashSalt": "&{am.oidc.client.subject.identifier.hash.salt}", + "includeClientIdClaimInStatelessTokens": true, + "includeSubnameInTokenClaims": true, + "macaroonTokenFormat": "V2", + "maxAgeOfRequestObjectNbfClaim": 0, + "maxDifferenceBetweenRequestObjectNbfAndExp": 0, + "moduleMessageEnabledInPasswordGrant": false, + "nbfClaimRequiredInRequestObject": false, + "parRequestUriLifetime": 90, + "passwordGrantAuthService": "Login", + "persistentClaims": [], + "refreshTokenGracePeriod": 0, + "requestObjectProcessing": "OIDC", + "requirePushedAuthorizationRequests": false, + "responseTypeClasses": [ + "code|org.forgerock.oauth2.core.AuthorizationCodeResponseTypeHandler", + "device_code|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "token|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "id_token|org.forgerock.openidconnect.IdTokenResponseTypeHandler", + ], + "supportedScopes": [ + "email|Your email address", + "openid|", + "address|Your postal address", + "phone|Your telephone number(s)", + "profile|Your personal information", + "fr:idm:*", + "am-introspect-all-tokens", + ], + "supportedSubjectTypes": [ + "public", + "pairwise", + ], + "tlsCertificateBoundAccessTokensEnabled": true, + "tlsCertificateRevocationCheckingEnabled": false, + "tlsClientCertificateHeaderFormat": "URLENCODED_PEM", + "tokenCompressionEnabled": false, + "tokenEncryptionEnabled": false, + "tokenExchangeClasses": [ + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToAccessTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToAccessTokenExchanger", + ], + "tokenSigningAlgorithm": "HS256", + "tokenValidatorClasses": [ + "urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.OidcIdTokenValidator", + "urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.OAuth2AccessTokenValidator", + ], + }, + "advancedOIDCConfig": { + "alwaysAddClaimsToToken": true, + "amrMappings": {}, + "authorisedIdmDelegationClients": [], + "authorisedOpenIdConnectSSOClients": [], + "claimsParameterSupported": false, + "defaultACR": [], + "idTokenInfoClientAuthenticationEnabled": true, + "includeAllKtyAlgCombinationsInJwksUri": false, + "loaMapping": {}, + "storeOpsTokens": true, + "supportedAuthorizationResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedAuthorizationResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedAuthorizationResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRequestParameterEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRequestParameterEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRequestParameterSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenEndpointAuthenticationSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenIntrospectionResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedTokenIntrospectionResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedTokenIntrospectionResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedUserInfoEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedUserInfoEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedUserInfoSigningAlgorithms": [ + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + ], + "useForceAuthnForMaxAge": false, + "useForceAuthnForPromptLogin": false, + }, + "cibaConfig": { + "cibaAuthReqIdLifetime": 600, + "cibaMinimumPollingInterval": 2, + "supportedCibaSigningAlgorithms": [ + "ES256", + "PS256", + ], + }, + "clientDynamicRegistrationConfig": { + "allowDynamicRegistration": false, + "dynamicClientRegistrationScope": "dynamic_client_registration", + "dynamicClientRegistrationSoftwareStatementRequired": false, + "generateRegistrationAccessTokens": true, + "requiredSoftwareStatementAttestedAttributes": [ + "redirect_uris", + ], + }, + "consent": { + "clientsCanSkipConsent": true, + "enableRemoteConsent": false, + "supportedRcsRequestEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsRequestEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsRequestSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRcsResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsResponseEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsResponseSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "coreOAuth2Config": { + "accessTokenLifetime": 3600, + "accessTokenMayActScript": "[Empty]", + "codeLifetime": 120, + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "macaroonTokensEnabled": false, + "oidcMayActScript": "[Empty]", + "refreshTokenLifetime": 604800, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": true, + "usePolicyEngineForScope": false, + }, + "coreOIDCConfig": { + "jwtTokenLifetime": 3600, + "oidcDiscoveryEndpointEnabled": true, + "overrideableOIDCClaims": [], + "supportedClaims": [], + "supportedIDTokenEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedIDTokenEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedIDTokenSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "deviceCodeConfig": { + "deviceCodeLifetime": 300, + "devicePollInterval": 5, + "deviceUserCodeCharacterSet": "234567ACDEFGHJKLMNPQRSTWXYZabcdefhijkmnopqrstwxyz", + "deviceUserCodeLength": 8, + }, + "pluginsConfig": { + "accessTokenEnricherClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "accessTokenModificationPluginType": "SCRIPTED", + "accessTokenModificationScript": "39c08084-1238-43e8-857f-2e11005eac49", + "accessTokenModifierClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderPluginType": "JAVA", + "authorizeEndpointDataProviderScript": "[Empty]", + "evaluateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "evaluateScopePluginType": "JAVA", + "evaluateScopeScript": "[Empty]", + "oidcClaimsClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "oidcClaimsPluginType": "SCRIPTED", + "oidcClaimsScript": "cf3515f0-8278-4ee3-a530-1bad7424c416", + "userCodeGeneratorClass": "org.forgerock.oauth2.core.plugins.registry.DefaultUserCodeGenerator", + "validateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "validateScopePluginType": "JAVA", + "validateScopeScript": "[Empty]", + }, + }, + "_type": { + "_id": "OAuth2Client", + "collection": true, + "name": "OAuth2 Clients", + }, + "advancedOAuth2ClientConfig": { + "clientUri": [], + "contacts": [], + "customProperties": [], + "descriptions": [ + "Created by Frodo on 3/20/2024, 9:46:11 AM", + ], + "grantTypes": [ + "client_credentials", + ], + "isConsentImplied": true, + "javascriptOrigins": [], + "logoUri": [], + "mixUpMitigation": false, + "name": [], + "policyUri": [], + "refreshTokenGracePeriod": 0, + "requestUris": [], + "require_pushed_authorization_requests": false, + "responseTypes": [ + "token", + ], + "sectorIdentifierUri": null, + "softwareIdentity": null, + "softwareVersion": null, + "subjectType": "Public", + "tokenEndpointAuthMethod": "client_secret_basic", + "tokenExchangeAuthLevel": 0, + "tosURI": [], + "updateAccessToken": null, + }, + "coreOAuth2ClientConfig": { + "accessTokenLifetime": 3600, + "authorizationCodeLifetime": 120, + "clientName": [ + "da190d6b-0fcc-42aa-b890-0cef7486e6d4", + ], + "clientType": "Confidential", + "defaultScopes": [ + "fr:idm:*", + ], + "loopbackInterfaceRedirection": false, + "redirectionUris": [], + "refreshTokenLifetime": 604800, + "scopes": [ + "fr:idm:*", + "fr:idc:esv:*", + "dynamic_client_registration", + ], + "status": "Active", + "userpassword": null, + }, + "coreOpenIDClientConfig": { + "backchannel_logout_session_required": false, + "backchannel_logout_uri": null, + "claims": [], + "clientSessionUri": null, + "defaultAcrValues": [], + "defaultMaxAge": 600, + "defaultMaxAgeEnabled": false, + "jwtTokenLifetime": 3600, + "postLogoutRedirectUri": [], + }, + "coreUmaClientConfig": { + "claimsRedirectionUris": [], + }, + "overrideOAuth2ClientConfig": { + "accessTokenMayActScript": "[Empty]", + "accessTokenModificationPluginType": "PROVIDER", + "accessTokenModificationScript": "[Empty]", + "authorizeEndpointDataProviderClass": "org.forgerock.oauth2.core.plugins.registry.DefaultEndpointDataProvider", + "authorizeEndpointDataProviderPluginType": "PROVIDER", + "authorizeEndpointDataProviderScript": "[Empty]", + "clientsCanSkipConsent": false, + "enableRemoteConsent": false, + "evaluateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeEvaluator", + "evaluateScopePluginType": "PROVIDER", + "evaluateScopeScript": "[Empty]", + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "oidcClaimsPluginType": "PROVIDER", + "oidcClaimsScript": "[Empty]", + "oidcMayActScript": "[Empty]", + "overrideableOIDCClaims": [], + "providerOverridesEnabled": false, + "remoteConsentServiceId": null, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": false, + "tokenEncryptionEnabled": false, + "useForceAuthnForMaxAge": false, + "usePolicyEngineForScope": false, + "validateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeValidator", + "validateScopePluginType": "PROVIDER", + "validateScopeScript": "[Empty]", + }, + "signEncOAuth2ClientConfig": { + "authorizationResponseEncryptionAlgorithm": null, + "authorizationResponseEncryptionMethod": null, + "authorizationResponseSigningAlgorithm": "RS256", + "clientJwtPublicKey": null, + "idTokenEncryptionAlgorithm": "RSA-OAEP-256", + "idTokenEncryptionEnabled": false, + "idTokenEncryptionMethod": "A128CBC-HS256", + "idTokenPublicEncryptionKey": null, + "idTokenSignedResponseAlg": "RS256", + "jwkSet": null, + "jwkStoreCacheMissCacheTime": 60000, + "jwksCacheTimeout": 3600000, + "jwksUri": null, + "mTLSCertificateBoundAccessTokens": false, + "mTLSSubjectDN": null, + "mTLSTrustedCert": null, + "publicKeyLocation": "jwks_uri", + "requestParameterEncryptedAlg": null, + "requestParameterEncryptedEncryptionAlgorithm": "A128CBC-HS256", + "requestParameterSignedAlg": null, + "tokenEndpointAuthSigningAlgorithm": "RS256", + "tokenIntrospectionEncryptedResponseAlg": "RSA-OAEP-256", + "tokenIntrospectionEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "tokenIntrospectionResponseFormat": "JSON", + "tokenIntrospectionSignedResponseAlg": "RS256", + "userinfoEncryptedResponseAlg": null, + "userinfoEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "userinfoResponseFormat": "JSON", + "userinfoSignedResponseAlg": null, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/oauth2.app/frodo-idm-access.oauth2.app.json 1`] = ` +{ + "application": { + "frodo-idm-access": { + "_id": "frodo-idm-access", + "_provider": { + "_id": "", + "_type": { + "_id": "oauth-oidc", + "collection": false, + "name": "OAuth2 Provider", + }, + "advancedOAuth2Config": { + "allowClientCredentialsInTokenRequestQueryParameters": true, + "allowedAudienceValues": [], + "authenticationAttributes": [ + "uid", + ], + "codeVerifierEnforced": "false", + "defaultScopes": [ + "address", + "phone", + "openid", + "profile", + "email", + ], + "displayNameAttribute": "cn", + "expClaimRequiredInRequestObject": false, + "grantTypes": [ + "implicit", + "urn:ietf:params:oauth:grant-type:saml2-bearer", + "refresh_token", + "password", + "client_credentials", + "urn:ietf:params:oauth:grant-type:device_code", + "authorization_code", + "urn:openid:params:grant-type:ciba", + "urn:ietf:params:oauth:grant-type:uma-ticket", + "urn:ietf:params:oauth:grant-type:jwt-bearer", + ], + "hashSalt": "&{am.oidc.client.subject.identifier.hash.salt}", + "includeClientIdClaimInStatelessTokens": true, + "includeSubnameInTokenClaims": true, + "macaroonTokenFormat": "V2", + "maxAgeOfRequestObjectNbfClaim": 0, + "maxDifferenceBetweenRequestObjectNbfAndExp": 0, + "moduleMessageEnabledInPasswordGrant": false, + "nbfClaimRequiredInRequestObject": false, + "parRequestUriLifetime": 90, + "passwordGrantAuthService": "Login", + "persistentClaims": [], + "refreshTokenGracePeriod": 0, + "requestObjectProcessing": "OIDC", + "requirePushedAuthorizationRequests": false, + "responseTypeClasses": [ + "code|org.forgerock.oauth2.core.AuthorizationCodeResponseTypeHandler", + "device_code|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "token|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "id_token|org.forgerock.openidconnect.IdTokenResponseTypeHandler", + ], + "supportedScopes": [ + "email|Your email address", + "openid|", + "address|Your postal address", + "phone|Your telephone number(s)", + "profile|Your personal information", + "fr:idm:*", + "am-introspect-all-tokens", + ], + "supportedSubjectTypes": [ + "public", + "pairwise", + ], + "tlsCertificateBoundAccessTokensEnabled": true, + "tlsCertificateRevocationCheckingEnabled": false, + "tlsClientCertificateHeaderFormat": "URLENCODED_PEM", + "tokenCompressionEnabled": false, + "tokenEncryptionEnabled": false, + "tokenExchangeClasses": [ + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToAccessTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToAccessTokenExchanger", + ], + "tokenSigningAlgorithm": "HS256", + "tokenValidatorClasses": [ + "urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.OidcIdTokenValidator", + "urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.OAuth2AccessTokenValidator", + ], + }, + "advancedOIDCConfig": { + "alwaysAddClaimsToToken": true, + "amrMappings": {}, + "authorisedIdmDelegationClients": [], + "authorisedOpenIdConnectSSOClients": [], + "claimsParameterSupported": false, + "defaultACR": [], + "idTokenInfoClientAuthenticationEnabled": true, + "includeAllKtyAlgCombinationsInJwksUri": false, + "loaMapping": {}, + "storeOpsTokens": true, + "supportedAuthorizationResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedAuthorizationResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedAuthorizationResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRequestParameterEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRequestParameterEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRequestParameterSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenEndpointAuthenticationSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenIntrospectionResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedTokenIntrospectionResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedTokenIntrospectionResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedUserInfoEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedUserInfoEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedUserInfoSigningAlgorithms": [ + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + ], + "useForceAuthnForMaxAge": false, + "useForceAuthnForPromptLogin": false, + }, + "cibaConfig": { + "cibaAuthReqIdLifetime": 600, + "cibaMinimumPollingInterval": 2, + "supportedCibaSigningAlgorithms": [ + "ES256", + "PS256", + ], + }, + "clientDynamicRegistrationConfig": { + "allowDynamicRegistration": false, + "dynamicClientRegistrationScope": "dynamic_client_registration", + "dynamicClientRegistrationSoftwareStatementRequired": false, + "generateRegistrationAccessTokens": true, + "requiredSoftwareStatementAttestedAttributes": [ + "redirect_uris", + ], + }, + "consent": { + "clientsCanSkipConsent": true, + "enableRemoteConsent": false, + "supportedRcsRequestEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsRequestEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsRequestSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRcsResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsResponseEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsResponseSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "coreOAuth2Config": { + "accessTokenLifetime": 3600, + "accessTokenMayActScript": "[Empty]", + "codeLifetime": 120, + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "macaroonTokensEnabled": false, + "oidcMayActScript": "[Empty]", + "refreshTokenLifetime": 604800, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": true, + "usePolicyEngineForScope": false, + }, + "coreOIDCConfig": { + "jwtTokenLifetime": 3600, + "oidcDiscoveryEndpointEnabled": true, + "overrideableOIDCClaims": [], + "supportedClaims": [], + "supportedIDTokenEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedIDTokenEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedIDTokenSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "deviceCodeConfig": { + "deviceCodeLifetime": 300, + "devicePollInterval": 5, + "deviceUserCodeCharacterSet": "234567ACDEFGHJKLMNPQRSTWXYZabcdefhijkmnopqrstwxyz", + "deviceUserCodeLength": 8, + }, + "pluginsConfig": { + "accessTokenEnricherClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "accessTokenModificationPluginType": "SCRIPTED", + "accessTokenModificationScript": "39c08084-1238-43e8-857f-2e11005eac49", + "accessTokenModifierClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderPluginType": "JAVA", + "authorizeEndpointDataProviderScript": "[Empty]", + "evaluateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "evaluateScopePluginType": "JAVA", + "evaluateScopeScript": "[Empty]", + "oidcClaimsClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "oidcClaimsPluginType": "SCRIPTED", + "oidcClaimsScript": "cf3515f0-8278-4ee3-a530-1bad7424c416", + "userCodeGeneratorClass": "org.forgerock.oauth2.core.plugins.registry.DefaultUserCodeGenerator", + "validateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "validateScopePluginType": "JAVA", + "validateScopeScript": "[Empty]", + }, + }, + "_type": { + "_id": "OAuth2Client", + "collection": true, + "name": "OAuth2 Clients", + }, + "advancedOAuth2ClientConfig": { + "clientUri": [], + "contacts": [], + "customProperties": [], + "descriptions": [ + "Frodo IDM Access", + ], + "grantTypes": [ + "authorization_code", + ], + "isConsentImplied": true, + "javascriptOrigins": [ + "http://localhost:8712", + "https://openam-frodo-dev.forgeblocks.com", + "https://openam-frodo-dev.forgeblocks.com:443", + ], + "logoUri": [], + "mixUpMitigation": false, + "name": [], + "policyUri": [], + "refreshTokenGracePeriod": 0, + "requestUris": [], + "require_pushed_authorization_requests": false, + "responseTypes": [ + "code", + "token", + "id_token", + "code token", + "token id_token", + "code id_token", + "code token id_token", + "device_code", + "device_code id_token", + ], + "sectorIdentifierUri": null, + "softwareIdentity": null, + "softwareVersion": null, + "subjectType": "public", + "tokenEndpointAuthMethod": "client_secret_post", + "tokenExchangeAuthLevel": 0, + "tosURI": [], + "updateAccessToken": null, + }, + "coreOAuth2ClientConfig": { + "accessTokenLifetime": 3600, + "authorizationCodeLifetime": 120, + "clientName": [ + "frodo-idm-access", + ], + "clientType": "Public", + "defaultScopes": [], + "loopbackInterfaceRedirection": false, + "redirectionUris": [ + "http://localhost:8712/frodo", + "https://openam-frodo-dev.forgeblocks.com/platform/appAuthHelperRedirect.html", + ], + "refreshTokenLifetime": 604800, + "scopes": [ + "openid", + "fr:idm:*", + ], + "secretLabelIdentifier": null, + "status": "Active", + }, + "coreOpenIDClientConfig": { + "backchannel_logout_session_required": false, + "backchannel_logout_uri": null, + "claims": [], + "clientSessionUri": null, + "defaultAcrValues": [], + "defaultMaxAge": 600, + "defaultMaxAgeEnabled": false, + "jwtTokenLifetime": 3600, + "postLogoutRedirectUri": [], + }, + "coreUmaClientConfig": { + "claimsRedirectionUris": [], + }, + "overrideOAuth2ClientConfig": { + "accessTokenMayActScript": "[Empty]", + "accessTokenModificationPluginType": "PROVIDER", + "accessTokenModificationScript": "[Empty]", + "authorizeEndpointDataProviderClass": "org.forgerock.oauth2.core.plugins.registry.DefaultEndpointDataProvider", + "authorizeEndpointDataProviderPluginType": "PROVIDER", + "authorizeEndpointDataProviderScript": "[Empty]", + "clientsCanSkipConsent": false, + "enableRemoteConsent": false, + "evaluateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeEvaluator", + "evaluateScopePluginType": "PROVIDER", + "evaluateScopeScript": "[Empty]", + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "oidcClaimsPluginType": "PROVIDER", + "oidcClaimsScript": "[Empty]", + "oidcMayActScript": "[Empty]", + "overrideableOIDCClaims": [], + "providerOverridesEnabled": false, + "remoteConsentServiceId": null, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": false, + "tokenEncryptionEnabled": false, + "useForceAuthnForMaxAge": false, + "usePolicyEngineForScope": false, + "validateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeValidator", + "validateScopePluginType": "PROVIDER", + "validateScopeScript": "[Empty]", + }, + "signEncOAuth2ClientConfig": { + "authorizationResponseEncryptionAlgorithm": null, + "authorizationResponseEncryptionMethod": null, + "authorizationResponseSigningAlgorithm": "RS256", + "clientJwtPublicKey": null, + "idTokenEncryptionAlgorithm": "RSA-OAEP-256", + "idTokenEncryptionEnabled": false, + "idTokenEncryptionMethod": "A128CBC-HS256", + "idTokenPublicEncryptionKey": null, + "idTokenSignedResponseAlg": "RS256", + "jwkSet": null, + "jwkStoreCacheMissCacheTime": 60000, + "jwksCacheTimeout": 3600000, + "jwksUri": null, + "mTLSCertificateBoundAccessTokens": false, + "mTLSSubjectDN": null, + "mTLSTrustedCert": null, + "publicKeyLocation": "jwks_uri", + "requestParameterEncryptedAlg": null, + "requestParameterEncryptedEncryptionAlgorithm": "A128CBC-HS256", + "requestParameterSignedAlg": null, + "tokenEndpointAuthSigningAlgorithm": "RS256", + "tokenIntrospectionEncryptedResponseAlg": "RSA-OAEP-256", + "tokenIntrospectionEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "tokenIntrospectionResponseFormat": "JSON", + "tokenIntrospectionSignedResponseAlg": "RS256", + "userinfoEncryptedResponseAlg": null, + "userinfoEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "userinfoResponseFormat": "JSON", + "userinfoSignedResponseAlg": null, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/oauth2.app/hrlite-client.oauth2.app.json 1`] = ` +{ + "application": { + "hrlite-client": { + "_id": "hrlite-client", + "_provider": { + "_id": "", + "_type": { + "_id": "oauth-oidc", + "collection": false, + "name": "OAuth2 Provider", + }, + "advancedOAuth2Config": { + "allowClientCredentialsInTokenRequestQueryParameters": true, + "allowedAudienceValues": [], + "authenticationAttributes": [ + "uid", + ], + "codeVerifierEnforced": "false", + "defaultScopes": [ + "address", + "phone", + "openid", + "profile", + "email", + ], + "displayNameAttribute": "cn", + "expClaimRequiredInRequestObject": false, + "grantTypes": [ + "implicit", + "urn:ietf:params:oauth:grant-type:saml2-bearer", + "refresh_token", + "password", + "client_credentials", + "urn:ietf:params:oauth:grant-type:device_code", + "authorization_code", + "urn:openid:params:grant-type:ciba", + "urn:ietf:params:oauth:grant-type:uma-ticket", + "urn:ietf:params:oauth:grant-type:jwt-bearer", + ], + "hashSalt": "&{am.oidc.client.subject.identifier.hash.salt}", + "includeClientIdClaimInStatelessTokens": true, + "includeSubnameInTokenClaims": true, + "macaroonTokenFormat": "V2", + "maxAgeOfRequestObjectNbfClaim": 0, + "maxDifferenceBetweenRequestObjectNbfAndExp": 0, + "moduleMessageEnabledInPasswordGrant": false, + "nbfClaimRequiredInRequestObject": false, + "parRequestUriLifetime": 90, + "passwordGrantAuthService": "Login", + "persistentClaims": [], + "refreshTokenGracePeriod": 0, + "requestObjectProcessing": "OIDC", + "requirePushedAuthorizationRequests": false, + "responseTypeClasses": [ + "code|org.forgerock.oauth2.core.AuthorizationCodeResponseTypeHandler", + "device_code|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "token|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "id_token|org.forgerock.openidconnect.IdTokenResponseTypeHandler", + ], + "supportedScopes": [ + "email|Your email address", + "openid|", + "address|Your postal address", + "phone|Your telephone number(s)", + "profile|Your personal information", + "fr:idm:*", + "am-introspect-all-tokens", + ], + "supportedSubjectTypes": [ + "public", + "pairwise", + ], + "tlsCertificateBoundAccessTokensEnabled": true, + "tlsCertificateRevocationCheckingEnabled": false, + "tlsClientCertificateHeaderFormat": "URLENCODED_PEM", + "tokenCompressionEnabled": false, + "tokenEncryptionEnabled": false, + "tokenExchangeClasses": [ + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToAccessTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToAccessTokenExchanger", + ], + "tokenSigningAlgorithm": "HS256", + "tokenValidatorClasses": [ + "urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.OidcIdTokenValidator", + "urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.OAuth2AccessTokenValidator", + ], + }, + "advancedOIDCConfig": { + "alwaysAddClaimsToToken": true, + "amrMappings": {}, + "authorisedIdmDelegationClients": [], + "authorisedOpenIdConnectSSOClients": [], + "claimsParameterSupported": false, + "defaultACR": [], + "idTokenInfoClientAuthenticationEnabled": true, + "includeAllKtyAlgCombinationsInJwksUri": false, + "loaMapping": {}, + "storeOpsTokens": true, + "supportedAuthorizationResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedAuthorizationResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedAuthorizationResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRequestParameterEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRequestParameterEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRequestParameterSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenEndpointAuthenticationSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenIntrospectionResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedTokenIntrospectionResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedTokenIntrospectionResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedUserInfoEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedUserInfoEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedUserInfoSigningAlgorithms": [ + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + ], + "useForceAuthnForMaxAge": false, + "useForceAuthnForPromptLogin": false, + }, + "cibaConfig": { + "cibaAuthReqIdLifetime": 600, + "cibaMinimumPollingInterval": 2, + "supportedCibaSigningAlgorithms": [ + "ES256", + "PS256", + ], + }, + "clientDynamicRegistrationConfig": { + "allowDynamicRegistration": false, + "dynamicClientRegistrationScope": "dynamic_client_registration", + "dynamicClientRegistrationSoftwareStatementRequired": false, + "generateRegistrationAccessTokens": true, + "requiredSoftwareStatementAttestedAttributes": [ + "redirect_uris", + ], + }, + "consent": { + "clientsCanSkipConsent": true, + "enableRemoteConsent": false, + "supportedRcsRequestEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsRequestEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsRequestSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRcsResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsResponseEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsResponseSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "coreOAuth2Config": { + "accessTokenLifetime": 3600, + "accessTokenMayActScript": "[Empty]", + "codeLifetime": 120, + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "macaroonTokensEnabled": false, + "oidcMayActScript": "[Empty]", + "refreshTokenLifetime": 604800, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": true, + "usePolicyEngineForScope": false, + }, + "coreOIDCConfig": { + "jwtTokenLifetime": 3600, + "oidcDiscoveryEndpointEnabled": true, + "overrideableOIDCClaims": [], + "supportedClaims": [], + "supportedIDTokenEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedIDTokenEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedIDTokenSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "deviceCodeConfig": { + "deviceCodeLifetime": 300, + "devicePollInterval": 5, + "deviceUserCodeCharacterSet": "234567ACDEFGHJKLMNPQRSTWXYZabcdefhijkmnopqrstwxyz", + "deviceUserCodeLength": 8, + }, + "pluginsConfig": { + "accessTokenEnricherClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "accessTokenModificationPluginType": "SCRIPTED", + "accessTokenModificationScript": "39c08084-1238-43e8-857f-2e11005eac49", + "accessTokenModifierClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderPluginType": "JAVA", + "authorizeEndpointDataProviderScript": "[Empty]", + "evaluateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "evaluateScopePluginType": "JAVA", + "evaluateScopeScript": "[Empty]", + "oidcClaimsClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "oidcClaimsPluginType": "SCRIPTED", + "oidcClaimsScript": "cf3515f0-8278-4ee3-a530-1bad7424c416", + "userCodeGeneratorClass": "org.forgerock.oauth2.core.plugins.registry.DefaultUserCodeGenerator", + "validateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "validateScopePluginType": "JAVA", + "validateScopeScript": "[Empty]", + }, + }, + "_type": { + "_id": "OAuth2Client", + "collection": true, + "name": "OAuth2 Clients", + }, + "advancedOAuth2ClientConfig": { + "clientUri": [], + "contacts": [], + "customProperties": [], + "descriptions": [ + "hrlite/id_token/callback", + ], + "grantTypes": [ + "authorization_code", + "client_credentials", + "refresh_token", + ], + "isConsentImplied": true, + "javascriptOrigins": [ + "https://volker-demo.encore.forgerock.com", + "https://volker-demo.encore.forgerock.com:443", + "https://volker-demo.encore.forgerock.com", + "https://volker-demo.encore.forgerock.com:443", + ], + "logoUri": [], + "mixUpMitigation": false, + "name": [], + "policyUri": [], + "refreshTokenGracePeriod": 0, + "requestUris": [], + "require_pushed_authorization_requests": false, + "responseTypes": [ + "code", + "token", + "id_token", + ], + "sectorIdentifierUri": null, + "softwareIdentity": null, + "softwareVersion": null, + "subjectType": "Public", + "tokenEndpointAuthMethod": "client_secret_basic", + "tokenExchangeAuthLevel": 0, + "tosURI": [], + "updateAccessToken": null, + }, + "coreOAuth2ClientConfig": { + "accessTokenLifetime": 3600, + "agentgroup": null, + "authorizationCodeLifetime": 120, + "clientName": [], + "clientType": "Confidential", + "defaultScopes": [], + "loopbackInterfaceRedirection": false, + "redirectionUris": [ + "https://volker-demo.encore.forgerock.com/apps/hrlite/id_token/callback", + "https://volker-demo.encore.forgerock.com:443/apps/hrlite/id_token/callback", + "https://volker-demo.encore.forgerock.com/apps/hrlite/id_token/callback", + "https://volker-demo.encore.forgerock.com:443/apps/hrlite/id_token/callback", + "https://volker-demo.encore.forgerock.com/apps/contractor/id_token/callback", + "https://volker-demo.encore.forgerock.com:443/apps/contractor/id_token/callback", + ], + "refreshTokenLifetime": 604800, + "scopes": [ + "openid", + "fr:idm:*", + ], + "status": "Active", + }, + "coreOpenIDClientConfig": { + "backchannel_logout_session_required": false, + "backchannel_logout_uri": null, + "claims": [], + "clientSessionUri": null, + "defaultAcrValues": [], + "defaultMaxAge": 600, + "defaultMaxAgeEnabled": false, + "jwtTokenLifetime": 3600, + "postLogoutRedirectUri": [], + }, + "coreUmaClientConfig": { + "claimsRedirectionUris": [], + }, + "overrideOAuth2ClientConfig": { + "accessTokenMayActScript": "[Empty]", + "accessTokenModificationPluginType": "PROVIDER", + "accessTokenModificationScript": "[Empty]", + "accessTokenModifierClass": null, + "authorizeEndpointDataProviderClass": "org.forgerock.oauth2.core.plugins.registry.DefaultEndpointDataProvider", + "authorizeEndpointDataProviderPluginType": "PROVIDER", + "authorizeEndpointDataProviderScript": "[Empty]", + "clientsCanSkipConsent": false, + "customLoginUrlTemplate": null, + "enableRemoteConsent": false, + "evaluateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeEvaluator", + "evaluateScopePluginType": "PROVIDER", + "evaluateScopeScript": "[Empty]", + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "oidcClaimsClass": null, + "oidcClaimsPluginType": "PROVIDER", + "oidcClaimsScript": "[Empty]", + "oidcMayActScript": "[Empty]", + "overrideableOIDCClaims": [], + "providerOverridesEnabled": false, + "remoteConsentServiceId": null, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": false, + "tokenEncryptionEnabled": false, + "useForceAuthnForMaxAge": false, + "usePolicyEngineForScope": false, + "validateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeValidator", + "validateScopePluginType": "PROVIDER", + "validateScopeScript": "[Empty]", + }, + "signEncOAuth2ClientConfig": { + "authorizationResponseEncryptionAlgorithm": null, + "authorizationResponseEncryptionMethod": null, + "authorizationResponseSigningAlgorithm": "RS256", + "clientJwtPublicKey": null, + "idTokenEncryptionAlgorithm": "RSA-OAEP-256", + "idTokenEncryptionEnabled": false, + "idTokenEncryptionMethod": "A128CBC-HS256", + "idTokenPublicEncryptionKey": null, + "idTokenSignedResponseAlg": "RS256", + "jwkSet": null, + "jwkStoreCacheMissCacheTime": 60000, + "jwksCacheTimeout": 3600000, + "jwksUri": null, + "mTLSCertificateBoundAccessTokens": false, + "mTLSSubjectDN": null, + "mTLSTrustedCert": null, + "publicKeyLocation": "jwks_uri", + "requestParameterEncryptedAlg": null, + "requestParameterEncryptedEncryptionAlgorithm": "A128CBC-HS256", + "requestParameterSignedAlg": null, + "tokenEndpointAuthSigningAlgorithm": "RS256", + "tokenIntrospectionEncryptedResponseAlg": "RSA-OAEP-256", + "tokenIntrospectionEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "tokenIntrospectionResponseFormat": "JSON", + "tokenIntrospectionSignedResponseAlg": "RS256", + "userinfoEncryptedResponseAlg": null, + "userinfoEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "userinfoResponseFormat": "JSON", + "userinfoSignedResponseAlg": null, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/oauth2.app/rfc7523-client1.oauth2.app.json 1`] = ` +{ + "application": { + "rfc7523-client1": { + "_id": "rfc7523-client1", + "_provider": { + "_id": "", + "_type": { + "_id": "oauth-oidc", + "collection": false, + "name": "OAuth2 Provider", + }, + "advancedOAuth2Config": { + "allowClientCredentialsInTokenRequestQueryParameters": true, + "allowedAudienceValues": [], + "authenticationAttributes": [ + "uid", + ], + "codeVerifierEnforced": "false", + "defaultScopes": [ + "address", + "phone", + "openid", + "profile", + "email", + ], + "displayNameAttribute": "cn", + "expClaimRequiredInRequestObject": false, + "grantTypes": [ + "implicit", + "urn:ietf:params:oauth:grant-type:saml2-bearer", + "refresh_token", + "password", + "client_credentials", + "urn:ietf:params:oauth:grant-type:device_code", + "authorization_code", + "urn:openid:params:grant-type:ciba", + "urn:ietf:params:oauth:grant-type:uma-ticket", + "urn:ietf:params:oauth:grant-type:jwt-bearer", + ], + "hashSalt": "&{am.oidc.client.subject.identifier.hash.salt}", + "includeClientIdClaimInStatelessTokens": true, + "includeSubnameInTokenClaims": true, + "macaroonTokenFormat": "V2", + "maxAgeOfRequestObjectNbfClaim": 0, + "maxDifferenceBetweenRequestObjectNbfAndExp": 0, + "moduleMessageEnabledInPasswordGrant": false, + "nbfClaimRequiredInRequestObject": false, + "parRequestUriLifetime": 90, + "passwordGrantAuthService": "Login", + "persistentClaims": [], + "refreshTokenGracePeriod": 0, + "requestObjectProcessing": "OIDC", + "requirePushedAuthorizationRequests": false, + "responseTypeClasses": [ + "code|org.forgerock.oauth2.core.AuthorizationCodeResponseTypeHandler", + "device_code|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "token|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "id_token|org.forgerock.openidconnect.IdTokenResponseTypeHandler", + ], + "supportedScopes": [ + "email|Your email address", + "openid|", + "address|Your postal address", + "phone|Your telephone number(s)", + "profile|Your personal information", + "fr:idm:*", + "am-introspect-all-tokens", + ], + "supportedSubjectTypes": [ + "public", + "pairwise", + ], + "tlsCertificateBoundAccessTokensEnabled": true, + "tlsCertificateRevocationCheckingEnabled": false, + "tlsClientCertificateHeaderFormat": "URLENCODED_PEM", + "tokenCompressionEnabled": false, + "tokenEncryptionEnabled": false, + "tokenExchangeClasses": [ + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToAccessTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToAccessTokenExchanger", + ], + "tokenSigningAlgorithm": "HS256", + "tokenValidatorClasses": [ + "urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.OidcIdTokenValidator", + "urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.OAuth2AccessTokenValidator", + ], + }, + "advancedOIDCConfig": { + "alwaysAddClaimsToToken": true, + "amrMappings": {}, + "authorisedIdmDelegationClients": [], + "authorisedOpenIdConnectSSOClients": [], + "claimsParameterSupported": false, + "defaultACR": [], + "idTokenInfoClientAuthenticationEnabled": true, + "includeAllKtyAlgCombinationsInJwksUri": false, + "loaMapping": {}, + "storeOpsTokens": true, + "supportedAuthorizationResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedAuthorizationResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedAuthorizationResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRequestParameterEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRequestParameterEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRequestParameterSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenEndpointAuthenticationSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenIntrospectionResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedTokenIntrospectionResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedTokenIntrospectionResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedUserInfoEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedUserInfoEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedUserInfoSigningAlgorithms": [ + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + ], + "useForceAuthnForMaxAge": false, + "useForceAuthnForPromptLogin": false, + }, + "cibaConfig": { + "cibaAuthReqIdLifetime": 600, + "cibaMinimumPollingInterval": 2, + "supportedCibaSigningAlgorithms": [ + "ES256", + "PS256", + ], + }, + "clientDynamicRegistrationConfig": { + "allowDynamicRegistration": false, + "dynamicClientRegistrationScope": "dynamic_client_registration", + "dynamicClientRegistrationSoftwareStatementRequired": false, + "generateRegistrationAccessTokens": true, + "requiredSoftwareStatementAttestedAttributes": [ + "redirect_uris", + ], + }, + "consent": { + "clientsCanSkipConsent": true, + "enableRemoteConsent": false, + "supportedRcsRequestEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsRequestEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsRequestSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRcsResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsResponseEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsResponseSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "coreOAuth2Config": { + "accessTokenLifetime": 3600, + "accessTokenMayActScript": "[Empty]", + "codeLifetime": 120, + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "macaroonTokensEnabled": false, + "oidcMayActScript": "[Empty]", + "refreshTokenLifetime": 604800, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": true, + "usePolicyEngineForScope": false, + }, + "coreOIDCConfig": { + "jwtTokenLifetime": 3600, + "oidcDiscoveryEndpointEnabled": true, + "overrideableOIDCClaims": [], + "supportedClaims": [], + "supportedIDTokenEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedIDTokenEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedIDTokenSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "deviceCodeConfig": { + "deviceCodeLifetime": 300, + "devicePollInterval": 5, + "deviceUserCodeCharacterSet": "234567ACDEFGHJKLMNPQRSTWXYZabcdefhijkmnopqrstwxyz", + "deviceUserCodeLength": 8, + }, + "pluginsConfig": { + "accessTokenEnricherClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "accessTokenModificationPluginType": "SCRIPTED", + "accessTokenModificationScript": "39c08084-1238-43e8-857f-2e11005eac49", + "accessTokenModifierClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderPluginType": "JAVA", + "authorizeEndpointDataProviderScript": "[Empty]", + "evaluateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "evaluateScopePluginType": "JAVA", + "evaluateScopeScript": "[Empty]", + "oidcClaimsClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "oidcClaimsPluginType": "SCRIPTED", + "oidcClaimsScript": "cf3515f0-8278-4ee3-a530-1bad7424c416", + "userCodeGeneratorClass": "org.forgerock.oauth2.core.plugins.registry.DefaultUserCodeGenerator", + "validateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "validateScopePluginType": "JAVA", + "validateScopeScript": "[Empty]", + }, + }, + "_type": { + "_id": "OAuth2Client", + "collection": true, + "name": "OAuth2 Clients", + }, + "advancedOAuth2ClientConfig": { + "clientUri": [], + "contacts": [], + "customProperties": [], + "descriptions": [], + "grantTypes": [ + "urn:ietf:params:oauth:grant-type:jwt-bearer", + ], + "isConsentImplied": true, + "javascriptOrigins": [], + "logoUri": [], + "mixUpMitigation": false, + "name": [], + "policyUri": [], + "requestUris": [], + "responseTypes": [ + "token", + ], + "sectorIdentifierUri": null, + "softwareIdentity": null, + "softwareVersion": null, + "subjectType": "Public", + "tokenEndpointAuthMethod": "none", + "tokenExchangeAuthLevel": 0, + "tosURI": [], + "updateAccessToken": null, + }, + "coreOAuth2ClientConfig": { + "accessTokenLifetime": 3600, + "authorizationCodeLifetime": 120, + "clientName": [ + "rfc7523-client1", + ], + "clientType": "Public", + "defaultScopes": [], + "loopbackInterfaceRedirection": false, + "redirectionUris": [], + "refreshTokenLifetime": 604800, + "scopes": [ + "openid", + "fr:am:*", + "fr:idm:*", + ], + "status": "Active", + }, + "coreOpenIDClientConfig": { + "backchannel_logout_session_required": false, + "backchannel_logout_uri": null, + "claims": [], + "clientSessionUri": null, + "defaultAcrValues": [], + "defaultMaxAge": 600, + "defaultMaxAgeEnabled": false, + "jwtTokenLifetime": 3600, + "postLogoutRedirectUri": [], + }, + "coreUmaClientConfig": { + "claimsRedirectionUris": [], + }, + "signEncOAuth2ClientConfig": { + "clientJwtPublicKey": null, + "idTokenEncryptionAlgorithm": "RSA-OAEP-256", + "idTokenEncryptionEnabled": false, + "idTokenEncryptionMethod": "A128CBC-HS256", + "idTokenPublicEncryptionKey": null, + "idTokenSignedResponseAlg": "RS256", + "jwkSet": "{"keys":[{"kty":"RSA","kid":"5rpTrxBPGieY8tVMmxMq_m3ZBbrATN0SlikhoM13VJM","alg":"RS256","e":"AQAB","n":"3oLso7E5tS9FL0ui5KaQe2qEsozeZAwqCHqzEP7KzgMAAvPCQHPZ8etsC9xeYxAyjPnfQc-EXMRqCHqlyxeyR912gBKYVZ6VB9h1zWKCIiUQHpY_nz6bDAt1EisRiH_jqENDOJ0m5ELVLPZoXcsEQ9e_yg352YToGvS560YCBi6xYj4JX5SGs0Rah-SmhpsOZNr46XHolGYivLaRNLJRQc2YV2NArMfb5JcDQ9aSv3EyIXOim7MRFh8uORCiyNpF_y3jOjC17rdJ_0IPnYvPl1-Krq283RzzhIDe2s2CoKAK50XEM8J5FT9298xd7ku1_nyCcNsltGPLj3a7p9OYzofaC8FIfBXX_T4MoNfJ0edNp3FWGin_C_l1z4JnKdSyyBMr4-mB0mIx3td2qK8StFj2hfXZXxtG4cJ0vnP4Qizse-BlqG0Wkmbjijun9cfPiL5AFv-W5OcfQ5R8HqU5JHkQGkWXopZpZtGbqCS7LbDyNBZJNa_qacAIZ98C4sbbRwZgv824hxJlVGu0uxyIqwNHyNnPkZ8zhJ9OCp2l4y8KC3aALyVlBzmi55xh4J8J1cgFXX2v_ilPqUYN9uwQAR4mJ6_tHEPzX7BPxFl1BubNyK5S1ZZevtbUUE8oV9an2fP51H64oYy_1ni6badcu0TOPr2ISGuwFvQxtllHRcE"}]}", + "jwkStoreCacheMissCacheTime": 60000, + "jwksCacheTimeout": 3600000, + "jwksUri": null, + "mTLSCertificateBoundAccessTokens": false, + "mTLSSubjectDN": null, + "mTLSTrustedCert": null, + "publicKeyLocation": "jwks", + "requestParameterEncryptedAlg": null, + "requestParameterEncryptedEncryptionAlgorithm": "A128CBC-HS256", + "requestParameterSignedAlg": null, + "tokenEndpointAuthSigningAlgorithm": "RS256", + "tokenIntrospectionEncryptedResponseAlg": "RSA-OAEP-256", + "tokenIntrospectionEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "tokenIntrospectionResponseFormat": "JSON", + "tokenIntrospectionSignedResponseAlg": "RS256", + "userinfoEncryptedResponseAlg": null, + "userinfoEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "userinfoResponseFormat": "JSON", + "userinfoSignedResponseAlg": null, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/oauth2.app/test2.oauth2.app.json 1`] = ` +{ + "application": { + "test2": { + "_id": "test2", + "_provider": { + "_id": "", + "_type": { + "_id": "oauth-oidc", + "collection": false, + "name": "OAuth2 Provider", + }, + "advancedOAuth2Config": { + "allowClientCredentialsInTokenRequestQueryParameters": true, + "allowedAudienceValues": [], + "authenticationAttributes": [ + "uid", + ], + "codeVerifierEnforced": "false", + "defaultScopes": [ + "address", + "phone", + "openid", + "profile", + "email", + ], + "displayNameAttribute": "cn", + "expClaimRequiredInRequestObject": false, + "grantTypes": [ + "implicit", + "urn:ietf:params:oauth:grant-type:saml2-bearer", + "refresh_token", + "password", + "client_credentials", + "urn:ietf:params:oauth:grant-type:device_code", + "authorization_code", + "urn:openid:params:grant-type:ciba", + "urn:ietf:params:oauth:grant-type:uma-ticket", + "urn:ietf:params:oauth:grant-type:jwt-bearer", + ], + "hashSalt": "&{am.oidc.client.subject.identifier.hash.salt}", + "includeClientIdClaimInStatelessTokens": true, + "includeSubnameInTokenClaims": true, + "macaroonTokenFormat": "V2", + "maxAgeOfRequestObjectNbfClaim": 0, + "maxDifferenceBetweenRequestObjectNbfAndExp": 0, + "moduleMessageEnabledInPasswordGrant": false, + "nbfClaimRequiredInRequestObject": false, + "parRequestUriLifetime": 90, + "passwordGrantAuthService": "Login", + "persistentClaims": [], + "refreshTokenGracePeriod": 0, + "requestObjectProcessing": "OIDC", + "requirePushedAuthorizationRequests": false, + "responseTypeClasses": [ + "code|org.forgerock.oauth2.core.AuthorizationCodeResponseTypeHandler", + "device_code|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "token|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "id_token|org.forgerock.openidconnect.IdTokenResponseTypeHandler", + ], + "supportedScopes": [ + "email|Your email address", + "openid|", + "address|Your postal address", + "phone|Your telephone number(s)", + "profile|Your personal information", + "fr:idm:*", + "am-introspect-all-tokens", + ], + "supportedSubjectTypes": [ + "public", + "pairwise", + ], + "tlsCertificateBoundAccessTokensEnabled": true, + "tlsCertificateRevocationCheckingEnabled": false, + "tlsClientCertificateHeaderFormat": "URLENCODED_PEM", + "tokenCompressionEnabled": false, + "tokenEncryptionEnabled": false, + "tokenExchangeClasses": [ + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToAccessTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToAccessTokenExchanger", + ], + "tokenSigningAlgorithm": "HS256", + "tokenValidatorClasses": [ + "urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.OidcIdTokenValidator", + "urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.OAuth2AccessTokenValidator", + ], + }, + "advancedOIDCConfig": { + "alwaysAddClaimsToToken": true, + "amrMappings": {}, + "authorisedIdmDelegationClients": [], + "authorisedOpenIdConnectSSOClients": [], + "claimsParameterSupported": false, + "defaultACR": [], + "idTokenInfoClientAuthenticationEnabled": true, + "includeAllKtyAlgCombinationsInJwksUri": false, + "loaMapping": {}, + "storeOpsTokens": true, + "supportedAuthorizationResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedAuthorizationResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedAuthorizationResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRequestParameterEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRequestParameterEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRequestParameterSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenEndpointAuthenticationSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenIntrospectionResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedTokenIntrospectionResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedTokenIntrospectionResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedUserInfoEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedUserInfoEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedUserInfoSigningAlgorithms": [ + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + ], + "useForceAuthnForMaxAge": false, + "useForceAuthnForPromptLogin": false, + }, + "cibaConfig": { + "cibaAuthReqIdLifetime": 600, + "cibaMinimumPollingInterval": 2, + "supportedCibaSigningAlgorithms": [ + "ES256", + "PS256", + ], + }, + "clientDynamicRegistrationConfig": { + "allowDynamicRegistration": false, + "dynamicClientRegistrationScope": "dynamic_client_registration", + "dynamicClientRegistrationSoftwareStatementRequired": false, + "generateRegistrationAccessTokens": true, + "requiredSoftwareStatementAttestedAttributes": [ + "redirect_uris", + ], + }, + "consent": { + "clientsCanSkipConsent": true, + "enableRemoteConsent": false, + "supportedRcsRequestEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsRequestEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsRequestSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRcsResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsResponseEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsResponseSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "coreOAuth2Config": { + "accessTokenLifetime": 3600, + "accessTokenMayActScript": "[Empty]", + "codeLifetime": 120, + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "macaroonTokensEnabled": false, + "oidcMayActScript": "[Empty]", + "refreshTokenLifetime": 604800, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": true, + "usePolicyEngineForScope": false, + }, + "coreOIDCConfig": { + "jwtTokenLifetime": 3600, + "oidcDiscoveryEndpointEnabled": true, + "overrideableOIDCClaims": [], + "supportedClaims": [], + "supportedIDTokenEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedIDTokenEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedIDTokenSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "deviceCodeConfig": { + "deviceCodeLifetime": 300, + "devicePollInterval": 5, + "deviceUserCodeCharacterSet": "234567ACDEFGHJKLMNPQRSTWXYZabcdefhijkmnopqrstwxyz", + "deviceUserCodeLength": 8, + }, + "pluginsConfig": { + "accessTokenEnricherClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "accessTokenModificationPluginType": "SCRIPTED", + "accessTokenModificationScript": "39c08084-1238-43e8-857f-2e11005eac49", + "accessTokenModifierClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderPluginType": "JAVA", + "authorizeEndpointDataProviderScript": "[Empty]", + "evaluateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "evaluateScopePluginType": "JAVA", + "evaluateScopeScript": "[Empty]", + "oidcClaimsClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "oidcClaimsPluginType": "SCRIPTED", + "oidcClaimsScript": "cf3515f0-8278-4ee3-a530-1bad7424c416", + "userCodeGeneratorClass": "org.forgerock.oauth2.core.plugins.registry.DefaultUserCodeGenerator", + "validateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "validateScopePluginType": "JAVA", + "validateScopeScript": "[Empty]", + }, + }, + "_type": { + "_id": "OAuth2Client", + "collection": true, + "name": "OAuth2 Clients", + }, + "advancedOAuth2ClientConfig": { + "clientUri": [], + "contacts": [], + "customProperties": [], + "descriptions": [ + "Modified by Frodo on 4/16/2022, 8:41:59 PM", + ], + "grantTypes": [ + "authorization_code", + "refresh_token", + "client_credentials", + ], + "isConsentImplied": false, + "javascriptOrigins": [], + "logoUri": [], + "mixUpMitigation": false, + "name": [], + "policyUri": [], + "requestUris": [], + "responseTypes": [ + "code", + "token", + "id_token", + ], + "sectorIdentifierUri": null, + "softwareIdentity": null, + "softwareVersion": null, + "subjectType": "public", + "tokenEndpointAuthMethod": "client_secret_basic", + "tokenExchangeAuthLevel": 0, + "tosURI": [], + "updateAccessToken": null, + }, + "coreOAuth2ClientConfig": { + "accessTokenLifetime": 0, + "authorizationCodeLifetime": 0, + "clientName": [ + "test2", + ], + "clientType": "Confidential", + "defaultScopes": [ + "openid", + ], + "loopbackInterfaceRedirection": false, + "redirectionUris": [], + "refreshTokenLifetime": 0, + "scopes": [ + "openid", + "fr:idm:*", + ], + "status": "Active", + }, + "coreOpenIDClientConfig": { + "backchannel_logout_session_required": false, + "backchannel_logout_uri": null, + "claims": [], + "clientSessionUri": null, + "defaultAcrValues": [], + "defaultMaxAge": 600, + "defaultMaxAgeEnabled": false, + "jwtTokenLifetime": 0, + "postLogoutRedirectUri": [], + }, + "coreUmaClientConfig": { + "claimsRedirectionUris": [], + }, + "overrideOAuth2ClientConfig": { + "accessTokenMayActScript": "[Empty]", + "accessTokenModificationScript": "d22f9a0c-426a-4466-b95e-d0f125b0d5fa", + "clientsCanSkipConsent": false, + "enableRemoteConsent": false, + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "oidcClaimsScript": "36863ffb-40ec-48b9-94b1-9a99f71cc3b5", + "oidcMayActScript": "[Empty]", + "overrideableOIDCClaims": [], + "providerOverridesEnabled": false, + "remoteConsentServiceId": null, + "statelessTokensEnabled": false, + "tokenEncryptionEnabled": false, + "usePolicyEngineForScope": false, + }, + "signEncOAuth2ClientConfig": { + "clientJwtPublicKey": null, + "idTokenEncryptionAlgorithm": "RSA-OAEP-256", + "idTokenEncryptionEnabled": false, + "idTokenEncryptionMethod": "A128CBC-HS256", + "idTokenPublicEncryptionKey": null, + "idTokenSignedResponseAlg": "RS256", + "jwkSet": null, + "jwkStoreCacheMissCacheTime": 60000, + "jwksCacheTimeout": 3600000, + "jwksUri": null, + "mTLSCertificateBoundAccessTokens": false, + "mTLSSubjectDN": null, + "mTLSTrustedCert": null, + "publicKeyLocation": "jwks_uri", + "requestParameterEncryptedAlg": null, + "requestParameterEncryptedEncryptionAlgorithm": "A128CBC-HS256", + "requestParameterSignedAlg": null, + "tokenEndpointAuthSigningAlgorithm": "RS256", + "tokenIntrospectionEncryptedResponseAlg": "RSA-OAEP-256", + "tokenIntrospectionEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "tokenIntrospectionResponseFormat": "JSON", + "tokenIntrospectionSignedResponseAlg": "RS256", + "userinfoEncryptedResponseAlg": null, + "userinfoEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "userinfoResponseFormat": "JSON", + "userinfoSignedResponseAlg": null, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/oauth2.app/testapp.oauth2.app.json 1`] = ` +{ + "application": { + "testapp": { + "_id": "testapp", + "_provider": { + "_id": "", + "_type": { + "_id": "oauth-oidc", + "collection": false, + "name": "OAuth2 Provider", + }, + "advancedOAuth2Config": { + "allowClientCredentialsInTokenRequestQueryParameters": true, + "allowedAudienceValues": [], + "authenticationAttributes": [ + "uid", + ], + "codeVerifierEnforced": "false", + "defaultScopes": [ + "address", + "phone", + "openid", + "profile", + "email", + ], + "displayNameAttribute": "cn", + "expClaimRequiredInRequestObject": false, + "grantTypes": [ + "implicit", + "urn:ietf:params:oauth:grant-type:saml2-bearer", + "refresh_token", + "password", + "client_credentials", + "urn:ietf:params:oauth:grant-type:device_code", + "authorization_code", + "urn:openid:params:grant-type:ciba", + "urn:ietf:params:oauth:grant-type:uma-ticket", + "urn:ietf:params:oauth:grant-type:jwt-bearer", + ], + "hashSalt": "&{am.oidc.client.subject.identifier.hash.salt}", + "includeClientIdClaimInStatelessTokens": true, + "includeSubnameInTokenClaims": true, + "macaroonTokenFormat": "V2", + "maxAgeOfRequestObjectNbfClaim": 0, + "maxDifferenceBetweenRequestObjectNbfAndExp": 0, + "moduleMessageEnabledInPasswordGrant": false, + "nbfClaimRequiredInRequestObject": false, + "parRequestUriLifetime": 90, + "passwordGrantAuthService": "Login", + "persistentClaims": [], + "refreshTokenGracePeriod": 0, + "requestObjectProcessing": "OIDC", + "requirePushedAuthorizationRequests": false, + "responseTypeClasses": [ + "code|org.forgerock.oauth2.core.AuthorizationCodeResponseTypeHandler", + "device_code|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "token|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "id_token|org.forgerock.openidconnect.IdTokenResponseTypeHandler", + ], + "supportedScopes": [ + "email|Your email address", + "openid|", + "address|Your postal address", + "phone|Your telephone number(s)", + "profile|Your personal information", + "fr:idm:*", + "am-introspect-all-tokens", + ], + "supportedSubjectTypes": [ + "public", + "pairwise", + ], + "tlsCertificateBoundAccessTokensEnabled": true, + "tlsCertificateRevocationCheckingEnabled": false, + "tlsClientCertificateHeaderFormat": "URLENCODED_PEM", + "tokenCompressionEnabled": false, + "tokenEncryptionEnabled": false, + "tokenExchangeClasses": [ + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToAccessTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToAccessTokenExchanger", + ], + "tokenSigningAlgorithm": "HS256", + "tokenValidatorClasses": [ + "urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.OidcIdTokenValidator", + "urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.OAuth2AccessTokenValidator", + ], + }, + "advancedOIDCConfig": { + "alwaysAddClaimsToToken": true, + "amrMappings": {}, + "authorisedIdmDelegationClients": [], + "authorisedOpenIdConnectSSOClients": [], + "claimsParameterSupported": false, + "defaultACR": [], + "idTokenInfoClientAuthenticationEnabled": true, + "includeAllKtyAlgCombinationsInJwksUri": false, + "loaMapping": {}, + "storeOpsTokens": true, + "supportedAuthorizationResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedAuthorizationResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedAuthorizationResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRequestParameterEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRequestParameterEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRequestParameterSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenEndpointAuthenticationSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenIntrospectionResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedTokenIntrospectionResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedTokenIntrospectionResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedUserInfoEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedUserInfoEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedUserInfoSigningAlgorithms": [ + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + ], + "useForceAuthnForMaxAge": false, + "useForceAuthnForPromptLogin": false, + }, + "cibaConfig": { + "cibaAuthReqIdLifetime": 600, + "cibaMinimumPollingInterval": 2, + "supportedCibaSigningAlgorithms": [ + "ES256", + "PS256", + ], + }, + "clientDynamicRegistrationConfig": { + "allowDynamicRegistration": false, + "dynamicClientRegistrationScope": "dynamic_client_registration", + "dynamicClientRegistrationSoftwareStatementRequired": false, + "generateRegistrationAccessTokens": true, + "requiredSoftwareStatementAttestedAttributes": [ + "redirect_uris", + ], + }, + "consent": { + "clientsCanSkipConsent": true, + "enableRemoteConsent": false, + "supportedRcsRequestEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsRequestEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsRequestSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRcsResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsResponseEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsResponseSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "coreOAuth2Config": { + "accessTokenLifetime": 3600, + "accessTokenMayActScript": "[Empty]", + "codeLifetime": 120, + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "macaroonTokensEnabled": false, + "oidcMayActScript": "[Empty]", + "refreshTokenLifetime": 604800, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": true, + "usePolicyEngineForScope": false, + }, + "coreOIDCConfig": { + "jwtTokenLifetime": 3600, + "oidcDiscoveryEndpointEnabled": true, + "overrideableOIDCClaims": [], + "supportedClaims": [], + "supportedIDTokenEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedIDTokenEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedIDTokenSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "deviceCodeConfig": { + "deviceCodeLifetime": 300, + "devicePollInterval": 5, + "deviceUserCodeCharacterSet": "234567ACDEFGHJKLMNPQRSTWXYZabcdefhijkmnopqrstwxyz", + "deviceUserCodeLength": 8, + }, + "pluginsConfig": { + "accessTokenEnricherClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "accessTokenModificationPluginType": "SCRIPTED", + "accessTokenModificationScript": "39c08084-1238-43e8-857f-2e11005eac49", + "accessTokenModifierClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderPluginType": "JAVA", + "authorizeEndpointDataProviderScript": "[Empty]", + "evaluateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "evaluateScopePluginType": "JAVA", + "evaluateScopeScript": "[Empty]", + "oidcClaimsClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "oidcClaimsPluginType": "SCRIPTED", + "oidcClaimsScript": "cf3515f0-8278-4ee3-a530-1bad7424c416", + "userCodeGeneratorClass": "org.forgerock.oauth2.core.plugins.registry.DefaultUserCodeGenerator", + "validateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "validateScopePluginType": "JAVA", + "validateScopeScript": "[Empty]", + }, + }, + "_type": { + "_id": "OAuth2Client", + "collection": true, + "name": "OAuth2 Clients", + }, + "advancedOAuth2ClientConfig": { + "clientUri": [], + "contacts": [], + "customProperties": [], + "descriptions": [ + "Test Application", + ], + "grantTypes": [ + "authorization_code", + ], + "isConsentImplied": false, + "javascriptOrigins": [], + "logoUri": [], + "mixUpMitigation": false, + "name": [], + "policyUri": [], + "refreshTokenGracePeriod": 0, + "requestUris": [], + "require_pushed_authorization_requests": false, + "responseTypes": [ + "code", + "token", + "id_token", + "code token", + "token id_token", + "code id_token", + "code token id_token", + "device_code", + "device_code id_token", + ], + "sectorIdentifierUri": null, + "softwareIdentity": null, + "softwareVersion": null, + "subjectType": "public", + "tokenEndpointAuthMethod": "client_secret_basic", + "tokenExchangeAuthLevel": 0, + "tosURI": [], + "updateAccessToken": null, + }, + "coreOAuth2ClientConfig": { + "accessTokenLifetime": 0, + "agentgroup": null, + "authorizationCodeLifetime": 0, + "clientName": [ + "testapp", + ], + "clientType": "Confidential", + "defaultScopes": [], + "loopbackInterfaceRedirection": false, + "redirectionUris": [], + "refreshTokenLifetime": 0, + "scopes": [], + "secretLabelIdentifier": null, + "status": "Active", + }, + "coreOpenIDClientConfig": { + "backchannel_logout_session_required": false, + "backchannel_logout_uri": null, + "claims": [], + "clientSessionUri": null, + "defaultAcrValues": [], + "defaultMaxAge": 600, + "defaultMaxAgeEnabled": false, + "jwtTokenLifetime": 0, + "postLogoutRedirectUri": [], + }, + "coreUmaClientConfig": { + "claimsRedirectionUris": [], + }, + "overrideOAuth2ClientConfig": { + "accessTokenMayActScript": "[Empty]", + "accessTokenModificationPluginType": "PROVIDER", + "accessTokenModificationScript": "[Empty]", + "accessTokenModifierClass": null, + "authorizeEndpointDataProviderClass": "org.forgerock.oauth2.core.plugins.registry.DefaultEndpointDataProvider", + "authorizeEndpointDataProviderPluginType": "PROVIDER", + "authorizeEndpointDataProviderScript": "[Empty]", + "clientsCanSkipConsent": false, + "customLoginUrlTemplate": null, + "enableRemoteConsent": false, + "evaluateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeEvaluator", + "evaluateScopePluginType": "PROVIDER", + "evaluateScopeScript": "[Empty]", + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "oidcClaimsClass": null, + "oidcClaimsPluginType": "PROVIDER", + "oidcClaimsScript": "[Empty]", + "oidcMayActScript": "[Empty]", + "overrideableOIDCClaims": [], + "providerOverridesEnabled": false, + "remoteConsentServiceId": null, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": false, + "tokenEncryptionEnabled": false, + "useForceAuthnForMaxAge": false, + "usePolicyEngineForScope": false, + "validateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeValidator", + "validateScopePluginType": "PROVIDER", + "validateScopeScript": "[Empty]", + }, + "signEncOAuth2ClientConfig": { + "authorizationResponseEncryptionAlgorithm": null, + "authorizationResponseEncryptionMethod": null, + "authorizationResponseSigningAlgorithm": "RS256", + "clientJwtPublicKey": null, + "idTokenEncryptionAlgorithm": "RSA-OAEP-256", + "idTokenEncryptionEnabled": false, + "idTokenEncryptionMethod": "A128CBC-HS256", + "idTokenPublicEncryptionKey": null, + "idTokenSignedResponseAlg": "RS256", + "jwkSet": null, + "jwkStoreCacheMissCacheTime": 60000, + "jwksCacheTimeout": 3600000, + "jwksUri": null, + "mTLSCertificateBoundAccessTokens": false, + "mTLSSubjectDN": null, + "mTLSTrustedCert": null, + "publicKeyLocation": "jwks_uri", + "requestParameterEncryptedAlg": null, + "requestParameterEncryptedEncryptionAlgorithm": "A128CBC-HS256", + "requestParameterSignedAlg": null, + "tokenEndpointAuthSigningAlgorithm": "RS256", + "tokenIntrospectionEncryptedResponseAlg": "RSA-OAEP-256", + "tokenIntrospectionEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "tokenIntrospectionResponseFormat": "JSON", + "tokenIntrospectionSignedResponseAlg": "RS256", + "userinfoEncryptedResponseAlg": null, + "userinfoEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "userinfoResponseFormat": "JSON", + "userinfoSignedResponseAlg": null, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/oauth2.app/testclient.oauth2.app.json 1`] = ` +{ + "application": { + "testclient": { + "_id": "testclient", + "_provider": { + "_id": "", + "_type": { + "_id": "oauth-oidc", + "collection": false, + "name": "OAuth2 Provider", + }, + "advancedOAuth2Config": { + "allowClientCredentialsInTokenRequestQueryParameters": true, + "allowedAudienceValues": [], + "authenticationAttributes": [ + "uid", + ], + "codeVerifierEnforced": "false", + "defaultScopes": [ + "address", + "phone", + "openid", + "profile", + "email", + ], + "displayNameAttribute": "cn", + "expClaimRequiredInRequestObject": false, + "grantTypes": [ + "implicit", + "urn:ietf:params:oauth:grant-type:saml2-bearer", + "refresh_token", + "password", + "client_credentials", + "urn:ietf:params:oauth:grant-type:device_code", + "authorization_code", + "urn:openid:params:grant-type:ciba", + "urn:ietf:params:oauth:grant-type:uma-ticket", + "urn:ietf:params:oauth:grant-type:jwt-bearer", + ], + "hashSalt": "&{am.oidc.client.subject.identifier.hash.salt}", + "includeClientIdClaimInStatelessTokens": true, + "includeSubnameInTokenClaims": true, + "macaroonTokenFormat": "V2", + "maxAgeOfRequestObjectNbfClaim": 0, + "maxDifferenceBetweenRequestObjectNbfAndExp": 0, + "moduleMessageEnabledInPasswordGrant": false, + "nbfClaimRequiredInRequestObject": false, + "parRequestUriLifetime": 90, + "passwordGrantAuthService": "Login", + "persistentClaims": [], + "refreshTokenGracePeriod": 0, + "requestObjectProcessing": "OIDC", + "requirePushedAuthorizationRequests": false, + "responseTypeClasses": [ + "code|org.forgerock.oauth2.core.AuthorizationCodeResponseTypeHandler", + "device_code|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "token|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "id_token|org.forgerock.openidconnect.IdTokenResponseTypeHandler", + ], + "supportedScopes": [ + "email|Your email address", + "openid|", + "address|Your postal address", + "phone|Your telephone number(s)", + "profile|Your personal information", + "fr:idm:*", + "am-introspect-all-tokens", + ], + "supportedSubjectTypes": [ + "public", + "pairwise", + ], + "tlsCertificateBoundAccessTokensEnabled": true, + "tlsCertificateRevocationCheckingEnabled": false, + "tlsClientCertificateHeaderFormat": "URLENCODED_PEM", + "tokenCompressionEnabled": false, + "tokenEncryptionEnabled": false, + "tokenExchangeClasses": [ + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToAccessTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToAccessTokenExchanger", + ], + "tokenSigningAlgorithm": "HS256", + "tokenValidatorClasses": [ + "urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.OidcIdTokenValidator", + "urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.OAuth2AccessTokenValidator", + ], + }, + "advancedOIDCConfig": { + "alwaysAddClaimsToToken": true, + "amrMappings": {}, + "authorisedIdmDelegationClients": [], + "authorisedOpenIdConnectSSOClients": [], + "claimsParameterSupported": false, + "defaultACR": [], + "idTokenInfoClientAuthenticationEnabled": true, + "includeAllKtyAlgCombinationsInJwksUri": false, + "loaMapping": {}, + "storeOpsTokens": true, + "supportedAuthorizationResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedAuthorizationResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedAuthorizationResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRequestParameterEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRequestParameterEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRequestParameterSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenEndpointAuthenticationSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenIntrospectionResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedTokenIntrospectionResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedTokenIntrospectionResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedUserInfoEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedUserInfoEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedUserInfoSigningAlgorithms": [ + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + ], + "useForceAuthnForMaxAge": false, + "useForceAuthnForPromptLogin": false, + }, + "cibaConfig": { + "cibaAuthReqIdLifetime": 600, + "cibaMinimumPollingInterval": 2, + "supportedCibaSigningAlgorithms": [ + "ES256", + "PS256", + ], + }, + "clientDynamicRegistrationConfig": { + "allowDynamicRegistration": false, + "dynamicClientRegistrationScope": "dynamic_client_registration", + "dynamicClientRegistrationSoftwareStatementRequired": false, + "generateRegistrationAccessTokens": true, + "requiredSoftwareStatementAttestedAttributes": [ + "redirect_uris", + ], + }, + "consent": { + "clientsCanSkipConsent": true, + "enableRemoteConsent": false, + "supportedRcsRequestEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsRequestEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsRequestSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRcsResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsResponseEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsResponseSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "coreOAuth2Config": { + "accessTokenLifetime": 3600, + "accessTokenMayActScript": "[Empty]", + "codeLifetime": 120, + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "macaroonTokensEnabled": false, + "oidcMayActScript": "[Empty]", + "refreshTokenLifetime": 604800, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": true, + "usePolicyEngineForScope": false, + }, + "coreOIDCConfig": { + "jwtTokenLifetime": 3600, + "oidcDiscoveryEndpointEnabled": true, + "overrideableOIDCClaims": [], + "supportedClaims": [], + "supportedIDTokenEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedIDTokenEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedIDTokenSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "deviceCodeConfig": { + "deviceCodeLifetime": 300, + "devicePollInterval": 5, + "deviceUserCodeCharacterSet": "234567ACDEFGHJKLMNPQRSTWXYZabcdefhijkmnopqrstwxyz", + "deviceUserCodeLength": 8, + }, + "pluginsConfig": { + "accessTokenEnricherClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "accessTokenModificationPluginType": "SCRIPTED", + "accessTokenModificationScript": "39c08084-1238-43e8-857f-2e11005eac49", + "accessTokenModifierClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderPluginType": "JAVA", + "authorizeEndpointDataProviderScript": "[Empty]", + "evaluateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "evaluateScopePluginType": "JAVA", + "evaluateScopeScript": "[Empty]", + "oidcClaimsClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "oidcClaimsPluginType": "SCRIPTED", + "oidcClaimsScript": "cf3515f0-8278-4ee3-a530-1bad7424c416", + "userCodeGeneratorClass": "org.forgerock.oauth2.core.plugins.registry.DefaultUserCodeGenerator", + "validateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "validateScopePluginType": "JAVA", + "validateScopeScript": "[Empty]", + }, + }, + "_type": { + "_id": "OAuth2Client", + "collection": true, + "name": "OAuth2 Clients", + }, + "advancedOAuth2ClientConfig": { + "clientUri": [], + "contacts": [], + "customProperties": [], + "descriptions": [], + "grantTypes": [ + "authorization_code", + ], + "isConsentImplied": false, + "javascriptOrigins": [], + "logoUri": [], + "mixUpMitigation": false, + "name": [], + "policyUri": [], + "requestUris": [], + "responseTypes": [ + "code", + "token", + "id_token", + "code token", + "token id_token", + "code id_token", + "code token id_token", + "device_code", + "device_code id_token", + ], + "sectorIdentifierUri": null, + "softwareIdentity": null, + "softwareVersion": null, + "subjectType": "public", + "tokenEndpointAuthMethod": "client_secret_basic", + "tokenExchangeAuthLevel": 0, + "tosURI": [], + "updateAccessToken": null, + }, + "coreOAuth2ClientConfig": { + "accessTokenLifetime": 0, + "authorizationCodeLifetime": 0, + "clientName": [], + "clientType": "Confidential", + "defaultScopes": [], + "loopbackInterfaceRedirection": false, + "redirectionUris": [], + "refreshTokenLifetime": 0, + "scopes": [ + "email", + "openid", + "profile", + ], + "status": "Active", + }, + "coreOpenIDClientConfig": { + "backchannel_logout_session_required": false, + "backchannel_logout_uri": null, + "claims": [], + "clientSessionUri": null, + "defaultAcrValues": [], + "defaultMaxAge": 600, + "defaultMaxAgeEnabled": false, + "jwtTokenLifetime": 0, + "postLogoutRedirectUri": [], + }, + "coreUmaClientConfig": { + "claimsRedirectionUris": [], + }, + "signEncOAuth2ClientConfig": { + "clientJwtPublicKey": null, + "idTokenEncryptionAlgorithm": "RSA-OAEP-256", + "idTokenEncryptionEnabled": false, + "idTokenEncryptionMethod": "A128CBC-HS256", + "idTokenPublicEncryptionKey": null, + "idTokenSignedResponseAlg": "RS256", + "jwkSet": null, + "jwkStoreCacheMissCacheTime": 60000, + "jwksCacheTimeout": 3600000, + "jwksUri": null, + "mTLSCertificateBoundAccessTokens": false, + "mTLSSubjectDN": null, + "mTLSTrustedCert": null, + "publicKeyLocation": "jwks_uri", + "requestParameterEncryptedAlg": null, + "requestParameterEncryptedEncryptionAlgorithm": "A128CBC-HS256", + "requestParameterSignedAlg": null, + "tokenEndpointAuthSigningAlgorithm": "RS256", + "tokenIntrospectionEncryptedResponseAlg": "RSA-OAEP-256", + "tokenIntrospectionEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "tokenIntrospectionResponseFormat": "JSON", + "tokenIntrospectionSignedResponseAlg": "RS256", + "userinfoEncryptedResponseAlg": null, + "userinfoEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "userinfoResponseFormat": "JSON", + "userinfoSignedResponseAlg": null, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/oauth2.app/testmeout.oauth2.app.json 1`] = ` +{ + "application": { + "testmeout": { + "_id": "testmeout", + "_provider": { + "_id": "", + "_type": { + "_id": "oauth-oidc", + "collection": false, + "name": "OAuth2 Provider", + }, + "advancedOAuth2Config": { + "allowClientCredentialsInTokenRequestQueryParameters": true, + "allowedAudienceValues": [], + "authenticationAttributes": [ + "uid", + ], + "codeVerifierEnforced": "false", + "defaultScopes": [ + "address", + "phone", + "openid", + "profile", + "email", + ], + "displayNameAttribute": "cn", + "expClaimRequiredInRequestObject": false, + "grantTypes": [ + "implicit", + "urn:ietf:params:oauth:grant-type:saml2-bearer", + "refresh_token", + "password", + "client_credentials", + "urn:ietf:params:oauth:grant-type:device_code", + "authorization_code", + "urn:openid:params:grant-type:ciba", + "urn:ietf:params:oauth:grant-type:uma-ticket", + "urn:ietf:params:oauth:grant-type:jwt-bearer", + ], + "hashSalt": "&{am.oidc.client.subject.identifier.hash.salt}", + "includeClientIdClaimInStatelessTokens": true, + "includeSubnameInTokenClaims": true, + "macaroonTokenFormat": "V2", + "maxAgeOfRequestObjectNbfClaim": 0, + "maxDifferenceBetweenRequestObjectNbfAndExp": 0, + "moduleMessageEnabledInPasswordGrant": false, + "nbfClaimRequiredInRequestObject": false, + "parRequestUriLifetime": 90, + "passwordGrantAuthService": "Login", + "persistentClaims": [], + "refreshTokenGracePeriod": 0, + "requestObjectProcessing": "OIDC", + "requirePushedAuthorizationRequests": false, + "responseTypeClasses": [ + "code|org.forgerock.oauth2.core.AuthorizationCodeResponseTypeHandler", + "device_code|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "token|org.forgerock.oauth2.core.TokenResponseTypeHandler", + "id_token|org.forgerock.openidconnect.IdTokenResponseTypeHandler", + ], + "supportedScopes": [ + "email|Your email address", + "openid|", + "address|Your postal address", + "phone|Your telephone number(s)", + "profile|Your personal information", + "fr:idm:*", + "am-introspect-all-tokens", + ], + "supportedSubjectTypes": [ + "public", + "pairwise", + ], + "tlsCertificateBoundAccessTokensEnabled": true, + "tlsCertificateRevocationCheckingEnabled": false, + "tlsClientCertificateHeaderFormat": "URLENCODED_PEM", + "tokenCompressionEnabled": false, + "tokenEncryptionEnabled": false, + "tokenExchangeClasses": [ + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToAccessTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:access_token=>urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.AccessTokenToIdTokenExchanger", + "urn:ietf:params:oauth:token-type:id_token=>urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.idtoken.IdTokenToAccessTokenExchanger", + ], + "tokenSigningAlgorithm": "HS256", + "tokenValidatorClasses": [ + "urn:ietf:params:oauth:token-type:id_token|org.forgerock.oauth2.core.tokenexchange.idtoken.OidcIdTokenValidator", + "urn:ietf:params:oauth:token-type:access_token|org.forgerock.oauth2.core.tokenexchange.accesstoken.OAuth2AccessTokenValidator", + ], + }, + "advancedOIDCConfig": { + "alwaysAddClaimsToToken": true, + "amrMappings": {}, + "authorisedIdmDelegationClients": [], + "authorisedOpenIdConnectSSOClients": [], + "claimsParameterSupported": false, + "defaultACR": [], + "idTokenInfoClientAuthenticationEnabled": true, + "includeAllKtyAlgCombinationsInJwksUri": false, + "loaMapping": {}, + "storeOpsTokens": true, + "supportedAuthorizationResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedAuthorizationResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedAuthorizationResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRequestParameterEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRequestParameterEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRequestParameterSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenEndpointAuthenticationSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedTokenIntrospectionResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedTokenIntrospectionResponseEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedTokenIntrospectionResponseSigningAlgorithms": [ + "PS384", + "RS384", + "EdDSA", + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedUserInfoEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedUserInfoEncryptionEnc": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedUserInfoSigningAlgorithms": [ + "ES384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + ], + "useForceAuthnForMaxAge": false, + "useForceAuthnForPromptLogin": false, + }, + "cibaConfig": { + "cibaAuthReqIdLifetime": 600, + "cibaMinimumPollingInterval": 2, + "supportedCibaSigningAlgorithms": [ + "ES256", + "PS256", + ], + }, + "clientDynamicRegistrationConfig": { + "allowDynamicRegistration": false, + "dynamicClientRegistrationScope": "dynamic_client_registration", + "dynamicClientRegistrationSoftwareStatementRequired": false, + "generateRegistrationAccessTokens": true, + "requiredSoftwareStatementAttestedAttributes": [ + "redirect_uris", + ], + }, + "consent": { + "clientsCanSkipConsent": true, + "enableRemoteConsent": false, + "supportedRcsRequestEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsRequestEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsRequestSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + "supportedRcsResponseEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "ECDH-ES+A128KW", + "RSA-OAEP", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedRcsResponseEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedRcsResponseSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "coreOAuth2Config": { + "accessTokenLifetime": 3600, + "accessTokenMayActScript": "[Empty]", + "codeLifetime": 120, + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "macaroonTokensEnabled": false, + "oidcMayActScript": "[Empty]", + "refreshTokenLifetime": 604800, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": true, + "usePolicyEngineForScope": false, + }, + "coreOIDCConfig": { + "jwtTokenLifetime": 3600, + "oidcDiscoveryEndpointEnabled": true, + "overrideableOIDCClaims": [], + "supportedClaims": [], + "supportedIDTokenEncryptionAlgorithms": [ + "ECDH-ES+A256KW", + "ECDH-ES+A192KW", + "RSA-OAEP", + "ECDH-ES+A128KW", + "RSA-OAEP-256", + "A128KW", + "A256KW", + "ECDH-ES", + "dir", + "A192KW", + ], + "supportedIDTokenEncryptionMethods": [ + "A256GCM", + "A192GCM", + "A128GCM", + "A128CBC-HS256", + "A192CBC-HS384", + "A256CBC-HS512", + ], + "supportedIDTokenSigningAlgorithms": [ + "PS384", + "ES384", + "RS384", + "HS256", + "HS512", + "ES256", + "RS256", + "HS384", + "ES512", + "PS256", + "PS512", + "RS512", + ], + }, + "deviceCodeConfig": { + "deviceCodeLifetime": 300, + "devicePollInterval": 5, + "deviceUserCodeCharacterSet": "234567ACDEFGHJKLMNPQRSTWXYZabcdefhijkmnopqrstwxyz", + "deviceUserCodeLength": 8, + }, + "pluginsConfig": { + "accessTokenEnricherClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "accessTokenModificationPluginType": "SCRIPTED", + "accessTokenModificationScript": "39c08084-1238-43e8-857f-2e11005eac49", + "accessTokenModifierClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "authorizeEndpointDataProviderPluginType": "JAVA", + "authorizeEndpointDataProviderScript": "[Empty]", + "evaluateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "evaluateScopePluginType": "JAVA", + "evaluateScopeScript": "[Empty]", + "oidcClaimsClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "oidcClaimsPluginType": "SCRIPTED", + "oidcClaimsScript": "cf3515f0-8278-4ee3-a530-1bad7424c416", + "userCodeGeneratorClass": "org.forgerock.oauth2.core.plugins.registry.DefaultUserCodeGenerator", + "validateScopeClass": "org.forgerock.openam.oauth2.OpenAMScopeValidator", + "validateScopePluginType": "JAVA", + "validateScopeScript": "[Empty]", + }, + }, + "_type": { + "_id": "OAuth2Client", + "collection": true, + "name": "OAuth2 Clients", + }, + "advancedOAuth2ClientConfig": { + "clientUri": [], + "contacts": [], + "customProperties": [], + "descriptions": [], + "grantTypes": [ + "authorization_code", + "refresh_token", + ], + "isConsentImplied": true, + "javascriptOrigins": [], + "logoUri": [], + "mixUpMitigation": false, + "name": [], + "policyUri": [], + "refreshTokenGracePeriod": 0, + "requestUris": [], + "require_pushed_authorization_requests": false, + "responseTypes": [ + "code", + "token", + "id_token", + ], + "sectorIdentifierUri": null, + "softwareIdentity": null, + "softwareVersion": null, + "subjectType": "public", + "tokenEndpointAuthMethod": "client_secret_basic", + "tokenExchangeAuthLevel": 0, + "tosURI": [], + "updateAccessToken": null, + }, + "coreOAuth2ClientConfig": { + "accessTokenLifetime": 3600, + "agentgroup": null, + "authorizationCodeLifetime": 120, + "clientName": [ + "testmeout", + ], + "clientType": "Public", + "defaultScopes": [], + "loopbackInterfaceRedirection": false, + "redirectionUris": [], + "refreshTokenLifetime": 604800, + "scopes": [ + "openid", + ], + "secretLabelIdentifier": null, + "status": "Active", + }, + "coreOpenIDClientConfig": { + "backchannel_logout_session_required": false, + "backchannel_logout_uri": null, + "claims": [], + "clientSessionUri": null, + "defaultAcrValues": [], + "defaultMaxAge": 600, + "defaultMaxAgeEnabled": false, + "jwtTokenLifetime": 3600, + "postLogoutRedirectUri": [], + }, + "coreUmaClientConfig": { + "claimsRedirectionUris": [], + }, + "overrideOAuth2ClientConfig": { + "accessTokenMayActScript": "[Empty]", + "accessTokenModificationPluginType": "PROVIDER", + "accessTokenModificationScript": "[Empty]", + "accessTokenModifierClass": null, + "authorizeEndpointDataProviderClass": "org.forgerock.oauth2.core.plugins.registry.DefaultEndpointDataProvider", + "authorizeEndpointDataProviderPluginType": "PROVIDER", + "authorizeEndpointDataProviderScript": "[Empty]", + "clientsCanSkipConsent": false, + "customLoginUrlTemplate": null, + "enableRemoteConsent": false, + "evaluateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeEvaluator", + "evaluateScopePluginType": "PROVIDER", + "evaluateScopeScript": "[Empty]", + "issueRefreshToken": true, + "issueRefreshTokenOnRefreshedToken": true, + "oidcClaimsClass": null, + "oidcClaimsPluginType": "PROVIDER", + "oidcClaimsScript": "[Empty]", + "oidcMayActScript": "[Empty]", + "overrideableOIDCClaims": [], + "providerOverridesEnabled": false, + "remoteConsentServiceId": null, + "scopesPolicySet": "oauth2Scopes", + "statelessTokensEnabled": false, + "tokenEncryptionEnabled": false, + "useForceAuthnForMaxAge": false, + "usePolicyEngineForScope": false, + "validateScopeClass": "org.forgerock.oauth2.core.plugins.registry.DefaultScopeValidator", + "validateScopePluginType": "PROVIDER", + "validateScopeScript": "[Empty]", + }, + "signEncOAuth2ClientConfig": { + "authorizationResponseEncryptionAlgorithm": null, + "authorizationResponseEncryptionMethod": null, + "authorizationResponseSigningAlgorithm": "RS256", + "clientJwtPublicKey": null, + "idTokenEncryptionAlgorithm": "RSA-OAEP-256", + "idTokenEncryptionEnabled": false, + "idTokenEncryptionMethod": "A128CBC-HS256", + "idTokenPublicEncryptionKey": null, + "idTokenSignedResponseAlg": "RS256", + "jwkSet": null, + "jwkStoreCacheMissCacheTime": 60000, + "jwksCacheTimeout": 3600000, + "jwksUri": null, + "mTLSCertificateBoundAccessTokens": false, + "mTLSSubjectDN": null, + "mTLSTrustedCert": null, + "publicKeyLocation": "jwks_uri", + "requestParameterEncryptedAlg": null, + "requestParameterEncryptedEncryptionAlgorithm": "A128CBC-HS256", + "requestParameterSignedAlg": null, + "tokenEndpointAuthSigningAlgorithm": "RS256", + "tokenIntrospectionEncryptedResponseAlg": "RSA-OAEP-256", + "tokenIntrospectionEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "tokenIntrospectionResponseFormat": "JSON", + "tokenIntrospectionSignedResponseAlg": "RS256", + "userinfoEncryptedResponseAlg": null, + "userinfoEncryptedResponseEncryptionAlgorithm": "A128CBC-HS256", + "userinfoResponseFormat": "JSON", + "userinfoSignedResponseAlg": null, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/policy/FeatureStorePolicy.policy.json 1`] = ` +{ + "policy": { + "FeatureStorePolicy": { + "_id": "FeatureStorePolicy", + "actionValues": {}, + "active": true, + "applicationName": "test-policy-set", + "createdBy": "id=76618ff6-e851-433e-9704-9d2852a17b7a,ou=user,ou=am-config", + "creationDate": "2024-07-12T15:25:19.248Z", + "description": "FeatureStorePolicy", + "lastModifiedBy": "id=b4b5ea11-ad75-4ec5-b8eb-77a6c5eff8bf,ou=user,ou=am-config", + "lastModifiedDate": "2024-12-02T23:36:10.512Z", + "name": "FeatureStorePolicy", + "resourceTypeUuid": "76656a38-5f8e-401b-83aa-4ccb74ce88d2", + "resources": [ + "https://www.example.com:443/*", + ], + "subject": { + "type": "NONE", + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/policy/HR-webapp.policy.json 1`] = ` +{ + "policy": { + "HR-webapp": { + "_id": "HR-webapp", + "actionValues": { + "GET": true, + "POST": true, + }, + "active": true, + "applicationName": "EdgePolicySet", + "createdBy": "id=bc01b841-b6ec-4691-b9d6-561b306e12db,ou=user,ou=am-config", + "creationDate": "2024-10-31T16:26:42.822Z", + "description": "", + "lastModifiedBy": "id=b4b5ea11-ad75-4ec5-b8eb-77a6c5eff8bf,ou=user,ou=am-config", + "lastModifiedDate": "2024-12-02T23:36:10.934Z", + "name": "HR-webapp", + "resourceTypeUuid": "76656a38-5f8e-401b-83aa-4ccb74ce88d2", + "resources": [ + "*://*:*/apps/hrlite/*", + "*://*:*/apps/hrlite?*", + "*://*:*/apps/contractor", + "*://*:*/apps/contractor/*", + "*://*:*/apps/contractor?*", + "*://*:*/apps/hrlite", + ], + "subject": { + "subjectValues": [ + "id=hradmins,ou=group,o=alpha,ou=services,ou=am-config", + ], + "type": "Identity", + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/policy/New-Test-Policy.policy.json 1`] = ` +{ + "policy": { + "New Test Policy": { + "_id": "New Test Policy", + "actionValues": {}, + "active": true, + "applicationName": "test-policy-set", + "createdBy": "id=1e9280f6-eab6-467e-889c-83d147c8b936,ou=user,ou=am-config", + "creationDate": "2024-11-21T04:01:27.705Z", + "description": "", + "lastModifiedBy": "id=b4b5ea11-ad75-4ec5-b8eb-77a6c5eff8bf,ou=user,ou=am-config", + "lastModifiedDate": "2024-12-02T23:36:11.93Z", + "name": "New Test Policy", + "resourceTypeUuid": "76656a38-5f8e-401b-83aa-4ccb74ce88d2", + "resources": [ + "*://*:*/*?*", + ], + "subject": { + "type": "NONE", + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/policy/Test-Policy.policy.json 1`] = ` +{ + "policy": { + "Test Policy": { + "_id": "Test Policy", + "actionValues": { + "GET": true, + "POST": false, + }, + "active": false, + "applicationName": "test-policy-set", + "condition": { + "conditions": [ + { + "endDate": "2023:08:02", + "endDay": "fri", + "endTime": "11:59", + "enforcementTimeZone": "GMT", + "startDate": "2023:08:01", + "startDay": "mon", + "startTime": "12:00", + "type": "SimpleTime", + }, + { + "scriptId": "59f84396-71e4-4c1d-a6ae-c4fc624d9752", + "type": "Script", + }, + ], + "type": "AND", + }, + "createdBy": "id=76618ff6-e851-433e-9704-9d2852a17b7a,ou=user,ou=am-config", + "creationDate": "2024-07-12T15:25:19.356Z", + "description": "Test Policy Description", + "lastModifiedBy": "id=b4b5ea11-ad75-4ec5-b8eb-77a6c5eff8bf,ou=user,ou=am-config", + "lastModifiedDate": "2024-12-02T23:36:11.233Z", + "name": "Test Policy", + "resourceAttributes": [ + { + "propertyName": "Test_Name", + "propertyValues": [ + "Test_Value", + ], + "type": "Static", + }, + ], + "resourceTypeUuid": "76656a38-5f8e-401b-83aa-4ccb74ce88d2", + "resources": [ + "lorem://ipsum:dolor/sit", + ], + "subject": { + "type": "NONE", + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/policy/actions.policy.json 1`] = ` +{ + "policy": { + "actions": { + "_id": "actions", + "actionValues": { + "GET": true, + }, + "active": true, + "applicationName": "data", + "createdBy": "id=76618ff6-e851-433e-9704-9d2852a17b7a,ou=user,ou=am-config", + "creationDate": "2024-07-12T15:25:50.202Z", + "description": "", + "lastModifiedBy": "id=b4b5ea11-ad75-4ec5-b8eb-77a6c5eff8bf,ou=user,ou=am-config", + "lastModifiedDate": "2024-12-02T23:36:11.355Z", + "name": "actions", + "resourceTypeUuid": "76656a38-5f8e-401b-83aa-4ccb74ce88d2", + "resources": [ + "*://*:*/demo/api/action/actions", + ], + "subject": { + "type": "AuthenticatedUsers", + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/policy/activity.policy.json 1`] = ` +{ + "policy": { + "activity": { + "_id": "activity", + "actionValues": { + "GET": true, + "POST": true, + }, + "active": true, + "applicationName": "data", + "createdBy": "id=76618ff6-e851-433e-9704-9d2852a17b7a,ou=user,ou=am-config", + "creationDate": "2024-07-12T15:25:50.288Z", + "description": "", + "lastModifiedBy": "id=b4b5ea11-ad75-4ec5-b8eb-77a6c5eff8bf,ou=user,ou=am-config", + "lastModifiedDate": "2024-12-02T23:36:11.472Z", + "name": "activity", + "resourceTypeUuid": "76656a38-5f8e-401b-83aa-4ccb74ce88d2", + "resources": [ + "*://*:*/demo/api/action/activity", + ], + "subject": { + "type": "AuthenticatedUsers", + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/policy/apply.policy.json 1`] = ` +{ + "policy": { + "apply": { + "_id": "apply", + "actionValues": { + "POST": true, + }, + "active": true, + "applicationName": "data", + "condition": { + "authenticationStrategy": "AuthenticateToTreeConditionAdvice", + "strategySpecifier": "Baseline-Transaction", + "type": "Transaction", + }, + "createdBy": "id=76618ff6-e851-433e-9704-9d2852a17b7a,ou=user,ou=am-config", + "creationDate": "2024-07-12T15:25:50.368Z", + "description": "", + "lastModifiedBy": "id=b4b5ea11-ad75-4ec5-b8eb-77a6c5eff8bf,ou=user,ou=am-config", + "lastModifiedDate": "2024-12-02T23:36:11.636Z", + "name": "apply", + "resourceTypeUuid": "76656a38-5f8e-401b-83aa-4ccb74ce88d2", + "resources": [ + "*://*:*/demo/api/action/apply", + ], + "subject": { + "type": "AuthenticatedUsers", + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/policyset/EdgePolicySet.policyset.json 1`] = ` +{ + "policyset": { + "EdgePolicySet": { + "applicationType": "iPlanetAMWebAgentService", + "attributeNames": [], + "conditions": [ + "Script", + "ClientId", + "AMIdentityMembership", + "IPv6", + "SimpleTime", + "IPv4", + "LEAuthLevel", + "LDAPFilter", + "AuthScheme", + "Session", + "AND", + "Expiration", + "AuthenticateToRealm", + "ResourceEnvIP", + "Policy", + "SessionProperty", + "OAuth2Scope", + "OR", + "Transaction", + "NOT", + "AuthLevel", + "AuthenticateToService", + ], + "createdBy": "id=dsameuser,ou=user,ou=am-config", + "creationDate": 1669672555404, + "description": "Policy Set EdgePolicySet", + "displayName": null, + "editable": true, + "entitlementCombiner": "DenyOverride", + "lastModifiedBy": "id=b4b5ea11-ad75-4ec5-b8eb-77a6c5eff8bf,ou=user,ou=am-config", + "lastModifiedDate": 1733182569712, + "name": "EdgePolicySet", + "resourceComparator": null, + "resourceTypeUuids": [ + "76656a38-5f8e-401b-83aa-4ccb74ce88d2", + ], + "saveIndex": null, + "searchIndex": null, + "subjects": [ + "AuthenticatedUsers", + "NOT", + "Identity", + "Uma", + "OR", + "AND", + "NONE", + "Policy", + "JwtClaim", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/policyset/FeatureStorePolicySet.policyset.json 1`] = ` +{ + "policyset": { + "FeatureStorePolicySet": { + "applicationType": "iPlanetAMWebAgentService", + "attributeNames": [], + "conditions": [ + "AMIdentityMembership", + "AND", + "AuthLevel", + "AuthScheme", + "AuthenticateToRealm", + "AuthenticateToService", + "IPv4", + "IPv6", + "LDAPFilter", + "LEAuthLevel", + "NOT", + "OAuth2Scope", + "OR", + "Policy", + "ResourceEnvIP", + "Script", + "Session", + "SessionProperty", + "SimpleTime", + "Transaction", + ], + "createdBy": "id=8efaa5b6-8c98-4489-9b21-ee41f5589ab7,ou=user,ou=am-config", + "creationDate": 1695912757709, + "description": null, + "displayName": "FeatureStorePolicySet", + "editable": true, + "entitlementCombiner": "DenyOverride", + "lastModifiedBy": "id=b4b5ea11-ad75-4ec5-b8eb-77a6c5eff8bf,ou=user,ou=am-config", + "lastModifiedDate": 1733182569853, + "name": "FeatureStorePolicySet", + "resourceComparator": null, + "resourceTypeUuids": [ + "76656a38-5f8e-401b-83aa-4ccb74ce88d2", + ], + "saveIndex": null, + "searchIndex": null, + "subjects": [ + "AND", + "AuthenticatedUsers", + "Identity", + "JwtClaim", + "NONE", + "NOT", + "OR", + "Policy", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/policyset/data.policyset.json 1`] = ` +{ + "policyset": { + "data": { + "applicationType": "iPlanetAMWebAgentService", + "attributeNames": [], + "conditions": [ + "Script", + "AMIdentityMembership", + "IPv6", + "IPv4", + "SimpleTime", + "LEAuthLevel", + "LDAPFilter", + "AuthScheme", + "Session", + "AND", + "AuthenticateToRealm", + "ResourceEnvIP", + "Policy", + "OAuth2Scope", + "SessionProperty", + "OR", + "Transaction", + "NOT", + "AuthLevel", + "AuthenticateToService", + ], + "createdBy": "id=df492700-ba67-4345-83a9-58305850596c,ou=user,ou=am-config", + "creationDate": 1610648242757, + "description": null, + "displayName": "Baseline Demo", + "editable": true, + "entitlementCombiner": "DenyOverride", + "lastModifiedBy": "id=b4b5ea11-ad75-4ec5-b8eb-77a6c5eff8bf,ou=user,ou=am-config", + "lastModifiedDate": 1733182569972, + "name": "data", + "resourceComparator": null, + "resourceTypeUuids": [ + "76656a38-5f8e-401b-83aa-4ccb74ce88d2", + ], + "saveIndex": null, + "searchIndex": null, + "subjects": [ + "AuthenticatedUsers", + "NOT", + "Identity", + "OR", + "AND", + "NONE", + "Policy", + "JwtClaim", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/policyset/oauth2Scopes.policyset.json 1`] = ` +{ + "policyset": { + "oauth2Scopes": { + "applicationType": "iPlanetAMWebAgentService", + "attributeNames": [], + "conditions": [ + "Script", + "AMIdentityMembership", + "IPv6", + "SimpleTime", + "IPv4", + "LEAuthLevel", + "LDAPFilter", + "AuthScheme", + "Session", + "AND", + "AuthenticateToRealm", + "ResourceEnvIP", + "SessionProperty", + "OAuth2Scope", + "OR", + "Transaction", + "NOT", + "AuthLevel", + "AuthenticateToService", + ], + "createdBy": "id=dsameuser,ou=user,ou=am-config", + "creationDate": 1578580064992, + "description": "The built-in Application used by the OAuth2 scope authorization process.", + "displayName": "Default OAuth2 Scopes Policy Set", + "editable": true, + "entitlementCombiner": "DenyOverride", + "lastModifiedBy": "id=b4b5ea11-ad75-4ec5-b8eb-77a6c5eff8bf,ou=user,ou=am-config", + "lastModifiedDate": 1733182570134, + "name": "oauth2Scopes", + "resourceComparator": null, + "resourceTypeUuids": [ + "d60b7a71-1dc6-44a5-8e48-e4b9d92dee8b", + ], + "saveIndex": null, + "searchIndex": null, + "subjects": [ + "AuthenticatedUsers", + "NOT", + "Identity", + "OR", + "AND", + "NONE", + "JwtClaim", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/policyset/test-policy-set.policyset.json 1`] = ` +{ + "policyset": { + "test-policy-set": { + "applicationType": "iPlanetAMWebAgentService", + "attributeNames": [], + "conditions": [ + "AMIdentityMembership", + "AND", + "AuthLevel", + "AuthScheme", + "AuthenticateToRealm", + "AuthenticateToService", + "IPv4", + "IPv6", + "LDAPFilter", + "LEAuthLevel", + "NOT", + "OAuth2Scope", + "OR", + "Policy", + "ResourceEnvIP", + "Script", + "Session", + "SessionProperty", + "SimpleTime", + "Transaction", + ], + "createdBy": "id=fbdeb2a9-beb6-4a14-ae66-e35f16ce421d,ou=user,ou=am-config", + "creationDate": 1693494279401, + "description": "Test Policy Set Description", + "displayName": "Test Policy Set", + "editable": true, + "entitlementCombiner": "DenyOverride", + "lastModifiedBy": "id=b4b5ea11-ad75-4ec5-b8eb-77a6c5eff8bf,ou=user,ou=am-config", + "lastModifiedDate": 1733182570278, + "name": "test-policy-set", + "resourceComparator": null, + "resourceTypeUuids": [ + "76656a38-5f8e-401b-83aa-4ccb74ce88d2", + ], + "saveIndex": null, + "searchIndex": null, + "subjects": [ + "AND", + "AuthenticatedUsers", + "Identity", + "JwtClaim", + "NONE", + "NOT", + "OR", + "Policy", + ], + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/resourcetype/FrodoTestResourceType11.resourcetype.json 1`] = ` +{ + "resourcetype": { + "993eba78-1c3f-4f27-b205-b4b29418f831": { + "actions": { + "action1": true, + "action2": true, + }, + "createdBy": "id=7a031a92-f70d-4b30-9d70-da7cfb1d9c93,ou=user,ou=am-config", + "creationDate": 1725916400290, + "description": "Frodo Test Resource Type Eleven", + "lastModifiedBy": "id=b4b5ea11-ad75-4ec5-b8eb-77a6c5eff8bf,ou=user,ou=am-config", + "lastModifiedDate": 1733182562598, + "name": "FrodoTestResourceType11", + "patterns": [ + "pattern2://*:*/*?*", + "pattern1://*:*/*", + ], + "uuid": "993eba78-1c3f-4f27-b205-b4b29418f831", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/resourcetype/FrodoTestResourceType12.resourcetype.json 1`] = ` +{ + "resourcetype": { + "3fc799d7-b73f-49e0-a70b-e37990e54e56": { + "actions": { + "action1": true, + "action2": true, + }, + "createdBy": "id=7a031a92-f70d-4b30-9d70-da7cfb1d9c93,ou=user,ou=am-config", + "creationDate": 1725916400511, + "description": "Frodo Test Resource Type Twelve", + "lastModifiedBy": "id=b4b5ea11-ad75-4ec5-b8eb-77a6c5eff8bf,ou=user,ou=am-config", + "lastModifiedDate": 1733182563123, + "name": "FrodoTestResourceType12", + "patterns": [ + "pattern2://*:*/*?*", + "pattern1://*:*/*", + ], + "uuid": "3fc799d7-b73f-49e0-a70b-e37990e54e56", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/resourcetype/FrodoTestResourceType13.resourcetype.json 1`] = ` +{ + "resourcetype": { + "0aa5ed25-0c62-4ff5-9a42-3bda8c5cbb76": { + "actions": { + "action1": true, + "action2": true, + }, + "createdBy": "id=7a031a92-f70d-4b30-9d70-da7cfb1d9c93,ou=user,ou=am-config", + "creationDate": 1725916400601, + "description": "Frodo Test Resource Type Thirteen", + "lastModifiedBy": "id=b4b5ea11-ad75-4ec5-b8eb-77a6c5eff8bf,ou=user,ou=am-config", + "lastModifiedDate": 1733182563278, + "name": "FrodoTestResourceType13", + "patterns": [ + "pattern2://*:*/*?*", + "pattern1://*:*/*", + ], + "uuid": "0aa5ed25-0c62-4ff5-9a42-3bda8c5cbb76", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/resourcetype/FrodoTestResourceType14.resourcetype.json 1`] = ` +{ + "resourcetype": { + "119b291c-40b3-4b1e-8d84-c2a561a2cb1f": { + "actions": { + "action1": true, + "action2": true, + }, + "createdBy": "id=7a031a92-f70d-4b30-9d70-da7cfb1d9c93,ou=user,ou=am-config", + "creationDate": 1725916400702, + "description": "Frodo Test Resource Type Fourteen", + "lastModifiedBy": "id=b4b5ea11-ad75-4ec5-b8eb-77a6c5eff8bf,ou=user,ou=am-config", + "lastModifiedDate": 1733182563434, + "name": "FrodoTestResourceType14", + "patterns": [ + "pattern2://*:*/*?*", + "pattern1://*:*/*", + ], + "uuid": "119b291c-40b3-4b1e-8d84-c2a561a2cb1f", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/resourcetype/FrodoTestResourceType15.resourcetype.json 1`] = ` +{ + "resourcetype": { + "3c5f13af-ca17-403e-b47d-d15263cce954": { + "actions": { + "action1": true, + "action2": true, + }, + "createdBy": "id=7a031a92-f70d-4b30-9d70-da7cfb1d9c93,ou=user,ou=am-config", + "creationDate": 1725916400790, + "description": "Frodo Test Resource Type Fifteen", + "lastModifiedBy": "id=b4b5ea11-ad75-4ec5-b8eb-77a6c5eff8bf,ou=user,ou=am-config", + "lastModifiedDate": 1733182563592, + "name": "FrodoTestResourceType15", + "patterns": [ + "pattern2://*:*/*?*", + "pattern1://*:*/*", + ], + "uuid": "3c5f13af-ca17-403e-b47d-d15263cce954", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/resourcetype/OAuth2-Scope.resourcetype.json 1`] = ` +{ + "resourcetype": { + "d60b7a71-1dc6-44a5-8e48-e4b9d92dee8b": { + "actions": { + "GRANT": true, + }, + "createdBy": "id=dsameuser,ou=user,ou=am-config", + "creationDate": 1595479030586, + "description": "The built-in OAuth2 Scope Resource Type for OAuth2policy-provided scope.", + "lastModifiedBy": "id=b4b5ea11-ad75-4ec5-b8eb-77a6c5eff8bf,ou=user,ou=am-config", + "lastModifiedDate": 1733182563748, + "name": "OAuth2 Scope", + "patterns": [ + "*://*:*/*", + "*://*:*/*?*", + "*", + ], + "uuid": "d60b7a71-1dc6-44a5-8e48-e4b9d92dee8b", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/resourcetype/URL.resourcetype.json 1`] = ` +{ + "resourcetype": { + "76656a38-5f8e-401b-83aa-4ccb74ce88d2": { + "actions": { + "DELETE": true, + "GET": true, + "HEAD": true, + "OPTIONS": true, + "PATCH": true, + "POST": true, + "PUT": true, + }, + "createdBy": "id=dsameuser,ou=user,ou=am-config", + "creationDate": 1595479030487, + "description": "The built-in URL Resource Type available to OpenAMPolicies.", + "lastModifiedBy": "id=b4b5ea11-ad75-4ec5-b8eb-77a6c5eff8bf,ou=user,ou=am-config", + "lastModifiedDate": 1733182563891, + "name": "URL", + "patterns": [ + "*://*:*/*", + "*://*:*/*?*", + ], + "uuid": "76656a38-5f8e-401b-83aa-4ccb74ce88d2", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/resourcetype/test_resource.resourcetype.json 1`] = ` +{ + "resourcetype": { + "1f445c60-0828-41ac-9a4e-a16c026e9536": { + "actions": { + "allow": true, + }, + "createdBy": "id=bc01b841-b6ec-4691-b9d6-561b306e12db,ou=user,ou=am-config", + "creationDate": 1730325157570, + "description": "", + "lastModifiedBy": "id=b4b5ea11-ad75-4ec5-b8eb-77a6c5eff8bf,ou=user,ou=am-config", + "lastModifiedDate": 1733182564024, + "name": "test_resource", + "patterns": [ + "type1/node1", + "type2/node2", + ], + "uuid": "1f445c60-0828-41ac-9a4e-a16c026e9536", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/saml/iSPAzure.saml.json 1`] = ` +{ + "saml": { + "cot": {}, + "hosted": { + "aVNQQXp1cmU": { + "_id": "aVNQQXp1cmU", + "entityId": "iSPAzure", + "serviceProvider": { + "advanced": { + "ecpConfiguration": { + "ecpRequestIdpListFinderImpl": "com.sun.identity.saml2.plugins.ECPIDPFinder", + }, + "idpProxy": {}, + "relayStateUrlList": {}, + "saeConfiguration": { + "spUrl": "https://idc.scheuber.io/am/spsaehandler/metaAlias/alpha/iSPAzure", + }, + }, + "assertionContent": { + "assertionTimeSkew": 300, + "authenticationContext": { + "authContextItems": [ + { + "contextReference": "urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport", + "defaultItem": true, + "level": 0, + }, + ], + "authenticationComparisonType": "Exact", + "authenticationContextMapper": "com.sun.identity.saml2.plugins.DefaultSPAuthnContextMapper", + "includeRequestedAuthenticationContext": true, + }, + "basicAuthentication": {}, + "clientAuthentication": {}, + "nameIdFormat": { + "nameIdFormatList": [ + "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", + "urn:oasis:names:tc:SAML:2.0:nameid-format:transient", + "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", + "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", + "urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName", + "urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos", + "urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName", + ], + }, + "signingAndEncryption": { + "encryption": {}, + "requestResponseSigning": {}, + "secretIdAndAlgorithms": {}, + }, + }, + "assertionProcessing": { + "accountMapping": { + "spAccountMapper": "com.sun.identity.saml2.plugins.DefaultSPAccountMapper", + "useNameIDAsSPUserID": true, + }, + "adapter": {}, + "attributeMapper": { + "attributeMap": [ + { + "key": "http://schemas.microsoft.com/identity/claims/displayname", + "value": "cn", + }, + { + "key": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname", + "value": "givenName", + }, + { + "key": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname", + "value": "sn", + }, + { + "key": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", + "value": "mail", + }, + { + "key": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", + "value": "uid", + }, + ], + "attributeMapper": "com.sun.identity.saml2.plugins.DefaultSPAttributeMapper", + }, + "autoFederation": { + "autoFedEnabled": false, + }, + "responseArtifactMessageEncoding": { + "encoding": "URI", + }, + "url": {}, + }, + "services": { + "metaAlias": "/alpha/iSPAzure", + "serviceAttributes": { + "assertionConsumerService": [ + { + "binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact", + "index": 0, + "isDefault": true, + "location": "https://idc.scheuber.io/am/AuthConsumer/metaAlias/alpha/iSPAzure", + }, + { + "binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST", + "index": 1, + "isDefault": false, + "location": "https://idc.scheuber.io/am/AuthConsumer/metaAlias/alpha/iSPAzure", + }, + { + "binding": "urn:oasis:names:tc:SAML:2.0:bindings:PAOS", + "index": 2, + "isDefault": false, + "location": "https://idc.scheuber.io/am/Consumer/ECP/metaAlias/alpha/iSPAzure", + }, + ], + "nameIdService": [ + { + "binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect", + "location": "https://idc.scheuber.io/am/SPMniRedirect/metaAlias/alpha/iSPAzure", + "responseLocation": "https://idc.scheuber.io/am/SPMniRedirect/metaAlias/alpha/iSPAzure", + }, + { + "binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST", + "location": "https://idc.scheuber.io/am/SPMniPOST/metaAlias/alpha/iSPAzure", + "responseLocation": "https://idc.scheuber.io/am/SPMniPOST/metaAlias/alpha/iSPAzure", + }, + { + "binding": "urn:oasis:names:tc:SAML:2.0:bindings:SOAP", + "location": "https://idc.scheuber.io/am/SPMniSoap/metaAlias/alpha/iSPAzure", + "responseLocation": "https://idc.scheuber.io/am/SPMniSoap/metaAlias/alpha/iSPAzure", + }, + ], + "singleLogoutService": [ + { + "binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect", + "location": "https://idc.scheuber.io/am/SPSloRedirect/metaAlias/alpha/iSPAzure", + "responseLocation": "https://idc.scheuber.io/am/SPSloRedirect/metaAlias/alpha/iSPAzure", + }, + { + "binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST", + "location": "https://idc.scheuber.io/am/SPSloPOST/metaAlias/alpha/iSPAzure", + "responseLocation": "https://idc.scheuber.io/am/SPSloPOST/metaAlias/alpha/iSPAzure", + }, + { + "binding": "urn:oasis:names:tc:SAML:2.0:bindings:SOAP", + "location": "https://idc.scheuber.io/am/SPSloSoap/metaAlias/alpha/iSPAzure", + }, + ], + }, + }, + }, + }, + }, + "metadata": { + "aVNQQXp1cmU": [ + "", + "", + " ", + " ", + " ", + " ", + " PGNlcnRpZmljYXRlPg==", + " ", + " ", + " ", + " ", + " ", + " ", + " PGNlcnRpZmljYXRlPg==", + " ", + " ", + " ", + " ", + " ", + " ", + " 128", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", + " urn:oasis:names:tc:SAML:2.0:nameid-format:transient", + " urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", + " urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", + " urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName", + " urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos", + " urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName", + " ", + " ", + " ", + " ", + "", + "", + "", + ], + }, + "remote": {}, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/saml/urnfederationMicrosoftOnline.saml.json 1`] = ` +{ + "saml": { + "cot": {}, + "hosted": {}, + "metadata": { + "dXJuOmZlZGVyYXRpb246TWljcm9zb2Z0T25saW5l": [ + "", + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " PGNlcnRpZmljYXRlPg==", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " PGNlcnRpZmljYXRlPg==", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " PGNlcnRpZmljYXRlPg==", + " ", + " ", + " ", + " ", + " urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", + " urn:mace:shibboleth:1.0:nameIdentifier", + " urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", + " urn:oasis:names:tc:SAML:2.0:nameid-format:transient", + " urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", + " ", + " ", + " ", + " ", + "", + "", + "", + ], + }, + "remote": { + "dXJuOmZlZGVyYXRpb246TWljcm9zb2Z0T25saW5l": { + "_id": "dXJuOmZlZGVyYXRpb246TWljcm9zb2Z0T25saW5l", + "entityId": "urn:federation:MicrosoftOnline", + "serviceProvider": { + "advanced": { + "idpProxy": {}, + "saeConfiguration": {}, + "treeConfiguration": {}, + }, + "assertionContent": { + "basicAuthentication": {}, + "nameIdFormat": { + "nameIdFormatList": [ + "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", + "urn:mace:shibboleth:1.0:nameIdentifier", + "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", + "urn:oasis:names:tc:SAML:2.0:nameid-format:transient", + "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", + ], + }, + "secrets": {}, + "signingAndEncryption": { + "encryption": {}, + "requestResponseSigning": { + "assertion": true, + }, + "secretIdAndAlgorithms": {}, + }, + }, + "assertionProcessing": { + "accountMapper": {}, + "attributeMapper": { + "attributeMap": [ + { + "binary": false, + "localAttribute": "mail", + "samlAttribute": "IDPEmail", + }, + { + "binary": false, + "localAttribute": "UOPClassID", + "samlAttribute": "UOPClassID", + }, + ], + }, + "responseArtifactMessageEncoding": { + "encoding": "URI", + }, + }, + "services": { + "serviceAttributes": { + "assertionConsumerService": [ + { + "binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST", + "index": 0, + "isDefault": true, + "location": "https://login.microsoftonline.com/login.srf", + }, + { + "binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign", + "index": 1, + "isDefault": false, + "location": "https://login.microsoftonline.com/login.srf", + }, + { + "binding": "urn:oasis:names:tc:SAML:2.0:bindings:PAOS", + "index": 2, + "isDefault": false, + "location": "https://login.microsoftonline.com/login.srf", + }, + ], + "singleLogoutService": [ + { + "binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST", + "location": "https://login.microsoftonline.com/login.srf", + }, + ], + }, + }, + }, + }, + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/ADFS-Profile-Normalization-(JS).script.js 1`] = ` +"/* + * Copyright 2022 ForgeRock AS. All Rights Reserved + * + * Use of this code requires a commercial software license with ForgeRock AS + * or with one of its affiliates. All use shall be exclusively subject + * to such license between the licensee and ForgeRock AS. + */ + +/* + * This script returns the social identity profile information for the authenticating user + * in a standard form expected by the Social Provider Handler Node. + * + * Defined variables: + * rawProfile - The social identity provider profile information for the authenticating user. + * JsonValue (1). + * logger - The debug logger instance: + * https://backstage.forgerock.com/docs/am/7/scripting-guide/scripting-api-global-logger.html#scripting-api-global-logger. + * realm - String (primitive). + * The name of the realm the user is authenticating to. + * requestHeaders - TreeMap (2). + * The object that provides methods for accessing headers in the login request: + * https://backstage.forgerock.com/docs/am/7/authentication-guide/scripting-api-node.html#scripting-api-node-requestHeaders. + * requestParameters - TreeMap (2). + * The object that contains the authentication request parameters. + * selectedIdp - String (primitive). + * The social identity provider name. For example: google. + * sharedState - LinkedHashMap (3). + * The object that holds the state of the authentication tree and allows data exchange between the stateless nodes: + * https://backstage.forgerock.com/docs/am/7/auth-nodes/core-action.html#accessing-tree-state. + * transientState - LinkedHashMap (3). + * The object for storing sensitive information that must not leave the server unencrypted, + * and that may not need to persist between authentication requests during the authentication session: + * https://backstage.forgerock.com/docs/am/7/auth-nodes/core-action.html#accessing-tree-state. + * + * Return - a JsonValue (1). + * The result of the last statement in the script is returned to the server. + * Currently, the Immediately Invoked Function Expression (also known as Self-Executing Anonymous Function) + * is the last (and only) statement in this script, and its return value will become the script result. + * Do not use "return variable" statement outside of a function definition. + * + * This script's last statement should result in a JsonValue (1) with the following keys: + * { + * {"displayName": "corresponding-social-identity-provider-value"}, + * {"email": "corresponding-social-identity-provider-value"}, + * {"familyName": "corresponding-social-identity-provider-value"}, + * {"givenName": "corresponding-social-identity-provider-value"}, + * {"id": "corresponding-social-identity-provider-value"}, + * {"locale": "corresponding-social-identity-provider-value"}, + * {"photoUrl": "corresponding-social-identity-provider-value"}, + * {"username": "corresponding-social-identity-provider-value"} + * } + * + * The consumer of this data defines which keys are required and which are optional. + * For example, the script associated with the Social Provider Handler Node and, + * ultimately, the managed object created/updated with this data + * will expect certain keys to be populated. + * In some common default configurations, the following keys are required to be not empty: + * username, givenName, familyName, email. + * + * From RFC4517: A value of the Directory String syntax is a string of one or more + * arbitrary characters from the Universal Character Set (UCS). + * A zero-length character string is not permitted. + * + * (1) JsonValue - https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/json/JsonValue.html. + * (2) TreeMap - https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/TreeMap.html. + * (3) LinkedHashMap - https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/LinkedHashMap.html. + */ + +(function () { + var frJava = JavaImporter( + org.forgerock.json.JsonValue + ); + + var normalizedProfileData = frJava.JsonValue.json(frJava.JsonValue.object()); + + //logger.message('Seguin rawProfile: '+rawProfile); + + normalizedProfileData.put('id', rawProfile.get('sub').asString()); + normalizedProfileData.put('displayName', rawProfile.get('givenName').asString() + ' ' + rawProfile.get('sn').asString()); + normalizedProfileData.put('email', rawProfile.get('mail').asString()); + normalizedProfileData.put('givenName', rawProfile.get('givenName').asString()); + normalizedProfileData.put('familyName', rawProfile.get('sn').asString()); + normalizedProfileData.put('username', rawProfile.get('upn').asString()); + normalizedProfileData.put('roles', rawProfile.get('roles').asString()); + + //logger.message('Seguin normalizedProfileData: '+normalizedProfileData); + + return normalizedProfileData; +}()); +" +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/ADFS-Profile-Normalization-(JS).script.json 1`] = ` +{ + "script": { + "dbe0bf9a-72aa-49d5-8483-9db147985a47": { + "_id": "dbe0bf9a-72aa-49d5-8483-9db147985a47", + "context": "SOCIAL_IDP_PROFILE_TRANSFORMATION", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Normalizes raw profile data from ADFS", + "evaluatorVersion": "1.0", + "language": "JAVASCRIPT", + "lastModifiedBy": "id=7a031a92-f70d-4b30-9d70-da7cfb1d9c93,ou=user,ou=am-config", + "lastModifiedDate": 1733329920504, + "name": "ADFS Profile Normalization (JS)", + "script": "file://ADFS-Profile-Normalization-(JS).script.js", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Alpha-OAuth2-Access-Token-Modification-Script.script.js 1`] = ` +"/* + * Copyright 2019-2021 ForgeRock AS. All Rights Reserved. + * + * Use of this code requires a commercial software license with ForgeRock AS + * or with one of its affiliates. All use shall be exclusively subject + * to such license between the licensee and ForgeRock AS. + */ + +/* + * This script lets you modify information associated with an OAuth2 access token + * with methods provided by the AccessToken (1) interface. + * The changes made to OAuth2 access tokens will directly impact the size of the CTS tokens, + * and, similarly, the size of the JWTs if client-based OAuth2 tokens are utilized. + * When adding/updating fields make sure that the token size remains within client/user-agent limits. + * + * Defined variables: + * accessToken - AccessToken (1). + * The access token to be updated. + * Mutable object, all changes to the access token will be reflected. + * scopes - Set (6). + * Always present, the requested scopes. + * requestProperties - Unmodifiable Map (5). + * Always present, contains a map of request properties: + * requestUri - The request URI. + * realm - The realm that the request relates to. + * requestParams - A map of the request params and/or posted data. + * Each value is a list of one or more properties. + * Please note that these should be handled in accordance with OWASP best practices: + * https://owasp.org/www-community/vulnerabilities/Unsafe_use_of_Reflection. + * clientProperties - Unmodifiable Map (5). + * Present if the client specified in the request was identified, contains a map of client properties: + * clientId - The client's URI for the request locale. + * allowedGrantTypes - List of the allowed grant types (org.forgerock.oauth2.core.GrantType) for the client. + * allowedResponseTypes - List of the allowed response types for the client. + * allowedScopes - List of the allowed scopes for the client. + * customProperties - A map of the custom properties of the client. + * Lists or maps will be included as sub-maps; for example: + * customMap[Key1]=Value1 will be returned as customMap -> Key1 -> Value1. + * To add custom properties to a client, update the Custom Properties field + * in AM Console > Realm Name > Applications > OAuth 2.0 > Clients > Client ID > Advanced. + * identity - AMIdentity (3). + * Always present, the identity of the resource owner. + * session - SSOToken (4). + * Present if the request contains the session cookie, the user's session object. + * scriptName - String (primitive). + * Always present, the display name of the script. + * logger - Always present, the "OAuth2Provider" debug logger instance: + * https://backstage.forgerock.com/docs/am/7/scripting-guide/scripting-api-global-logger.html#scripting-api-global-logger. + * Corresponding log files will be prefixed with: scripts.OAUTH2_ACCESS_TOKEN_MODIFICATION. + * httpClient - HTTP Client (8). + * Always present, the HTTP Client instance: + * https://backstage.forgerock.com/docs/am/7/scripting-guide/scripting-api-global-http-client.html#scripting-api-global-http-client. + * + * Return - no value is expected, changes shall be made to the accessToken parameter directly. + * + * Class reference: + * (1) AccessToken - https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/oauth2/core/AccessToken.html. + * (3) AMIdentity - https://backstage.forgerock.com/docs/am/7/apidocs/com/sun/identity/idm/AMIdentity.html. + * (4) SSOToken - https://backstage.forgerock.com/docs/am/7/apidocs/com/iplanet/sso/SSOToken.html. + * (5) Map - https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/HashMap.html, + * or https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/LinkedHashMap.html. + * (6) Set - https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/HashSet.html. + * (8) Client - https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/http/Client.html. + */ + +/* EXAMPLE +(function () { + var frJava = JavaImporter( + org.forgerock.http.protocol.Request, + org.forgerock.http.protocol.Response + ); + + // Always includes this field in the token. + accessToken.setField('key1', 'value1'); + + // Receives and adds to the access token additional values by performing a REST call to an external service. + // WARNING: Below, you will find a reference to a third-party site, which is provided only as an example. + var uri = 'https://jsonplaceholder.typicode.com/posts'; + + try { + var request = new frJava.Request(); + + // You can chain methods that return the request object. + request.setUri(uri) + .setMethod('POST') + .setEntity(JSON.stringify({ + updatedFields: { + key2: 'value2', + key3: 'value3' + } + })); + + // You can call a method when chaining is not possible. + request.getHeaders().add('Content-Type', 'application/json; charset=UTF-8'); + + // Sends the request and receives the response. + var response = httpClient.send(request).getOrThrow(); + + // Checks if the response status is as expected. + if (response.getStatus() === org.forgerock.http.protocol.Status.CREATED) { + var result = JSON.parse(response.getEntity().getString()); + + // Set multiple token fields at once. + accessToken.setFields(result.updatedFields); + } else { + logger.error('Unable to obtain access token modifications. Status: ' + response.getStatus() + '. Content: ' + response.getEntity().getString()); + } + } catch (e) { + logger.error('The request processing was interrupted. ' + e); + + // The access token request fails with the HTTP 500 error in this case. + throw ('Unable to obtain response from: ' + uri); + } + + // Adds new fields containing identity attribute values to the access token. + accessToken.setField('mail', identity.getAttribute('mail')); + accessToken.setField('phone', identity.getAttribute('telephoneNumber').toArray()[0]); + + // Adds new fields containing the session property values. + // NOTE: session may not be available for non-interactive authorization grants. + if (session) { + try { + accessToken.setField('ipAddress', session.getProperty('Host')); + } catch (e) { + logger.error('Unable to retrieve session property value. ' + e); + } + } + + // Removes a native field from the token entry, that was set by AM. + // WARNING: removing native fields from the token may result in loss of functionality. + // accessToken.removeTokenName() + + // No return value is expected. Let it be undefined. +}()); +*/ +" +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Alpha-OAuth2-Access-Token-Modification-Script.script.json 1`] = ` +{ + "script": { + "39c08084-1238-43e8-857f-2e11005eac49": { + "_id": "39c08084-1238-43e8-857f-2e11005eac49", + "context": "OAUTH2_ACCESS_TOKEN_MODIFICATION", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Default alpha realm script for OAuth2 Access Token Modification", + "evaluatorVersion": "1.0", + "language": "JAVASCRIPT", + "lastModifiedBy": "id=b4b5ea11-ad75-4ec5-b8eb-77a6c5eff8bf,ou=user,ou=am-config", + "lastModifiedDate": 1733182558539, + "name": "Alpha OAuth2 Access Token Modification Script", + "script": "file://Alpha-OAuth2-Access-Token-Modification-Script.script.js", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Alpha-OIDC-Claims-Script.script.js 1`] = ` +"/* + * Copyright 2014-2021 ForgeRock AS. All Rights Reserved + * + * Use of this code requires a commercial software license with ForgeRock AS + * or with one of its affiliates. All use shall be exclusively subject + * to such license between the licensee and ForgeRock AS. + */ + +/* + * This script computes claim values returned in ID tokens and/or at the UserInfo Endpoint. + * The claim values are computed for: + * the claims derived from the requested scopes, + * the claims provided by the authorization server, + * and the claims requested by the client via the claims parameter. + * + * In the CONFIGURATION AND CUSTOMIZATION section, you can + * define the scope-to-claims mapping, and + * assign to each claim a resolver function that will compute the claim value. + * + * Defined variables (class references are provided below): + * scopes - Set (6). + * Always present, the requested scopes. + * claims - Map (5). + * Always present, default server provided claims. + * claimObjects - List (7, 2). + * Always present, the default server provided claims. + * requestedClaims - Map> (5). + * Always present, not empty if the request contains the claims parameter and the server has enabled + * claims_parameter_supported. A map of the requested claims to possible values, otherwise empty; + * requested claims with no requested values will have a key but no value in the map. A key with + * a single value in its Set (6) indicates that this is the only value that should be returned. + * requestedTypedClaims - List (7, 2). + * Always present, the requested claims. + * Requested claims with no requested values will have a claim with no values. + * A claim with a single value indicates this is the only value that should be returned. + * claimsLocales - List (7). + * The values from the 'claims_locales' parameter. + * See https://openid.net/specs/openid-connect-core-1_0.html#ClaimsLanguagesAndScripts for the OIDC specification details. + * requestProperties - Unmodifiable Map (5). + * Always present, contains a map of request properties: + * requestUri - The request URI. + * realm - The realm that the request relates to. + * requestParams - A map of the request params and/or posted data. + * Each value is a list of one or more properties. + * Please note that these should be handled in accordance with OWASP best practices: + * https://owasp.org/www-community/vulnerabilities/Unsafe_use_of_Reflection. + * clientProperties - Unmodifiable Map (5). + * Present if the client specified in the request was identified, contains a map of client properties: + * clientId - The client's URI for the request locale. + * allowedGrantTypes - List of the allowed grant types (org.forgerock.oauth2.core.GrantType) for the client. + * allowedResponseTypes - List of the allowed response types for the client. + * allowedScopes - List of the allowed scopes for the client. + * customProperties - A map of the custom properties of the client. + * Lists or maps will be included as sub-maps; for example: + * customMap[Key1]=Value1 will be returned as customMap -> Key1 -> Value1. + * To add custom properties to a client, update the Custom Properties field + * in AM Console > Realm Name > Applications > OAuth 2.0 > Clients > Client ID > Advanced. + * identity - AMIdentity (3). + * Always present, the identity of the resource owner. + * session - SSOToken (4). + * Present if the request contains the session cookie, the user's session object. + * scriptName - String (primitive). + * Always present, the display name of the script. + * logger - Always present, the "OAuth2Provider" debug logger instance: + * https://backstage.forgerock.com/docs/am/7/scripting-guide/scripting-api-global-logger.html#scripting-api-global-logger. + * Corresponding files will be prefixed with: scripts.OIDC_CLAIMS. + * httpClient - HTTP Client (8). + * Always present, the HTTP Client instance: + * https://backstage.forgerock.com/docs/am/7/scripting-guide/scripting-api-global-http-client.html#scripting-api-global-http-client. + * In order to use the client, you may need to add + * org.forgerock.http.Client, + * org.forgerock.http.protocol.*, + * and org.forgerock.util.promise.PromiseImpl + * to the allowed Java classes in the scripting engine configuration, as described in: + * https://backstage.forgerock.com/docs/am/7/scripting-guide/script-engine-security.html + * + * Return - a new UserInfoClaims(Map values, Map> compositeScopes) (1) object. + * The result of the last statement in the script is returned to the server. + * Currently, the Immediately Invoked Function Expression (also known as Self-Executing Anonymous Function) + * is the last (and only) statement in this script, and its return value will become the script result. + * Do not use "return variable" statement outside of a function definition. + * See RESULTS section for additional details. + * + * Class reference: + * (1) UserInfoClaims - https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/oauth2/core/UserInfoClaims.html. + * (2) Claim - https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html). + * An instance of org.forgerock.openidconnect.Claim has methods to access + * the claim name, requested values, locale, and whether the claim is essential. + * (3) AMIdentity - https://backstage.forgerock.com/docs/am/7/apidocs/com/sun/identity/idm/AMIdentity.html. + * (4) SSOToken - https://backstage.forgerock.com/docs/am/7/apidocs/com/iplanet/sso/SSOToken.html. + * (5) Map - https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/HashMap.html, + * or https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/LinkedHashMap.html. + * (6) Set - https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/HashSet.html. + * (7) List - https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html. + * (8) Client - https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/http/Client.html. +*/ + +(function () { + // SETUP + + /** + * Claim processing utilities. + * An object that contains reusable functions for processing claims. + * @see CLAIM PROCESSING UTILITIES section for details. + */ + var utils = getUtils(); + + // CONFIGURATION AND CUSTOMIZATION + + /** + * OAuth 2.0 scope values (scopes) can be used by the Client to request OIDC claims. + * + * Call this configuration method, and pass in as the first argument + * an object that maps a scope value to an array of claim names + * to specify which claims need to be processed and returned for the requested scopes. + * @see {@link https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims} + * for the scope values that could be used to request claims as defined in the OIDC specification. + * + * Below, find a default configuration that is expected to work in the current environment. + * + * CUSTOMIZATION + * You can choose the claim names returned for a scope. + */ + utils.setScopeClaimsMap({ + profile: [ + 'name', + 'family_name', + 'given_name', + 'zoneinfo', + 'locale' + ], + email: ['email'], + address: ['address'], + phone: ['phone_number'] + }); + + /** + * In this script, each claim + * derived from the requested scopes, + * provided by the authorization server, and + * requested by the client via the claims parameter + * will be processed by a function associated with the claim name. + * + * Call this configuration method, and pass in as the first argument + * an object that maps a claim name to a resolver function, + * which will be automatically executed for each claim processed by the script. + * + * The claim resolver function will receive the requested claim information + * in an instance of org.forgerock.openidconnect.Claim as the first argument. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html} + * for details on the Claim class. + * + * If the claim resolver function returns a value, + * other than undefined or null, + * the claim will be included in the script's results. + * + * The Claim instance provides methods to check + * what the name of the claim is, + * which values the claim request contains, + * whether the claim is essential, and + * which locale the claim is associated with. + * The resolver function can consider this information when computing and returning the claim value. + * + * Below, find a default configuration that is expected to work in the current environment. + * A reusable function, utils.getUserProfileClaimResolver(String attribute-name), + * is called to return a claim resolver function based on a user profile attribute. + * @see CLAIM RESOLVERS section for the implementation details and examples. + * For the address claim, an example of a claim resolver that uses another claim resolver is provided. + * + * CUSTOMIZATION + * You can reuse the predefined utils methods with your custom arguments. + * You can also specify a custom resolver function for a claim name, + * that will compute and return the claim value—as shown in the commented out example below. + */ + utils.setClaimResolvers({ + /* + // An example of a simple claim resolver function that is defined for a claim + // directly in the configuration object: + custom-claim-name: function (requestedClaim) { + // In this case, initially, the claim value comes straight from a user profile attribute value: + var claimValue = identity.getAttribute('custom-attribute-name').toArray()[0] + + // Optionally, provide additional logic for processing (filtering, formatting, etc.) the claim value. + // You can use: + // requestedClaim.getName() + // requestedClaim.getValues() + // requestedClaim.getLocale() + // requestedClaim.isEssential() + + return claimValue + }, + */ + /** + * The use of utils.getUserProfileClaimResolver shows how + * an argument passed to a function that returns a claim resolver + * becomes available to the resolver function (via its lexical context). + */ + name: utils.getUserProfileClaimResolver('cn'), + family_name: utils.getUserProfileClaimResolver('sn'), + given_name: utils.getUserProfileClaimResolver('givenname'), + zoneinfo: utils.getUserProfileClaimResolver('preferredtimezone'), + locale: utils.getUserProfileClaimResolver('preferredlocale'), + email: utils.getUserProfileClaimResolver('mail'), + address: utils.getAddressClaimResolver( + /** + * The passed in user profile claim resolver function + * can be used by the address claim resolver function + * to obtain the claim value to be formatted as per the OIDC specification: + * @see https://openid.net/specs/openid-connect-core-1_0.html#AddressClaim. + */ + utils.getUserProfileClaimResolver('postaladdress') + ), + phone_number: utils.getUserProfileClaimResolver('telephonenumber') + }); + + // CLAIM PROCESSING UTILITIES + + /** + * @returns {object} An object that contains reusable claim processing utilities. + * @see PUBLIC METHODS section and the return statement for the list of exported functions. + */ + function getUtils () { + // IMPORT JAVA + + /** + * Provides Java scripting functionality. + * @see {@link https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/Scripting_Java#javaimporter_constructor}. + */ + var frJava = JavaImporter( + org.forgerock.oauth2.core.exceptions.InvalidRequestException, + org.forgerock.oauth2.core.UserInfoClaims, + org.forgerock.openidconnect.Claim, + + java.util.LinkedHashMap, + java.util.ArrayList + ); + + // SET UP CONFIGURATION + + /** + * Placeholder for a configuration option that contains + * an object that maps the supported scope values (scopes) + * and the corresponding claim names for each scope value. + */ + var scopeClaimsMap; + + /** + * Placeholder for a configuration option that contains + * an object that maps the supported claim names + * and the resolver functions returning the claim value. + */ + var claimResolvers; + + /** + * A (public) method that accepts an object that maps the supported scopes and the corresponding claim names, + * and assigns it to a (private) variable that serves as a configuration option. + * @param {object} params - An object that maps each supported scope value to an array of claim names, + * in order to specify which claims need to be processed for the requested scopes. + * @see {@link https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims} for details. + * @param {string[]} [params.profile] - An array of claim names to be returned if the profile scope is requested. + * @param {string[]} [params.email] - An array of claim names to be returned if the email scope is requested. + * @param {string[]} [params.address] - An array of claim names to be returned if the address scope is requested. + * @param {string[]} [params.phone] - An array of claim names to be returned if the phone scope is requested. + * @returns {undefined} + */ + function setScopeClaimsMap(params) { + scopeClaimsMap = params; + } + + /** + * A (public) method that accepts an object that maps the supported claim names + * and the resolver functions returning the claim value, + * and assigns it to a (private) variable that serves as a configuration option. + * @param {object} params - An object that maps + * each supported claim name to a function that computes and returns the claim value. + */ + function setClaimResolvers(params) { + claimResolvers = params; + } + + // CLAIM RESOLVERS + + /** + * Claim resolvers are functions that return a claim value. + * @param {*} + * @returns {*} + */ + + /** + * Defines a claim resolver based on a user profile attribute. + * @param {string} attributeName - Name of the user profile attribute. + * @returns {function} A function that will determine the claim value + * based on the user profile attribute and the (requested) claim properties. + */ + function getUserProfileClaimResolver (attributeName) { + /** + * Resolves a claim with a user profile attribute value. + * Returns undefined if the identity attribute is not populated, + * OR if the claim has requested values that do not contain the identity attribute value. + * ATTENTION: the aforementioned comparison is case-sensitive. + * @param {org.forgerock.openidconnect.Claim} claim + * An object that provides methods to obtain information/requirements associated with a claim. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html} for details. + * @returns {string|HashSet|undefined} + */ + function resolveClaim(claim) { + var userProfileValue; + + if (identity) { + userProfileValue = getClaimValueFromSet(claim, identity.getAttribute(attributeName)); + + if (userProfileValue && !userProfileValue.isEmpty()) { + if (!claim.getValues() || claim.getValues().isEmpty() || claim.getValues().contains(userProfileValue)) { + return userProfileValue; + } + } + } + } + + return resolveClaim; + } + + /** + * Returns an address claim resolver based on a claim value obtained with another claim resolver. + * @param {function} resolveClaim - A function that returns a claim value. + * @returns {function} A function that will accept a claim as an argument, + * run the claim resolver function for the claim and obtain the claim value, + * and apply additional formatting to the value before returning it. + */ + function getAddressClaimResolver (resolveClaim) { + /** + * Creates an address claim object from a value returned by a claim resolver, + * and returns the address claim object as the claim value. + * @see {@link https://openid.net/specs/openid-connect-core-1_0.html#AddressClaim}. + * The claim value is obtained with a claim resolving function available from the closure. + * @param {org.forgerock.openidconnect.Claim} claim + * An object that provides methods to obtain information/requirements associated with a claim. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html} for details. + * @returns {java.util.LinkedHashMap|undefined} The address claim object created from a claim value. + */ + function resolveAddressClaim(claim) { + var claimValue = resolveClaim(claim); + var addressObject; + + if (isClaimValueValid(claimValue)) { + addressObject = new frJava.LinkedHashMap(); + + addressObject.put('formatted', claimValue); + + return addressObject; + } + } + + return resolveAddressClaim; + } + + /** + * Returns an essential claim resolver based on a claim value obtained with another claim resolver. + * @param {function} resolveClaim - A function that returns a claim value. + * @returns {function} A function that will accept a claim as an argument, + * run the claim resolver function for the claim and obtain the claim value, + * and apply additional logic for essential claims. + */ + function getEssentialClaimResolver (resolveClaim) { + /** + * Returns a claim value or throws an error. + * The claim value is obtained with a claim resolving function available from the closure. + * Throws an exception if the claim is essential and no value is returned for the claim. + * + * Use of this resolver is optional. + * @see {@link https://openid.net/specs/openid-connect-core-1_0.html#IndividualClaimsRequests} stating: + * "Note that even if the Claims are not available because the End-User did not authorize their release or they are not present, + * the Authorization Server MUST NOT generate an error when Claims are not returned, whether they are Essential or Voluntary, + * unless otherwise specified in the description of the specific claim." + * + * @param {org.forgerock.openidconnect.Claim} claim + * An object that provides methods to obtain information/requirements associated with a claim. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html} for details. + * @returns {*} + * @throws {org.forgerock.oauth2.core.exceptions.InvalidRequestException} + */ + function resolveEssentialClaim(claim) { + var claimValue = resolveClaim(claim); + + if (claim.isEssential() && !isClaimValueValid(claimValue)) { + throw new frJava.InvalidRequestException('Could not provide value for essential claim: ' + claim.getName()); + } + + return claimValue; + } + + return resolveEssentialClaim; + } + + /** + * Provides default resolution for a claim. + * Use it if a claim-specific resolver is not defined in the configuration. + * @param {org.forgerock.openidconnect.Claim} claim + * An object that provides methods to obtain information/requirements associated with a claim. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html} for details. + * @returns {*} A single value associated with this claim. + */ + function resolveAnyClaim (claim) { + if (claim.getValues().size() === 1) { + return claim.getValues().toArray()[0]; + } + } + + // UTILITIES + + /** + * Returns claim value from a set. + * If the set contains a single value, returns the value. + * If the set contains multiple values, returns the set. + * Otherwise, returns undefined. + * + * @param {org.forgerock.openidconnect.Claim} claim + * An object that provides methods to obtain information/requirements associated with a claim. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html} for details. + * @param {java.util.HashSet} set The set—for example, a user profile attribute value. + * @returns {string|java.util.HashSet|undefined} + */ + function getClaimValueFromSet (claim, set) { + if (set && set.size()) { + if (set.size() === 1) { + return set.toArray()[0]; + } else { + return set; + } + } else if (logger.warningEnabled()) { + logger.warning('OIDC Claims script. Got an empty set for claim: ' + claim.getName()); + } + } + + function isClaimValueValid (claimValue) { + if (typeof claimValue === 'undefined' || claimValue === null) { + return false; + } + + return true; + } + + // CLAIM PROCESSING + + /** + * Constructs and returns an object populated with the computed claim values + * and the requested scopes mapped to the claim names. + * @returns {org.forgerock.oauth2.core.UserInfoClaims} The object to be returned to the authorization server. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/oauth2/core/UserInfoClaims.html}. + * @see RESULTS section for the use of this function. + */ + function getUserInfoClaims () { + return new frJava.UserInfoClaims(getComputedClaims(), getCompositeScopes()); + } + + /** + * Creates a map of (requested) claim names populated with the computed claim values. + * @returns {java.util.LinkedHashMap} + * A map of the requested claim names and the corresponding claim values. + */ + function getComputedClaims () { + /** + * Creates a complete list of claim objects from: + * the claims derived from the scopes, + * the claims provided by the authorization server, + * and the claims requested by the client. + * @returns {java.util.ArrayList} + * Returns a complete list of org.forgerock.openidconnect.Claim objects available to the script. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html} for the claim object details. + */ + function getClaims() { + /** + * Returns a list of claim objects for the requested scopes. + * Uses the scopeClaimsMap configuration option to derive the claim names; + * no other properties of a claim derived from a scope are populated. + * @returns {java.util.ArrayList} + * A list of org.forgerock.openidconnect.Claim objects derived from the requested scopes. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html} for the claim object details. + */ + function convertScopeToClaims() { + var claims = new frJava.ArrayList(); + + scopes.toArray().forEach(function (scope) { + if (String(scope) !== 'openid' && scopeClaimsMap[scope]) { + scopeClaimsMap[scope].forEach(function (claimName) { + claims.add(new frJava.Claim(claimName)); + }); + } + }); + + return claims; + } + + var claims = new frJava.ArrayList(); + + claims.addAll(convertScopeToClaims()); + claims.addAll(claimObjects); + claims.addAll(requestedTypedClaims); + + return claims; + } + + /** + * Computes and returns a claim value. + * To obtain the claim value, uses the resolver function specified for the claim in the claimResolvers configuration object. + * @see claimResolvers + * If no resolver function is found, uses the default claim resolver function. + * + * @param {org.forgerock.openidconnect.Claim} claim + * An object that provides methods to obtain information/requirements associated with a claim. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html} for details. + * @returns {*} Claim value. + * @throws {org.forgerock.oauth2.core.exceptions.InvalidRequestException} + * Rethrows this exception if a claim resolver throws it. + * You can throw org.forgerock.oauth2.core.exceptions.InvalidRequestException from your custom claim resolver + * if you want to terminate the claim processing. + */ + function computeClaim(claim) { + var resolveClaim; + var message; + + try { + resolveClaim = claimResolvers[claim.getName()] || resolveAnyClaim; + + return resolveClaim(claim); + } catch (e) { + message = 'OIDC Claims script exception. Unable to resolve OIDC Claim. ' + e; + + if (String(e).indexOf('org.forgerock.oauth2.core.exceptions.InvalidRequestException') !== -1) { + throw e; + } + + if (logger.warningEnabled()) { + logger.warning(message); + } + } + } + + var computedClaims = new frJava.LinkedHashMap(); + + getClaims().toArray().forEach(function (claim) { + var claimValue = computeClaim(claim); + + if (isClaimValueValid(claimValue)) { + computedClaims.put(claim.getName(), claimValue); + } else { + /** + * If a claim has been processed, but appears in the list again, + * and its value cannot be computed under the new conditions, + * the claim is removed from the final result. + * + * For example, a claim could be mapped to a scope and found in the user profile, + * but also requested by the client with required values that don't match the computed one. + * @see {link https://openid.net/specs/openid-connect-core-1_0.html#IndividualClaimsRequests}. + * for the relevant OIDC specification details. + */ + computedClaims.remove(claim.getName()); + } + }); + + return computedClaims; + } + + /** + * Creates a map of requested scopes and the corresponding claim names. + * @returns {java.util.LinkedHashMap} + */ + function getCompositeScopes () { + var compositeScopes = new frJava.LinkedHashMap(); + + scopes.toArray().forEach(function (scope) { + var scopeClaims = new frJava.ArrayList(); + + if (scopeClaimsMap[scope]) { + scopeClaimsMap[scope].forEach(function (claimName) { + scopeClaims.add(claimName); + }); + } + + if (scopeClaims.size()) { + compositeScopes.put(scope, scopeClaims); + } + }); + + return compositeScopes; + } + + // PUBLIC METHODS + + return { + setScopeClaimsMap: setScopeClaimsMap, + setClaimResolvers: setClaimResolvers, + getUserProfileClaimResolver: getUserProfileClaimResolver, + getAddressClaimResolver: getAddressClaimResolver, + getEssentialClaimResolver: getEssentialClaimResolver, + getUserInfoClaims: getUserInfoClaims + }; + } + + // RESULTS + + /** + * This script returns an instance of the org.forgerock.oauth2.core.UserInfoClaims class + * populated with the computed claim values and + * the requested scopes mapped to the claim names. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/oauth2/core/UserInfoClaims.html}. + * + * Assigning it to a variable gives you an opportunity + * to log the content of the returned value during development. + */ + var userInfoClaims = utils.getUserInfoClaims(); + + /* + logger.error(scriptName + ' results:') + logger.error('Values: ' + userInfoClaims.getValues()) + logger.error('Scopes: ' + userInfoClaims.getCompositeScopes()) + */ + + return userInfoClaims; +}()); +" +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Alpha-OIDC-Claims-Script.script.json 1`] = ` +{ + "script": { + "cf3515f0-8278-4ee3-a530-1bad7424c416": { + "_id": "cf3515f0-8278-4ee3-a530-1bad7424c416", + "context": "OIDC_CLAIMS", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Default alpha realm script for OIDC claims", + "evaluatorVersion": "1.0", + "language": "JAVASCRIPT", + "lastModifiedBy": "id=b4b5ea11-ad75-4ec5-b8eb-77a6c5eff8bf,ou=user,ou=am-config", + "lastModifiedDate": 1733182558619, + "name": "Alpha OIDC Claims Script", + "script": "file://Alpha-OIDC-Claims-Script.script.js", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Alpha-endUserUIClient-OAuth2-Access-Token-Modification-Script.script.js 1`] = ` +"(function () { + if (scopes.contains('fr:autoaccess:*') || scopes.contains('fr:iga:*') || scopes.contains('fr:idc:analytics:*')) { + var fr = JavaImporter( + com.sun.identity.idm.IdType + ); + var groups = []; + identity.getMemberships(fr.IdType.GROUP).toArray().forEach(function (group) { + groups.push(group.getAttribute('cn').toArray()[0]); + }); + accessToken.setField('groups', groups); + } +}()); +" +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Alpha-endUserUIClient-OAuth2-Access-Token-Modification-Script.script.json 1`] = ` +{ + "script": { + "e232cff3-2460-47cd-80b2-36c86c0d0f06": { + "_id": "e232cff3-2460-47cd-80b2-36c86c0d0f06", + "context": "OAUTH2_ACCESS_TOKEN_MODIFICATION", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Used by endUserUIClient", + "evaluatorVersion": "1.0", + "language": "JAVASCRIPT", + "lastModifiedBy": "id=b4b5ea11-ad75-4ec5-b8eb-77a6c5eff8bf,ou=user,ou=am-config", + "lastModifiedDate": 1733182558730, + "name": "Alpha endUserUIClient OAuth2 Access Token Modification Script", + "script": "file://Alpha-endUserUIClient-OAuth2-Access-Token-Modification-Script.script.js", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Alpha-endUserUIClient-OIDC-Claims-Script.script.js 1`] = ` +"/* + * Copyright 2014-2021 ForgeRock AS. All Rights Reserved + * + * Use of this code requires a commercial software license with ForgeRock AS + * or with one of its affiliates. All use shall be exclusively subject + * to such license between the licensee and ForgeRock AS. + */ + +/* + * This script computes claim values returned in ID tokens and/or at the UserInfo Endpoint. + * The claim values are computed for: + * the claims derived from the requested scopes, + * the claims provided by the authorization server, + * and the claims requested by the client via the claims parameter. + * + * In the CONFIGURATION AND CUSTOMIZATION section, you can + * define the scope-to-claims mapping, and + * assign to each claim a resolver function that will compute the claim value. + * + * Defined variables (class references are provided below): + * scopes - Set (6). + * Always present, the requested scopes. + * claims - Map (5). + * Always present, default server provided claims. + * claimObjects - List (7, 2). + * Always present, the default server provided claims. + * requestedClaims - Map> (5). + * Always present, not empty if the request contains the claims parameter and the server has enabled + * claims_parameter_supported. A map of the requested claims to possible values, otherwise empty; + * requested claims with no requested values will have a key but no value in the map. A key with + * a single value in its Set (6) indicates that this is the only value that should be returned. + * requestedTypedClaims - List (7, 2). + * Always present, the requested claims. + * Requested claims with no requested values will have a claim with no values. + * A claim with a single value indicates this is the only value that should be returned. + * claimsLocales - List (7). + * The values from the 'claims_locales' parameter. + * See https://openid.net/specs/openid-connect-core-1_0.html#ClaimsLanguagesAndScripts for the OIDC specification details. + * requestProperties - Unmodifiable Map (5). + * Always present, contains a map of request properties: + * requestUri - The request URI. + * realm - The realm that the request relates to. + * requestParams - A map of the request params and/or posted data. + * Each value is a list of one or more properties. + * Please note that these should be handled in accordance with OWASP best practices: + * https://owasp.org/www-community/vulnerabilities/Unsafe_use_of_Reflection. + * clientProperties - Unmodifiable Map (5). + * Present if the client specified in the request was identified, contains a map of client properties: + * clientId - The client's URI for the request locale. + * allowedGrantTypes - List of the allowed grant types (org.forgerock.oauth2.core.GrantType) for the client. + * allowedResponseTypes - List of the allowed response types for the client. + * allowedScopes - List of the allowed scopes for the client. + * customProperties - A map of the custom properties of the client. + * Lists or maps will be included as sub-maps; for example: + * customMap[Key1]=Value1 will be returned as customMap -> Key1 -> Value1. + * To add custom properties to a client, update the Custom Properties field + * in AM Console > Realm Name > Applications > OAuth 2.0 > Clients > Client ID > Advanced. + * identity - AMIdentity (3). + * Always present, the identity of the resource owner. + * session - SSOToken (4). + * Present if the request contains the session cookie, the user's session object. + * scriptName - String (primitive). + * Always present, the display name of the script. + * logger - Always present, the "OAuth2Provider" debug logger instance: + * https://backstage.forgerock.com/docs/am/7/scripting-guide/scripting-api-global-logger.html#scripting-api-global-logger. + * Corresponding files will be prefixed with: scripts.OIDC_CLAIMS. + * httpClient - HTTP Client (8). + * Always present, the HTTP Client instance: + * https://backstage.forgerock.com/docs/am/7/scripting-guide/scripting-api-global-http-client.html#scripting-api-global-http-client. + * In order to use the client, you may need to add + * org.forgerock.http.Client, + * org.forgerock.http.protocol.*, + * and org.forgerock.util.promise.PromiseImpl + * to the allowed Java classes in the scripting engine configuration, as described in: + * https://backstage.forgerock.com/docs/am/7/scripting-guide/script-engine-security.html + * + * Return - a new UserInfoClaims(Map values, Map> compositeScopes) (1) object. + * The result of the last statement in the script is returned to the server. + * Currently, the Immediately Invoked Function Expression (also known as Self-Executing Anonymous Function) + * is the last (and only) statement in this script, and its return value will become the script result. + * Do not use "return variable" statement outside of a function definition. + * See RESULTS section for additional details. + * + * Class reference: + * (1) UserInfoClaims - https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/oauth2/core/UserInfoClaims.html. + * (2) Claim - https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html). + * An instance of org.forgerock.openidconnect.Claim has methods to access + * the claim name, requested values, locale, and whether the claim is essential. + * (3) AMIdentity - https://backstage.forgerock.com/docs/am/7/apidocs/com/sun/identity/idm/AMIdentity.html. + * (4) SSOToken - https://backstage.forgerock.com/docs/am/7/apidocs/com/iplanet/sso/SSOToken.html. + * (5) Map - https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/HashMap.html, + * or https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/LinkedHashMap.html. + * (6) Set - https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/HashSet.html. + * (7) List - https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html. + * (8) Client - https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/http/Client.html. +*/ + +(function () { + // SETUP + + /** + * Claim processing utilities. + * An object that contains reusable functions for processing claims. + * @see CLAIM PROCESSING UTILITIES section for details. + */ + var utils = getUtils(); + + // CONFIGURATION AND CUSTOMIZATION + + /** + * OAuth 2.0 scope values (scopes) can be used by the Client to request OIDC claims. + * + * Call this configuration method, and pass in as the first argument + * an object that maps a scope value to an array of claim names + * to specify which claims need to be processed and returned for the requested scopes. + * @see {@link https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims} + * for the scope values that could be used to request claims as defined in the OIDC specification. + * + * Below, find a default configuration that is expected to work in the current environment. + * + * CUSTOMIZATION + * You can choose the claim names returned for a scope. + */ + utils.setScopeClaimsMap({ + profile: [ + 'name', + 'family_name', + 'given_name', + 'zoneinfo', + 'locale' + ], + email: ['email'], + address: ['address'], + phone: ['phone_number'] + }); + + /** + * In this script, each claim + * derived from the requested scopes, + * provided by the authorization server, and + * requested by the client via the claims parameter + * will be processed by a function associated with the claim name. + * + * Call this configuration method, and pass in as the first argument + * an object that maps a claim name to a resolver function, + * which will be automatically executed for each claim processed by the script. + * + * The claim resolver function will receive the requested claim information + * in an instance of org.forgerock.openidconnect.Claim as the first argument. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html} + * for details on the Claim class. + * + * If the claim resolver function returns a value, + * other than undefined or null, + * the claim will be included in the script's results. + * + * The Claim instance provides methods to check + * what the name of the claim is, + * which values the claim request contains, + * whether the claim is essential, and + * which locale the claim is associated with. + * The resolver function can consider this information when computing and returning the claim value. + * + * Below, find a default configuration that is expected to work in the current environment. + * A reusable function, utils.getUserProfileClaimResolver(String attribute-name), + * is called to return a claim resolver function based on a user profile attribute. + * @see CLAIM RESOLVERS section for the implementation details and examples. + * For the address claim, an example of a claim resolver that uses another claim resolver is provided. + * + * CUSTOMIZATION + * You can reuse the predefined utils methods with your custom arguments. + * You can also specify a custom resolver function for a claim name, + * that will compute and return the claim value—as shown in the commented out example below. + */ + utils.setClaimResolvers({ + /* + // An example of a simple claim resolver function that is defined for a claim + // directly in the configuration object: + custom-claim-name: function (requestedClaim) { + // In this case, initially, the claim value comes straight from a user profile attribute value: + var claimValue = identity.getAttribute('custom-attribute-name').toArray()[0] + + // Optionally, provide additional logic for processing (filtering, formatting, etc.) the claim value. + // You can use: + // requestedClaim.getName() + // requestedClaim.getValues() + // requestedClaim.getLocale() + // requestedClaim.isEssential() + + return claimValue + }, + */ + /** + * The use of utils.getUserProfileClaimResolver shows how + * an argument passed to a function that returns a claim resolver + * becomes available to the resolver function (via its lexical context). + */ + name: utils.getUserProfileClaimResolver('cn'), + family_name: utils.getUserProfileClaimResolver('sn'), + given_name: utils.getUserProfileClaimResolver('givenname'), + zoneinfo: utils.getUserProfileClaimResolver('preferredtimezone'), + locale: utils.getUserProfileClaimResolver('preferredlocale'), + email: utils.getUserProfileClaimResolver('mail'), + address: utils.getAddressClaimResolver( + /** + * The passed in user profile claim resolver function + * can be used by the address claim resolver function + * to obtain the claim value to be formatted as per the OIDC specification: + * @see https://openid.net/specs/openid-connect-core-1_0.html#AddressClaim. + */ + utils.getUserProfileClaimResolver('postaladdress') + ), + phone_number: utils.getUserProfileClaimResolver('telephonenumber') + }); + + // CLAIM PROCESSING UTILITIES + + /** + * @returns {object} An object that contains reusable claim processing utilities. + * @see PUBLIC METHODS section and the return statement for the list of exported functions. + */ + function getUtils () { + // IMPORT JAVA + + /** + * Provides Java scripting functionality. + * @see {@link https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/Scripting_Java#javaimporter_constructor}. + */ + var frJava = JavaImporter( + org.forgerock.oauth2.core.exceptions.InvalidRequestException, + org.forgerock.oauth2.core.UserInfoClaims, + org.forgerock.openidconnect.Claim, + + java.util.LinkedHashMap, + java.util.ArrayList + ); + + // SET UP CONFIGURATION + + /** + * Placeholder for a configuration option that contains + * an object that maps the supported scope values (scopes) + * and the corresponding claim names for each scope value. + */ + var scopeClaimsMap; + + /** + * Placeholder for a configuration option that contains + * an object that maps the supported claim names + * and the resolver functions returning the claim value. + */ + var claimResolvers; + + /** + * A (public) method that accepts an object that maps the supported scopes and the corresponding claim names, + * and assigns it to a (private) variable that serves as a configuration option. + * @param {object} params - An object that maps each supported scope value to an array of claim names, + * in order to specify which claims need to be processed for the requested scopes. + * @see {@link https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims} for details. + * @param {string[]} [params.profile] - An array of claim names to be returned if the profile scope is requested. + * @param {string[]} [params.email] - An array of claim names to be returned if the email scope is requested. + * @param {string[]} [params.address] - An array of claim names to be returned if the address scope is requested. + * @param {string[]} [params.phone] - An array of claim names to be returned if the phone scope is requested. + * @returns {undefined} + */ + function setScopeClaimsMap(params) { + scopeClaimsMap = params; + } + + /** + * A (public) method that accepts an object that maps the supported claim names + * and the resolver functions returning the claim value, + * and assigns it to a (private) variable that serves as a configuration option. + * @param {object} params - An object that maps + * each supported claim name to a function that computes and returns the claim value. + */ + function setClaimResolvers(params) { + claimResolvers = params; + } + + // CLAIM RESOLVERS + + /** + * Claim resolvers are functions that return a claim value. + * @param {*} + * @returns {*} + */ + + /** + * Defines a claim resolver based on a user profile attribute. + * @param {string} attributeName - Name of the user profile attribute. + * @returns {function} A function that will determine the claim value + * based on the user profile attribute and the (requested) claim properties. + */ + function getUserProfileClaimResolver (attributeName) { + /** + * Resolves a claim with a user profile attribute value. + * Returns undefined if the identity attribute is not populated, + * OR if the claim has requested values that do not contain the identity attribute value. + * ATTENTION: the aforementioned comparison is case-sensitive. + * @param {org.forgerock.openidconnect.Claim} claim + * An object that provides methods to obtain information/requirements associated with a claim. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html} for details. + * @returns {string|HashSet|undefined} + */ + function resolveClaim(claim) { + var userProfileValue; + + if (identity) { + userProfileValue = getClaimValueFromSet(claim, identity.getAttribute(attributeName)); + + if (userProfileValue && !userProfileValue.isEmpty()) { + if (!claim.getValues() || claim.getValues().isEmpty() || claim.getValues().contains(userProfileValue)) { + return userProfileValue; + } + } + } + } + + return resolveClaim; + } + + /** + * Returns an address claim resolver based on a claim value obtained with another claim resolver. + * @param {function} resolveClaim - A function that returns a claim value. + * @returns {function} A function that will accept a claim as an argument, + * run the claim resolver function for the claim and obtain the claim value, + * and apply additional formatting to the value before returning it. + */ + function getAddressClaimResolver (resolveClaim) { + /** + * Creates an address claim object from a value returned by a claim resolver, + * and returns the address claim object as the claim value. + * @see {@link https://openid.net/specs/openid-connect-core-1_0.html#AddressClaim}. + * The claim value is obtained with a claim resolving function available from the closure. + * @param {org.forgerock.openidconnect.Claim} claim + * An object that provides methods to obtain information/requirements associated with a claim. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html} for details. + * @returns {java.util.LinkedHashMap|undefined} The address claim object created from a claim value. + */ + function resolveAddressClaim(claim) { + var claimValue = resolveClaim(claim); + var addressObject; + + if (isClaimValueValid(claimValue)) { + addressObject = new frJava.LinkedHashMap(); + + addressObject.put('formatted', claimValue); + + return addressObject; + } + } + + return resolveAddressClaim; + } + + /** + * Returns an essential claim resolver based on a claim value obtained with another claim resolver. + * @param {function} resolveClaim - A function that returns a claim value. + * @returns {function} A function that will accept a claim as an argument, + * run the claim resolver function for the claim and obtain the claim value, + * and apply additional logic for essential claims. + */ + function getEssentialClaimResolver (resolveClaim) { + /** + * Returns a claim value or throws an error. + * The claim value is obtained with a claim resolving function available from the closure. + * Throws an exception if the claim is essential and no value is returned for the claim. + * + * Use of this resolver is optional. + * @see {@link https://openid.net/specs/openid-connect-core-1_0.html#IndividualClaimsRequests} stating: + * "Note that even if the Claims are not available because the End-User did not authorize their release or they are not present, + * the Authorization Server MUST NOT generate an error when Claims are not returned, whether they are Essential or Voluntary, + * unless otherwise specified in the description of the specific claim." + * + * @param {org.forgerock.openidconnect.Claim} claim + * An object that provides methods to obtain information/requirements associated with a claim. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html} for details. + * @returns {*} + * @throws {org.forgerock.oauth2.core.exceptions.InvalidRequestException} + */ + function resolveEssentialClaim(claim) { + var claimValue = resolveClaim(claim); + + if (claim.isEssential() && !isClaimValueValid(claimValue)) { + throw new frJava.InvalidRequestException('Could not provide value for essential claim: ' + claim.getName()); + } + + return claimValue; + } + + return resolveEssentialClaim; + } + + /** + * Provides default resolution for a claim. + * Use it if a claim-specific resolver is not defined in the configuration. + * @param {org.forgerock.openidconnect.Claim} claim + * An object that provides methods to obtain information/requirements associated with a claim. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html} for details. + * @returns {*} A single value associated with this claim. + */ + function resolveAnyClaim (claim) { + if (claim.getValues().size() === 1) { + return claim.getValues().toArray()[0]; + } + } + + // UTILITIES + + /** + * Returns claim value from a set. + * If the set contains a single value, returns the value. + * If the set contains multiple values, returns the set. + * Otherwise, returns undefined. + * + * @param {org.forgerock.openidconnect.Claim} claim + * An object that provides methods to obtain information/requirements associated with a claim. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html} for details. + * @param {java.util.HashSet} set The set—for example, a user profile attribute value. + * @returns {string|java.util.HashSet|undefined} + */ + function getClaimValueFromSet (claim, set) { + if (set && set.size()) { + if (set.size() === 1) { + return set.toArray()[0]; + } else { + return set; + } + } else if (logger.warningEnabled()) { + logger.warning('OIDC Claims script. Got an empty set for claim: ' + claim.getName()); + } + } + + function isClaimValueValid (claimValue) { + if (typeof claimValue === 'undefined' || claimValue === null) { + return false; + } + + return true; + } + + // CLAIM PROCESSING + + /** + * Constructs and returns an object populated with the computed claim values + * and the requested scopes mapped to the claim names. + * @returns {org.forgerock.oauth2.core.UserInfoClaims} The object to be returned to the authorization server. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/oauth2/core/UserInfoClaims.html}. + * @see RESULTS section for the use of this function. + */ + function getUserInfoClaims () { + return new frJava.UserInfoClaims(getComputedClaims(), getCompositeScopes()); + } + + /** + * Creates a map of (requested) claim names populated with the computed claim values. + * @returns {java.util.LinkedHashMap} + * A map of the requested claim names and the corresponding claim values. + */ + function getComputedClaims () { + /** + * Creates a complete list of claim objects from: + * the claims derived from the scopes, + * the claims provided by the authorization server, + * and the claims requested by the client. + * @returns {java.util.ArrayList} + * Returns a complete list of org.forgerock.openidconnect.Claim objects available to the script. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html} for the claim object details. + */ + function getClaims() { + /** + * Returns a list of claim objects for the requested scopes. + * Uses the scopeClaimsMap configuration option to derive the claim names; + * no other properties of a claim derived from a scope are populated. + * @returns {java.util.ArrayList} + * A list of org.forgerock.openidconnect.Claim objects derived from the requested scopes. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html} for the claim object details. + */ + function convertScopeToClaims() { + var claims = new frJava.ArrayList(); + + scopes.toArray().forEach(function (scope) { + if (String(scope) !== 'openid' && scopeClaimsMap[scope]) { + scopeClaimsMap[scope].forEach(function (claimName) { + claims.add(new frJava.Claim(claimName)); + }); + } + }); + + return claims; + } + + var claims = new frJava.ArrayList(); + + claims.addAll(convertScopeToClaims()); + claims.addAll(claimObjects); + claims.addAll(requestedTypedClaims); + + return claims; + } + + /** + * Computes and returns a claim value. + * To obtain the claim value, uses the resolver function specified for the claim in the claimResolvers configuration object. + * @see claimResolvers + * If no resolver function is found, uses the default claim resolver function. + * + * @param {org.forgerock.openidconnect.Claim} claim + * An object that provides methods to obtain information/requirements associated with a claim. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html} for details. + * @returns {*} Claim value. + * @throws {org.forgerock.oauth2.core.exceptions.InvalidRequestException} + * Rethrows this exception if a claim resolver throws it. + * You can throw org.forgerock.oauth2.core.exceptions.InvalidRequestException from your custom claim resolver + * if you want to terminate the claim processing. + */ + function computeClaim(claim) { + var resolveClaim; + var message; + + try { + resolveClaim = claimResolvers[claim.getName()] || resolveAnyClaim; + + return resolveClaim(claim); + } catch (e) { + message = 'OIDC Claims script exception. Unable to resolve OIDC Claim. ' + e; + + if (String(e).indexOf('org.forgerock.oauth2.core.exceptions.InvalidRequestException') !== -1) { + throw e; + } + + if (logger.warningEnabled()) { + logger.warning(message); + } + } + } + + var computedClaims = new frJava.LinkedHashMap(); + + getClaims().toArray().forEach(function (claim) { + var claimValue = computeClaim(claim); + + if (isClaimValueValid(claimValue)) { + computedClaims.put(claim.getName(), claimValue); + } else { + /** + * If a claim has been processed, but appears in the list again, + * and its value cannot be computed under the new conditions, + * the claim is removed from the final result. + * + * For example, a claim could be mapped to a scope and found in the user profile, + * but also requested by the client with required values that don't match the computed one. + * @see {link https://openid.net/specs/openid-connect-core-1_0.html#IndividualClaimsRequests}. + * for the relevant OIDC specification details. + */ + computedClaims.remove(claim.getName()); + } + }); + + return computedClaims; + } + + /** + * Creates a map of requested scopes and the corresponding claim names. + * @returns {java.util.LinkedHashMap} + */ + function getCompositeScopes () { + var compositeScopes = new frJava.LinkedHashMap(); + + scopes.toArray().forEach(function (scope) { + var scopeClaims = new frJava.ArrayList(); + + if (scopeClaimsMap[scope]) { + scopeClaimsMap[scope].forEach(function (claimName) { + scopeClaims.add(claimName); + }); + } + + if (scopeClaims.size()) { + compositeScopes.put(scope, scopeClaims); + } + }); + + return compositeScopes; + } + + // PUBLIC METHODS + + return { + setScopeClaimsMap: setScopeClaimsMap, + setClaimResolvers: setClaimResolvers, + getUserProfileClaimResolver: getUserProfileClaimResolver, + getAddressClaimResolver: getAddressClaimResolver, + getEssentialClaimResolver: getEssentialClaimResolver, + getUserInfoClaims: getUserInfoClaims + }; + } + + // RESULTS + + /** + * This script returns an instance of the org.forgerock.oauth2.core.UserInfoClaims class + * populated with the computed claim values and + * the requested scopes mapped to the claim names. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/oauth2/core/UserInfoClaims.html}. + * + * Assigning it to a variable gives you an opportunity + * to log the content of the returned value during development. + */ + var userInfoClaims = utils.getUserInfoClaims(); + + /* + logger.error(scriptName + ' results:') + logger.error('Values: ' + userInfoClaims.getValues()) + logger.error('Scopes: ' + userInfoClaims.getCompositeScopes()) + */ + + return userInfoClaims; +}()); +" +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Alpha-endUserUIClient-OIDC-Claims-Script.script.json 1`] = ` +{ + "script": { + "e1db8a0a-0329-4962-a5bf-ecffaca376ae": { + "_id": "e1db8a0a-0329-4962-a5bf-ecffaca376ae", + "context": "OIDC_CLAIMS", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Used by endUserUIClient", + "evaluatorVersion": "1.0", + "language": "JAVASCRIPT", + "lastModifiedBy": "id=b4b5ea11-ad75-4ec5-b8eb-77a6c5eff8bf,ou=user,ou=am-config", + "lastModifiedDate": 1733182558803, + "name": "Alpha endUserUIClient OIDC Claims Script", + "script": "file://Alpha-endUserUIClient-OIDC-Claims-Script.script.js", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Amazon-Profile-Normalization.script.groovy 1`] = ` +"/* + * Copyright 2020 ForgeRock AS. All Rights Reserved + * + * Use of this code requires a commercial software license with ForgeRock AS. + * or with one of its affiliates. All use shall be exclusively subject + * to such license between the licensee and ForgeRock AS. + */ + +import static org.forgerock.json.JsonValue.field +import static org.forgerock.json.JsonValue.json +import static org.forgerock.json.JsonValue.object + +return json(object( + field("id", rawProfile.user_id), + field("displayName", rawProfile.name), + field("email", rawProfile.email), + field("username", rawProfile.email))) +" +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Amazon-Profile-Normalization.script.json 1`] = ` +{ + "script": { + "6b3cfd48-62d3-48ff-a96f-fe8f3a22ab30": { + "_id": "6b3cfd48-62d3-48ff-a96f-fe8f3a22ab30", + "context": "SOCIAL_IDP_PROFILE_TRANSFORMATION", + "createdBy": "null", + "creationDate": 0, + "default": true, + "description": "Normalizes raw profile data from Amazon", + "evaluatorVersion": "1.0", + "language": "GROOVY", + "lastModifiedBy": "id=7a031a92-f70d-4b30-9d70-da7cfb1d9c93,ou=user,ou=am-config", + "lastModifiedDate": 1731021913202, + "name": "Amazon Profile Normalization", + "script": "file://Amazon-Profile-Normalization.script.groovy", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Apple-Profile-Normalization.script.groovy 1`] = ` +""/*\\n * Copyright 2021-2022 ForgeRock AS. All Rights Reserved\\n *\\n * Use of this code requires a commercial software license with ForgeRock AS.\\n * or with one of its affiliates. All use shall be exclusively subject\\n * to such license between the licensee and ForgeRock AS.\\n *\\n * In some common default configurations, the following keys are required to be not empty:\\n * username, givenName, familyName, email.\\n *\\n * From RFC4517: A value of the Directory String syntax is a string of one or more\\n * arbitrary characters from the Universal Character Set (UCS).\\n * A zero-length character string is not permitted.\\n */\\n\\nimport static org.forgerock.json.JsonValue.field\\nimport static org.forgerock.json.JsonValue.json\\nimport static org.forgerock.json.JsonValue.object\\n\\nString email = \\"change@me.com\\"\\nString subjectId = rawProfile.sub\\nString firstName = \\" \\"\\nString lastName = \\" \\"\\nString username = subjectId\\nString name\\n\\nif (rawProfile.isDefined(\\"email\\") && rawProfile.email.isNotNull()){ // User can elect to not share their email\\n email = rawProfile.email.asString()\\n username = email\\n}\\nif (rawProfile.isDefined(\\"name\\") && rawProfile.name.isNotNull()) {\\n if (rawProfile.name.isDefined(\\"firstName\\") && rawProfile.name.firstName.isNotNull()) {\\n firstName = rawProfile.name.firstName.asString()\\n }\\n if (rawProfile.name.isDefined(\\"lastName\\") && rawProfile.name.lastName.isNotNull()) {\\n lastName = rawProfile.name.lastName.asString()\\n }\\n}\\n\\nname = (firstName?.trim() ? firstName : \\"\\") + (lastName?.trim() ? ((firstName?.trim() ? \\" \\" : \\"\\") + lastName) : \\"\\")\\nname = (!name?.trim()) ? \\" \\" : name\\n\\nreturn json(object(\\n field(\\"id\\", subjectId),\\n field(\\"displayName\\", name),\\n field(\\"email\\", email),\\n field(\\"givenName\\", firstName),\\n field(\\"familyName\\", lastName),\\n field(\\"username\\", username)))" +" +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Apple-Profile-Normalization.script.json 1`] = ` +{ + "script": { + "484e6246-dbc6-4288-97e6-54e55431402e": { + "_id": "484e6246-dbc6-4288-97e6-54e55431402e", + "context": "SOCIAL_IDP_PROFILE_TRANSFORMATION", + "createdBy": "null", + "creationDate": 0, + "default": true, + "description": "Normalizes raw profile data from Apple", + "evaluatorVersion": "1.0", + "language": "GROOVY", + "lastModifiedBy": "id=7a031a92-f70d-4b30-9d70-da7cfb1d9c93,ou=user,ou=am-config", + "lastModifiedDate": 1733329920011, + "name": "Apple Profile Normalization", + "script": "file://Apple-Profile-Normalization.script.groovy", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Authentication-Tree-Decision-Node-Script.script.js 1`] = ` +"/* + - Data made available by nodes that have already executed are available in the sharedState variable. + - The script should set outcome to either "true" or "false". + */ + +outcome = "true"; +" +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Authentication-Tree-Decision-Node-Script.script.json 1`] = ` +{ + "script": { + "01e1a3c0-038b-4c16-956a-6c9d89328cff": { + "_id": "01e1a3c0-038b-4c16-956a-6c9d89328cff", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": true, + "description": "Default global script for a scripted decision node", + "evaluatorVersion": "1.0", + "language": "JAVASCRIPT", + "lastModifiedBy": "id=7a031a92-f70d-4b30-9d70-da7cfb1d9c93,ou=user,ou=am-config", + "lastModifiedDate": 1731021913348, + "name": "Authentication Tree Decision Node Script", + "script": "file://Authentication-Tree-Decision-Node-Script.script.js", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Check-Username.script.js 1`] = ` +"/* Check Username + * + * Author: volker.scheuber@forgerock.com + * + * Check if username has already been collected. + * Return "known" if yes, "unknown" otherwise. + * + * This script does not need to be parametrized. It will work properly as is. + * + * The Scripted Decision Node needs the following outcomes defined: + * - known + * - unknown + */ +(function () { + if (null != sharedState.get("username")) { + outcome = "known"; + } + else { + outcome = "unknown"; + } +}()); +" +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Check-Username.script.json 1`] = ` +{ + "script": { + "739bdc48-fd24-4c52-b353-88706d75558a": { + "_id": "739bdc48-fd24-4c52-b353-88706d75558a", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Check if username has already been collected.", + "evaluatorVersion": "1.0", + "language": "JAVASCRIPT", + "lastModifiedBy": "id=7a031a92-f70d-4b30-9d70-da7cfb1d9c93,ou=user,ou=am-config", + "lastModifiedDate": 1733329920340, + "name": "Check Username", + "script": "file://Check-Username.script.js", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Config-Provider-Node-Script.script.js 1`] = ` +"/* + * Copyright 2021-2022 ForgeRock AS. All Rights Reserved + * + * Use of this code requires a commercial software license with ForgeRock AS. + * or with one of its affiliates. All use shall be exclusively subject + * to such license between the licensee and ForgeRock AS. + */ + +/** + * The following script is a simplified template for understanding how to build + * up a config Map object with custom values. The Config Provider Node will then + * provide this config Map to the desired node type. It is important that the Map + * you build here is named 'config'. + * + * Defined variables: + * + * nodeState - Node State (1) + * Always present, this represents the current values stored in the node state. + * + * idRepository - Profile Data (2) + * Always present, a repository to retrieve user information. + * + * secrets - Credentials and Secrets (3) + * Always present, an interface to access the Secrets API from a scripting context. + * + * requestHeaders (4) - Map (5) + * Always present, an object that provides methods for accessing headers in the login request. + * + * logger - Debug Logging (6) + * Always present, the debug logger instance. + * + * httpClient - HTTP Client (7) + * Always present, the HTTP client that can be used to make external HTTP requests. + * + * realm - String (primitive). + * Always present, the name of the realm the user is authenticating to. + * + * existingSession - Map (5) + * Present if the request contains the session cookie, the user's session object. The returned map from + * SSOToken.getProperties() (8) + * + * requestParameters - Map (5) + * Always present, the object that contains the authentication request parameters. + * + * + * Outputs: + * + * config - Map (5) + * Define and fill a Map object named 'config' with custom values, this will define the configuration for the + * associated node selected in the ConfigProviderNode. + * + * Reference: + * (1) Node State - https://backstage.forgerock.com/docs/idcloud-am/latest/authentication-guide/scripting-api-node.html#scripting-api-node-nodeState + * (2) Profile Data - https://backstage.forgerock.com/docs/am/7.1/authentication-guide/scripting-api-node.html#scripting-api-node-id-repo + * (3) Credentials and Secrets - https://backstage.forgerock.com/docs/am/7.1/authentication-guide/scripting-api-node.html#scripting-api-authn-secrets + * (4) Request Headers - https://backstage.forgerock.com/docs/am/7/authentication-guide/scripting-api-node.html#scripting-api-node-requestHeaders. + * (5) Map - https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html + * (6) Debug Logging - https://backstage.forgerock.com/docs/am/7/scripting-guide/scripting-api-global-logger.html#scripting-api-global-logger. + * (7) HTTP Client - https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/http/Client.html. + * (8) SSOToken - https://backstage.forgerock.com/docs/am/7/apidocs/com/iplanet/sso/SSOToken.html. + */ + +config = { + "key0": {"subKey": "value0"}, + "key1": "value1" +}; +" +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Config-Provider-Node-Script.script.json 1`] = ` +{ + "script": { + "5e854779-6ec1-4c39-aeba-0477e0986646": { + "_id": "5e854779-6ec1-4c39-aeba-0477e0986646", + "context": "CONFIG_PROVIDER_NODE", + "createdBy": "null", + "creationDate": 0, + "default": true, + "description": "Script to provide values for a config provider node", + "evaluatorVersion": "1.0", + "language": "JAVASCRIPT", + "lastModifiedBy": "id=7a031a92-f70d-4b30-9d70-da7cfb1d9c93,ou=user,ou=am-config", + "lastModifiedDate": 1731021914074, + "name": "Config Provider Node Script", + "script": "file://Config-Provider-Node-Script.script.js", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Custom-Device-Match-Script.script.js 1`] = ` +"/* + * Custom Device Match Script + */ + +outcome = "true"; +" +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Custom-Device-Match-Script.script.json 1`] = ` +{ + "script": { + "d58977ed-0542-4147-8197-973ef7300191": { + "_id": "d58977ed-0542-4147-8197-973ef7300191", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Custom Device Match Script", + "evaluatorVersion": "1.0", + "language": "JAVASCRIPT", + "lastModifiedBy": "id=7a031a92-f70d-4b30-9d70-da7cfb1d9c93,ou=user,ou=am-config", + "lastModifiedDate": 1733329034586, + "name": "Custom Device Match Script", + "script": "file://Custom-Device-Match-Script.script.js", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Device-Id-(Match)-Client-Side.script.js 1`] = ` +"/* + * Copyright 2023 ForgeRock AS. All Rights Reserved + * + * Use of this code requires a commercial software license with ForgeRock AS. + * or with one of its affiliates. All use shall be exclusively subject + * to such license between the licensee and ForgeRock AS. + */ + +var fontDetector = (function () { + /** + * JavaScript code to detect available availability of a + * particular font in a browser using JavaScript and CSS. + * + * Author : Lalit Patel + * Website: http://www.lalit.org/lab/javascript-css-font-detect/ + * License: Apache Software License 2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * Version: 0.15 (21 Sep 2009) + * Changed comparision font to default from sans-default-default, + * as in FF3.0 font of child element didn't fallback + * to parent element if the font is missing. + * Version: 0.2 (04 Mar 2012) + * Comparing font against all the 3 generic font families ie, + * 'monospace', 'sans-serif' and 'sans'. If it doesn't match all 3 + * then that font is 100% not available in the system + * Version: 0.3 (24 Mar 2012) + * Replaced sans with serif in the list of baseFonts + */ + /* + * Portions Copyrighted 2013 ForgeRock AS. + */ + var detector = {}, baseFonts, testString, testSize, h, s, defaultWidth = {}, defaultHeight = {}, index; + + // a font will be compared against all the three default fonts. + // and if it doesn't match all 3 then that font is not available. + baseFonts = ['monospace', 'sans-serif', 'serif']; + + //we use m or w because these two characters take up the maximum width. + // And we use a LLi so that the same matching fonts can get separated + testString = "mmmmmmmmmmlli"; + + //we test using 72px font size, we may use any size. I guess larger the better. + testSize = '72px'; + + h = document.getElementsByTagName("body")[0]; + + // create a SPAN in the document to get the width of the text we use to test + s = document.createElement("span"); + s.style.fontSize = testSize; + s.innerHTML = testString; + for (index in baseFonts) { + //get the default width for the three base fonts + s.style.fontFamily = baseFonts[index]; + h.appendChild(s); + defaultWidth[baseFonts[index]] = s.offsetWidth; //width for the default font + defaultHeight[baseFonts[index]] = s.offsetHeight; //height for the defualt font + h.removeChild(s); + } + + detector.detect = function(font) { + var detected = false, index, matched; + for (index in baseFonts) { + s.style.fontFamily = font + ',' + baseFonts[index]; // name of the font along with the base font for fallback. + h.appendChild(s); + matched = (s.offsetWidth !== defaultWidth[baseFonts[index]] || s.offsetHeight !== defaultHeight[baseFonts[index]]); + h.removeChild(s); + detected = detected || matched; + } + return detected; + }; + + return detector; +}()); +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2009 Sun Microsystems Inc. All Rights Reserved + * + * The contents of this file are subject to the terms + * of the Common Development and Distribution License + * (the License). You may not use this file except in + * compliance with the License. + * + * You can obtain a copy of the License at + * https://opensso.dev.java.net/public/CDDLv1.0.html or + * opensso/legal/CDDLv1.0.txt + * See the License for the specific language governing + * permission and limitations under the License. + * + * When distributing Covered Code, include this CDDL + * Header Notice in each file and include the License file + * at opensso/legal/CDDLv1.0.txt. + * If applicable, add the following below the CDDL Header, + * with the fields enclosed by brackets [] replaced by + * your own identifying information: + * "Portions Copyrighted [year] [name of copyright owner]" + * + */ +/* + * Portions Copyrighted 2013 Syntegrity. + * Portions Copyrighted 2013-2014 ForgeRock AS. + */ + +var collectScreenInfo = function () { + var screenInfo = {}; + if (screen) { + if (screen.width) { + screenInfo.screenWidth = screen.width; + } + + if (screen.height) { + screenInfo.screenHeight = screen.height; + } + + if (screen.pixelDepth) { + screenInfo.screenColourDepth = screen.pixelDepth; + } + } else { + console.warn("Cannot collect screen information. screen is not defined."); + } + return screenInfo; + }, + collectTimezoneInfo = function () { + var timezoneInfo = {}, offset = new Date().getTimezoneOffset(); + + if (offset) { + timezoneInfo.timezone = offset; + } else { + console.warn("Cannot collect timezone information. timezone is not defined."); + } + + return timezoneInfo; + }, + collectBrowserPluginsInfo = function () { + + if (navigator && navigator.plugins) { + var pluginsInfo = {}, i, plugins = navigator.plugins; + pluginsInfo.installedPlugins = ""; + + for (i = 0; i < plugins.length; i++) { + pluginsInfo.installedPlugins = pluginsInfo.installedPlugins + plugins[i].filename + ";"; + } + + return pluginsInfo; + } else { + console.warn("Cannot collect browser plugin information. navigator.plugins is not defined."); + return {}; + } + + }, +// Getting geolocation takes some time and is done asynchronously, hence need a callback which is called once geolocation is retrieved. + collectGeolocationInfo = function (callback) { + var geolocationInfo = {}, + successCallback = function(position) { + geolocationInfo.longitude = position.coords.longitude; + geolocationInfo.latitude = position.coords.latitude; + callback(geolocationInfo); + }, errorCallback = function(error) { + console.warn("Cannot collect geolocation information. " + error.code + ": " + error.message); + callback(geolocationInfo); + }; + if (navigator && navigator.geolocation) { + // NB: If user chooses 'Not now' on Firefox neither callback gets called + // https://bugzilla.mozilla.org/show_bug.cgi?id=675533 + navigator.geolocation.getCurrentPosition(successCallback, errorCallback); + } else { + console.warn("Cannot collect geolocation information. navigator.geolocation is not defined."); + callback(geolocationInfo); + } + }, + collectBrowserFontsInfo = function () { + var fontsInfo = {}, i, fontsList = ["cursive","monospace","serif","sans-serif","fantasy","default","Arial","Arial Black", + "Arial Narrow","Arial Rounded MT Bold","Bookman Old Style","Bradley Hand ITC","Century","Century Gothic", + "Comic Sans MS","Courier","Courier New","Georgia","Gentium","Impact","King","Lucida Console","Lalit", + "Modena","Monotype Corsiva","Papyrus","Tahoma","TeX","Times","Times New Roman","Trebuchet MS","Verdana", + "Verona"]; + fontsInfo.installedFonts = ""; + + for (i = 0; i < fontsList.length; i++) { + if (fontDetector.detect(fontsList[i])) { + fontsInfo.installedFonts = fontsInfo.installedFonts + fontsList[i] + ";"; + } + } + return fontsInfo; + }, + devicePrint = {}; + +devicePrint.screen = collectScreenInfo(); +devicePrint.timezone = collectTimezoneInfo(); +devicePrint.plugins = collectBrowserPluginsInfo(); +devicePrint.fonts = collectBrowserFontsInfo(); + +if (navigator.userAgent) { + devicePrint.userAgent = navigator.userAgent; +} +if (navigator.appName) { + devicePrint.appName = navigator.appName; +} +if (navigator.appCodeName) { + devicePrint.appCodeName = navigator.appCodeName; +} +if (navigator.appVersion) { + devicePrint.appVersion = navigator.appVersion; +} +if (navigator.appMinorVersion) { + devicePrint.appMinorVersion = navigator.appMinorVersion; +} +if (navigator.buildID) { + devicePrint.buildID = navigator.buildID; +} +if (navigator.platform) { + devicePrint.platform = navigator.platform; +} +if (navigator.cpuClass) { + devicePrint.cpuClass = navigator.cpuClass; +} +if (navigator.oscpu) { + devicePrint.oscpu = navigator.oscpu; +} +if (navigator.product) { + devicePrint.product = navigator.product; +} +if (navigator.productSub) { + devicePrint.productSub = navigator.productSub; +} +if (navigator.vendor) { + devicePrint.vendor = navigator.vendor; +} +if (navigator.vendorSub) { + devicePrint.vendorSub = navigator.vendorSub; +} +if (navigator.language) { + devicePrint.language = navigator.language; +} +if (navigator.userLanguage) { + devicePrint.userLanguage = navigator.userLanguage; +} +if (navigator.browserLanguage) { + devicePrint.browserLanguage = navigator.browserLanguage; +} +if (navigator.systemLanguage) { + devicePrint.systemLanguage = navigator.systemLanguage; +} + +// Attempt to collect geo-location information and return this with the data collected so far. +// Otherwise, if geo-location fails or takes longer than 30 seconds, auto-submit the data collected so far. +autoSubmitDelay = 30000; +output.value = JSON.stringify(devicePrint); +collectGeolocationInfo(function(geolocationInfo) { + devicePrint.geolocation = geolocationInfo; + output.value = JSON.stringify(devicePrint); + submit(); +}); +" +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Device-Id-(Match)-Client-Side.script.json 1`] = ` +{ + "script": { + "157298c0-7d31-4059-a95b-eeb08473b7e5": { + "_id": "157298c0-7d31-4059-a95b-eeb08473b7e5", + "context": "AUTHENTICATION_CLIENT_SIDE", + "createdBy": "null", + "creationDate": 0, + "default": true, + "description": "Default global script for client side Device Id (Match) Authentication Module", + "evaluatorVersion": "1.0", + "language": "JAVASCRIPT", + "lastModifiedBy": "id=7a031a92-f70d-4b30-9d70-da7cfb1d9c93,ou=user,ou=am-config", + "lastModifiedDate": 1731021914148, + "name": "Device Id (Match) - Client Side", + "script": "file://Device-Id-(Match)-Client-Side.script.js", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Device-Id-(Match)-Server-Side.script.js 1`] = ` +"/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2009 Sun Microsystems Inc. All Rights Reserved + * + * The contents of this file are subject to the terms + * of the Common Development and Distribution License + * (the License). You may not use this file except in + * compliance with the License. + * + * You can obtain a copy of the License at + * https://opensso.dev.java.net/public/CDDLv1.0.html or + * opensso/legal/CDDLv1.0.txt + * See the License for the specific language governing + * permission and limitations under the License. + * + * When distributing Covered Code, include this CDDL + * Header Notice in each file and include the License file + * at opensso/legal/CDDLv1.0.txt. + * If applicable, add the following below the CDDL Header, + * with the fields enclosed by brackets [] replaced by + * your own identifying information: + * "Portions Copyrighted [year] [name of copyright owner]" + * + */ +/* + * Portions Copyrighted 2013 Syntegrity. + * Portions Copyrighted 2013-2023 ForgeRock AS. + */ + +var ScalarComparator = {}, ScreenComparator = {}, MultiValueComparator = {}, UserAgentComparator = {}, GeolocationComparator = {}; + +var config = { + profileExpiration: 30, //in days + maxProfilesAllowed: 5, + maxPenaltyPoints: 0, + attributes: { + screen: { + required: true, + comparator: ScreenComparator, + args: { + penaltyPoints: 50 + } + }, + plugins: { + installedPlugins: { + required: false, + comparator: MultiValueComparator, + args: { + maxPercentageDifference: 10, + maxDifferences: 5, + penaltyPoints: 100 + } + } + }, + fonts: { + installedFonts: { + required: false, + comparator: MultiValueComparator, + args: { + maxPercentageDifference: 10, + maxDifferences: 5, + penaltyPoints: 100 + } + } + }, + timezone: { + timezone: { + required: false, + comparator: ScalarComparator, + args: { + penaltyPoints: 100 + } + } + }, + userAgent: { + required: true, + comparator: UserAgentComparator, + args: { + ignoreVersion: true, + penaltyPoints: 100 + } + }, + geolocation: { + required: false, + comparator: GeolocationComparator, + args: { + allowedRange: 100, //in miles + penaltyPoints: 100 + } + } + } +}; + +//---------------------------------------------------------------------------// +// Comparator functions // +//---------------------------------------------------------------------------// + +var all, any, calculateDistance, calculateIntersection, calculatePercentage, nullOrUndefined, splitAndTrim, + undefinedLocation; + +// ComparisonResult + +/** + * Constructs an instance of a ComparisonResult with the given penalty points. + * + * @param penaltyPoints (Number) The penalty points for the comparison (defaults to 0). + * @param additionalInfoInCurrentValue (boolean) Whether the current value contains more information + * than the stored value (defaults to false). + */ +function ComparisonResult() { + + var penaltyPoints = 0, + additionalInfoInCurrentValue = false; + + if (arguments[0] !== undefined && arguments[1] !== undefined) { + penaltyPoints = arguments[0]; + additionalInfoInCurrentValue = arguments[1]; + } + + if (arguments[0] !== undefined && arguments[1] === undefined) { + if (typeof(arguments[0]) === "boolean") { + additionalInfoInCurrentValue = arguments[0]; + } else { + penaltyPoints = arguments[0]; + } + } + + this.penaltyPoints = penaltyPoints; + this.additionalInfoInCurrentValue = additionalInfoInCurrentValue; + +} + +ComparisonResult.ZERO_PENALTY_POINTS = new ComparisonResult(0); + +/** + * Static method for functional programming. + * + * @return boolean true if comparisonResult.isSuccessful(). + */ +ComparisonResult.isSuccessful = function(comparisonResult) { + return comparisonResult.isSuccessful(); +}; + + +/** + * Static method for functional programming. + * + * @return boolean true if comparisonResult.additionalInfoInCurrentValue. + */ +ComparisonResult.additionalInfoInCurrentValue = function(comparisonResult) { + return comparisonResult.additionalInfoInCurrentValue; +}; + +/** + * Comparison function that can be provided as an argument to array.sort + */ +ComparisonResult.compare = function(first, second) { + if (nullOrUndefined(first) && nullOrUndefined(second)) { + return 0; + } else if (nullOrUndefined(first)) { + return -1; + } else if (nullOrUndefined(second)) { + return 1; + } else { + if (first.penaltyPoints !== second.penaltyPoints) { + return first.penaltyPoints - second.penaltyPoints; + } else { + return (first.additionalInfoInCurrentValue ? 1 : 0) - (second.additionalInfoInCurrentValue ? 1 : 0); + } + } +}; + +/** + * Amalgamates the given ComparisonResult into this ComparisonResult. + * + * @param comparisonResult The ComparisonResult to include. + */ +ComparisonResult.prototype.addComparisonResult = function(comparisonResult) { + this.penaltyPoints += comparisonResult.penaltyPoints; + if (comparisonResult.additionalInfoInCurrentValue) { + this.additionalInfoInCurrentValue = comparisonResult.additionalInfoInCurrentValue; + } +}; + +/** + * Returns true if no penalty points have been assigned for the comparison. + * + * @return boolean true if the comparison was successful. + */ +ComparisonResult.prototype.isSuccessful = function() { + return nullOrUndefined(this.penaltyPoints) || this.penaltyPoints === 0; +}; + +/** + * Compares two simple objects (String|Number) and if they are equal then returns a ComparisonResult with zero + * penalty points assigned, otherwise returns a ComparisonResult with the given number of penalty points assigned. + * + * @param currentValue (String|Number) The current value. + * @param storedValue (String|Number) The stored value. + * @param config: { + * "penaltyPoints": (Number) The number of penalty points. + * } + * @return ComparisonResult. + */ +ScalarComparator.compare = function (currentValue, storedValue, config) { + if (logger.messageEnabled()) { + logger.message("StringComparator.compare:currentValue: " + JSON.stringify(currentValue)); + logger.message("StringComparator.compare:storedValue: " + JSON.stringify(storedValue)); + logger.message("StringComparator.compare:config: " + JSON.stringify(config)); + } + if (config.penaltyPoints === 0) { + return ComparisonResult.ZERO_PENALTY_POINTS; + } + + if (!nullOrUndefined(storedValue)) { + if (nullOrUndefined(currentValue) || currentValue !== storedValue) { + return new ComparisonResult(config.penaltyPoints); + } + } else if (!nullOrUndefined(currentValue)) { + return new ComparisonResult(true); + } + + return ComparisonResult.ZERO_PENALTY_POINTS; +}; + +/** + * Compares two screens and if they are equal then returns a ComparisonResult with zero penalty points assigned, + * otherwise returns a ComparisonResult with the given number of penalty points assigned. + * + * @param currentValue: { + * "screenWidth": (Number) The current client screen width. + * "screenHeight": (Number) The current client screen height. + * "screenColourDepth": (Number) The current client screen colour depth. + * } + * @param storedValue: { + * "screenWidth": (Number) The stored client screen width. + * "screenHeight": (Number) The stored client screen height. + * "screenColourDepth": (Number) The stored client screen colour depth. + * } + * @param config: { + * "penaltyPoints": (Number) The number of penalty points. + * } + * @return ComparisonResult + */ +ScreenComparator.compare = function (currentValue, storedValue, config) { + if (logger.messageEnabled()) { + logger.message("ScreenComparator.compare:currentValue: " + JSON.stringify(currentValue)); + logger.message("ScreenComparator.compare:storedValue: " + JSON.stringify(storedValue)); + logger.message("ScreenComparator.compare:config: " + JSON.stringify(config)); + } + + if (nullOrUndefined(currentValue)) { + currentValue = {screenWidth: null, screenHeight: null, screenColourDepth: null}; + } + if (nullOrUndefined(storedValue)) { + storedValue = {screenWidth: null, screenHeight: null, screenColourDepth: null}; + } + + var comparisonResults = [ + ScalarComparator.compare(currentValue.screenWidth, storedValue.screenWidth, config), + ScalarComparator.compare(currentValue.screenHeight, storedValue.screenHeight, config), + ScalarComparator.compare(currentValue.screenColourDepth, storedValue.screenColourDepth, config)]; + + if (all(comparisonResults, ComparisonResult.isSuccessful)) { + return new ComparisonResult(any(comparisonResults, ComparisonResult.additionalInfoInCurrentValue)); + } else { + return new ComparisonResult(config.penaltyPoints); + } +}; + +/** + * Splits both values using delimiter, trims every value and compares collections of values. + * Returns zero-result for same multi-value attributes. + * + * If collections are not same checks if number of differences is less or equal maxDifferences or + * percentage of difference is less or equal maxPercentageDifference. + * + * If yes then returns zero-result with additional info, else returns penaltyPoints-result. + * + * @param currentValue: (String) The current value. + * @param storedValue: (String) The stored value. + * @param config: { + * "maxPercentageDifference": (Number) The max difference percentage in the values, + * before the penalty is assigned. + * "maxDifferences": (Number) The max number of differences in the values, + * before the penalty points are assigned. + * "penaltyPoints": (Number) The number of penalty points. + * } + * @return ComparisonResult + */ +MultiValueComparator.compare = function (currentValue, storedValue, config) { + if (logger.messageEnabled()) { + logger.message("MultiValueComparator.compare:currentValue: " + JSON.stringify(currentValue)); + logger.message("MultiValueComparator.compare:storedValue: " + JSON.stringify(storedValue)); + logger.message("MultiValueComparator.compare:config: " + JSON.stringify(config)); + } + + var delimiter = ";", + currentValues = splitAndTrim(currentValue, delimiter), + storedValues = splitAndTrim(storedValue, delimiter), + maxNumberOfElements = Math.max(currentValues.length, storedValues.length), + numberOfTheSameElements = calculateIntersection(currentValues, storedValues).length, + numberOfDifferences = maxNumberOfElements - numberOfTheSameElements, + percentageOfDifferences = calculatePercentage(numberOfDifferences, maxNumberOfElements); + + if (nullOrUndefined(storedValue) && !nullOrUndefined(currentValue)) { + return new ComparisonResult(true); + } + + if (logger.messageEnabled()) { + logger.message(numberOfTheSameElements + " of " + maxNumberOfElements + " are same"); + } + + if (maxNumberOfElements === 0) { + logger.message("Ignored because no attributes found in both profiles"); + return ComparisonResult.ZERO_PENALTY_POINTS; + } + + if (numberOfTheSameElements === maxNumberOfElements) { + logger.message("Ignored because all attributes are same"); + return ComparisonResult.ZERO_PENALTY_POINTS; + } + + if (numberOfDifferences > config.maxDifferences) { + if (logger.messageEnabled()) { + logger.message("Would be ignored if not more than " + config.maxDifferences + " differences"); + } + return new ComparisonResult(config.penaltyPoints); + } + + if (percentageOfDifferences > config.maxPercentageDifference) { + if (logger.messageEnabled()) { + logger.message(percentageOfDifferences + " percents are different"); + logger.message("Would be ignored if not more than " + config.maxPercentageDifference + " percent"); + } + return new ComparisonResult(config.penaltyPoints); + } + + if (logger.messageEnabled()) { + logger.message("Ignored because number of differences(" + numberOfDifferences + ") not more than " + + config.maxDifferences); + logger.message(percentageOfDifferences + " percents are different"); + logger.message("Ignored because not more than " + config.maxPercentageDifference + " percent"); + } + return new ComparisonResult(true); +}; + +/** + * Compares two User Agent Strings and if they are equal then returns a ComparisonResult with zero penalty + * points assigned, otherwise returns a ComparisonResult with the given number of penalty points assigned. + * + * @param currentValue (String) The current value. + * @param storedValue (String) The stored value. + * @param config: { + * "ignoreVersion": (boolean) If the version numbers in the User Agent Strings should be ignore + * in the comparison. + * "penaltyPoints": (Number) The number of penalty points. + * } + * @return A ComparisonResult. + */ +UserAgentComparator.compare = function (currentValue, storedValue, config) { + if (logger.messageEnabled()) { + logger.message("UserAgentComparator.compare:currentValue: " + JSON.stringify(currentValue)); + logger.message("UserAgentComparator.compare:storedValue: " + JSON.stringify(storedValue)); + logger.message("UserAgentComparator.compare:config: " + JSON.stringify(config)); + } + + if (config.ignoreVersion) { + // remove version number + currentValue = nullOrUndefined(currentValue) ? null : currentValue.replace(/[\\d\\.]+/g, "").trim(); + storedValue = nullOrUndefined(storedValue) ? null : storedValue.replace(/[\\d\\.]+/g, "").trim(); + } + + return ScalarComparator.compare(currentValue, storedValue, config); +}; + +/** + * Compares two locations, taking into account a degree of difference. + * + * @param currentValue: { + * "latitude": (Number) The current latitude. + * "longitude": (Number) The current longitude. + * } + * @param storedValue: { + * "latitude": (Number) The stored latitude. + * "longitude": (Number) The stored longitude. + * } + * @param config: { + * "allowedRange": (Number) The max difference allowed in the two locations, before the penalty is assigned. + * "penaltyPoints": (Number) The number of penalty points. +* } + * @return ComparisonResult + */ +GeolocationComparator.compare = function (currentValue, storedValue, config) { + if (logger.messageEnabled()) { + logger.message("GeolocationComparator.compare:currentValue: " + JSON.stringify(currentValue)); + logger.message("GeolocationComparator.compare:storedValue: " + JSON.stringify(storedValue)); + logger.message("GeolocationComparator.compare:config: " + JSON.stringify(config)); + } + + // Check for undefined stored or current locations + + if (undefinedLocation(currentValue) && undefinedLocation(storedValue)) { + return ComparisonResult.ZERO_PENALTY_POINTS; + } + if (undefinedLocation(currentValue) && !undefinedLocation(storedValue)) { + return new ComparisonResult(config.penaltyPoints); + } + if (!undefinedLocation(currentValue) && undefinedLocation(storedValue)) { + return new ComparisonResult(true); + } + + // Both locations defined, therefore perform comparison + + var distance = calculateDistance(currentValue, storedValue); + + if (logger.messageEnabled()) { + logger.message("Distance between (" + currentValue.latitude + "," + currentValue.longitude + ") and (" + + storedValue.latitude + "," + storedValue.longitude + ") is " + distance + " miles"); + } + + if (parseFloat(distance.toPrecision(5)) === 0) { + logger.message("Location is the same"); + return ComparisonResult.ZERO_PENALTY_POINTS; + } + + if (distance <= config.allowedRange) { + if (logger.messageEnabled()) { + logger.message("Tolerated because distance not more then " + config.allowedRange); + } + return new ComparisonResult(true); + } else { + if (logger.messageEnabled()) { + logger.message("Would be ignored if distance not more then " + config.allowedRange); + } + return new ComparisonResult(config.penaltyPoints); + } +}; + + +//---------------------------------------------------------------------------// +// Device Print Logic - DO NOT MODIFY // +//---------------------------------------------------------------------------// + +// Utility functions + +/** + * Returns true if evaluating function f on each element of the Array a returns true. + * + * @param a: (Array) The array of elements to evaluate + * @param f: (Function) A single argument function for mapping elements of the array to boolean. + * @return boolean. + */ +all = function(a, f) { + var i; + for (i = 0; i < a.length; i++) { + if (f(a[i]) === false) { + return false; + } + } + return true; +}; + +/** + * Returns true if evaluating function f on any element of the Array a returns true. + * + * @param a: (Array) The array of elements to evaluate + * @param f: (Function) A single argument function for mapping elements of the array to boolean. + * @return boolean. + */ +any = function(a, f) { + var i; + for (i = 0; i < a.length; i++) { + if (f(a[i]) === true) { + return true; + } + } + return false; +}; + +/** + * Returns true if the provided location is null or has undefined longitude or latitude values. + * + * @param location: { + * "latitude": (Number) The latitude. + * "longitude": (Number) The longitude. + * } + * @return boolean + */ +undefinedLocation = function(location) { + return nullOrUndefined(location) || nullOrUndefined(location.latitude) || nullOrUndefined(location.longitude); +}; + +/** + * Returns true if the provided value is null or undefined. + * + * @param value: a value of any type + * @return boolean + */ +nullOrUndefined = function(value) { + return value === null || value === undefined; +}; + +/** + * Calculates the distances between the two locations. + * + * @param first: { + * "latitude": (Number) The first latitude. + * "longitude": (Number) The first longitude. + * } + * @param second: { + * "latitude": (Number) The second latitude. + * "longitude": (Number) The second longitude. + * } + * @return Number The distance between the two locations. + */ +calculateDistance = function(first, second) { + var factor = (Math.PI / 180), + theta, + dist; + function degreesToRadians(degrees) { + return degrees * factor; + } + function radiansToDegrees(radians) { + return radians / factor; + } + theta = first.longitude - second.longitude; + dist = Math.sin(degreesToRadians(first.latitude)) * Math.sin(degreesToRadians(second.latitude)) + + Math.cos(degreesToRadians(first.latitude)) * Math.cos(degreesToRadians(second.latitude)) + * Math.cos(degreesToRadians(theta)); + dist = Math.acos(dist); + dist = radiansToDegrees(dist); + dist = dist * 60 * 1.1515; + return dist; +}; + +/** + * Converts a String holding a delimited sequence of values into an array. + * + * @param text (String) The String representation of a delimited sequence of values. + * @param delimiter (String) The character delimiting values within the text String. + * @return (Array) The comma separated values. + */ +splitAndTrim = function(text, delimiter) { + + var results = [], + i, + values, + value; + if (text === null) { + return results; + } + + values = text.split(delimiter); + for (i = 0; i < values.length; i++) { + value = values[i].trim(); + if (value !== "") { + results.push(value); + } + } + + return results; +}; + +/** + * Converts value to a percentage of range. + * + * @param value (Number) The actual number to be converted to a percentage. + * @param range (Number) The total number of values (i.e. represents 100%). + * @return (Number) The percentage. + */ +calculatePercentage = function(value, range) { + if (range === 0) { + return 0; + } + return parseFloat((value / range).toPrecision(2)) * 100; +}; + +/** + * Creates a new array containing only those elements found in both arrays received as arguments. + * + * @param first (Array) The first array. + * @param second (Array) The second array. + * @return (Array) The elements that found in first and second. + */ +calculateIntersection = function(first, second) { + return first.filter(function(element) { + return second.indexOf(element) !== -1; + }); +}; + +function getValue(obj, attributePath) { + var value = obj, + i; + for (i = 0; i < attributePath.length; i++) { + if (value === undefined) { + return null; + } + value = value[attributePath[i]]; + } + return value; +} + + +function isLeafNode(attributeConfig) { + return attributeConfig.comparator !== undefined; +} + +function getAttributePaths(attributeConfig, attributePath) { + + var attributePaths = [], + attributeName, + attrPaths, + attrPath, + i; + + for (attributeName in attributeConfig) { + if (attributeConfig.hasOwnProperty(attributeName)) { + + if (isLeafNode(attributeConfig[attributeName])) { + attrPath = attributePath.slice(); + attrPath.push(attributeName); + attributePaths.push(attrPath); + } else { + attrPath = attributePath.slice(); + attrPath.push(attributeName); + attrPaths = getAttributePaths(attributeConfig[attributeName], attrPath); + for (i = 0; i < attrPaths.length; i++) { + attributePaths.push(attrPaths[i]); + } + } + } + } + + return attributePaths; +} + +function getDevicePrintAttributePaths(attributeConfig) { + return getAttributePaths(attributeConfig, []); +} + +function hasRequiredAttributes(devicePrint, attributeConfig) { + + var attributePaths = getDevicePrintAttributePaths(attributeConfig), + i, + attrValue, + attrConfig; + + for (i = 0; i < attributePaths.length; i++) { + + attrValue = getValue(devicePrint, attributePaths[i]); + attrConfig = getValue(attributeConfig, attributePaths[i]); + + if (attrConfig.required && attrValue === undefined) { + logger.warning("Device Print profile missing required attribute, " + attributePaths[i]); + return false; + } + } + + logger.message("device print has required attributes"); + return true; +} + +function compareDevicePrintProfiles(attributeConfig, devicePrint, devicePrintProfiles, maxPenaltyPoints) { + + var attributePaths = getDevicePrintAttributePaths(attributeConfig), + dao = sharedState.get('_DeviceIdDao'), + results, + j, + aggregatedComparisonResult, + i, + currentValue, + storedValue, + attrConfig, + comparisonResult, + selectedComparisonResult, + selectedProfile, + curDevicePrintProfile, + vals; + + results = []; + for (j = 0; j < devicePrintProfiles.length; j++) { + curDevicePrintProfile = JSON.parse(org.forgerock.json.JsonValue.json(devicePrintProfiles[j])); + aggregatedComparisonResult = new ComparisonResult(); + for (i = 0; i < attributePaths.length; i++) { + + currentValue = getValue(devicePrint, attributePaths[i]); + storedValue = getValue(curDevicePrintProfile.devicePrint, attributePaths[i]); + attrConfig = getValue(attributeConfig, attributePaths[i]); + + if (storedValue === null) { + comparisonResult = new ComparisonResult(attrConfig.penaltyPoints); + } else { + comparisonResult = attrConfig.comparator.compare(currentValue, storedValue, attrConfig.args); + } + + if (logger.messageEnabled()) { + logger.message("Comparing attribute path: " + attributePaths[i] + + ", Comparison result: successful=" + comparisonResult.isSuccessful() + ", penaltyPoints=" + + comparisonResult.penaltyPoints + ", additionalInfoInCurrentValue=" + + comparisonResult.additionalInfoInCurrentValue); + } + aggregatedComparisonResult.addComparisonResult(comparisonResult); + } + if (logger.messageEnabled()) { + logger.message("Aggregated comparison result: successful=" + + aggregatedComparisonResult.isSuccessful() + ", penaltyPoints=" + + aggregatedComparisonResult.penaltyPoints + ", additionalInfoInCurrentValue=" + + aggregatedComparisonResult.additionalInfoInCurrentValue); + } + + results.push({ + key: aggregatedComparisonResult, + value: devicePrintProfiles[j] + }); + } + + if (results.length === 0) { + return null; + } + + results.sort(function(a, b) { + return ComparisonResult.compare(a.key, b.key); + }); + selectedComparisonResult = results[0].key; + if (logger.messageEnabled()) { + logger.message("Selected comparison result: successful=" + selectedComparisonResult.isSuccessful() + + ", penaltyPoints=" + selectedComparisonResult.penaltyPoints + ", additionalInfoInCurrentValue=" + + selectedComparisonResult.additionalInfoInCurrentValue); + } + + selectedProfile = null; + if (selectedComparisonResult.penaltyPoints <= maxPenaltyPoints) { + selectedProfile = results[0].value; + if (logger.messageEnabled()) { + logger.message("Selected profile: " + selectedProfile + + " with " + selectedComparisonResult.penaltyPoints + " penalty points"); + } + } + + if (selectedProfile === null) { + return false; + } + + /* update profile */ + selectedProfile.put("selectionCounter", + java.lang.Integer.valueOf(parseInt(selectedProfile.get("selectionCounter"), 10) + 1)); + selectedProfile.put("lastSelectedDate", java.lang.Long.valueOf(new Date().getTime())); + selectedProfile.put("devicePrint", devicePrint); + + vals = []; + for (i = 0; i < devicePrintProfiles.length; i++) { + vals.push(org.forgerock.json.JsonValue.json(devicePrintProfiles[i])); + } + + dao.saveDeviceProfiles(username, realm, vals); + + return true; +} + +function matchDevicePrint() { + + if (!username) { + logger.error("Username not set. Cannot compare user's device print profiles."); + authState = FAILED; + } else { + + if (logger.messageEnabled()) { + logger.message("client devicePrint: " + clientScriptOutputData); + } + + var getProfiles = function () { + + function isExpiredProfile(devicePrintProfile) { + var expirationDate = new Date(), + lastSelectedDate; + expirationDate.setDate(expirationDate.getDate() - config.profileExpiration); + + lastSelectedDate = new Date(devicePrintProfile.lastSelectedDate); + + return lastSelectedDate < expirationDate; + } + + function getNotExpiredProfiles() { + var profile, + dao = sharedState.get('_DeviceIdDao'), + results = [], + profiles, + iter; + + profiles = dao.getDeviceProfiles(username, realm); + + if (profiles) { + iter = profiles.iterator(); + + while (iter.hasNext()) { + profile = iter.next().getObject(); + if (!isExpiredProfile(profile)) { + results.push(profile); + } + } + } + if (logger.messageEnabled()) { + logger.message("stored non-expired profiles: " + results); + } + return results; + } + + return getNotExpiredProfiles(); + }, + devicePrint = JSON.parse(clientScriptOutputData), + devicePrintProfiles = getProfiles(); + + if (!hasRequiredAttributes(devicePrint, config.attributes)) { + logger.message("devicePrint.hasRequiredAttributes: false"); + // Will fail this module but fall-through to next module. Which should be OTP. + authState = FAILED; + } else if (compareDevicePrintProfiles(config.attributes, devicePrint, devicePrintProfiles, config.maxPenaltyPoints)) { + logger.message("devicePrint.hasValidProfile: true"); + authState = SUCCESS; + } else { + logger.message("devicePrint.hasValidProfile: false"); + sharedState.put('devicePrintProfile', JSON.stringify(devicePrint)); + // Will fail this module but fall-through to next module. Which should be OTP. + authState = FAILED; + } + } +} + +matchDevicePrint(); +" +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Device-Id-(Match)-Server-Side.script.json 1`] = ` +{ + "script": { + "703dab1a-1921-4981-98dd-b8e5349d8548": { + "_id": "703dab1a-1921-4981-98dd-b8e5349d8548", + "context": "AUTHENTICATION_SERVER_SIDE", + "createdBy": "null", + "creationDate": 0, + "default": true, + "description": "Default global script for server side Device Id (Match) Authentication Module", + "evaluatorVersion": "1.0", + "language": "JAVASCRIPT", + "lastModifiedBy": "id=7a031a92-f70d-4b30-9d70-da7cfb1d9c93,ou=user,ou=am-config", + "lastModifiedDate": 1731021914231, + "name": "Device Id (Match) - Server Side", + "script": "file://Device-Id-(Match)-Server-Side.script.js", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Device-Profile-Match-Template-Decision-Node-Script.script.js 1`] = ` +"/* + * Copyright 2020-2022 ForgeRock AS. All Rights Reserved + * + * Use of this code requires a commercial software license with ForgeRock AS. + * or with one of its affiliates. All use shall be exclusively subject + * to such license between the licensee and ForgeRock AS. + */ + +/** ****************************************************************** + * + * The following script is a simplified template for understanding + * the basics of device matching. _This is not functionally complete._ + * For a functionally complete script as well as a development toolkit, + * visit https://github.com/ForgeRock/forgerock-device-match-script. + * + * Global node variables accessible within this scope: + * 1. \`sharedState\` provides access to incoming request + * 2. \`deviceProfilesDao\` provides access to stored profiles + * 3. \`outcome\` variable maps to auth tree node outcomes; values are + * 'true', 'false', or 'unknownDevice' (notice _all_ are strings). + * ******************************************************************/ + +/** + * Get the incoming request's device profile. + * Returns serialized JSON (type string); parsing this will result a + * native JS object. + */ +var incomingJson = sharedState.get('forgeRock.device.profile').toString(); +var incoming = JSON.parse(incomingJson); + +/** + * Get the incoming user's username and realm. + * Notice the use of \`.asString()\`. + */ +var username = sharedState.get("username").asString(); +var realm = sharedState.get("realm").asString(); + +/** + * Get the user's stored profiles for appropriate realm. + * Returns a _special_ object with methods for profile data + */ +var storedProfiles = deviceProfilesDao.getDeviceProfiles(username, realm); + +// Default to \`outcome\` of 'unknownDevice' +outcome = 'unknownDevice'; + +if (storedProfiles) { + var i = 0; + // NOTE: \`.size()\` method returns the number of stored profiles + var len = storedProfiles.size(); + + for (i; i < len; i++) { + /** + * Get the stored profile. + * Returns serialized JSON (type string); parsing this will result + * a native JS object. + */ + var storedJson = storedProfiles.get(i); + var stored = JSON.parse(storedJson); + + /** + * Find a stored profile with the same identifier. + */ + if (incoming.identifier === stored.identifier) { + + /** + * Now that you've found the appropriate profile, you will perform + * the logic here to match the values of the \`incoming\` profile + * with that of the \`stored\` profile. + * + * The result of the matching logic is assigned to \`outcome\`. Since + * we have profiles of the same identifier, the value (type string) + * should now be either 'true' or 'false' (properties matched or not). + * + * For more information about this topic, visit this Github repo: + * https://github.com/ForgeRock/forgerock-device-match-script + */ + outcome = 'false'; + } + } +} +" +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Device-Profile-Match-Template-Decision-Node-Script.script.json 1`] = ` +{ + "script": { + "13e3f263-9cd3-4844-8d1c-040fd0dd02eb": { + "_id": "13e3f263-9cd3-4844-8d1c-040fd0dd02eb", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": true, + "description": "Default global script template for Device Profile Match decision node script for Authentication Tree", + "evaluatorVersion": "1.0", + "language": "JAVASCRIPT", + "lastModifiedBy": "id=7a031a92-f70d-4b30-9d70-da7cfb1d9c93,ou=user,ou=am-config", + "lastModifiedDate": 1731021914332, + "name": "Device Profile Match Template - Decision Node Script", + "script": "file://Device-Profile-Match-Template-Decision-Node-Script.script.js", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/EmailAsUsername.script.js 1`] = ` +"objectAttributes = sharedState.get("objectAttributes") +userName = objectAttributes.get("userName") + +if(userName){ + //Form Fill + objectAttributes.put("mail", userName) +} else { + //Social + objectAttributes.put("userName", objectAttributes.get("mail")) +} + + +sharedState.put("objectAttributes", objectAttributes); +//sharedState.put("username", mail) + +outcome = "true"; +" +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/EmailAsUsername.script.json 1`] = ` +{ + "script": { + "e5c302c8-f838-4698-87cc-d7225fc82454": { + "_id": "e5c302c8-f838-4698-87cc-d7225fc82454", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "null", + "evaluatorVersion": "1.0", + "language": "JAVASCRIPT", + "lastModifiedBy": "id=b4b5ea11-ad75-4ec5-b8eb-77a6c5eff8bf,ou=user,ou=am-config", + "lastModifiedDate": 1733182559031, + "name": "EmailAsUsername", + "script": "file://EmailAsUsername.script.js", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Facebook-Profile-Normalization.script.groovy 1`] = ` +""/*\\n * Copyright 2020 ForgeRock AS. All Rights Reserved\\n *\\n * Use of this code requires a commercial software license with ForgeRock AS.\\n * or with one of its affiliates. All use shall be exclusively subject\\n * to such license between the licensee and ForgeRock AS.\\n */\\n\\nimport static org.forgerock.json.JsonValue.field\\nimport static org.forgerock.json.JsonValue.json\\nimport static org.forgerock.json.JsonValue.object\\n\\nreturn json(object(\\n field(\\"id\\", rawProfile.id),\\n field(\\"displayName\\", rawProfile.name),\\n field(\\"givenName\\", rawProfile.first_name),\\n field(\\"familyName\\", rawProfile.last_name),\\n field(\\"photoUrl\\", rawProfile.picture.data.url),\\n field(\\"email\\", rawProfile.email),\\n field(\\"username\\", rawProfile.email)))" +" +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Facebook-Profile-Normalization.script.json 1`] = ` +{ + "script": { + "bae1d54a-e97d-4997-aa5d-c027f21af82c": { + "_id": "bae1d54a-e97d-4997-aa5d-c027f21af82c", + "context": "SOCIAL_IDP_PROFILE_TRANSFORMATION", + "createdBy": "null", + "creationDate": 0, + "default": true, + "description": "Normalizes raw profile data from Facebook", + "evaluatorVersion": "1.0", + "language": "GROOVY", + "lastModifiedBy": "id=7a031a92-f70d-4b30-9d70-da7cfb1d9c93,ou=user,ou=am-config", + "lastModifiedDate": 1731021914518, + "name": "Facebook Profile Normalization", + "script": "file://Facebook-Profile-Normalization.script.groovy", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/ForgeRock-Internal-OAuth2-Access-Token-Modification-Script.script.js 1`] = ` +"/* + * Copyright 2023 ForgeRock AS. All Rights Reserved + * + * Use of this code requires a commercial software license with ForgeRock AS. + * or with one of its affiliates. All use shall be exclusively subject + * to such license between the licensee and ForgeRock AS. + */ +// Script is intentionally empty +" +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/ForgeRock-Internal-OAuth2-Access-Token-Modification-Script.script.json 1`] = ` +{ + "script": { + "c234ba0b-58a1-4cfd-9567-09edde980745": { + "_id": "c234ba0b-58a1-4cfd-9567-09edde980745", + "context": "OAUTH2_ACCESS_TOKEN_MODIFICATION", + "createdBy": "null", + "creationDate": 1433147666269, + "default": true, + "description": "Internal token modification script", + "evaluatorVersion": "1.0", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "ForgeRock Internal: OAuth2 Access Token Modification Script", + "script": "file://ForgeRock-Internal-OAuth2-Access-Token-Modification-Script.script.js", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/ForgeRock-Internal-OIDC-Claims-Script.script.js 1`] = ` +"/* + * Copyright 2014-2023 ForgeRock AS. All Rights Reserved + * + * Use of this code requires a commercial software license with ForgeRock AS + * or with one of its affiliates. All use shall be exclusively subject + * to such license between the licensee and ForgeRock AS. + */ + +/* + * This script computes claim values returned in ID tokens and/or at the UserInfo Endpoint. + * The claim values are computed for: + * the claims derived from the requested scopes, + * the claims provided by the authorization server, + * and the claims requested by the client via the claims parameter. + * + * In the CONFIGURATION AND CUSTOMIZATION section, you can + * define the scope-to-claims mapping, and + * assign to each claim a resolver function that will compute the claim value. + * + * Defined variables (class references are provided below): + * scopes - Set (6). + * Always present, the requested scopes. + * claims - Map (5). + * Always present, default server provided claims. + * claimObjects - List (7, 2). + * Always present, the default server provided claims. + * requestedClaims - Map> (5). + * Always present, not empty if the request contains the claims parameter and the server has enabled + * claims_parameter_supported. A map of the requested claims to possible values, otherwise empty; + * requested claims with no requested values will have a key but no value in the map. A key with + * a single value in its Set (6) indicates that this is the only value that should be returned. + * requestedTypedClaims - List (7, 2). + * Always present, the requested claims. + * Requested claims with no requested values will have a claim with no values. + * A claim with a single value indicates this is the only value that should be returned. + * claimsLocales - List (7). + * The values from the 'claims_locales' parameter. + * See https://openid.net/specs/openid-connect-core-1_0.html#ClaimsLanguagesAndScripts for the OIDC specification details. + * requestProperties - Unmodifiable Map (5). + * Always present, contains a map of request properties: + * requestUri - The request URI. + * realm - The realm that the request relates to. + * requestParams - A map of the request params and/or posted data. + * Each value is a list of one or more properties. + * Please note that these should be handled in accordance with OWASP best practices: + * https://owasp.org/www-community/vulnerabilities/Unsafe_use_of_Reflection. + * clientProperties - Unmodifiable Map (5). + * Present if the client specified in the request was identified, contains a map of client properties: + * clientId - The client's URI for the request locale. + * allowedGrantTypes - List of the allowed grant types (org.forgerock.oauth2.core.GrantType) for the client. + * allowedResponseTypes - List of the allowed response types for the client. + * allowedScopes - List of the allowed scopes for the client. + * customProperties - A map of the custom properties of the client. + * Lists or maps will be included as sub-maps; for example: + * customMap[Key1]=Value1 will be returned as customMap -> Key1 -> Value1. + * To add custom properties to a client, update the Custom Properties field + * in AM Console > Realm Name > Applications > OAuth 2.0 > Clients > Client ID > Advanced. + * identity - AMIdentity (3). + * Always present, the identity of the resource owner. + * session - SSOToken (4). + * Present if the request contains the session cookie, the user's session object. + * scriptName - String (primitive). + * Always present, the display name of the script. + * logger - Always present, the "OAuth2Provider" debug logger instance: + * https://backstage.forgerock.com/docs/am/7/scripting-guide/scripting-api-global-logger.html#scripting-api-global-logger. + * Corresponding files will be prefixed with: scripts.OIDC_CLAIMS. + * httpClient - HTTP Client (8). + * Always present, the HTTP Client instance: + * https://backstage.forgerock.com/docs/am/7/scripting-guide/scripting-api-global-http-client.html#scripting-api-global-http-client. + * In order to use the client, you may need to add + * org.forgerock.http.Client, + * org.forgerock.http.protocol.*, + * and org.forgerock.util.promise.PromiseImpl + * to the allowed Java classes in the scripting engine configuration, as described in: + * https://backstage.forgerock.com/docs/am/7/scripting-guide/script-engine-security.html + * + * Return - a new UserInfoClaims(Map values, Map> compositeScopes) (1) object. + * The result of the last statement in the script is returned to the server. + * Currently, the Immediately Invoked Function Expression (also known as Self-Executing Anonymous Function) + * is the last (and only) statement in this script, and its return value will become the script result. + * Do not use "return variable" statement outside of a function definition. + * See RESULTS section for additional details. + * + * Class reference: + * (1) UserInfoClaims - https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/oauth2/core/UserInfoClaims.html. + * (2) Claim - https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html). + * An instance of org.forgerock.openidconnect.Claim has methods to access + * the claim name, requested values, locale, and whether the claim is essential. + * (3) AMIdentity - https://backstage.forgerock.com/docs/am/7/apidocs/com/sun/identity/idm/AMIdentity.html. + * (4) SSOToken - https://backstage.forgerock.com/docs/am/7/apidocs/com/iplanet/sso/SSOToken.html. + * (5) Map - https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/HashMap.html, + * or https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/LinkedHashMap.html. + * (6) Set - https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/HashSet.html. + * (7) List - https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html. + * (8) Client - https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/http/Client.html. +*/ + +(function () { + // SETUP + + /** + * Claim processing utilities. + * An object that contains reusable functions for processing claims. + * @see CLAIM PROCESSING UTILITIES section for details. + */ + var utils = getUtils(); + + // CONFIGURATION AND CUSTOMIZATION + + /** + * OAuth 2.0 scope values (scopes) can be used by the Client to request OIDC claims. + * + * Call this configuration method, and pass in as the first argument + * an object that maps a scope value to an array of claim names + * to specify which claims need to be processed and returned for the requested scopes. + * @see {@link https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims} + * for the scope values that could be used to request claims as defined in the OIDC specification. + * + * Below, find a default configuration that is expected to work in the current environment. + * + * CUSTOMIZATION + * You can choose the claim names returned for a scope. + */ + utils.setScopeClaimsMap({ + profile: [ + 'name', + 'family_name', + 'given_name', + 'zoneinfo', + 'locale' + ], + email: ['email'], + address: ['address'], + phone: ['phone_number'] + }); + + /** + * In this script, each claim + * derived from the requested scopes, + * provided by the authorization server, and + * requested by the client via the claims parameter + * will be processed by a function associated with the claim name. + * + * Call this configuration method, and pass in as the first argument + * an object that maps a claim name to a resolver function, + * which will be automatically executed for each claim processed by the script. + * + * The claim resolver function will receive the requested claim information + * in an instance of org.forgerock.openidconnect.Claim as the first argument. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html} + * for details on the Claim class. + * + * If the claim resolver function returns a value, + * other than undefined or null, + * the claim will be included in the script's results. + * + * The Claim instance provides methods to check + * what the name of the claim is, + * which values the claim request contains, + * whether the claim is essential, and + * which locale the claim is associated with. + * The resolver function can consider this information when computing and returning the claim value. + * + * Below, find a default configuration that is expected to work in the current environment. + * A reusable function, utils.getUserProfileClaimResolver(String attribute-name), + * is called to return a claim resolver function based on a user profile attribute. + * @see CLAIM RESOLVERS section for the implementation details and examples. + * For the address claim, an example of a claim resolver that uses another claim resolver is provided. + * + * CUSTOMIZATION + * You can reuse the predefined utils methods with your custom arguments. + * You can also specify a custom resolver function for a claim name, + * that will compute and return the claim value—as shown in the commented out example below. + */ + utils.setClaimResolvers({ + /* + // An example of a simple claim resolver function that is defined for a claim + // directly in the configuration object: + custom-claim-name: function (requestedClaim) { + // In this case, initially, the claim value comes straight from a user profile attribute value: + var claimValue = identity.getAttribute('custom-attribute-name').toArray()[0] + + // Optionally, provide additional logic for processing (filtering, formatting, etc.) the claim value. + // You can use: + // requestedClaim.getName() + // requestedClaim.getValues() + // requestedClaim.getLocale() + // requestedClaim.isEssential() + + return claimValue + }, + */ + /** + * The use of utils.getUserProfileClaimResolver shows how + * an argument passed to a function that returns a claim resolver + * becomes available to the resolver function (via its lexical context). + */ + name: utils.getUserProfileClaimResolver('cn'), + family_name: utils.getUserProfileClaimResolver('sn'), + given_name: utils.getUserProfileClaimResolver('givenname'), + zoneinfo: utils.getUserProfileClaimResolver('preferredtimezone'), + locale: utils.getUserProfileClaimResolver('preferredlocale'), + email: utils.getUserProfileClaimResolver('mail'), + address: utils.getAddressClaimResolver( + /** + * The passed in user profile claim resolver function + * can be used by the address claim resolver function + * to obtain the claim value to be formatted as per the OIDC specification: + * @see https://openid.net/specs/openid-connect-core-1_0.html#AddressClaim. + */ + utils.getUserProfileClaimResolver('postaladdress') + ), + phone_number: utils.getUserProfileClaimResolver('telephonenumber') + }); + + // CLAIM PROCESSING UTILITIES + + /** + * @returns {object} An object that contains reusable claim processing utilities. + * @see PUBLIC METHODS section and the return statement for the list of exported functions. + */ + function getUtils () { + // IMPORT JAVA + + /** + * Provides Java scripting functionality. + * @see {@link https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/Scripting_Java#javaimporter_constructor}. + */ + var frJava = JavaImporter( + org.forgerock.oauth2.core.exceptions.InvalidRequestException, + org.forgerock.oauth2.core.UserInfoClaims, + org.forgerock.openidconnect.Claim, + + java.util.LinkedHashMap, + java.util.ArrayList + ); + + // SET UP CONFIGURATION + + /** + * Placeholder for a configuration option that contains + * an object that maps the supported scope values (scopes) + * and the corresponding claim names for each scope value. + */ + var scopeClaimsMap; + + /** + * Placeholder for a configuration option that contains + * an object that maps the supported claim names + * and the resolver functions returning the claim value. + */ + var claimResolvers; + + /** + * A (public) method that accepts an object that maps the supported scopes and the corresponding claim names, + * and assigns it to a (private) variable that serves as a configuration option. + * @param {object} params - An object that maps each supported scope value to an array of claim names, + * in order to specify which claims need to be processed for the requested scopes. + * @see {@link https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims} for details. + * @param {string[]} [params.profile] - An array of claim names to be returned if the profile scope is requested. + * @param {string[]} [params.email] - An array of claim names to be returned if the email scope is requested. + * @param {string[]} [params.address] - An array of claim names to be returned if the address scope is requested. + * @param {string[]} [params.phone] - An array of claim names to be returned if the phone scope is requested. + * @returns {undefined} + */ + function setScopeClaimsMap(params) { + scopeClaimsMap = params; + } + + /** + * A (public) method that accepts an object that maps the supported claim names + * and the resolver functions returning the claim value, + * and assigns it to a (private) variable that serves as a configuration option. + * @param {object} params - An object that maps + * each supported claim name to a function that computes and returns the claim value. + */ + function setClaimResolvers(params) { + claimResolvers = params; + } + + // CLAIM RESOLVERS + + /** + * Claim resolvers are functions that return a claim value. + * @param {*} + * @returns {*} + */ + + /** + * Defines a claim resolver based on a user profile attribute. + * @param {string} attributeName - Name of the user profile attribute. + * @returns {function} A function that will determine the claim value + * based on the user profile attribute and the (requested) claim properties. + */ + function getUserProfileClaimResolver (attributeName) { + /** + * Resolves a claim with a user profile attribute value. + * Returns undefined if the identity attribute is not populated, + * OR if the claim has requested values that do not contain the identity attribute value. + * ATTENTION: the aforementioned comparison is case-sensitive. + * @param {org.forgerock.openidconnect.Claim} claim + * An object that provides methods to obtain information/requirements associated with a claim. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html} for details. + * @returns {string|HashSet|undefined} + */ + function resolveClaim(claim) { + var userProfileValue; + + if (identity) { + userProfileValue = getClaimValueFromSet(claim, identity.getAttribute(attributeName)); + + if (userProfileValue && !userProfileValue.isEmpty()) { + if (!claim.getValues() || claim.getValues().isEmpty() || claim.getValues().contains(userProfileValue)) { + return userProfileValue; + } + } + } + } + + return resolveClaim; + } + + /** + * Returns an address claim resolver based on a claim value obtained with another claim resolver. + * @param {function} resolveClaim - A function that returns a claim value. + * @returns {function} A function that will accept a claim as an argument, + * run the claim resolver function for the claim and obtain the claim value, + * and apply additional formatting to the value before returning it. + */ + function getAddressClaimResolver (resolveClaim) { + /** + * Creates an address claim object from a value returned by a claim resolver, + * and returns the address claim object as the claim value. + * @see {@link https://openid.net/specs/openid-connect-core-1_0.html#AddressClaim}. + * The claim value is obtained with a claim resolving function available from the closure. + * @param {org.forgerock.openidconnect.Claim} claim + * An object that provides methods to obtain information/requirements associated with a claim. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html} for details. + * @returns {java.util.LinkedHashMap|undefined} The address claim object created from a claim value. + */ + function resolveAddressClaim(claim) { + var claimValue = resolveClaim(claim); + var addressObject; + + if (isClaimValueValid(claimValue)) { + addressObject = new frJava.LinkedHashMap(); + + addressObject.put('formatted', claimValue); + + return addressObject; + } + } + + return resolveAddressClaim; + } + + /** + * Returns an essential claim resolver based on a claim value obtained with another claim resolver. + * @param {function} resolveClaim - A function that returns a claim value. + * @returns {function} A function that will accept a claim as an argument, + * run the claim resolver function for the claim and obtain the claim value, + * and apply additional logic for essential claims. + */ + function getEssentialClaimResolver (resolveClaim) { + /** + * Returns a claim value or throws an error. + * The claim value is obtained with a claim resolving function available from the closure. + * Throws an exception if the claim is essential and no value is returned for the claim. + * + * Use of this resolver is optional. + * @see {@link https://openid.net/specs/openid-connect-core-1_0.html#IndividualClaimsRequests} stating: + * "Note that even if the Claims are not available because the End-User did not authorize their release or they are not present, + * the Authorization Server MUST NOT generate an error when Claims are not returned, whether they are Essential or Voluntary, + * unless otherwise specified in the description of the specific claim." + * + * @param {org.forgerock.openidconnect.Claim} claim + * An object that provides methods to obtain information/requirements associated with a claim. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html} for details. + * @returns {*} + * @throws {org.forgerock.oauth2.core.exceptions.InvalidRequestException} + */ + function resolveEssentialClaim(claim) { + var claimValue = resolveClaim(claim); + + if (claim.isEssential() && !isClaimValueValid(claimValue)) { + throw new frJava.InvalidRequestException('Could not provide value for essential claim: ' + claim.getName()); + } + + return claimValue; + } + + return resolveEssentialClaim; + } + + /** + * Provides default resolution for a claim. + * Use it if a claim-specific resolver is not defined in the configuration. + * @param {org.forgerock.openidconnect.Claim} claim + * An object that provides methods to obtain information/requirements associated with a claim. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html} for details. + * @returns {*} A single value associated with this claim. + */ + function resolveAnyClaim (claim) { + if (claim.getValues().size() === 1) { + return claim.getValues().toArray()[0]; + } + } + + // UTILITIES + + /** + * Returns claim value from a set. + * If the set contains a single value, returns the value. + * If the set contains multiple values, returns the set. + * Otherwise, returns undefined. + * + * @param {org.forgerock.openidconnect.Claim} claim + * An object that provides methods to obtain information/requirements associated with a claim. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html} for details. + * @param {java.util.HashSet} set The set—for example, a user profile attribute value. + * @returns {string|java.util.HashSet|undefined} + */ + function getClaimValueFromSet (claim, set) { + if (set && set.size()) { + if (set.size() === 1) { + return set.toArray()[0]; + } else { + return set; + } + } else if (logger.warningEnabled()) { + logger.warning('OIDC Claims script. Got an empty set for claim: ' + claim.getName()); + } + } + + function isClaimValueValid (claimValue) { + if (typeof claimValue === 'undefined' || claimValue === null) { + return false; + } + + return true; + } + + // CLAIM PROCESSING + + /** + * Constructs and returns an object populated with the computed claim values + * and the requested scopes mapped to the claim names. + * @returns {org.forgerock.oauth2.core.UserInfoClaims} The object to be returned to the authorization server. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/oauth2/core/UserInfoClaims.html}. + * @see RESULTS section for the use of this function. + */ + function getUserInfoClaims () { + return new frJava.UserInfoClaims(getComputedClaims(), getCompositeScopes()); + } + + /** + * Creates a map of (requested) claim names populated with the computed claim values. + * @returns {java.util.LinkedHashMap} + * A map of the requested claim names and the corresponding claim values. + */ + function getComputedClaims () { + /** + * Creates a complete list of claim objects from: + * the claims derived from the scopes, + * the claims provided by the authorization server, + * and the claims requested by the client. + * @returns {java.util.ArrayList} + * Returns a complete list of org.forgerock.openidconnect.Claim objects available to the script. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html} for the claim object details. + */ + function getClaims() { + /** + * Returns a list of claim objects for the requested scopes. + * Uses the scopeClaimsMap configuration option to derive the claim names; + * no other properties of a claim derived from a scope are populated. + * @returns {java.util.ArrayList} + * A list of org.forgerock.openidconnect.Claim objects derived from the requested scopes. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html} for the claim object details. + */ + function convertScopeToClaims() { + var claims = new frJava.ArrayList(); + + scopes.toArray().forEach(function (scope) { + if (String(scope) !== 'openid' && scopeClaimsMap[scope]) { + scopeClaimsMap[scope].forEach(function (claimName) { + claims.add(new frJava.Claim(claimName)); + }); + } + }); + + return claims; + } + + var claims = new frJava.ArrayList(); + + claims.addAll(convertScopeToClaims()); + claims.addAll(claimObjects); + claims.addAll(requestedTypedClaims); + + return claims; + } + + /** + * Computes and returns a claim value. + * To obtain the claim value, uses the resolver function specified for the claim in the claimResolvers configuration object. + * @see claimResolvers + * If no resolver function is found, uses the default claim resolver function. + * + * @param {org.forgerock.openidconnect.Claim} claim + * An object that provides methods to obtain information/requirements associated with a claim. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/openidconnect/Claim.html} for details. + * @returns {*} Claim value. + * @throws {org.forgerock.oauth2.core.exceptions.InvalidRequestException} + * Rethrows this exception if a claim resolver throws it. + * You can throw org.forgerock.oauth2.core.exceptions.InvalidRequestException from your custom claim resolver + * if you want to terminate the claim processing. + */ + function computeClaim(claim) { + var resolveClaim; + var message; + + try { + resolveClaim = claimResolvers[claim.getName()] || resolveAnyClaim; + + return resolveClaim(claim); + } catch (e) { + message = 'OIDC Claims script exception. Unable to resolve OIDC Claim. ' + e; + + if (String(e).indexOf('org.forgerock.oauth2.core.exceptions.InvalidRequestException') !== -1) { + throw e; + } + + if (logger.warningEnabled()) { + logger.warning(message); + } + } + } + + var computedClaims = new frJava.LinkedHashMap(); + + getClaims().toArray().forEach(function (claim) { + var claimValue = computeClaim(claim); + + if (isClaimValueValid(claimValue)) { + computedClaims.put(claim.getName(), claimValue); + } else { + /** + * If a claim has been processed, but appears in the list again, + * and its value cannot be computed under the new conditions, + * the claim is removed from the final result. + * + * For example, a claim could be mapped to a scope and found in the user profile, + * but also requested by the client with required values that don't match the computed one. + * @see {link https://openid.net/specs/openid-connect-core-1_0.html#IndividualClaimsRequests}. + * for the relevant OIDC specification details. + */ + computedClaims.remove(claim.getName()); + } + }); + + return computedClaims; + } + + /** + * Creates a map of requested scopes and the corresponding claim names. + * @returns {java.util.LinkedHashMap} + */ + function getCompositeScopes () { + var compositeScopes = new frJava.LinkedHashMap(); + + scopes.toArray().forEach(function (scope) { + var scopeClaims = new frJava.ArrayList(); + + if (scopeClaimsMap[scope]) { + scopeClaimsMap[scope].forEach(function (claimName) { + scopeClaims.add(claimName); + }); + } + + if (scopeClaims.size()) { + compositeScopes.put(scope, scopeClaims); + } + }); + + return compositeScopes; + } + + // PUBLIC METHODS + + return { + setScopeClaimsMap: setScopeClaimsMap, + setClaimResolvers: setClaimResolvers, + getUserProfileClaimResolver: getUserProfileClaimResolver, + getAddressClaimResolver: getAddressClaimResolver, + getEssentialClaimResolver: getEssentialClaimResolver, + getUserInfoClaims: getUserInfoClaims + }; + } + + // RESULTS + + /** + * This script returns an instance of the org.forgerock.oauth2.core.UserInfoClaims class + * populated with the computed claim values and + * the requested scopes mapped to the claim names. + * @see {@link https://backstage.forgerock.com/docs/am/7/apidocs/org/forgerock/oauth2/core/UserInfoClaims.html}. + * + * Assigning it to a variable gives you an opportunity + * to log the content of the returned value during development. + */ + var userInfoClaims = utils.getUserInfoClaims(); + + /* + logger.error(scriptName + ' results:') + logger.error('Values: ' + userInfoClaims.getValues()) + logger.error('Scopes: ' + userInfoClaims.getCompositeScopes()) + */ + + return userInfoClaims; +}()); +" +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/ForgeRock-Internal-OIDC-Claims-Script.script.json 1`] = ` +{ + "script": { + "1f389a3d-21cf-417c-a6d3-42ea620071f0": { + "_id": "1f389a3d-21cf-417c-a6d3-42ea620071f0", + "context": "OIDC_CLAIMS", + "createdBy": "null", + "creationDate": 0, + "default": true, + "description": "Internal OIDC Claims script", + "evaluatorVersion": "1.0", + "language": "JAVASCRIPT", + "lastModifiedBy": "null", + "lastModifiedDate": 0, + "name": "ForgeRock Internal: OIDC Claims Script", + "script": "file://ForgeRock-Internal-OIDC-Claims-Script.script.js", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Format-Username.script.js 1`] = ` +"var username = sharedState.get("username"); + +sharedState.put("displayName", username); +outcome = "continue"; +" +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/Format-Username.script.json 1`] = ` +{ + "script": { + "223739f3-9c54-43b7-9572-3c5338786145": { + "_id": "223739f3-9c54-43b7-9572-3c5338786145", + "context": "AUTHENTICATION_TREE_DECISION_NODE", + "createdBy": "null", + "creationDate": 0, + "default": false, + "description": "Change this upp buddy", + "evaluatorVersion": "1.0", + "language": "JAVASCRIPT", + "lastModifiedBy": "id=b4b5ea11-ad75-4ec5-b8eb-77a6c5eff8bf,ou=user,ou=am-config", + "lastModifiedDate": 1733182559104, + "name": "Format Username", + "script": "file://Format-Username.script.js", + }, + }, +} +`; + +exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir9 --use-string-arrays --no-decode --no-coords --extract --separate-objects": should export everything, including default scripts, into separate files in the directory exportAllTestDir9 with scripts extracted, no decoding variables, no journey coordinates, separate managed objects, and using string arrays: exportAllTestDir9/realm/root-alpha/script/FrodoSPAdapter.script.js 1`] = ` +"/* + * Copyright 2023 ForgeRock AS. All Rights Reserved + * + * Use of this code requires a commercial software license with ForgeRock AS. + * or with one of its affiliates. All use shall be exclusively subject + * to such license between the licensee and ForgeRock AS. + */ + +/* + * The script has these top level functions that could be executed during a SAML2 flow. + * - preSingleSignOnRequest + * - preSingleSignOnProcess + * - postSingleSignOnSuccess + * - postSingleSignOnFailure + * - postNewNameIDSuccess + * - postTerminateNameIDSuccess + * - preSingleLogoutProcess + * - postSingleLogoutSuccess + * + * Please see the JavaDoc for the interface for more information about these methods. + * https://backstage.forgerock.com/docs/am/7.3/_attachments/apidocs/org/forgerock/openam/saml2/plugins/SPAdapter.html + * Note that the initialize method is not supported in the scripts. + * + * Defined variables. Check the documentation on the respective functions for the variables available to it. + * + * hostedEntityId - String + * Entity ID for the hosted IDP + * realm - String + * Realm of the hosted IDP + * idpEntityId - String + * The entity ID for the Identity Provider for which the sign-on request will be sent. + * request - HttpServletRequest (1) + * Servlet request object + * response - HttpServletResponse (2) + * Servlet response object + * authnRequest - AuthnRequest (3) + * The authentication request sent that is sent from the Service Provider. + * session - SSOToken (4) + * The single sign-on session. The reference type of this is Object and would need to be casted to SSOToken. + * res - Response (5) + * The SSO Response received from the Identity Provider. + * profile - String + * The protocol profile that is used, this will be one of the following values from SAML2Constants (6): + * - SAML2Constants.HTTP_POST + * - SAML2Constants.HTTP_ARTIFACT + * - SAML2Constants.PAOS + * out - PrintWriter (7) + * The PrintWriter that can be used to write to. + * isFederation - boolean + * Set to true if using federation, otherwise false. + * failureCode - int + * An integer holding the failure code when an error has occurred. For potential values see SPAdapter. + * userId - String + * The unique universal ID of the user with whom the new name identifier request was performed. + * idRequest - ManageNameIDRequest (8) + * The new name identifier request, this will be null if the request object is not available + * idResponse - ManageNameIDResponse (9) + * The new name identifier response, this will be null if the response object is not available + * binding - String + * The binding used for the new name identifier request. This will be one of the following values: + * - SAML2Constants.SOAP + * - SAML2Constants.HTTP_REDIRECT + * logoutRequest - LogoutRequest (10) + * The single logout request. + * logoutResponse - LogoutResponse (11) + * The single logout response. + * spAdapterScriptHelper - SpAdapterScriptHelper (12) + * An instance of SpAdapterScriptHelper containing helper methods. See Javadoc for more details. + * logger - Logger instance + * https://backstage.forgerock.com/docs/am/7/scripting-guide/scripting-api-global-logger.html#scripting-api-global-logger. + * Corresponding log files will be prefixed with: scripts.