Deploying the On-Premise Agent
This guide describes the standard procedure for deploying the PMS Sync on-premises SQL agent and connecting it to the Alterspective Cloud and Clio Operate tenant. It is written for deployment engineers collaborating with client IT administrators.
1. How the Connection Works
The cloud components (the Portal on port 3060 and the Proxy on port 3050) never connect directly to the client database. Instead, a lightweight on-premises agent (port 4102) runs on a Windows host inside the client network, adjacent to the Aderant SQL Server. The agent connects outbound over TLS (port 443) to anAzure Relay Hybrid Connection — opening zero inbound firewall ports.
Staff Browser / Widget │ HTTPS (Port 443 -> Container 3060) ▼ PMS Sync Portal (Port 3060) ──► API Proxy (Port 3050) ──► Azure Relay (Port 443) ──► SQL Agent (Port 4102) ──► Aderant SQL (Port 1433) (Alterspective Cloud) (Orchestrator) (Microsoft Rendezvous) (Client Host / LAN) (db_datareader)
2. Provisioning Summary (per client environment)
| Component | Location / Host | Port | Security & Purpose |
|---|---|---|---|
| Azure Relay Hybrid Connection | Alterspective Azure Subscription | TCP 443 | Rendezvous tunnel. Requires client authorization (SAS tokens). |
| Dual Authorization Rules | On the Hybrid Connection | — | agent-listen (Listen-only) and proxy-send (Send-only) SAS keys. |
| On-Premise Windows Host | Client Network (LAN) | TCP 4102 | Runs the supervised agent Windows service. Outbound HTTPS 443 egress only. |
| Read-Only SQL Login | Aderant SQL Server | TCP 1433 | db_datareader role. Strictly read-only query posture. |
| Agent API Key | Azure Key Vault / Local .env | — | 32+ random characters. Required on startup for all proxy → agent calls. |
3. Provision the Azure Relay
In the Alterspective Azure subscription (using Azure CLI):
# 1. Resource group & relay namespace (select geographic region close to the client host) az group create -n rg-<client>-pms -l australiaeast az relay namespace create -g rg-<client>-pms -n <client>-pms-relay -l australiaeast # 2. Hybrid connection — enforce client authorization az relay hyco create -g rg-<client>-pms \ --namespace-name <client>-pms-relay -n aderant-agent \ --requires-client-authorization true # 3. Create least-privilege SAS rules az relay hyco authorization-rule create -g rg-<client>-pms \ --namespace-name <client>-pms-relay --hybrid-connection-name aderant-agent \ -n agent-listen --rights Listen az relay hyco authorization-rule create -g rg-<client>-pms \ --namespace-name <client>-pms-relay --hybrid-connection-name aderant-agent \ -n proxy-send --rights Send
The agent endpoint resolves to https://<namespace>.servicebus.windows.net/aderant-agent. The agent-listen key is installed into the agent host configuration; the proxy-sendkey is stored in the portal environment settings.
4. Install and Verify the Agent (Client Host)
The agent ships as a standalone Windows MSI that packages a self-contained Node runtime and installs as an automatically recovering Windows service:
- Install MSI (Elevated PowerShell):
msiexec /i AderantAgentSetup-<version>.msi /qn /l*v install.log
The service is registered with automatic startup but remains stopped until configuration is applied. - Configure Environment: Populate the
.envfile in the service installation directory:PORT=4102 SQL_SERVER=192.168.1.50 SQL_DATABASE=AderantExpert SQL_USER=pms_sync_reader SQL_PASSWORD=<StrongSecretPassword> API_KEY=<SecureRandom32CharString> AZURE_RELAY_NAMESPACE=<client>-pms-relay AZURE_RELAY_PATH=aderant-agent AZURE_RELAY_RULE_NAME=agent-listen AZURE_RELAY_KEY=<ListenSasKey>
- Preflight Diagnostic Verification: Run the preflight checker before starting the service:
aderant-agent.cmd --check
This command validates port 4102 availability, SQL credentials, network latency to the database, and Azure Relay socket binding. Exit code 0 confirms all prerequisites are met. - Start Service:
Start-Service AlterspectiveAderantAgent
Confirm thatGET http://localhost:4102/api/healthreturns200 OKandGET http://localhost:4102/api/health/readyconfirms active SQL connectivity.
5. Connect Environment & Role Cardinality Configuration
In the PMS Sync Portal, navigate to Settings → Environments and supply the connection details:
- Alterspective Proxy URL: Hosted proxy endpoint (e.g.
https://aderant-proxy.alterspective.com.au). - Azure Relay Endpoint:
https://<namespace>.servicebus.windows.net/aderant-agent. - Azure Relay SAS Key & Rule Name: The
proxy-sendkey and rule name. - Clio Operate Connection: Identity URL, API URL, client ID, client secret, and scope.
- Role Cardinality Mapping: Configure work-type participant rules. Designate single-allocation roles (Claim Handler, Responsible Partner) vs multi-allocation roles (Counsel, Expert Witnesses), ensuring pre-import validation catches conflicts before writes execute.
- Default Security Teams: Configure mandatory matter access groups to stamp on import.
6. End-to-End Verification Checklist
- Search Verification: Query a known matter code on the dashboard to test the read path (Portal → Proxy → Relay → Agent → SQL).
- Preview & Cardinality: Open the matter preview to confirm client details, parties, and role badges resolve with zero cardinality warnings.
- Pilot Import: Enable import writes, import one test matter, and verify the work item and ODS party links in Clio Operate.
- Idempotency Verification: Re-import the same matter to verify it detects the existing record and prevents duplicate creation.
7. Troubleshooting Matrix
| Symptom | Root Cause | Resolution |
|---|---|---|
| Search fails with 500 error; local /health passes | Proxy Send SAS key is missing or invalid in Settings | Verify SAS key matches the proxy-send rule in Azure Relay. |
| Azure Relay returns 401 "Token Required" | Request reached the relay without valid HMAC signature | Ensure proxy environment is configured with the Relay SAS key and rule name. |
| Agent refuses to start on Windows host | API key < 32 chars or SQL TCP connection failed | Run aderant-agent.cmd --check to inspect preflight output. |
| Health check reports degraded but ready | Agent running with Azure Relay hybrid connection rather than local proxy | Expected behavior in relay mode; liveness and readiness remain active. |
| Role cardinality duplicate conflict error | Multiple parties mapped to a single-allocation role | Select the primary participant in the preview modal or update the mapping rule. |
For component boundaries and security specifications, see the Technical Overview. For staff import procedures, see the User Guide.