How to: Add a Proxy Module to a Remote Execute

Prev Next

A proxy module adds a layer of security to a remote execute. A remote execute in Unqork executes a module behind the scenes or on the server-side. While a remote execute increases security, it can leave data vulnerable to manipulation in the underlying code. A proxy module ensures your remote execute is fully secure.

What Is a Proxy Module?

A proxy module sits between a Front-End module and a Remote Execute or API module. Passing data through a proxy module force-validates the Front-End module’s data after submission. By force-validating, you ensure the data maintains its original form without manipulation.

For roles that need to initiate the remote execute from an Express module, enhance proxy module security by setting the permissions to Write.

Creating a Proxy Module

Learn how to create a proxy module in UDesigner or Classic Designer by clicking on the tabs below:

UDesigner Proxy Module Prerequisites

This how-to guide assumes you have a Front-End module that collects the name, phone number, and email address of your end-user, with Property IDs of name, phone, and email, respectively.

To ensure security, add a proxy module with the same name, phone number, and email address fields as your Front-End module. The only difference is that your proxy module keeps all these fields hidden.

To begin, you need the following modules already configured:

  • A Front-End module with name, phone, and email data fields.

  • An API module to perform your necessary remote execute.

    To prevent users from directly executing the API module outside of the proxy module, set the API module permissions to No Access for all roles.

Ensure both modules exist in the same application.

Set Up Server Side Execution

Enable the Server Side Execution Only setting to ensure the proxy module is inaccessible in Express View.

  1. At the top right of the Module Builder, click the (ellipsis) button.

  2. Select Module Settings.

  3. Set Server Side Execution Only to A toggle switch indicating an on/off state for a user interface element. (ON).

    Settings menu displaying module options and server-side execution features for configuration.

  4. Click Save & Close.

Configure the Display & Layout Components

For this example, add three Panel components to serve as containers for the components.

Configure the Panel Components

The panelRequest Panel component manages the data carried over from your Front-End module. The panelValidate Panel component manages the remote execute trigger. And, the panelResponse Panel component manages error handling.

  1. In your proxy module, drag and drop three Panel components onto your canvas.

  2. In the Property ID and Canvas Label Text fields, enter the following for each Panel component:

    #

    Property ID

    Canvas Label Text

    1

    panelRequest

    panelRequest

    2

    panelValidate

    panelValidate

    3

    panelResponse

    panelResponse

  3. Click Save Component after adding each component.

Data Field Configuration

Next, add a range of data components to store the name, phone, and email values. For this how-to guide, the same fields are named as the previous ones in your Front-End module. For other use cases, ensure that the fields expected in your Front-End module are created in the proxy module.

Configure the name Text Field Component

First, configure the Text Field component to store the end-user's name.

  1. Drag and drop a Text Field component into the panelRequest Panel component.

  2. In the Property ID field, enter name.

  3. In the Label Text field, enter Name.

  4. Set Hide Field to A toggle switch indicating an on/off state for a user interface element. (ON).

  5. Click Save Component.

Configure the phone Phone Number Component

Configure the Phone Number component to store the end-user's phone number.

  1. Drag and drop a Phone Number component into the panelRequest Panel component.

  2. In the Property ID field, enter phone.

  3. In the Label Text field, enter Phone.

  4. Set Hide Field to A toggle switch indicating an on/off state for a user interface element. (ON).

  5. Click Save Component.

Configure the email Email Component

Configure the Email component to store the end-user's email address.

  1. Drag and drop an Email component into the panelRequest Panel component.

  2. In the Property ID field, enter email.

  3. In the Label Text field, enter Email.

  4. Set Hide Field to A toggle switch indicating an on/off state for a user interface element. (ON).

  5. Click Save Component.

Validation Configuration

Next, set up an Initializer and Plug-In components to perform the validation.

Configure the initValidate Initializer Component

Next, set up the first of two Initializer components. This first Initializer triggers a Plug-In component that you'll add later.

  1. Drag and drop an Initializer component into the panelValidate Panel component.

  2. In the Property ID and Canvas Label Text fields, enter initValidate.

  3. From the Trigger Type drop-down, select New Submission.

  4. In the Outputs table, enter the following:

    #

    Property ID

    Type

    Value

    1

    pluginValidate

    trigger

    GO

    The Property ID in the Outputs table corresponds to the Plug-In component you'll add in the next section. The Property ID you use in the Outputs table must match the Plug-In component’s Property ID.

    Configuration settings for a new submission trigger and validation output in a software interface.

  5. Click Save Component.

