@rockcarver/frodo-cli 0.18.2-6 → 0.18.2-7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -1
- package/esm/cli/cmd_common.js +4 -4
- package/esm/cli/cmd_common.js.map +1 -1
- package/esm/cli/saml/saml-cot-export.js +4 -1
- package/esm/cli/saml/saml-cot-export.js.map +1 -1
- package/esm/cli/saml/saml-cot-import.js +4 -1
- package/esm/cli/saml/saml-cot-import.js.map +1 -1
- package/esm/cli/saml/saml-cot-list.js +4 -1
- package/esm/cli/saml/saml-cot-list.js.map +1 -1
- package/esm/cli/saml/saml-delete.js +40 -0
- package/esm/cli/saml/saml-delete.js.map +1 -0
- package/esm/cli/saml/saml-describe.js +6 -5
- package/esm/cli/saml/saml-describe.js.map +1 -1
- package/esm/cli/saml/saml-export.js +36 -25
- package/esm/cli/saml/saml-export.js.map +1 -1
- package/esm/cli/saml/saml-import.js +37 -21
- package/esm/cli/saml/saml-import.js.map +1 -1
- package/esm/cli/saml/saml-list.js +13 -7
- package/esm/cli/saml/saml-list.js.map +1 -1
- package/esm/cli/saml/saml-metadata-export.js +7 -6
- package/esm/cli/saml/saml-metadata-export.js.map +1 -1
- package/esm/cli/saml/saml.js +1 -0
- package/esm/cli/saml/saml.js.map +1 -1
- package/esm/ops/Saml2Ops.js +502 -2
- package/esm/ops/Saml2Ops.js.map +1 -1
- package/esm/ops/Saml2Ops.test_.js.map +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.18.2-7] - 2022-11-21
|
|
11
|
+
|
|
10
12
|
## [0.18.2-6] - 2022-11-16
|
|
11
13
|
|
|
12
14
|
## [0.18.2-5] - 2022-11-16
|
|
@@ -723,7 +725,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
723
725
|
- Fixed problem with adding connection profiles
|
|
724
726
|
- Miscellaneous bug fixes
|
|
725
727
|
|
|
726
|
-
[Unreleased]: https://github.com/rockcarver/frodo-cli/compare/v0.18.2-
|
|
728
|
+
[Unreleased]: https://github.com/rockcarver/frodo-cli/compare/v0.18.2-7...HEAD
|
|
729
|
+
|
|
730
|
+
[0.18.2-7]: https://github.com/rockcarver/frodo-cli/compare/v0.18.2-6...v0.18.2-7
|
|
727
731
|
|
|
728
732
|
[0.18.2-6]: https://github.com/rockcarver/frodo-cli/compare/v0.18.2-5...v0.18.2-6
|
|
729
733
|
|
package/esm/cli/cmd_common.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Argument, Option } from 'commander';
|
|
2
2
|
import { state } from '@rockcarver/frodo-lib';
|
|
3
|
-
import * as
|
|
3
|
+
import * as globalConfig from '../storage/StaticStorage';
|
|
4
4
|
import { printMessage, createProgressIndicator, updateProgressIndicator, stopProgressIndicator, verboseMessage, debugMessage, curlirizeMessage } from '../utils/Console.js';
|
|
5
5
|
state.default.session.setPrintHandler(printMessage);
|
|
6
6
|
state.default.session.setVerboseHandler(verboseMessage);
|
|
@@ -16,7 +16,7 @@ const hostArgumentDescription = 'Access Management base URL, e.g.: https://cdk.i
|
|
|
16
16
|
export const hostArgument = new Argument('[host]', hostArgumentDescription);
|
|
17
17
|
export const hostArgumentM = new Argument('<host>', hostArgumentDescription);
|
|
18
18
|
const realmArgumentDescription = "Realm. Specify realm as '/' for the root realm or 'realm' or '/parent/child' otherwise.";
|
|
19
|
-
export const realmArgument = new Argument('[realm]', realmArgumentDescription).default(
|
|
19
|
+
export const realmArgument = new Argument('[realm]', realmArgumentDescription).default(globalConfig.DEFAULT_REALM_KEY, '"alpha" for Identity Cloud tenants, "/" otherwise.');
|
|
20
20
|
export const realmArgumentM = new Argument('<realm>', realmArgumentDescription);
|
|
21
21
|
const userArgumentDescription = 'Username to login with. Must be an admin user with appropriate rights to manage authentication journeys/trees.';
|
|
22
22
|
export const userArgument = new Argument('[user]', userArgumentDescription);
|
|
@@ -41,8 +41,8 @@ forgeops: A ForgeOps CDK or CDM deployment. \n\
|
|
|
41
41
|
The detected or provided deployment type controls certain behavior like obtaining an Identity \
|
|
42
42
|
Management admin token or not and whether to export/import referenced email templates or how \
|
|
43
43
|
to walk through the tenant admin login flow of Identity Cloud and handle MFA';
|
|
44
|
-
export const deploymentOption = new Option('-m, --type <type>', deploymentOptionDescription).choices(
|
|
45
|
-
export const deploymentOptionM = new Option('-m, --type <type>', deploymentOptionDescription).choices(
|
|
44
|
+
export const deploymentOption = new Option('-m, --type <type>', deploymentOptionDescription).choices(globalConfig.DEPLOYMENT_TYPES);
|
|
45
|
+
export const deploymentOptionM = new Option('-m, --type <type>', deploymentOptionDescription).choices(globalConfig.DEPLOYMENT_TYPES);
|
|
46
46
|
export const insecureOption = new Option('-k, --insecure', 'Allow insecure connections when using SSL/TLS. Has no effect when using a network proxy for https (HTTPS_PROXY=http://<host>:<port>), in that case the proxy must provide this capability.').default(false, "Don't allow insecure connections");
|
|
47
47
|
export const verboseOption = new Option('--verbose', 'Verbose output during command execution. If specified, may or may not produce additional output.');
|
|
48
48
|
export const debugOption = new Option('--debug', 'Debug output during command execution. If specified, may or may not produce additional output helpful for troubleshooting.');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmd_common.js","names":["Argument","Option","state","global","printMessage","createProgressIndicator","updateProgressIndicator","stopProgressIndicator","verboseMessage","debugMessage","curlirizeMessage","default","session","setPrintHandler","setVerboseHandler","setDebugHandler","setCurlirizeHandler","setCreateProgressHandler","setUpdateProgressHandler","setStopProgressHandler","init","hostArgumentDescription","hostArgument","hostArgumentM","realmArgumentDescription","realmArgument","DEFAULT_REALM_KEY","realmArgumentM","userArgumentDescription","userArgument","userArgumentM","passwordArgumentDescription","passwordArgument","passwordArgumentM","apiKeyArgumentDescription","apiKeyArgument","apiSecretArgumentDescription","apiSecretArgument","treeOptionDescription","treeOption","treeOptionM","fileOptionDescription","fileOption","fileOptionM","deploymentOptionDescription","deploymentOption","choices","DEPLOYMENT_TYPES","deploymentOptionM","insecureOption","verboseOption","debugOption","curlirizeOption","managedNameOption","managedNameOptionM","dirOptionDescription","dirOption","dirOptionM","entitiesFileOptionDescription","entitiesFileOption","entitiesFileOptionM","envFileOptionDescription","envFileOption","envFileOptionM","sourcesOptionDescription","sourcesOptionDefaultValueDescription","sourcesOptionM","scriptFriendlyOption","makeOptionMandatory"],"sources":["cli/cmd_common.ts"],"sourcesContent":["import { Argument, Option } from 'commander';\nimport { state } from '@rockcarver/frodo-lib';\nimport * as global from '../storage/StaticStorage.js';\nimport {\n printMessage,\n createProgressIndicator,\n updateProgressIndicator,\n stopProgressIndicator,\n verboseMessage,\n debugMessage,\n curlirizeMessage,\n} from '../utils/Console.js';\n\nstate.default.session.setPrintHandler(printMessage);\nstate.default.session.setVerboseHandler(verboseMessage);\nstate.default.session.setDebugHandler(debugMessage);\nstate.default.session.setCurlirizeHandler(curlirizeMessage);\nstate.default.session.setCreateProgressHandler(createProgressIndicator);\nstate.default.session.setUpdateProgressHandler(updateProgressIndicator);\nstate.default.session.setStopProgressHandler(stopProgressIndicator);\n\nexport function init() {\n // pseudo functions for commands that do not otherwise need to import\n // this file but need to trigger print and progress handler registration\n}\n\nconst hostArgumentDescription =\n 'Access Management base URL, e.g.: https://cdk.iam.example.com/am. To use a connection profile, just specify a unique substring.';\nexport const hostArgument = new Argument('[host]', hostArgumentDescription);\nexport const hostArgumentM = new Argument('<host>', hostArgumentDescription);\n\nconst realmArgumentDescription =\n \"Realm. Specify realm as '/' for the root realm or 'realm' or '/parent/child' otherwise.\";\nexport const realmArgument = new Argument(\n '[realm]',\n realmArgumentDescription\n).default(\n global.DEFAULT_REALM_KEY,\n '\"alpha\" for Identity Cloud tenants, \"/\" otherwise.'\n);\nexport const realmArgumentM = new Argument('<realm>', realmArgumentDescription);\n\nconst userArgumentDescription =\n 'Username to login with. Must be an admin user with appropriate rights to manage authentication journeys/trees.';\nexport const userArgument = new Argument('[user]', userArgumentDescription);\nexport const userArgumentM = new Argument('<user>', userArgumentDescription);\n\nconst passwordArgumentDescription = 'Password.';\nexport const passwordArgument = new Argument(\n '[password]',\n passwordArgumentDescription\n);\nexport const passwordArgumentM = new Argument(\n '<password>',\n passwordArgumentDescription\n);\n\nconst apiKeyArgumentDescription = 'API key for logging API.';\nexport const apiKeyArgument = new Argument('[key]', apiKeyArgumentDescription);\n\nconst apiSecretArgumentDescription = 'API secret for logging API.';\nexport const apiSecretArgument = new Argument(\n '[secret]',\n apiSecretArgumentDescription\n);\n\nconst treeOptionDescription =\n 'Specify the name of an authentication journey/tree.';\nexport const treeOption = new Option(\n '-t, --tree <tree>',\n treeOptionDescription\n);\nexport const treeOptionM = new Option(\n '-t, --tree <tree>',\n treeOptionDescription\n);\n\nconst fileOptionDescription = 'File name.';\nexport const fileOption = new Option(\n '-f, --file <file>',\n fileOptionDescription\n);\nexport const fileOptionM = new Option(\n '-f, --file <file>',\n fileOptionDescription\n);\n\nconst deploymentOptionDescription =\n 'Override auto-detected deployment type. Valid values for type: \\n\\\nclassic: A classic Access Management-only deployment with custom layout and configuration. \\n\\\ncloud: A ForgeRock Identity Cloud environment. \\n\\\nforgeops: A ForgeOps CDK or CDM deployment. \\n\\\nThe detected or provided deployment type controls certain behavior like obtaining an Identity \\\nManagement admin token or not and whether to export/import referenced email templates or how \\\nto walk through the tenant admin login flow of Identity Cloud and handle MFA';\nexport const deploymentOption = new Option(\n '-m, --type <type>',\n deploymentOptionDescription\n).choices(global.DEPLOYMENT_TYPES);\nexport const deploymentOptionM = new Option(\n '-m, --type <type>',\n deploymentOptionDescription\n).choices(global.DEPLOYMENT_TYPES);\n\nexport const insecureOption = new Option(\n '-k, --insecure',\n 'Allow insecure connections when using SSL/TLS. Has no effect when using a network proxy for https (HTTPS_PROXY=http://<host>:<port>), in that case the proxy must provide this capability.'\n).default(false, \"Don't allow insecure connections\");\n\nexport const verboseOption = new Option(\n '--verbose',\n 'Verbose output during command execution. If specified, may or may not produce additional output.'\n);\n\nexport const debugOption = new Option(\n '--debug',\n 'Debug output during command execution. If specified, may or may not produce additional output helpful for troubleshooting.'\n);\n\nexport const curlirizeOption = new Option(\n '--curlirize',\n 'Output all network calls in curl format.'\n);\n\nexport const managedNameOption = new Option(\n '-N, --name <name>',\n 'Managed object name to be operated on. Examples are \\\nuser, role, alpha_user, alpha_role etc.'\n);\nexport const managedNameOptionM = new Option(\n '-N, --name <name>',\n 'Managed object name to be operated on. Examples are \\\nuser, role, alpha_user, alpha_role etc.'\n);\n\nconst dirOptionDescription =\n 'Directory for exporting all configuration entities to.';\nexport const dirOption = new Option(\n '-D, --directory <directory>',\n dirOptionDescription\n);\nexport const dirOptionM = new Option(\n '-D, --directory <directory>',\n dirOptionDescription\n);\n\nconst entitiesFileOptionDescription =\n 'JSON file that specifies the config entities to export/import.';\nexport const entitiesFileOption = new Option(\n '-E, --entitiesFile <file>',\n entitiesFileOptionDescription\n);\nexport const entitiesFileOptionM = new Option(\n '-E, --entitiesFile <file>',\n entitiesFileOptionDescription\n);\n\nconst envFileOptionDescription =\n 'File that defines environment specific variables for replacement during configuration export/import.';\nexport const envFileOption = new Option(\n '-e, --envFile <file>',\n envFileOptionDescription\n);\nexport const envFileOptionM = new Option(\n '-e, --envFile <file>',\n envFileOptionDescription\n);\n\nconst sourcesOptionDescription = 'Comma separated list of log sources';\nconst sourcesOptionDefaultValueDescription = 'Log everything';\nexport const sourcesOptionM = new Option(\n '-c, --sources <sources>',\n sourcesOptionDescription\n).default('am-everything,idm-everything', sourcesOptionDefaultValueDescription);\n\nexport const scriptFriendlyOption = new Option(\n '-s, --scriptFriendly',\n 'Send output of operation to STDOUT in a script-friendly format (JSON) which can be piped to other \\\ncommands. User messages/warnings are output to STDERR, and are not piped. For example, to only get \\\nbearer token: \\n\\\n<<< frodo info my-tenant -s 2>/dev/null | jq -r .bearerToken >>>'\n).default(false, 'Output as plain text');\n\ntreeOptionM.makeOptionMandatory();\nfileOptionM.makeOptionMandatory();\ndeploymentOptionM.makeOptionMandatory();\ndirOptionM.makeOptionMandatory();\nentitiesFileOptionM.makeOptionMandatory();\nenvFileOptionM.makeOptionMandatory();\nmanagedNameOptionM.makeOptionMandatory();\nsourcesOptionM.makeOptionMandatory();\n"],"mappings":"AAAA,SAASA,QAAT,EAAmBC,MAAnB,QAAiC,WAAjC;AACA,SAASC,KAAT,QAAsB,uBAAtB;AACA,OAAO,KAAKC,MAAZ,MAAwB,6BAAxB;AACA,SACEC,YADF,EAEEC,uBAFF,EAGEC,uBAHF,EAIEC,qBAJF,EAKEC,cALF,EAMEC,YANF,EAOEC,gBAPF,QAQO,qBARP;AAUAR,KAAK,CAACS,OAAN,CAAcC,OAAd,CAAsBC,eAAtB,CAAsCT,YAAtC;AACAF,KAAK,CAACS,OAAN,CAAcC,OAAd,CAAsBE,iBAAtB,CAAwCN,cAAxC;AACAN,KAAK,CAACS,OAAN,CAAcC,OAAd,CAAsBG,eAAtB,CAAsCN,YAAtC;AACAP,KAAK,CAACS,OAAN,CAAcC,OAAd,CAAsBI,mBAAtB,CAA0CN,gBAA1C;AACAR,KAAK,CAACS,OAAN,CAAcC,OAAd,CAAsBK,wBAAtB,CAA+CZ,uBAA/C;AACAH,KAAK,CAACS,OAAN,CAAcC,OAAd,CAAsBM,wBAAtB,CAA+CZ,uBAA/C;AACAJ,KAAK,CAACS,OAAN,CAAcC,OAAd,CAAsBO,sBAAtB,CAA6CZ,qBAA7C;AAEA,OAAO,SAASa,IAAT,GAAgB,CACrB;EACA;AACD;AAED,MAAMC,uBAAuB,GAC3B,iIADF;AAEA,OAAO,MAAMC,YAAY,GAAG,IAAItB,QAAJ,CAAa,QAAb,EAAuBqB,uBAAvB,CAArB;AACP,OAAO,MAAME,aAAa,GAAG,IAAIvB,QAAJ,CAAa,QAAb,EAAuBqB,uBAAvB,CAAtB;AAEP,MAAMG,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kBAAkB,GAAG,IAAI1D,MAAJ,CAChC,2BADgC,EAEhCyD,6BAFgC,CAA3B;AAIP,OAAO,MAAME,mBAAmB,GAAG,IAAI3D,MAAJ,CACjC,2BADiC,EAEjCyD,6BAFiC,CAA5B;AAKP,MAAMG,wBAAwB,GAC5B,sGADF;AAEA,OAAO,MAAMC,aAAa,GAAG,IAAI7D,MAAJ,CAC3B,sBAD2B,EAE3B4D,wBAF2B,CAAtB;AAIP,OAAO,MAAME,cAAc,GAAG,IAAI9D,MAAJ,CAC5B,sBAD4B,EAE5B4D,wBAF4B,CAAvB;AAKP,MAAMG,wBAAwB,GAAG,qCAAjC;AACA,MAAMC,oCAAoC,GAAG,gBAA7C;AACA,OAAO,MAAMC,cAAc,GAAG,IAAIjE,MAAJ,CAC5B,yBAD4B,EAE5B+D,wBAF4B,EAG5BrD,OAH4B,CAGpB,8BAHoB,EAGYsD,oCAHZ,CAAvB;AAKP,OAAO,MAAME,oBAAoB,GAAG,IAAIlE,MAAJ,CAClC,sBADkC,EAElC;AACF;AACA;AACA,iEALoC,EAMlCU,OANkC,CAM1B,KAN0B,EAMnB,sBANmB,CAA7B;AAQP6B,WAAW,CAAC4B,mBAAZ;AACAzB,WAAW,CAACyB,mBAAZ;AACApB,iBAAiB,CAACoB,mBAAlB;AACAX,UAAU,CAACW,mBAAX;AACAR,mBAAmB,CAACQ,mBAApB;AACAL,cAAc,CAACK,mBAAf;AACAd,kBAAkB,CAACc,mBAAnB;AACAF,cAAc,CAACE,mBAAf"}
|
|
1
|
+
{"version":3,"file":"cmd_common.js","names":["Argument","Option","state","globalConfig","printMessage","createProgressIndicator","updateProgressIndicator","stopProgressIndicator","verboseMessage","debugMessage","curlirizeMessage","default","session","setPrintHandler","setVerboseHandler","setDebugHandler","setCurlirizeHandler","setCreateProgressHandler","setUpdateProgressHandler","setStopProgressHandler","init","hostArgumentDescription","hostArgument","hostArgumentM","realmArgumentDescription","realmArgument","DEFAULT_REALM_KEY","realmArgumentM","userArgumentDescription","userArgument","userArgumentM","passwordArgumentDescription","passwordArgument","passwordArgumentM","apiKeyArgumentDescription","apiKeyArgument","apiSecretArgumentDescription","apiSecretArgument","treeOptionDescription","treeOption","treeOptionM","fileOptionDescription","fileOption","fileOptionM","deploymentOptionDescription","deploymentOption","choices","DEPLOYMENT_TYPES","deploymentOptionM","insecureOption","verboseOption","debugOption","curlirizeOption","managedNameOption","managedNameOptionM","dirOptionDescription","dirOption","dirOptionM","entitiesFileOptionDescription","entitiesFileOption","entitiesFileOptionM","envFileOptionDescription","envFileOption","envFileOptionM","sourcesOptionDescription","sourcesOptionDefaultValueDescription","sourcesOptionM","scriptFriendlyOption","makeOptionMandatory"],"sources":["cli/cmd_common.ts"],"sourcesContent":["import { Argument, Option } from 'commander';\nimport { state } from '@rockcarver/frodo-lib';\nimport * as globalConfig from '../storage/StaticStorage';\nimport {\n printMessage,\n createProgressIndicator,\n updateProgressIndicator,\n stopProgressIndicator,\n verboseMessage,\n debugMessage,\n curlirizeMessage,\n} from '../utils/Console.js';\n\nstate.default.session.setPrintHandler(printMessage);\nstate.default.session.setVerboseHandler(verboseMessage);\nstate.default.session.setDebugHandler(debugMessage);\nstate.default.session.setCurlirizeHandler(curlirizeMessage);\nstate.default.session.setCreateProgressHandler(createProgressIndicator);\nstate.default.session.setUpdateProgressHandler(updateProgressIndicator);\nstate.default.session.setStopProgressHandler(stopProgressIndicator);\n\nexport function init() {\n // pseudo functions for commands that do not otherwise need to import\n // this file but need to trigger print and progress handler registration\n}\n\nconst hostArgumentDescription =\n 'Access Management base URL, e.g.: https://cdk.iam.example.com/am. To use a connection profile, just specify a unique substring.';\nexport const hostArgument = new Argument('[host]', hostArgumentDescription);\nexport const hostArgumentM = new Argument('<host>', hostArgumentDescription);\n\nconst realmArgumentDescription =\n \"Realm. Specify realm as '/' for the root realm or 'realm' or '/parent/child' otherwise.\";\nexport const realmArgument = new Argument(\n '[realm]',\n realmArgumentDescription\n).default(\n globalConfig.DEFAULT_REALM_KEY,\n '\"alpha\" for Identity Cloud tenants, \"/\" otherwise.'\n);\nexport const realmArgumentM = new Argument('<realm>', realmArgumentDescription);\n\nconst userArgumentDescription =\n 'Username to login with. Must be an admin user with appropriate rights to manage authentication journeys/trees.';\nexport const userArgument = new Argument('[user]', userArgumentDescription);\nexport const userArgumentM = new Argument('<user>', userArgumentDescription);\n\nconst passwordArgumentDescription = 'Password.';\nexport const passwordArgument = new Argument(\n '[password]',\n passwordArgumentDescription\n);\nexport const passwordArgumentM = new Argument(\n '<password>',\n passwordArgumentDescription\n);\n\nconst apiKeyArgumentDescription = 'API key for logging API.';\nexport const apiKeyArgument = new Argument('[key]', apiKeyArgumentDescription);\n\nconst apiSecretArgumentDescription = 'API secret for logging API.';\nexport const apiSecretArgument = new Argument(\n '[secret]',\n apiSecretArgumentDescription\n);\n\nconst treeOptionDescription =\n 'Specify the name of an authentication journey/tree.';\nexport const treeOption = new Option(\n '-t, --tree <tree>',\n treeOptionDescription\n);\nexport const treeOptionM = new Option(\n '-t, --tree <tree>',\n treeOptionDescription\n);\n\nconst fileOptionDescription = 'File name.';\nexport const fileOption = new Option(\n '-f, --file <file>',\n fileOptionDescription\n);\nexport const fileOptionM = new Option(\n '-f, --file <file>',\n fileOptionDescription\n);\n\nconst deploymentOptionDescription =\n 'Override auto-detected deployment type. Valid values for type: \\n\\\nclassic: A classic Access Management-only deployment with custom layout and configuration. \\n\\\ncloud: A ForgeRock Identity Cloud environment. \\n\\\nforgeops: A ForgeOps CDK or CDM deployment. \\n\\\nThe detected or provided deployment type controls certain behavior like obtaining an Identity \\\nManagement admin token or not and whether to export/import referenced email templates or how \\\nto walk through the tenant admin login flow of Identity Cloud and handle MFA';\nexport const deploymentOption = new Option(\n '-m, --type <type>',\n deploymentOptionDescription\n).choices(globalConfig.DEPLOYMENT_TYPES);\nexport const deploymentOptionM = new Option(\n '-m, --type <type>',\n deploymentOptionDescription\n).choices(globalConfig.DEPLOYMENT_TYPES);\n\nexport const insecureOption = new Option(\n '-k, --insecure',\n 'Allow insecure connections when using SSL/TLS. Has no effect when using a network proxy for https (HTTPS_PROXY=http://<host>:<port>), in that case the proxy must provide this capability.'\n).default(false, \"Don't allow insecure connections\");\n\nexport const verboseOption = new Option(\n '--verbose',\n 'Verbose output during command execution. If specified, may or may not produce additional output.'\n);\n\nexport const debugOption = new Option(\n '--debug',\n 'Debug output during command execution. If specified, may or may not produce additional output helpful for troubleshooting.'\n);\n\nexport const curlirizeOption = new Option(\n '--curlirize',\n 'Output all network calls in curl format.'\n);\n\nexport const managedNameOption = new Option(\n '-N, --name <name>',\n 'Managed object name to be operated on. Examples are \\\nuser, role, alpha_user, alpha_role etc.'\n);\nexport const managedNameOptionM = new Option(\n '-N, --name <name>',\n 'Managed object name to be operated on. Examples are \\\nuser, role, alpha_user, alpha_role etc.'\n);\n\nconst dirOptionDescription =\n 'Directory for exporting all configuration entities to.';\nexport const dirOption = new Option(\n '-D, --directory <directory>',\n dirOptionDescription\n);\nexport const dirOptionM = new Option(\n '-D, --directory <directory>',\n dirOptionDescription\n);\n\nconst entitiesFileOptionDescription =\n 'JSON file that specifies the config entities to export/import.';\nexport const entitiesFileOption = new Option(\n '-E, --entitiesFile <file>',\n entitiesFileOptionDescription\n);\nexport const entitiesFileOptionM = new Option(\n '-E, --entitiesFile <file>',\n entitiesFileOptionDescription\n);\n\nconst envFileOptionDescription =\n 'File that defines environment specific variables for replacement during configuration export/import.';\nexport const envFileOption = new Option(\n '-e, --envFile <file>',\n envFileOptionDescription\n);\nexport const envFileOptionM = new Option(\n '-e, --envFile <file>',\n envFileOptionDescription\n);\n\nconst sourcesOptionDescription = 'Comma separated list of log sources';\nconst sourcesOptionDefaultValueDescription = 'Log everything';\nexport const sourcesOptionM = new Option(\n '-c, --sources <sources>',\n sourcesOptionDescription\n).default('am-everything,idm-everything', sourcesOptionDefaultValueDescription);\n\nexport const scriptFriendlyOption = new Option(\n '-s, --scriptFriendly',\n 'Send output of operation to STDOUT in a script-friendly format (JSON) which can be piped to other \\\ncommands. User messages/warnings are output to STDERR, and are not piped. For example, to only get \\\nbearer token: \\n\\\n<<< frodo info my-tenant -s 2>/dev/null | jq -r .bearerToken >>>'\n).default(false, 'Output as plain text');\n\ntreeOptionM.makeOptionMandatory();\nfileOptionM.makeOptionMandatory();\ndeploymentOptionM.makeOptionMandatory();\ndirOptionM.makeOptionMandatory();\nentitiesFileOptionM.makeOptionMandatory();\nenvFileOptionM.makeOptionMandatory();\nmanagedNameOptionM.makeOptionMandatory();\nsourcesOptionM.makeOptionMandatory();\n"],"mappings":"AAAA,SAASA,QAAT,EAAmBC,MAAnB,QAAiC,WAAjC;AACA,SAASC,KAAT,QAAsB,uBAAtB;AACA,OAAO,KAAKC,YAAZ,MAA8B,0BAA9B;AACA,SACEC,YADF,EAEEC,uBAFF,EAGEC,uBAHF,EAIEC,qBAJF,EAKEC,cALF,EAMEC,YANF,EAOEC,gBAPF,QAQO,qBARP;AAUAR,KAAK,CAACS,OAAN,CAAcC,OAAd,CAAsBC,eAAtB,CAAsCT,YAAtC;AACAF,KAAK,CAACS,OAAN,CAAcC,OAAd,CAAsBE,iBAAtB,CAAwCN,cAAxC;AACAN,KAAK,CAACS,OAAN,CAAcC,OAAd,CAAsBG,eAAtB,CAAsCN,YAAtC;AACAP,KAAK,CAACS,OAAN,CAAcC,OAAd,CAAsBI,mBAAtB,CAA0CN,gBAA1C;AACAR,KAAK,CAACS,OAAN,CAAcC,OAAd,CAAsBK,wBAAtB,CAA+CZ,uBAA/C;AACAH,KAAK,CAACS,OAAN,CAAcC,OAAd,CAAsBM,wBAAtB,CAA+CZ,uBAA/C;AACAJ,KAAK,CAACS,OAAN,CAAcC,OAAd,CAAsBO,sBAAtB,CAA6CZ,qBAA7C;AAEA,OAAO,SAASa,IAAT,GAAgB,CACrB;EACA;AACD;AAED,MAAMC,uBAAuB,GAC3B,iIADF;AAEA,OAAO,MAAMC,YAAY,GAAG,IAAItB,QAAJ,CAAa,QAAb,EAAuBqB,uBAAvB,CAAr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AJ,CACxB,6BADwB,EAExBsD,oBAFwB,CAAnB;AAKP,MAAMG,6BAA6B,GACjC,gEADF;AAEA,OAAO,MAAMC,kBAAkB,GAAG,IAAI1D,MAAJ,CAChC,2BADgC,EAEhCyD,6BAFgC,CAA3B;AAIP,OAAO,MAAME,mBAAmB,GAAG,IAAI3D,MAAJ,CACjC,2BADiC,EAEjCyD,6BAFiC,CAA5B;AAKP,MAAMG,wBAAwB,GAC5B,sGADF;AAEA,OAAO,MAAMC,aAAa,GAAG,IAAI7D,MAAJ,CAC3B,sBAD2B,EAE3B4D,wBAF2B,CAAtB;AAIP,OAAO,MAAME,cAAc,GAAG,IAAI9D,MAAJ,CAC5B,sBAD4B,EAE5B4D,wBAF4B,CAAvB;AAKP,MAAMG,wBAAwB,GAAG,qCAAjC;AACA,MAAMC,oCAAoC,GAAG,gBAA7C;AACA,OAAO,MAAMC,cAAc,GAAG,IAAIjE,MAAJ,CAC5B,yBAD4B,EAE5B+D,wBAF4B,EAG5BrD,OAH4B,CAGpB,8BAHoB,EAGYsD,oCAHZ,CAAvB;AAKP,OAAO,MAAME,oBAAoB,GAAG,IAAIlE,MAAJ,CAClC,sBADkC,EAElC;AACF;AACA;AACA,iEALoC,EAMlCU,OANkC,CAM1B,KAN0B,EAMnB,sBANmB,CAA7B;AAQP6B,WAAW,CAAC4B,mBAAZ;AACAzB,WAAW,CAACyB,mBAAZ;AACApB,iBAAiB,CAACoB,mBAAlB;AACAX,UAAU,CAACW,mBAAX;AACAR,mBAAmB,CAACQ,mBAApB;AACAL,cAAc,CAACK,mBAAf;AACAd,kBAAkB,CAACc,mBAAnB;AACAF,cAAc,CAACE,mBAAf"}
|
|
@@ -11,7 +11,7 @@ const {
|
|
|
11
11
|
exportCirclesOfTrustToFiles
|
|
12
12
|
} = CirclesOfTrust;
|
|
13
13
|
const program = new Command('frodo saml cot export');
|
|
14
|
-
program.description('Export SAML circles of trust.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(new Option('-i, --cot-id <cot-id>', 'Circle of trust id/name. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file [file]', 'Name of the export file. Ignored with -A. Defaults to <cot-id>.cot.saml.json.')).addOption(new Option('-a, --all', 'Export all the circles of trust in a realm to a single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Export all the circles of trust in a realm as separate files <cot-id>.cot.saml.json. Ignored with -i, and -a.')).action( // implement command logic inside action handler
|
|
14
|
+
program.description('Export SAML circles of trust.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(common.verboseOption).addOption(common.debugOption).addOption(common.curlirizeOption).addOption(new Option('-i, --cot-id <cot-id>', 'Circle of trust id/name. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file [file]', 'Name of the export file. Ignored with -A. Defaults to <cot-id>.cot.saml.json.')).addOption(new Option('-a, --all', 'Export all the circles of trust in a realm to a single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Export all the circles of trust in a realm as separate files <cot-id>.cot.saml.json. Ignored with -i, and -a.')).action( // implement command logic inside action handler
|
|
15
15
|
async (host, realm, user, password, options) => {
|
|
16
16
|
state.default.session.setTenant(host);
|
|
17
17
|
state.default.session.setRealm(realm);
|
|
@@ -19,6 +19,9 @@ async (host, realm, user, password, options) => {
|
|
|
19
19
|
state.default.session.setPassword(password);
|
|
20
20
|
state.default.session.setDeploymentType(options.type);
|
|
21
21
|
state.default.session.setAllowInsecureConnection(options.insecure);
|
|
22
|
+
state.default.session.setVerbose(options.verbose);
|
|
23
|
+
state.default.session.setDebug(options.debug);
|
|
24
|
+
state.default.session.setCurlirize(options.curlirize);
|
|
22
25
|
|
|
23
26
|
if (await getTokens()) {
|
|
24
27
|
// export by id/name
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"saml-cot-export.js","names":["Command","Option","Authenticate","CirclesOfTrust","state","common","printMessage","getTokens","exportCircleOfTrust","exportCirclesOfTrustToFile","exportCirclesOfTrustToFiles","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","cotId","getRealm","file","all","allSeparate","help","parse"],"sources":["cli/saml/saml-cot-export.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, CirclesOfTrust, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common';\nimport { printMessage } from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\nconst {\n exportCircleOfTrust,\n exportCirclesOfTrustToFile,\n exportCirclesOfTrustToFiles,\n} = CirclesOfTrust;\n\nconst program = new Command('frodo saml cot export');\n\nprogram\n .description('Export SAML circles of trust.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(\n new Option(\n '-i, --cot-id <cot-id>',\n 'Circle of trust id/name. If specified, -a and -A are ignored.'\n )\n )\n .addOption(\n new Option(\n '-f, --file [file]',\n 'Name of the export file. Ignored with -A. Defaults to <cot-id>.cot.saml.json.'\n )\n )\n .addOption(\n new Option(\n '-a, --all',\n 'Export all the circles of trust in a realm to a single file. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Export all the circles of trust in a realm as separate files <cot-id>.cot.saml.json. Ignored with -i, and -a.'\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n if (await getTokens()) {\n // export by id/name\n if (options.cotId) {\n printMessage(\n `Exporting circle of trust \"${\n options.cotId\n }\" from realm \"${state.default.session.getRealm()}\"...`\n );\n exportCircleOfTrust(options.cotId, options.file);\n }\n // --all -a\n else if (options.all) {\n printMessage('Exporting all circles of trust to a single file...');\n exportCirclesOfTrustToFile(options.file);\n }\n // --all-separate -A\n else if (options.allSeparate) {\n printMessage('Exporting all circles of trust to separate files...');\n exportCirclesOfTrustToFiles();\n }\n // unrecognized combination of options or no options\n else {\n printMessage(\n 'Unrecognized combination of options or no options...',\n 'error'\n );\n program.help();\n }\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,EAAkBC,MAAlB,QAAgC,WAAhC;AACA,SAASC,YAAT,EAAuBC,cAAvB,EAAuCC,KAAvC,QAAoD,uBAApD;AACA,OAAO,KAAKC,MAAZ,MAAwB,eAAxB;AACA,SAASC,YAAT,QAA6B,qBAA7B;AAEA,MAAM;EAAEC;AAAF,IAAgBL,YAAtB;AACA,MAAM;EACJM,mBADI;EAEJC,0BAFI;EAGJC;AAHI,IAIFP,cAJJ;AAMA,MAAMQ,OAAO,GAAG,IAAIX,OAAJ,CAAY,uBAAZ,CAAhB;AAEAW,OAAO,CACJC,WADH,CACe,+BADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIeV,MAAM,CAACW,aAJtB,EAKGD,WALH,CAKeV,MAAM,CAACY,aALtB,EAMGF,WANH,CAMeV,MAAM,CAACa,YANtB,EAOGH,WAPH,CAOeV,MAAM,CAACc,gBAPtB,EAQGC,SARH,CAQaf,MAAM,CAACgB,gBARpB,EASGD,SATH,CASaf,MAAM,CAACiB,cATpB,EAUGF,SAVH,
|
|
1
|
+
{"version":3,"file":"saml-cot-export.js","names":["Command","Option","Authenticate","CirclesOfTrust","state","common","printMessage","getTokens","exportCircleOfTrust","exportCirclesOfTrustToFile","exportCirclesOfTrustToFiles","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","verboseOption","debugOption","curlirizeOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","setVerbose","verbose","setDebug","debug","setCurlirize","curlirize","cotId","getRealm","file","all","allSeparate","help","parse"],"sources":["cli/saml/saml-cot-export.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, CirclesOfTrust, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common';\nimport { printMessage } from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\nconst {\n exportCircleOfTrust,\n exportCirclesOfTrustToFile,\n exportCirclesOfTrustToFiles,\n} = CirclesOfTrust;\n\nconst program = new Command('frodo saml cot export');\n\nprogram\n .description('Export SAML circles of trust.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(common.verboseOption)\n .addOption(common.debugOption)\n .addOption(common.curlirizeOption)\n .addOption(\n new Option(\n '-i, --cot-id <cot-id>',\n 'Circle of trust id/name. If specified, -a and -A are ignored.'\n )\n )\n .addOption(\n new Option(\n '-f, --file [file]',\n 'Name of the export file. Ignored with -A. Defaults to <cot-id>.cot.saml.json.'\n )\n )\n .addOption(\n new Option(\n '-a, --all',\n 'Export all the circles of trust in a realm to a single file. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Export all the circles of trust in a realm as separate files <cot-id>.cot.saml.json. Ignored with -i, and -a.'\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n state.default.session.setVerbose(options.verbose);\n state.default.session.setDebug(options.debug);\n state.default.session.setCurlirize(options.curlirize);\n if (await getTokens()) {\n // export by id/name\n if (options.cotId) {\n printMessage(\n `Exporting circle of trust \"${\n options.cotId\n }\" from realm \"${state.default.session.getRealm()}\"...`\n );\n exportCircleOfTrust(options.cotId, options.file);\n }\n // --all -a\n else if (options.all) {\n printMessage('Exporting all circles of trust to a single file...');\n exportCirclesOfTrustToFile(options.file);\n }\n // --all-separate -A\n else if (options.allSeparate) {\n printMessage('Exporting all circles of trust to separate files...');\n exportCirclesOfTrustToFiles();\n }\n // unrecognized combination of options or no options\n else {\n printMessage(\n 'Unrecognized combination of options or no options...',\n 'error'\n );\n program.help();\n }\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,EAAkBC,MAAlB,QAAgC,WAAhC;AACA,SAASC,YAAT,EAAuBC,cAAvB,EAAuCC,KAAvC,QAAoD,uBAApD;AACA,OAAO,KAAKC,MAAZ,MAAwB,eAAxB;AACA,SAASC,YAAT,QAA6B,qBAA7B;AAEA,MAAM;EAAEC;AAAF,IAAgBL,YAAtB;AACA,MAAM;EACJM,mBADI;EAEJC,0BAFI;EAGJC;AAHI,IAIFP,cAJJ;AAMA,MAAMQ,OAAO,GAAG,IAAIX,OAAJ,CAAY,uBAAZ,CAAhB;AAEAW,OAAO,CACJC,WADH,CACe,+BADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIeV,MAAM,CAACW,aAJtB,EAKGD,WALH,CAKeV,MAAM,CAACY,aALtB,EAMGF,WANH,CAMeV,MAAM,CAACa,YANtB,EAOGH,WAPH,CAOeV,MAAM,CAACc,gBAPtB,EAQGC,SARH,CAQaf,MAAM,C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Ba,YAAtB,CAAmCf,OAAO,CAACgB,SAA3C;;EACA,IAAI,MAAMxC,SAAS,EAAnB,EAAuB;IACrB;IACA,IAAIwB,OAAO,CAACiB,KAAZ,EAAmB;MACjB1C,YAAY,CACT,8BACCyB,OAAO,CAACiB,KACT,iBAAgB5C,KAAK,CAAC4B,OAAN,CAAcC,OAAd,CAAsBgB,QAAtB,EAAiC,MAHxC,CAAZ;MAKAzC,mBAAmB,CAACuB,OAAO,CAACiB,KAAT,EAAgBjB,OAAO,CAACmB,IAAxB,CAAnB;IACD,CAPD,CAQA;IARA,KASK,IAAInB,OAAO,CAACoB,GAAZ,EAAiB;MACpB7C,YAAY,CAAC,oDAAD,CAAZ;MACAG,0BAA0B,CAACsB,OAAO,CAACmB,IAAT,CAA1B;IACD,CAHI,CAIL;IAJK,KAKA,IAAInB,OAAO,CAACqB,WAAZ,EAAyB;MAC5B9C,YAAY,CAAC,qDAAD,CAAZ;MACAI,2BAA2B;IAC5B,CAHI,CAIL;IAJK,KAKA;MACHJ,YAAY,CACV,sDADU,EAEV,OAFU,CAAZ;MAIAK,OAAO,CAAC0C,IAAR;IACD;EACF;AACF,CA9EL,CA+EI;AA/EJ;AAkFA1C,OAAO,CAAC2C,KAAR"}
|
|
@@ -12,7 +12,7 @@ const {
|
|
|
12
12
|
importFirstCircleOfTrust
|
|
13
13
|
} = CirclesOfTrust;
|
|
14
14
|
const program = new Command('frodo saml cot import');
|
|
15
|
-
program.description('Import SAML circles of trust.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(new Option('-i, --cot-id <cot-id>', 'Circle of trust id. If specified, only one circle of trust is imported and the options -a and -A are ignored.')).addOption(new Option('-f, --file <file>', 'Name of the file to import the circle(s) of trust from.')).addOption(new Option('-a, --all', 'Import all circles of trust from single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Import all circles of trust from separate files (*.cot.saml.json) in the current directory. Ignored with -i or -a.')).action( // implement program logic inside action handler
|
|
15
|
+
program.description('Import SAML circles of trust.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(common.verboseOption).addOption(common.debugOption).addOption(common.curlirizeOption).addOption(new Option('-i, --cot-id <cot-id>', 'Circle of trust id. If specified, only one circle of trust is imported and the options -a and -A are ignored.')).addOption(new Option('-f, --file <file>', 'Name of the file to import the circle(s) of trust from.')).addOption(new Option('-a, --all', 'Import all circles of trust from single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Import all circles of trust from separate files (*.cot.saml.json) in the current directory. Ignored with -i or -a.')).action( // implement program logic inside action handler
|
|
16
16
|
async (host, realm, user, password, options) => {
|
|
17
17
|
state.default.session.setTenant(host);
|
|
18
18
|
state.default.session.setRealm(realm);
|
|
@@ -20,6 +20,9 @@ async (host, realm, user, password, options) => {
|
|
|
20
20
|
state.default.session.setPassword(password);
|
|
21
21
|
state.default.session.setDeploymentType(options.type);
|
|
22
22
|
state.default.session.setAllowInsecureConnection(options.insecure);
|
|
23
|
+
state.default.session.setVerbose(options.verbose);
|
|
24
|
+
state.default.session.setDebug(options.debug);
|
|
25
|
+
state.default.session.setCurlirize(options.curlirize);
|
|
23
26
|
|
|
24
27
|
if (await getTokens()) {
|
|
25
28
|
// import by id
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"saml-cot-import.js","names":["Command","Option","Authenticate","CirclesOfTrust","state","common","printMessage","getTokens","importCircleOfTrust","importCirclesOfTrustFromFile","importCirclesOfTrustFromFiles","importFirstCircleOfTrust","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","file","cotId","getRealm","all","allSeparate","help","parse"],"sources":["cli/saml/saml-cot-import.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, CirclesOfTrust, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common';\nimport { printMessage } from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\nconst {\n importCircleOfTrust,\n importCirclesOfTrustFromFile,\n importCirclesOfTrustFromFiles,\n importFirstCircleOfTrust,\n} = CirclesOfTrust;\n\nconst program = new Command('frodo saml cot import');\n\nprogram\n .description('Import SAML circles of trust.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(\n new Option(\n '-i, --cot-id <cot-id>',\n 'Circle of trust id. If specified, only one circle of trust is imported and the options -a and -A are ignored.'\n )\n )\n .addOption(\n new Option(\n '-f, --file <file>',\n 'Name of the file to import the circle(s) of trust from.'\n )\n )\n .addOption(\n new Option(\n '-a, --all',\n 'Import all circles of trust from single file. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Import all circles of trust from separate files (*.cot.saml.json) in the current directory. Ignored with -i or -a.'\n )\n )\n .action(\n // implement program logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n if (await getTokens()) {\n // import by id\n if (options.file && options.cotId) {\n printMessage(\n `Importing circle of trust \"${\n options.cotId\n }\" into realm \"${state.default.session.getRealm()}\"...`\n );\n importCircleOfTrust(options.cotId, options.file);\n }\n // --all -a\n else if (options.all && options.file) {\n printMessage(\n `Importing all circles of trust from a single file (${options.file})...`\n );\n importCirclesOfTrustFromFile(options.file);\n }\n // --all-separate -A\n else if (options.allSeparate && !options.file) {\n printMessage(\n 'Importing all circles of trust from separate files (*.saml.json) in current directory...'\n );\n importCirclesOfTrustFromFiles();\n }\n // import first provider from file\n else if (options.file) {\n printMessage(\n `Importing first circle of trust from file \"${\n options.file\n }\" into realm \"${state.default.session.getRealm()}\"...`\n );\n importFirstCircleOfTrust(options.file);\n }\n // unrecognized combination of options or no options\n else {\n printMessage('Unrecognized combination of options or no options...');\n program.help();\n }\n }\n }\n // end program logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,EAAkBC,MAAlB,QAAgC,WAAhC;AACA,SAASC,YAAT,EAAuBC,cAAvB,EAAuCC,KAAvC,QAAoD,uBAApD;AACA,OAAO,KAAKC,MAAZ,MAAwB,eAAxB;AACA,SAASC,YAAT,QAA6B,qBAA7B;AAEA,MAAM;EAAEC;AAAF,IAAgBL,YAAtB;AACA,MAAM;EACJM,mBADI;EAEJC,4BAFI;EAGJC,6BAHI;EAIJC;AAJI,IAKFR,cALJ;AAOA,MAAMS,OAAO,GAAG,IAAIZ,OAAJ,CAAY,uBAAZ,CAAhB;AAEAY,OAAO,CACJC,WADH,CACe,+BADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIeX,MAAM,CAACY,aAJtB,EAKGD,WALH,CAKeX,MAAM,CAACa,aALtB,EAMGF,WANH,CAMeX,MAAM,CAACc,YANtB,EAOGH,WAPH,CAOeX,MAAM,CAACe,gBAPtB,EAQGC,SARH,CAQahB,MAAM,CAACiB,gBARpB,EASGD,SATH,CASahB,MAAM,CAACkB,cATpB,EAUGF,SAVH,
|
|
1
|
+
{"version":3,"file":"saml-cot-import.js","names":["Command","Option","Authenticate","CirclesOfTrust","state","common","printMessage","getTokens","importCircleOfTrust","importCirclesOfTrustFromFile","importCirclesOfTrustFromFiles","importFirstCircleOfTrust","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","verboseOption","debugOption","curlirizeOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","setVerbose","verbose","setDebug","debug","setCurlirize","curlirize","file","cotId","getRealm","all","allSeparate","help","parse"],"sources":["cli/saml/saml-cot-import.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, CirclesOfTrust, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common';\nimport { printMessage } from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\nconst {\n importCircleOfTrust,\n importCirclesOfTrustFromFile,\n importCirclesOfTrustFromFiles,\n importFirstCircleOfTrust,\n} = CirclesOfTrust;\n\nconst program = new Command('frodo saml cot import');\n\nprogram\n .description('Import SAML circles of trust.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(common.verboseOption)\n .addOption(common.debugOption)\n .addOption(common.curlirizeOption)\n .addOption(\n new Option(\n '-i, --cot-id <cot-id>',\n 'Circle of trust id. If specified, only one circle of trust is imported and the options -a and -A are ignored.'\n )\n )\n .addOption(\n new Option(\n '-f, --file <file>',\n 'Name of the file to import the circle(s) of trust from.'\n )\n )\n .addOption(\n new Option(\n '-a, --all',\n 'Import all circles of trust from single file. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Import all circles of trust from separate files (*.cot.saml.json) in the current directory. Ignored with -i or -a.'\n )\n )\n .action(\n // implement program logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n state.default.session.setVerbose(options.verbose);\n state.default.session.setDebug(options.debug);\n state.default.session.setCurlirize(options.curlirize);\n if (await getTokens()) {\n // import by id\n if (options.file && options.cotId) {\n printMessage(\n `Importing circle of trust \"${\n options.cotId\n }\" into realm \"${state.default.session.getRealm()}\"...`\n );\n importCircleOfTrust(options.cotId, options.file);\n }\n // --all -a\n else if (options.all && options.file) {\n printMessage(\n `Importing all circles of trust from a single file (${options.file})...`\n );\n importCirclesOfTrustFromFile(options.file);\n }\n // --all-separate -A\n else if (options.allSeparate && !options.file) {\n printMessage(\n 'Importing all circles of trust from separate files (*.saml.json) in current directory...'\n );\n importCirclesOfTrustFromFiles();\n }\n // import first provider from file\n else if (options.file) {\n printMessage(\n `Importing first circle of trust from file \"${\n options.file\n }\" into realm \"${state.default.session.getRealm()}\"...`\n );\n importFirstCircleOfTrust(options.file);\n }\n // unrecognized combination of options or no options\n else {\n printMessage('Unrecognized combination of options or no options...');\n program.help();\n }\n }\n }\n // end program logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,EAAkBC,MAAlB,QAAgC,WAAhC;AACA,SAASC,YAAT,EAAuBC,cAAvB,EAAuCC,KAAvC,QAAoD,uBAApD;AACA,OAAO,KAAKC,MAAZ,MAAwB,eAAxB;AACA,SAASC,YAAT,QAA6B,qBAA7B;AAEA,MAAM;EAAEC;AAAF,IAAgBL,YAAtB;AACA,MAAM;EACJM,mBADI;EAEJC,4BAFI;EAGJC,6BAHI;EAIJC;AAJI,IAKFR,cALJ;AAOA,MAAMS,OAAO,GAAG,IAAIZ,OAAJ,CAAY,uBAAZ,CAAhB;AAEAY,OAAO,CACJC,WADH,CACe,+BADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIeX,MAAM,CAACY,aAJtB,EAKGD,WALH,CAKeX,MAAM,CAACa,aALtB,EAMGF,WANH,CAMeX,MAAM,CAACc,YANtB,EAOGH,WAPH,CAOeX,MAAM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OfTrust;
|
|
11
11
|
const program = new Command('frodo saml cot list');
|
|
12
|
-
program.description('List SAML circles of trust.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(new Option('-l, --long', 'Long with all fields.').default(false, 'false')).action( // implement command logic inside action handler
|
|
12
|
+
program.description('List SAML circles of trust.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(common.verboseOption).addOption(common.debugOption).addOption(common.curlirizeOption).addOption(new Option('-l, --long', 'Long with all fields.').default(false, 'false')).action( // implement command logic inside action handler
|
|
13
13
|
async (host, realm, user, password, options) => {
|
|
14
14
|
state.default.session.setTenant(host);
|
|
15
15
|
state.default.session.setRealm(realm);
|
|
@@ -17,6 +17,9 @@ async (host, realm, user, password, options) => {
|
|
|
17
17
|
state.default.session.setPassword(password);
|
|
18
18
|
state.default.session.setDeploymentType(options.type);
|
|
19
19
|
state.default.session.setAllowInsecureConnection(options.insecure);
|
|
20
|
+
state.default.session.setVerbose(options.verbose);
|
|
21
|
+
state.default.session.setDebug(options.debug);
|
|
22
|
+
state.default.session.setCurlirize(options.curlirize);
|
|
20
23
|
|
|
21
24
|
if (await getTokens()) {
|
|
22
25
|
printMessage(`Listing SAML circles of trust in realm "${state.default.session.getRealm()}"...`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"saml-cot-list.js","names":["Command","Option","Authenticate","CirclesOfTrust","state","common","printMessage","getTokens","listCirclesOfTrust","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","default","action","host","realm","user","password","options","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","getRealm","long","parse"],"sources":["cli/saml/saml-cot-list.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, CirclesOfTrust, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common';\nimport { printMessage } from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\nconst { listCirclesOfTrust } = CirclesOfTrust;\n\nconst program = new Command('frodo saml cot list');\n\nprogram\n .description('List SAML circles of trust.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(\n new Option('-l, --long', 'Long with all fields.').default(false, 'false')\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n if (await getTokens()) {\n printMessage(\n `Listing SAML circles of trust in realm \"${state.default.session.getRealm()}\"...`\n );\n listCirclesOfTrust(options.long);\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,EAAkBC,MAAlB,QAAgC,WAAhC;AACA,SAASC,YAAT,EAAuBC,cAAvB,EAAuCC,KAAvC,QAAoD,uBAApD;AACA,OAAO,KAAKC,MAAZ,MAAwB,eAAxB;AACA,SAASC,YAAT,QAA6B,qBAA7B;AAEA,MAAM;EAAEC;AAAF,IAAgBL,YAAtB;AACA,MAAM;EAAEM;AAAF,IAAyBL,cAA/B;AAEA,MAAMM,OAAO,GAAG,IAAIT,OAAJ,CAAY,qBAAZ,CAAhB;AAEAS,OAAO,CACJC,WADH,CACe,6BADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIeR,MAAM,CAACS,aAJtB,EAKGD,WALH,CAKeR,MAAM,CAACU,aALtB,EAMGF,WANH,CAMeR,MAAM,CAACW,YANtB,EAOGH,WAPH,CAOeR,MAAM,CAACY,gBAPtB,EAQGC,SARH,CAQab,MAAM,CAACc,gBARpB,EASGD,SATH,CASab,MAAM,CAACe,cATpB,EAUGF,SAVH,
|
|
1
|
+
{"version":3,"file":"saml-cot-list.js","names":["Command","Option","Authenticate","CirclesOfTrust","state","common","printMessage","getTokens","listCirclesOfTrust","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","verboseOption","debugOption","curlirizeOption","default","action","host","realm","user","password","options","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","setVerbose","verbose","setDebug","debug","setCurlirize","curlirize","getRealm","long","parse"],"sources":["cli/saml/saml-cot-list.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, CirclesOfTrust, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common';\nimport { printMessage } from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\nconst { listCirclesOfTrust } = CirclesOfTrust;\n\nconst program = new Command('frodo saml cot list');\n\nprogram\n .description('List SAML circles of trust.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(common.verboseOption)\n .addOption(common.debugOption)\n .addOption(common.curlirizeOption)\n .addOption(\n new Option('-l, --long', 'Long with all fields.').default(false, 'false')\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n state.default.session.setVerbose(options.verbose);\n state.default.session.setDebug(options.debug);\n state.default.session.setCurlirize(options.curlirize);\n if (await getTokens()) {\n printMessage(\n `Listing SAML circles of trust in realm \"${state.default.session.getRealm()}\"...`\n );\n listCirclesOfTrust(options.long);\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,EAAkBC,MAAlB,QAAgC,WAAhC;AACA,SAASC,YAAT,EAAuBC,cAAvB,EAAuCC,KAAvC,QAAoD,uBAApD;AACA,OAAO,KAAKC,MAAZ,MAAwB,eAAxB;AACA,SAASC,YAAT,QAA6B,qBAA7B;AAEA,MAAM;EAAEC;AAAF,IAAgBL,YAAtB;AACA,MAAM;EAAEM;AAAF,IAAyBL,cAA/B;AAEA,MAAMM,OAAO,GAAG,IAAIT,OAAJ,CAAY,qBAAZ,CAAhB;AAEAS,OAAO,CACJC,WADH,CACe,6BADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIeR,MAAM,CAACS,aAJtB,EAKGD,WALH,CAKeR,MAAM,CAACU,aALtB,EAMGF,WANH,CAMeR,MAAM,CAACW,YANtB,EAOGH,WAPH,CAOeR,MAAM,CAACY,gBAPtB,EAQGC,SARH,CAQab,MAAM,CAACc,gBARpB,EASGD,SATH,CASab,MAAM,CAACe,cATpB,EAUGF,SAVH,CAUab,MAAM,CAACgB,aAVpB,EAWGH,SAXH,CAWab,MAAM,CAACiB,WAXpB,EAYGJ,SAZH,CAYab,MAAM,CAACkB,eAZpB,EAaGL,SAbH,CAcI,IAAIjB,MAAJ,CAAW,YAAX,EAAyB,uBAAzB,EAAkDuB,OAAlD,CAA0D,KAA1D,EAAiE,OAAjE,CAdJ,EAgBGC,MAhBH,EAiBI;AACA,OAAOC,IAAP,EAAaC,KAAb,EAAoBC,IAApB,EAA0BC,QAA1B,EAAoCC,OAApC,KAAgD;EAC9C1B,KAAK,CAACoB,OAAN,CAAcO,OAAd,CAAsBC,SAAtB,CAAgCN,IAAhC;EACAtB,KAAK,CAACoB,OAAN,CAAcO,OAAd,CAAsBE,QAAtB,CAA+BN,KAA/B;EACAvB,KAAK,CAACoB,OAAN,CAAcO,OAAd,CAAsBG,WAAtB,CAAkCN,IAAlC;EACAxB,KAAK,CAACoB,OAAN,CAAcO,OAAd,CAAsBI,WAAtB,CAAkCN,QAAlC;EACAzB,KAAK,CAACoB,OAAN,CAAcO,OAAd,CAAsBK,iBAAtB,CAAwCN,OAAO,CAACO,IAAhD;EACAjC,KAAK,CAACoB,OAAN,CAAcO,OAAd,CAAsBO,0BAAtB,CAAiDR,OAAO,CAACS,QAAzD;EACAnC,KAAK,CAACoB,OAAN,CAAcO,OAAd,CAAsBS,UAAtB,CAAiCV,OAAO,CAACW,OAAzC;EACArC,KAAK,CAACoB,OAAN,CAAcO,OAAd,CAAsBW,QAAtB,CAA+BZ,OAAO,CAACa,KAAvC;EACAvC,KAAK,CAACoB,OAAN,CAAcO,OAAd,CAAsBa,YAAtB,CAAmCd,OAAO,CAACe,SAA3C;;EACA,IAAI,MAAMtC,SAAS,EAAnB,EAAuB;IACrBD,YAAY,CACT,2CAA0CF,KAAK,CAACoB,OAAN,CAAcO,OAAd,CAAsBe,QAAtB,EAAiC,MADlE,CAAZ;IAGAtC,kBAAkB,CAACsB,OAAO,CAACiB,IAAT,CAAlB;EACD;AACF,CAlCL,CAmCI;AAnCJ;AAsCAtC,OAAO,CAACuC,KAAR"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Authenticate, Saml2, state } from '@rockcarver/frodo-lib';
|
|
2
|
+
import { Command, Option } from 'commander';
|
|
3
|
+
import { printMessage, verboseMessage } from '../../utils/Console.js';
|
|
4
|
+
import * as common from '../cmd_common.js';
|
|
5
|
+
const {
|
|
6
|
+
getTokens
|
|
7
|
+
} = Authenticate;
|
|
8
|
+
const {
|
|
9
|
+
deleteSaml2Provider,
|
|
10
|
+
deleteSaml2Providers
|
|
11
|
+
} = Saml2;
|
|
12
|
+
const program = new Command('frodo saml delete');
|
|
13
|
+
program.description('Delete SAML entity providers.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(common.verboseOption).addOption(common.debugOption).addOption(common.curlirizeOption).addOption(new Option('-i, --entity-id <entity-id>', 'Entity id. If specified, -a is ignored.')).addOption(new Option('-a, --all', 'Delete all entity providers. Ignored with -i.')).action( // implement command logic inside action handler
|
|
14
|
+
async (host, realm, user, password, options) => {
|
|
15
|
+
state.default.session.setTenant(host);
|
|
16
|
+
state.default.session.setRealm(realm);
|
|
17
|
+
state.default.session.setUsername(user);
|
|
18
|
+
state.default.session.setPassword(password);
|
|
19
|
+
state.default.session.setDeploymentType(options.type);
|
|
20
|
+
state.default.session.setAllowInsecureConnection(options.insecure);
|
|
21
|
+
state.default.session.setVerbose(options.verbose);
|
|
22
|
+
state.default.session.setDebug(options.debug);
|
|
23
|
+
state.default.session.setCurlirize(options.curlirize); // -i / --entity-id
|
|
24
|
+
|
|
25
|
+
if (options.entityId && (await getTokens())) {
|
|
26
|
+
verboseMessage(`Deleting entity provider '${options.entityId}'...`);
|
|
27
|
+
await deleteSaml2Provider(options.entityId);
|
|
28
|
+
} // -a / --all
|
|
29
|
+
else if (options.all && (await getTokens())) {
|
|
30
|
+
verboseMessage(`Deleting all entity providers...`);
|
|
31
|
+
await deleteSaml2Providers();
|
|
32
|
+
} // unrecognized combination of options or no options
|
|
33
|
+
else {
|
|
34
|
+
printMessage('Unrecognized combination of options or no options...', 'error');
|
|
35
|
+
program.help();
|
|
36
|
+
}
|
|
37
|
+
} // end command logic inside action handler
|
|
38
|
+
);
|
|
39
|
+
program.parse();
|
|
40
|
+
//# sourceMappingURL=saml-delete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"saml-delete.js","names":["Authenticate","Saml2","state","Command","Option","printMessage","verboseMessage","common","getTokens","deleteSaml2Provider","deleteSaml2Providers","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","verboseOption","debugOption","curlirizeOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","setVerbose","verbose","setDebug","debug","setCurlirize","curlirize","entityId","all","help","parse"],"sources":["cli/saml/saml-delete.ts"],"sourcesContent":["import { Authenticate, Saml2, state } from '@rockcarver/frodo-lib';\nimport { Command, Option } from 'commander';\nimport { printMessage, verboseMessage } from '../../utils/Console.js';\nimport * as common from '../cmd_common.js';\n\nconst { getTokens } = Authenticate;\nconst { deleteSaml2Provider, deleteSaml2Providers } = Saml2;\n\nconst program = new Command('frodo saml delete');\n\nprogram\n .description('Delete SAML entity providers.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(common.verboseOption)\n .addOption(common.debugOption)\n .addOption(common.curlirizeOption)\n .addOption(\n new Option(\n '-i, --entity-id <entity-id>',\n 'Entity id. If specified, -a is ignored.'\n )\n )\n .addOption(\n new Option('-a, --all', 'Delete all entity providers. Ignored with -i.')\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n state.default.session.setVerbose(options.verbose);\n state.default.session.setDebug(options.debug);\n state.default.session.setCurlirize(options.curlirize);\n // -i / --entity-id\n if (options.entityId && (await getTokens())) {\n verboseMessage(`Deleting entity provider '${options.entityId}'...`);\n await deleteSaml2Provider(options.entityId);\n }\n // -a / --all\n else if (options.all && (await getTokens())) {\n verboseMessage(`Deleting all entity providers...`);\n await deleteSaml2Providers();\n }\n // unrecognized combination of options or no options\n else {\n printMessage(\n 'Unrecognized combination of options or no options...',\n 'error'\n );\n program.help();\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,YAAT,EAAuBC,KAAvB,EAA8BC,KAA9B,QAA2C,uBAA3C;AACA,SAASC,OAAT,EAAkBC,MAAlB,QAAgC,WAAhC;AACA,SAASC,YAAT,EAAuBC,cAAvB,QAA6C,wBAA7C;AACA,OAAO,KAAKC,MAAZ,MAAwB,kBAAxB;AAEA,MAAM;EAAEC;AAAF,IAAgBR,YAAtB;AACA,MAAM;EAAES,mBAAF;EAAuBC;AAAvB,IAAgDT,KAAtD;AAEA,MAAMU,OAAO,GAAG,IAAIR,OAAJ,CAAY,mBAAZ,CAAhB;AAEAQ,OAAO,CACJC,WADH,CACe,+BADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIeR,MAAM,CAACS,aAJtB,EAKGD,WALH,CAKeR,MAAM,CAACU,aALtB,EAMGF,WANH,CAMeR,MAAM,CAACW,YANtB,EAOGH,WAPH,CAOeR,MAAM,CAACY,gBAPtB,EAQGC,SARH,CAQab,MAAM,CAACc,gBARpB,EASGD,SATH,CASab,MAAM,CAACe,cATpB,EAUGF,SAVH,CAUab,MAAM,CAACgB,aAVpB,EAWGH,SAXH,CAWab,MAAM,CAACiB,WAXpB,EAYGJ,SAZH,CAYab,MAAM,CAACkB,eAZpB,EAaGL,SAbH,CAcI,IAAIhB,MAAJ,CACE,6BADF,EAEE,yCAFF,CAdJ,EAmBGgB,SAnBH,CAoBI,IAAIhB,MAAJ,CAAW,WAAX,EAAwB,+CAAxB,CApBJ,EAsBGsB,MAtBH,EAuBI;AACA,OAAOC,IAAP,EAAaC,KAAb,EAAoBC,IAApB,EAA0BC,QAA1B,EAAoCC,OAApC,KAAgD;EAC9C7B,KAAK,CAA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@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { Command, Option } from 'commander';
|
|
2
|
-
import { Authenticate,
|
|
2
|
+
import { Authenticate, state } from '@rockcarver/frodo-lib';
|
|
3
3
|
import * as common from '../cmd_common';
|
|
4
4
|
import { printMessage } from '../../utils/Console';
|
|
5
|
+
import { describeSaml2Provider } from '../../ops/Saml2Ops';
|
|
5
6
|
const {
|
|
6
7
|
getTokens
|
|
7
8
|
} = Authenticate;
|
|
8
|
-
const {
|
|
9
|
-
describeSaml2Provider
|
|
10
|
-
} = Saml2;
|
|
11
9
|
const program = new Command('frodo saml describe');
|
|
12
|
-
program.description('Describe the configuration of an entity provider.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(new Option('-i, --entity-id <entity-id>', 'Entity id.')).action( // implement command logic inside action handler
|
|
10
|
+
program.description('Describe the configuration of an entity provider.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(common.verboseOption).addOption(common.debugOption).addOption(common.curlirizeOption).addOption(new Option('-i, --entity-id <entity-id>', 'Entity id.')).action( // implement command logic inside action handler
|
|
13
11
|
async (host, realm, user, password, options) => {
|
|
14
12
|
state.default.session.setTenant(host);
|
|
15
13
|
state.default.session.setRealm(realm);
|
|
@@ -17,6 +15,9 @@ async (host, realm, user, password, options) => {
|
|
|
17
15
|
state.default.session.setPassword(password);
|
|
18
16
|
state.default.session.setDeploymentType(options.type);
|
|
19
17
|
state.default.session.setAllowInsecureConnection(options.insecure);
|
|
18
|
+
state.default.session.setVerbose(options.verbose);
|
|
19
|
+
state.default.session.setDebug(options.debug);
|
|
20
|
+
state.default.session.setCurlirize(options.curlirize);
|
|
20
21
|
|
|
21
22
|
if (await getTokens()) {
|
|
22
23
|
printMessage(`Describing SAML entity provider ${options.entityId} in realm "${state.default.session.getRealm()}"...`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"saml-describe.js","names":["Command","Option","Authenticate","
|
|
1
|
+
{"version":3,"file":"saml-describe.js","names":["Command","Option","Authenticate","state","common","printMessage","describeSaml2Provider","getTokens","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","verboseOption","debugOption","curlirizeOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","setVerbose","verbose","setDebug","debug","setCurlirize","curlirize","entityId","getRealm","parse"],"sources":["cli/saml/saml-describe.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common';\nimport { printMessage } from '../../utils/Console';\nimport { describeSaml2Provider } from '../../ops/Saml2Ops';\n\nconst { getTokens } = Authenticate;\n\nconst program = new Command('frodo saml describe');\n\nprogram\n .description('Describe the configuration of an entity provider.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(common.verboseOption)\n .addOption(common.debugOption)\n .addOption(common.curlirizeOption)\n .addOption(new Option('-i, --entity-id <entity-id>', 'Entity id.'))\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n state.default.session.setVerbose(options.verbose);\n state.default.session.setDebug(options.debug);\n state.default.session.setCurlirize(options.curlirize);\n if (await getTokens()) {\n printMessage(\n `Describing SAML entity provider ${\n options.entityId\n } in realm \"${state.default.session.getRealm()}\"...`\n );\n describeSaml2Provider(options.entityId);\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,EAAkBC,MAAlB,QAAgC,WAAhC;AACA,SAASC,YAAT,EAAuBC,KAAvB,QAAoC,uBAApC;AACA,OAAO,KAAKC,MAAZ,MAAwB,eAAxB;AACA,SAASC,YAAT,QAA6B,qBAA7B;AACA,SAASC,qBAAT,QAAsC,oBAAtC;AAEA,MAAM;EAAEC;AAAF,IAAgBL,YAAtB;AAEA,MAAMM,OAAO,GAAG,IAAIR,OAAJ,CAAY,qBAAZ,CAAhB;AAEAQ,OAAO,CACJC,WADH,CACe,mDADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIeR,MAAM,CAACS,aAJtB,EAKGD,WALH,CAKeR,MAAM,CAACU,aALtB,EAMGF,WANH,CAMeR,MAAM,CAACW,YANtB,EAOGH,WAPH,CAOeR,MAAM,CAACY,gBAPtB,EAQGC,SARH,CAQab,MAAM,CAACc,gBARpB,EASGD,SATH,CASab,MAAM,CAACe,cATpB,EAUGF,SAVH,CAUab,MAAM,CAACgB,aAVpB,EAWGH,SAXH,CAWab,MAAM,CAACiB,WAXpB,EAYGJ,SAZH,CAYab,MAAM,CAACkB,eAZpB,EAaGL,SAbH,CAaa,IAAIhB,MAAJ,CAAW,6BAAX,EAA0C,YAA1C,CAbb,EAcGsB,MAdH,EAeI;AACA,OAAOC,IAAP,EAAaC,KAAb,EAAoBC,IAApB,EAA0BC,QAA1B,EAAoCC,OAApC,KAAgD;EAC9CzB,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBC,SAAtB,CAAgCP,IAAhC;EACArB,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBE,QAAtB,CAA+BP,KAA/B;EACAtB,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBG,WAAtB,CAAkCP,IAAlC;EACAvB,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBI,WAAtB,CAAkCP,QAAlC;EACAxB,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBK,iBAAtB,CAAwCP,OAAO,CAACQ,IAAhD;EACAjC,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBO,0BAAtB,CAAiDT,OAAO,CAACU,QAAzD;EACAnC,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBS,UAAtB,CAAiCX,OAAO,CAACY,OAAzC;EACArC,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBW,QAAtB,CAA+Bb,OAAO,CAACc,KAAvC;EACAvC,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBa,YAAtB,CAAmCf,OAAO,CAACgB,SAA3C;;EACA,IAAI,MAAMrC,SAAS,EAAnB,EAAuB;IACrBF,YAAY,CACT,mCACCuB,OAAO,CAACiB,QACT,cAAa1C,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBgB,QAAtB,EAAiC,MAHrC,CAAZ;IAKAxC,qBAAqB,CAACsB,OAAO,CAACiB,QAAT,CAArB;EACD;AACF,CAlCL,CAmCI;AAnCJ;AAsCArC,OAAO,CAACuC,KAAR"}
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
import { Command, Option } from 'commander';
|
|
2
|
-
import { Authenticate,
|
|
2
|
+
import { Authenticate, state } from '@rockcarver/frodo-lib';
|
|
3
3
|
import * as common from '../cmd_common';
|
|
4
|
-
import { printMessage } from '../../utils/Console';
|
|
4
|
+
import { printMessage, verboseMessage } from '../../utils/Console';
|
|
5
|
+
import { exportRawSaml2ProvidersToFile, exportRawSaml2ProvidersToFiles, exportRawSaml2ProviderToFile, exportSaml2ProviderToFile, exportSaml2ProvidersToFile, exportSaml2ProvidersToFiles } from '../../ops/Saml2Ops';
|
|
5
6
|
const {
|
|
6
7
|
getTokens
|
|
7
8
|
} = Authenticate;
|
|
8
|
-
const {
|
|
9
|
-
exportSaml2ProviderToFile,
|
|
10
|
-
exportSaml2ProvidersToFile,
|
|
11
|
-
exportSaml2ProvidersToFiles
|
|
12
|
-
} = Saml2;
|
|
13
9
|
const program = new Command('frodo saml export');
|
|
14
|
-
program.description('Export SAML entity providers.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(new Option('-i, --entity-id <entity-id>', 'Entity id. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file [file]', 'Name of the file to write the exported provider(s) to. Ignored with -A. If not specified, the export file is named <id>.saml.json.')).addOption(new Option('-a, --all', 'Export all the providers in a realm to a single file. Ignored with -t and -i.')).addOption(new Option('-A, --all-separate', 'Export all the providers in a realm as separate files <provider name>.saml.json. Ignored with -t, -i, and -a.')).action( // implement command logic inside action handler
|
|
10
|
+
program.description('Export SAML entity providers.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(common.verboseOption).addOption(common.debugOption).addOption(common.curlirizeOption).addOption(new Option('-i, --entity-id <entity-id>', 'Entity id. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file [file]', 'Name of the file to write the exported provider(s) to. Ignored with -A. If not specified, the export file is named <id>.saml.json.')).addOption(new Option('-a, --all', 'Export all the providers in a realm to a single file. Ignored with -t and -i.')).addOption(new Option('-A, --all-separate', 'Export all the providers in a realm as separate files <provider name>.saml.json. Ignored with -t, -i, and -a.')).addOption(new Option('--raw', 'Include raw XML in export.')).action( // implement command logic inside action handler
|
|
15
11
|
async (host, realm, user, password, options) => {
|
|
16
12
|
state.default.session.setTenant(host);
|
|
17
13
|
state.default.session.setRealm(realm);
|
|
@@ -19,25 +15,40 @@ async (host, realm, user, password, options) => {
|
|
|
19
15
|
state.default.session.setPassword(password);
|
|
20
16
|
state.default.session.setDeploymentType(options.type);
|
|
21
17
|
state.default.session.setAllowInsecureConnection(options.insecure);
|
|
18
|
+
state.default.session.setVerbose(options.verbose);
|
|
19
|
+
state.default.session.setDebug(options.debug);
|
|
20
|
+
state.default.session.setCurlirize(options.curlirize); // export by id/name
|
|
22
21
|
|
|
23
|
-
if (await getTokens()) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
22
|
+
if (options.entityId && (await getTokens())) {
|
|
23
|
+
if (!options.raw) {
|
|
24
|
+
verboseMessage(`Exporting provider "${options.entityId}" from realm "${state.default.session.getRealm()}"...`);
|
|
25
|
+
await exportSaml2ProviderToFile(options.entityId, options.file);
|
|
26
|
+
} else {
|
|
27
|
+
verboseMessage(`Exporting raw provider "${options.entityId}" from realm "${state.default.session.getRealm()}"...`);
|
|
28
|
+
await exportRawSaml2ProviderToFile(options.entityId, options.file);
|
|
29
|
+
}
|
|
30
|
+
} // --all -a
|
|
31
|
+
else if (options.all && (await getTokens())) {
|
|
32
|
+
if (!options.raw) {
|
|
33
|
+
verboseMessage('Exporting all providers to a single file...');
|
|
34
|
+
await exportSaml2ProvidersToFile(options.file);
|
|
35
|
+
} else {
|
|
36
|
+
verboseMessage('Exporting all providers raw to a single file...');
|
|
37
|
+
await exportRawSaml2ProvidersToFile(options.file);
|
|
38
|
+
}
|
|
39
|
+
} // --all-separate -A
|
|
40
|
+
else if (options.allSeparate && (await getTokens())) {
|
|
41
|
+
if (!options.raw) {
|
|
42
|
+
verboseMessage('Exporting all providers to separate files...');
|
|
43
|
+
await exportSaml2ProvidersToFiles();
|
|
44
|
+
} else {
|
|
45
|
+
verboseMessage('Exporting all providers raw to separate files...');
|
|
46
|
+
await exportRawSaml2ProvidersToFiles();
|
|
40
47
|
}
|
|
48
|
+
} // unrecognized combination of options or no options
|
|
49
|
+
else {
|
|
50
|
+
printMessage('Unrecognized combination of options or no options...', 'error');
|
|
51
|
+
program.help();
|
|
41
52
|
}
|
|
42
53
|
} // end command logic inside action handler
|
|
43
54
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"saml-export.js","names":["Command","Option","Authenticate","
|
|
1
|
+
{"version":3,"file":"saml-export.js","names":["Command","Option","Authenticate","state","common","printMessage","verboseMessage","exportRawSaml2ProvidersToFile","exportRawSaml2ProvidersToFiles","exportRawSaml2ProviderToFile","exportSaml2ProviderToFile","exportSaml2ProvidersToFile","exportSaml2ProvidersToFiles","getTokens","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","verboseOption","debugOption","curlirizeOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","setVerbose","verbose","setDebug","debug","setCurlirize","curlirize","entityId","raw","getRealm","file","all","allSeparate","help","parse"],"sources":["cli/saml/saml-export.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common';\nimport { printMessage, verboseMessage } from '../../utils/Console';\nimport {\n exportRawSaml2ProvidersToFile,\n exportRawSaml2ProvidersToFiles,\n exportRawSaml2ProviderToFile,\n exportSaml2ProviderToFile,\n exportSaml2ProvidersToFile,\n exportSaml2ProvidersToFiles,\n} from '../../ops/Saml2Ops';\n\nconst { getTokens } = Authenticate;\n\nconst program = new Command('frodo saml export');\n\nprogram\n .description('Export SAML entity providers.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(common.verboseOption)\n .addOption(common.debugOption)\n .addOption(common.curlirizeOption)\n .addOption(\n new Option(\n '-i, --entity-id <entity-id>',\n 'Entity id. If specified, -a and -A are ignored.'\n )\n )\n .addOption(\n new Option(\n '-f, --file [file]',\n 'Name of the file to write the exported provider(s) to. Ignored with -A. If not specified, the export file is named <id>.saml.json.'\n )\n )\n .addOption(\n new Option(\n '-a, --all',\n 'Export all the providers in a realm to a single file. Ignored with -t and -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Export all the providers in a realm as separate files <provider name>.saml.json. Ignored with -t, -i, and -a.'\n )\n )\n .addOption(new Option('--raw', 'Include raw XML in export.'))\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n state.default.session.setVerbose(options.verbose);\n state.default.session.setDebug(options.debug);\n state.default.session.setCurlirize(options.curlirize);\n // export by id/name\n if (options.entityId && (await getTokens())) {\n if (!options.raw) {\n verboseMessage(\n `Exporting provider \"${\n options.entityId\n }\" from realm \"${state.default.session.getRealm()}\"...`\n );\n await exportSaml2ProviderToFile(options.entityId, options.file);\n } else {\n verboseMessage(\n `Exporting raw provider \"${\n options.entityId\n }\" from realm \"${state.default.session.getRealm()}\"...`\n );\n await exportRawSaml2ProviderToFile(options.entityId, options.file);\n }\n }\n // --all -a\n else if (options.all && (await getTokens())) {\n if (!options.raw) {\n verboseMessage('Exporting all providers to a single file...');\n await exportSaml2ProvidersToFile(options.file);\n } else {\n verboseMessage('Exporting all providers raw to a single file...');\n await exportRawSaml2ProvidersToFile(options.file);\n }\n }\n // --all-separate -A\n else if (options.allSeparate && (await getTokens())) {\n if (!options.raw) {\n verboseMessage('Exporting all providers to separate files...');\n await exportSaml2ProvidersToFiles();\n } else {\n verboseMessage('Exporting all providers raw to separate files...');\n await exportRawSaml2ProvidersToFiles();\n }\n }\n // unrecognized combination of options or no options\n else {\n printMessage(\n 'Unrecognized combination of options or no options...',\n 'error'\n );\n program.help();\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,EAAkBC,MAAlB,QAAgC,WAAhC;AACA,SAASC,YAAT,EAAuBC,KAAvB,QAAoC,uBAApC;AACA,OAAO,KAAKC,MAAZ,MAAwB,eAAxB;AACA,SAASC,YAAT,EAAuBC,cAAvB,QAA6C,qBAA7C;AACA,SACEC,6BADF,EAEEC,8BAFF,EAGEC,4BAHF,EAIEC,yBAJF,EAKEC,0BALF,EAMEC,2BANF,QAOO,oBAPP;AASA,MAAM;EAAEC;AAAF,IAAgBX,YAAtB;AAEA,MAAMY,OAAO,GAAG,IAAId,OAAJ,CAAY,mBAAZ,CAAhB;AAEAc,OAAO,CACJC,WADH,CACe,+BADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIed,MAAM,CAACe,aAJtB,EAKGD,WALH,CAKed,MAAM,CAACgB,aALtB,EAMGF,WANH,CAMed,MAAM,CAACiB,YANtB,EAOGH,WAPH,CAOed,MAAM,CAACkB,gBAPtB,EAQGC,SARH,CAQanB,MAAM,CAACoB,gBARpB,EASGD,SATH,CASanB,MAAM,CAACqB,cATpB,EAUGF,SAVH,CAUanB,MAAM,CAACsB,aAVpB,EAWGH,SAXH,CAWanB,MAAM,CAACuB,WAXpB,EAYGJ,SAZH,CAYanB,MAAM,CAACwB,eAZpB,EAaGL,SAbH,CAcI,IAAItB,MAAJ,CACE,6BADF,EAEE,iDAFF,CAdJ,EAmBGsB,SAnBH,CAoBI,IAAItB,MAAJ,CACE,mBADF,EAEE,oIAFF,CApBJ,EAyBGsB,SAzBH,CA0BI,IAAItB,MAAJ,CACE,WADF,EAEE,+EAFF,CA1BJ,EA+BGsB,SA/BH,CAgCI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