Command line tool (Cake console command), implemented as a standalone experimental plugin as of version 4.4.0, that supports two modes:

  • Mode 1: Export configuration for the specified CO to a JSON file
    • Configuration only, no data
    • CO Groups are configuration, CO Group Members are data
    • COUs are configuration
    • Departments and Organizations are data, not configuration
  • Mode 2: Import configuration from a JSON file to a specified CO


This plugin is experimental, and may change in incompatible ways across minor releases.

Installation

This is a non-core plugin, see Installing and Enabling Registry Plugins for more information.

Available Modes

Export Mode

Export Configuration to json file

Command Line Usage

$ cd /path/to/comanage/app && ./Console/cake job ConfigurationHandler.Export --coid 2 -l All -s -e 1235477978

  • co: --coid, Numeric  CO ID to run the export configuration for
  • list: -l, list of Models to export the configuration for
  • encryption: -e, salt string used to encrypt sensitive fields, e.g. passwords

(info) An exported JSON file that is not modified should "just work" on import

(info) A typo that results in invalid JSON would get rejected because the JSON fails to parse

(info) A typo that isn't detectable (eg: the wrong server name) will get loaded as is - the tool is not responsible for figuring this out

(info) On any error (eg: data validation) the whole process stops, eg If a CO Group fails to load, a later CO Enrollment Flow that references it will also fail

Import Mode

Import Configuration from JSON file

Command Line Usage

$ cd /path/to/comanage/app && ./Console/cake job ConfigurationHandler.Import --coid 72 --filename configuration_co2_1694967754.json -s -d  -e 1235477978

  • dry run: -d, If present it will run a test import
  • config file: --config-file, The name of the JSON Configuration file. The path lives under the /path/to/comanage/local/Config  directory
  • co: --coid, Numeric  CO ID to run the export configuration for
  • list: -l, list of Models to export the configuration for
  • encryption: -e, salt string used to decrypt sensitive fields, e.g. passwords. It matches the one we provided on encryption

Supported Models

const SUPPORTED_MODELS = array(
  "ApiUser",
  "AttributeEnumeration",
  "CoDashboard" => array("CoDashboardWidget"),
  "CoEnrollmentFlow" => array(
    "CoPipeline",
    "CoEnrollmentFlowWedge",
    "CoEnrollmentSource",
    "CoEnrollmentAttribute" => array("CoEnrollmentAttributeDefault")
  ),
  "CoExpirationPolicy",
  "CoExtendedType",
  "CoGroup" => array(
    "CoGroupNesting",
    "CoGroupOisMapping",
  ),
  "CoIdentifierAssignment",
  "CoIdentifierValidator",
  "CoLocalization",
  "CoMessageTemplate",
  "CoNavigationLink",
  "CoPipeline",
  "CoProvisioningTarget",
  "DataFilter" => array(
    "OrgIdentitySourceFilter",
    "CoProvisioningTargetFilter",
  ),
  "CoSelfServicePermission",
  "CoSetting",
  "CoTermsAndConditions",
  "CoTheme",
  "Cou" => array(
    "CoTermsAndConditions"
  ),
  "Dictionary" => array(
    "DictionaryEntry",
  ),
  "OrgIdentitySource" => array(
    "CoGroupOisMapping",
    "OrgIdentitySourceFilter",
  ),
  "Server" => array(
    "SqlServer",
    "Oauth2Server",
    "HttpServer",
    "KafkaServer",
    "MatchServer" => array("MatchServerAttribute"),
  ),
  "VettingStep"
);