In Cobalt, you can manage which users can access a workflow created by you. One of the primary tools for implementing access control is through User-Defined Function (UDF) parameters. UDF parameters empower users to filter configurations for Linked Accounts, thereby granting access to specific workflows only to authorized users or entities.

Learn in detail about the UDF Parameter in our guide here.

Creating UDF Parameters

In the Config Portal of a Workflow, users can set up Access conditions to control who can interact with the workflow.

Please ensure that UDF Parameters on which the access will be controlled, have been created and set for the Linked Accounts.

You can add UDF Parameters to the Linked Accounts either programmatically or by the UI of Cobalt. Using either the Upsert Linked Account API or .upsertLinkedAccount() method of the NodeJS SDK, you can add UDF parameter.

Learn how to create UDF Parameter through the dashboard here.

ParamRequiredTypeDescription
linked_account_idMandatoryStringUnique customer identifier
nameOptionalStringName of the customer
UDFOptionalObjectUser specific preliminary data
your_appOptionalObjectAuth specific data

The request upserts a Linked Account with the UDF Parameters as requested and gives the following Response

Response
{
    "_id": "65d5ba54d31e3880a27ebefd",
    "associated_org": "65c9ef72f4b95fce32e8ccf8",
    "account_id": "<Linked_account_id>",
    "environment": "test",
    "name": "John Doe",
    "udf": [
        {
            "key_name": "Role",
            "key_value": "Member",
            "_id": "660bd08b01d2ef85025d707c",
            "updatedAt": "2024-04-02T09:31:55.647Z",
            "createdAt": "2024-04-02T09:31:55.647Z"
        },
        {
            "key_name": "Title",
            "key_value": "Sr. Developer",
            "_id": "660bd08b01d2ef85025d707d",
            "updatedAt": "2024-04-02T09:31:55.647Z",
            "createdAt": "2024-04-02T09:31:55.647Z"
        }
    ],
    "createdAt": "2024-02-21T08:54:44.607Z",
    "updatedAt": "2024-04-02T09:31:55.647Z",
    "__v": 34
}

Configuring Access Controls

To configure the Access Controls, go to the Workflow in Cobalt for which you want to do so.

  • Click on the Config Portal button in the top right of the workflow.
Navigate to Config Portal in a Workflow
  • Here you have the option to define Access conditions such as Match all conditions or Match any condition. Users can then specify the name of the UDF parameter and its corresponding value that should be allowed to access the Workflow.
Config Portal in a Workflow

This workflow will now be visible only to the Linked Accounts which satsify the Access Control conditions.