Zetect Connector Guide Back to zetect.inSwitch portal ⇄

Provisioning XML

The provisioning XML describes an application in the App Catalog: which connector serves it, which operations Zetect may send, the connection settings administrators fill in, and the account and group attributes the connector returns. Zetect copies these definitions into each application an administrator adds from the catalog. The examples use a sample connector named Helpdesk; replace the names with your own.

Document structure

Configuration [@connector, @features]
├── Source
│   └── FieldSet [@name]                 one or more
│       └── Field                        one or more (source field)
│           ├── Name, DisplayName, Value, DataType, Required
│           ├── Placeholder, IsEncrypted          optional
│           └── Options                           optional, for DataType LIST
│               └── Option [@value]
│                   ├── Label
│                   └── ConditionalFields
│                       └── Field                 zero or more source fields
└── Attributes
    └── Attribute [@type, @identityAttribute, @groupName, @objectType]   one or more
        └── Field                        one or more (attribute field)
            ├── Name, Type, Description, IsMultiValued, IsRequired
            └── DisplayName, IsEntitlement, IsMitigationCriteria   optional

The file is validated against a strict schema. Source must come before Attributes, and an element the schema doesn't declare, or a misspelled one, rejects the whole upload. Inside a Field, the child elements may appear in any order.

Root element

AttributeDescription
connectorThe connector name. Must equal what your connector's connectorName() returns, including case. Zetect puts this value in the connectorName of every request for the application. The schema doesn't force it, but without it no request can reach your connector.
featuresA comma-separated list of the operations the application supports. Zetect only sends an operation that is in this list, and administrators can switch listed operations off. If you leave the list out, every operation is allowed until an administrator saves a list.

Use these names in features. The short names in the second column are accepted and converted.

FeatureAlso acceptedAllows Zetect to send
CREATE_ACCOUNTCREATECREATE_ACCOUNT
UPDATE_ACCOUNTUPDATEUPDATE_ACCOUNT
DELETE_ACCOUNTDELETEDELETE_ACCOUNT
SUSPEND_ACCOUNTDISABLE, DISABLE_ACCOUNTSUSPEND_ACCOUNT
RESTORE_ACCOUNTENABLE, ENABLE_ACCOUNTRESTORE_ACCOUNT
ADD_TO_GROUPADD_TO_GROUP
REMOVE_FROM_GROUPREMOVE_FROM_GROUP
CHANGE_PASSWORDRESET_PASSWORDRESET_PASSWORD

Aggregation (SYNC_USER and SYNC_GROUP) isn't controlled by features; every connector should answer it.

<Configuration connector="Helpdesk"
               features="CREATE_ACCOUNT,DELETE_ACCOUNT,SUSPEND_ACCOUNT,RESTORE_ACCOUNT,ADD_TO_GROUP,REMOVE_FROM_GROUP">

Source field sets

Each FieldSet groups related connection settings and appears as its own section on the application's connection screen. Its name attribute is required and becomes the key under which the values arrive in connectionInfo.

ElementRequiredDescription
NameYesThe key your connector reads, for example baseUrl.
DisplayNameYesThe label administrators see, for example "API Base URL".
ValueYesThe default value. Leave it empty for values the administrator must supply.
DataTypeYesOne of STRING, TEXT, TEXTAREA, NUMBER, BOOLEAN, SECRET, LIST, DATETIME. Use SECRET for passwords and tokens: Zetect stores the value encrypted, masks it on screen and decrypts it only into connectionInfo.
RequiredYestrue or false. Whether the administrator must fill it in.
PlaceholderNoHint text, for example https://helpdesk.example.com.
IsEncryptedNoAccepted by the schema. Use DataType SECRET to protect a value.
OptionsFor LISTOne or more Option elements. Each has a value attribute, a Label and a ConditionalFields element, which may be empty. Conditional fields appear only when that option is selected, and their values arrive in the same field set.

All values arrive in connectionInfo as strings. For a LIST, the value is the selected option's value.

<Field>
    <Name>authType</Name>
    <DisplayName>Authentication Type</DisplayName>
    <Value></Value>
    <DataType>LIST</DataType>
    <Required>true</Required>
    <Options>
        <Option value="TOKEN">
            <Label>API token</Label>
            <ConditionalFields>
                <Field>
                    <Name>apiToken</Name>
                    <DisplayName>API Token</DisplayName>
                    <Value></Value>
                    <DataType>SECRET</DataType>
                    <Required>true</Required>
                </Field>
            </ConditionalFields>
        </Option>
        <Option value="NONE">
            <Label>No authentication</Label>
            <ConditionalFields/>
        </Option>
    </Options>
</Field>

Account and group attributes

Each Attribute block declares the attributes of one kind of object your connector returns from aggregation.

AttributeDescription
typeRequired. account or group.
identityAttributeThe field that uniquely identifies the object, for example username. On the account block it becomes the application's identity attribute, which Zetect uses to match aggregated records and provisioning results to accounts.
groupNameGroup blocks only. A label for this kind of group, for example "Role".
objectTypeGroup blocks only. Matches the objectType value your connector puts on group records, and comes back on entitlements items in provisioning requests, so your connector knows which kind of group to change.