Configure the initError Initializer Component

Now, set up the second Initializer component to display an error message if the Plug-In component fails.

  1. Drag and drop an Initializer component into the panelValidate Panel component.

  2. In the Property ID and Canvas Label Text fields, enter initError.

  3. In the Outputs table, enter the following:

    #

    Property ID

    Type

    Value

    1

    resolution

    value

    error

    The Property ID in the Outputs table corresponds to the Hidden component you'll add later. The Property ID you use in the Outputs table must match the Hidden component’s Property ID.

    Initializer interface displaying property ID, label text, and output table with error.

  4. Click Save Component.

Configure the pluginValidate Plug-In Component

Now that you have your Initializer components, add a Plug-In component to force-validate the data from your Front-End module as it’s transmitted.

  1. Drag and drop a Plug-In component between your Initializer components in the panelValidate Panel component.

  2. In the Property ID and Canvas Label Text fields, enter pluginValidate.

  3. From the Internal Services drop-down, select Execute Module.

  4. From the Module drop-down, select your API module.

    Unqork plugin configuration interface showing service type and module selection options.

  5. In the Inputs table, enter the following:

    #

    Property ID

    Mapping

    1

    name

    dataName

    2

    phone

    dataPhone

    3

    email

    dataEmail

    4

    'true'

    validate

    Values in the Property ID column must match the Property IDs of the components copied from your Front-End module. Values in the Mapping column must match the Property IDs with data added, in the format data.PropertyID.

  6. In the Outputs table, enter the following:

    #

    Property ID

    Mapping

    1

    resolution

    data.resolved.resolution

    Inputs and outputs for a plugin validation process in a structured format.

  7. Navigate to the Actions settings.

  8. In the Error Trigger field, enter initError.

  9. Click Save Component.

Error Handling Configuration

Next, you'll add a Hidden component to serve as the error handler.

Configure the Hidden Component

This Hidden component populates an error message that only displays to your end-user when your Plug-In component fails.

  1. Drag and drop a Hidden component into the panelResponse Panel component.

  2. In the Property ID and Canvas Label Text fields, enter resolution.

  3. Click Save Component.

  4. Save your module.

Here's how your completed proxy module looks in the Module Builder:

Form fields for user input including name, phone, email, and validation options.

Classic Designer Proxy Module Prerequisites

This how-to guide assumes you have a Front-End module that collects the name, phone number, and email address of your end-user, with Property IDs of name, phone, and email, respectively.

To ensure security, add a proxy module with the same name, phone number, and email address fields as your Front-End module. The only difference is that your proxy module keeps all these fields hidden.

To begin, you need the following modules already configured:

  • A Front-End module with name, phone, and email data fields.

  • An API module to perform your necessary remote execute.

    To prevent users from directly executing the API module outside of the proxy module, set the API module permissions to No Access for all roles.

Ensure both modules exist in the same application.

Set Up Server Side Execution

Enable the Server Side Execution Only setting to ensure the proxy module is inaccessible in Express View.

  1. At the top right of the Module Builder, click the (ellipsis) button.

  2. Select Settings.

  3. Set Server Side Execution Only to A toggle switch indicating an on/off state for a user interface element. (ON).

  4. Click Save. The Module Builder updates, replacing the Preview button with the Server-Side Execution button.

Display and Layout Configuration

For this example, add three Panel components to serve as containers for the components.

Configure the Panel Components

The panelRequest Panel component manages the data carried over from your Front-End module. The panelValidate Panel component manages the remote execute trigger. And, the panelResponse Panel component manages error handling.

  1. In your proxy module, drag and drop three Panel components onto your canvas.

  2. In the Property ID and Label Text fields, enter the following for each Panel component:

    #

    Property ID

    Label Text

    1

    panelRequest

    panelRequest

    2

    panelValidate

    panelValidate

    3

    panelResponse

    panelResponse

  3. Save & Close each component as you add it.

Data Field Configuration

