Skip to content

Agents

Who can do this: repository admins, and an administrator of the machine the agent runs on.

The agent is a small service you install inside your network. It reaches file shares, SharePoint Server, Exchange Server and databases there, and passes what ContentSurface asks for — listings, and content when someone opens a document — without storing it.

  • The agent connects out to ContentSurface over HTTPS on port 443. No inbound firewall rule is needed. It works through corporate proxies, including those that inspect TLS.
  • It runs as a Windows service or a Linux systemd service. For SharePoint Server and Windows-authenticated Exchange Server, it runs on a domain-joined Windows machine as a domain service account.
  • What it may read is limited twice: by the service account’s rights in the source, and by the allowed roots or sites in the agent’s own configuration file, which only someone on that machine can change.

The Agents page with one enrolled agent online and the Download agent box

  1. Open Agents and choose New agent. Give it a name and a description, such as where it runs. It starts as Pending.

  2. On the agent’s page, issue an Enrollment file. It is shown once and works for 72 hours. Download it.

  3. Download the agent. The Download agent box on Agents and on the agent’s page offers the current version for Windows (a .zip) and Linux (a .tar.gz), with its size and SHA-256. The download link works for 15 minutes; open the page again for a fresh one. Copy the package and the enrollment file into one folder on the agent’s machine.

  4. Check and install. The box shows the commands with your file names filled in. On Windows, in an elevated PowerShell (Run as administrator) in that folder:

    Terminal window
    Get-FileHash .\contentsurface-agent-1.0.0-win-x64.zip -Algorithm SHA256
    Unblock-File .\contentsurface-agent-1.0.0-win-x64.zip
    Expand-Archive .\contentsurface-agent-1.0.0-win-x64.zip -DestinationPath .
    Set-ExecutionPolicy -Scope Process Bypass -Force
    .\contentsurface-agent-1.0.0-win-x64\install\install-agent.ps1 -EnrollmentFile .\contentsurface-enrollment-files01.json

    The printed hash must equal the SHA-256 in the Portal. Windows marks a downloaded file as coming from the internet and refuses to run the installer script from it: Unblock-File removes the mark, and Set-ExecutionPolicy -Scope Process lets the unsigned script run in this PowerShell window only. To run the service as a domain account, add -Credential (Get-Credential CORP\svc-contentsurface) to the last line.

    On Linux, as root in that folder:

    Terminal window
    sha256sum contentsurface-agent-1.0.0-linux-x64.tar.gz
    tar -xzf contentsurface-agent-1.0.0-linux-x64.tar.gz
    sudo ./contentsurface-agent-1.0.0-linux-x64/install/install-agent.sh --enrollment ./contentsurface-enrollment-files01.json

    The package unpacks to a folder: the agent and its install scripts. The installer registers the service and applies the enrollment file. Installing a newer package the same way updates the agent and keeps its identity and settings. Delete the enrollment file afterwards.

  5. The agent exchanges the file for its own certificate and connects. It becomes Enrolled and shows Online, with its version, machine, and the plugins it reports — filesystem, sharepoint, exchange, database.

  6. Configure the plugins you need in the agent’s configuration file, agent.settings.json in the agent’s data folder (C:\ProgramData\ContentSurface\Agent on Windows, /var/lib/contentsurface-agent on Linux): enable them and set their allowed roots, sites, mailboxes or profiles. The first installation writes this file as a commented template with an example of each plugin’s section; remove the // in front of the lines you need. Updates never overwrite it. Without allowed roots, the file system plugin may read everything the service account can. Restart the agent’s service after a change. See the connector pages.

  7. Run the agent’s preflight on the machine: it checks reachability, certificates, the service account’s rights and each plugin’s configuration.

  8. On the connection’s page, under Agents, add the agent. It must be enrolled and report the connector’s plugin. The answer shows which mount points it may read.

One agent can serve several connections. Two agents on one connection give failover and more throughput where both may read the same locations; agents in different offices can split one connection between them.

The agent’s certificate lasts 90 days and renews itself well before; you need to do nothing. Revoke a certificate when the machine may be compromised; issue a new enrollment file to enroll the agent again, also for a reinstalled machine.

  • Disable stops the agent from connecting; its certificates and connection links are kept for Enable.
  • Delete removes it with its certificates and links. Uninstall it on the machine too.

Both ask for confirmation when a connection would be left without a usable agent.

  • Offline: the agent has not been heard from recently. Check the service on the machine, its outbound access to port 443, and the proxy settings.
  • The agent must be enrolled and report the connector’s plugin: enroll it, enable the plugin in its configuration, or install a newer agent version.
  • No agent covers this mount point: add the location to the plugin’s allowed roots or sites on the agent machine; the agent reports the change within seconds.
  • The enrollment file expired: issue a new one.
  • No agent package is published yet in the Download agent box: there is no release to download yet; ask ContentSurface support.
  • The download link has expired: open the page again for a fresh link.

In the API

The Portal does this through these calls; an integration can make them directly.

OperationCall
The tenant's agents, by name, keyset-paged.GET /v1/admin/agents
The agent's current installation packages per platform, with size, SHA-256 and short-lived download links.GET /v1/admin/agents/downloads
Creates an agent record, Pending until enrolled.POST /v1/admin/agents
An agent with its reported version, plugins, certificates and online state.GET /v1/admin/agents/{id}
Renames an agent or changes its description.PATCH /v1/admin/agents/{id}
Issues a one-time enrollment file (72 hours); a new one replaces the outstanding one. Shown once.POST /v1/admin/agents/{id}/enrollment
Disables an agent: the hub refuses it. Confirmed through an impact token when connections would be left without a usable agent.POST /v1/admin/agents/{id}/disable
Enables a disabled agent.POST /v1/admin/agents/{id}/enable
Revokes a certificate; the hub checks on every connect.DELETE /v1/admin/agents/{id}/certificates/{slot}
Deletes an agent: certificates and connection links removed (tombstone). Confirmed when connections are left without one.DELETE /v1/admin/agents/{id}
The agents an on-prem connection uses.GET /v1/admin/connections/{id}/agents
Adds and removes the agents an on-prem connection uses; an added agent must be enrolled and report the connector's plugin. The answer names the mount points each added agent covers.PATCH /v1/admin/connections/{id}/agents