You can repeat Attribute type="group" for each distinct kind of group, each with its own groupName, objectType and fields.

Field elementRequiredDescription
NameYesThe attribute key in your records, for example email.
DisplayNameNoThe label shown in Zetect. Defaults to Name.
TypeYesOne of STRING, TEXT, NUMBER, BOOLEAN, DATETIME.
DescriptionYesWhat the attribute holds. Shown as help text.
IsEntitlementNoAccount blocks. Marks a multi-valued attribute, such as groups, as holding entitlements.
IsMultiValuedYesWhether the attribute can hold more than one value.
IsMitigationCriteriaNoAccount blocks. true or false.
IsRequiredYesWhether every record must include the attribute.

Full example

<?xml version="1.0" encoding="UTF-8"?>
<Configuration connector="Helpdesk"
               features="CREATE_ACCOUNT,DELETE_ACCOUNT,SUSPEND_ACCOUNT,RESTORE_ACCOUNT,ADD_TO_GROUP,REMOVE_FROM_GROUP">

    <Source>
        <FieldSet name="Connection Settings">
            <Field>
                <Name>baseUrl</Name>
                <DisplayName>API Base URL</DisplayName>
                <Value></Value>
                <DataType>STRING</DataType>
                <Required>true</Required>
                <Placeholder>https://helpdesk.example.com</Placeholder>
            </Field>
            <Field>
                <Name>apiToken</Name>
                <DisplayName>API Token</DisplayName>
                <Value></Value>
                <DataType>SECRET</DataType>
                <Required>true</Required>
            </Field>
        </FieldSet>

        <FieldSet name="Sync Settings">
            <Field>
                <Name>pageSize</Name>
                <DisplayName>Page Size</DisplayName>
                <Value>200</Value>
                <DataType>NUMBER</DataType>
                <Required>false</Required>
            </Field>
        </FieldSet>
    </Source>

    <Attributes>
        <Attribute type="account" identityAttribute="username">
            <Field>
                <Name>username</Name>
                <DisplayName>Username</DisplayName>
                <Type>STRING</Type>
                <Description>Unique account name</Description>
                <IsMultiValued>false</IsMultiValued>
                <IsRequired>true</IsRequired>
            </Field>
            <Field>
                <Name>email</Name>
                <DisplayName>Email</DisplayName>
                <Type>STRING</Type>
                <Description>Primary email address</Description>
                <IsMultiValued>false</IsMultiValued>
                <IsRequired>false</IsRequired>
            </Field>
            <Field>
                <Name>groups</Name>
                <DisplayName>Roles</DisplayName>
                <Type>STRING</Type>
                <Description>Roles the account holds</Description>
                <IsEntitlement>true</IsEntitlement>
                <IsMultiValued>true</IsMultiValued>
                <IsRequired>false</IsRequired>
            </Field>
        </Attribute>

        <Attribute type="group" groupName="Role" objectType="role" identityAttribute="groupId">
            <Field>
                <Name>groupId</Name>
                <DisplayName>Role ID</DisplayName>
                <Type>STRING</Type>
                <Description>Unique role identifier</Description>
                <IsMultiValued>false</IsMultiValued>
                <IsRequired>true</IsRequired>
            </Field>
            <Field>
                <Name>displayName</Name>
                <DisplayName>Name</DisplayName>
                <Type>STRING</Type>
                <Description>Role name</Description>
                <IsMultiValued>false</IsMultiValued>
                <IsRequired>false</IsRequired>
            </Field>
        </Attribute>

        <Attribute type="group" groupName="Queue" objectType="queue" identityAttribute="queueId">
            <Field>
                <Name>queueId</Name>
                <DisplayName>Queue ID</DisplayName>
                <Type>STRING</Type>
                <Description>Unique queue identifier</Description>
                <IsMultiValued>false</IsMultiValued>
                <IsRequired>true</IsRequired>
            </Field>
        </Attribute>
    </Attributes>

</Configuration>

With this file, a request's connectionInfo looks like this:

{
  "Connection Settings": { "baseUrl": "https://helpdesk.northwind.example", "apiToken": "…" },
  "Sync Settings": { "pageSize": "200" }
}

Validation rules

CheckWhat fails it
Well-formed XMLMalformed markup.
No DOCTYPE or external entitiesAny DOCTYPE declaration or external entity reference.
SchemaUndeclared or misspelled elements, missing required elements or attributes, Attributes before Source, or a value outside an allowed list such as DataType. The error names the offending element.
File sizeLarger than 50 MB.

Uploading the file to the App Catalog

To add or update the catalog entry:

  1. Sign in to the App Catalog and open Applications.
  2. Select + Add Application for a new entry, or Edit on an existing one.
  3. Enter the Application Name and, optionally, an Application Logo.
  4. Under Application Type, tick PROVISIONING. The Provisioning XML field appears.
  5. Choose your .xml file. On an existing entry, leave it empty to keep the current file.
  6. Select Save. If validation fails, the form shows the error and nothing is saved.