Next, add a range of data components to store the name, phone, and email values. For this how-to guide, the same fields are named as the previous ones in your Front-End module. For other use cases, ensure that the fields expected in your Front-End module are created in the proxy module.

Configure the name Text Field Component

First, configure the Text Field component to store the end-user's name.

  1. Drag and drop a Text Field component into the panelRequest Panel component.

  2. In the Property ID field, enter name.

  3. In the Label Text field, enter Name.

  4. Set Hide Field to A toggle switch indicating an on/off state for a user interface element. (ON).

  5. Click Save & Close.

Configure the phone Phone Number Component

Configure the Phone Number component to store the end-user's phone number.

  1. Drag and drop a Phone Number component into the panelRequest Panel component.

  2. In the Property ID field, enter phone.

  3. In the Label Text field, enter Phone.

  4. Set Hide Field to A toggle switch indicating an on/off state for a user interface element. (ON).

  5. Click Save & Close.

Configure the email Email Component

Configure the Email component to store the end-user's email address.

  1. Drag and drop an Email component into the panelRequest Panel component.

  2. In the Property ID field, enter email.

  3. In the Label Text field, enter Email.

  4. Set Hide Field to A toggle switch indicating an on/off state for a user interface element. (ON).

  5. Click Save & Close.

Validation Configuration

Next, set up an Initializer and Plug-In components to perform the validation.

Configure the initValidate Initializer Component

Next, set up the first of two Initializer components. This first Initializer triggers a Plug-In component that you'll add later.

  1. Drag and drop an Initializer component into the panelValidate Panel component.

  2. In the Property ID and Canvas Label Text fields, enter initValidate.

  3. To the left of the component's configuration window, select Actions.

  4. From the Trigger Type drop-down, select New Submission.

  5. In the Outputs table, enter the following:

    #

    Property ID

    Type

    Value

    1

    pluginValidate

    trigger

    GO

    The Property ID in the Outputs table corresponds to the Plug-In component you'll add in the next section. The Property ID you use in the Outputs table must match the Plug-In component’s Property ID.

  6. Click Save & Close.

Configure the initError Initializer Component

Now, set up the second Initializer component to display an error message if the Plug-In component fails.

  1. Drag and drop an Initializer component into the panelValidate Panel component.

  2. In the Property ID and Label Text fields, enter initError.

  3. To the left of the component's configuration window, select Actions.

  4. From the Trigger Type drop-down, select Manual.

  5. In the Outputs table, enter the following:

    #

    Property ID

    Type

    Value

    1

    resolution

    value

    error

    The Property ID in the Outputs table corresponds to the Hidden component you'll add later. The Property ID you use in the Outputs table must match the Hidden component’s Property ID.

  6. Click Save & Close.

Configure the pluginValidate Plug-In Component

Now that you have your Initializer components, add a Plug-In component to force-validate the data from your Front-End module as it’s transmitted.

  1. Drag and drop a Plug-In component between your Initializer components in the panelValidate Panel component.

  2. In the Property ID and Canvas Label Text fields, enter pluginValidate.

  3. From the Internal Services drop-down, select Execute Module.

  4. From the Module drop-down, select your API module.

  5. In the Inputs table, enter the following:

    Property ID

    Mapping

    name

    dataName

    phone

    dataPhone

    email

    dataEmail

    'true'

    validate

    Values in the Property ID column must match the Property IDs of the components copied from your Front-End module. Values in the Mapping column must match the Property IDs with data added, in the format data.PropertyID.

  6. In the Outputs table, enter the following:

    Property ID

    Mapping

    resolution

    data.resolved.resolution

    Settings interface showing property ID mappings for inputs and outputs in a plugin.

  7. Navigate to the Actions settings.

  8. In the Error Trigger field, enter initError.

  9. Click Save.

Error Handling Configuration

Next, you'll add a Hidden component to serve as the error handler.

Configure the Hidden Component

This Hidden component populates an error message that only displays to your end-user when your Plug-In component fails.

  1. Drag and drop a Hidden component into the panelResponse Panel component.

  2. In the Property ID and Canvas Label Text fields, enter resolution.

  3. Click Save & Close.

  4. Save your module.

Here's how your completed proxy module looks in the Module Builder:

Form fields for name, phone, and email in the Proxy Module interface.