Corteza Federation
|
Corteza Federation is currently in experimental mode and the federation function is disabled by default. See Environment Configuration below to enable it. |
Corteza Federation enables different Corteza instances to establish a federated network to freely and securely exchange information.
This guide walks you through the process of setting up your federated network and configuring data sharing.
Environment Configuration
Before pairing nodes in the administration interface, you must enable and configure the Federation feature in your .env file on all participating instances.
Add the following variables to your environment configuration and restart your Corteza server:
# Enable federation
FEDERATION_ENABLED=true
# Identify this specific node
# Replace with your actual resolvable host address and port
FEDERATION_HOST=node_origin:8084
FEDERATION_LABEL=Federation origin host
# Synchronization tuning
FEDERATION_SYNC_STRUCTURE_MONITOR_INTERVAL=60s
FEDERATION_SYNC_STRUCTURE_PAGE_SIZE=1
FEDERATION_SYNC_DATA_MONITOR_INTERVAL=20s
FEDERATION_SYNC_DATA_PAGE_SIZE=100
-
FEDERATION_HOST: The resolvable address (and port) where this specific node can be reached. -
FEDERATION_LABEL: A human-readable name for this node to easily identify it in the network. -
Sync tuning: The structure and data monitor intervals control how frequently the system polls for changes.
Federated Nodes
A federated node is an independent Corteza instance with the Federation feature enabled. In a federated network, each node operates autonomously but can connect with other nodes to securely exchange information.
A node can expose data to its destination nodes (acting as an origin), or consume shared data from its origin nodes (acting as a destination).
|
A node can act as both an origin and a destination simultaneously. |
Before any data can be exchanged, the instances must establish a secure connection through the node pairing process.
Node pairing
-
the origin node registers a destination node,
-
the origin node sends an invite to the destination node,
-
the destination node accepts the invite, either via email or manually,
-
the origin node accepts the handshake request sent by the destination node.
|
You can initiate the node pairing process from any node. |
-
navigate to the Corteza Admin,
-
click on Nodes under Federation in the navigation drawer,
-
click the New button,
-
provide the requested data regarding the node you wish to connect to,
-
press the Submit button.
-
navigate to the Corteza Admin,
-
click on Nodes under Federation in the navigation drawer,
-
click on the node to which you want to send an invitation,
-
click the Generate Federation Link button and either:
-
copy the invitation URL, or
-
insert the contact email where the invite should be sent.
-
|
The generated invite URL includes a secure OTT (One-Time Token), so ensure you send it over a secure channel. |
-
click the Pair Federation Node link in the email to open the pairing page,
-
enter the received URL and confirm.
-
navigate to the Corteza Admin,
-
click on Nodes under Federation in the navigation drawer,
-
click the Edit button,
-
enter the received URL and confirm.
|
Node pairing will not proceed until the pairing URL is inserted and the handshake request is accepted by the origin node. |
-
navigate to the Corteza Admin,
-
click on Nodes under Federation in the navigation drawer,
-
click on the node you wish to accept the request for,
-
click the warning icon to confirm the request.
|
Remember that this final step is done on the origin server (the one that initiated the handshake). |
Data Synchronization
Once two nodes have successfully completed the node pairing process, you can begin sharing data between them.
|
Shared modules are automatically created by the Federation system and cannot be manually removed or updated. |
Sharing data (Origin Node)
An origin node shares data by defining which modules and fields a specific paired destination node is allowed to access.
|
You can only share data with nodes that have been successfully paired. |
-
navigate to Corteza Low Code,
-
enter the namespace administration area,
-
navigate to the Modules sub-page,
-
click the edit icon next to the module you want to share,
-
click on Federation Settings,
-
go to the Expose tab,
-
select the destination node you want to share the module with,
-
select the specific fields you want to expose to that node,
-
save the changes.
|
To speed up configuration, you can duplicate settings from another node by selecting the desired node from the Copy settings from dropdown. |
Consume shared data (Destination Node)
A destination node consumes shared data from its paired origin node. The destination node defines which modules it wants to access and how the remote values map to the local destination module.
|
You can only consume data from nodes that have been successfully paired. |
-
navigate to Corteza Low Code,
-
enter the namespace administration area,
-
navigate to the Modules sub-page,
-
click the edit icon next to the local module where you want to consume the data,
-
click on Federation Settings,
-
go to the Map tab,
-
select the origin node you want to consume data from,
-
map the shared remote fields to your local module fields,
-
save the changes.