Rolling out the agent
You need the Attestree agent on every Windows endpoint, and you want to know where the installer comes from, what a token allows, and how to push it with Intune, Group Policy or Configuration Manager.
UPDATED
Every endpoint runs the same agent installer, an MSI. The enrollment token on the install command ties a machine to your server: the agent redeems it when it first starts, and from then on the endpoint has its own identity and key and checks in with them. This page covers where the installer and the command come from, how far one token goes, how to push both to a whole fleet, and the setup wizard. Once enrolled, the agent updates itself when a new agent release is armed. Unless the rollout loop is on, that release stops at the canary ring. A Community Edition installation set up on platform 26.11.2600 or later starts with the loop and auto-arm on; rollout operations says why and how a release moves on.
Where the installer comes from
On Community Edition the console serves it. Each release of the image carries the agent MSI of that release, and the Agents page (/community/agents) has a Download link for it under Agent installer, named for its version, wep-agent-<version>.msi.
- The link needs no sign-in, so a deployment tool or a script can fetch it from the console:
https://<your console>/community/agents/installer/wep-agent-<version>.msi. - Only the current version is served. When an upgrade of the platform ships a new agent, the file name changes, and a request for the old name gets 404. A release whose agent did not change ships the same agent again.
- It is rate-limited per network, generously, so that a whole site behind one address can download it: 300 downloads per 15 minutes per /24 by default.
Installed, the agent appears in Windows’ installed apps (Apps & features) as Attestree Agent. The broker’s installer, for a detonation host, appears as Attestree Detonation Broker.
On a dedicated instance, Admin › Agent enrollment (/admin/agent) names the installer the instance holds, with its version and SHA-256. Since platform 26.11.1300 the console serves that MSI to any signed-in account, 300 downloads per 15 minutes per IP by default. Since 26.11.1600 it also serves the .intunewin, and scripts fetch the MSI from /api/v1/agents/installer/current.
Where the command comes from
On Community Edition, an admin chooses Enroll an agent on the Agents page, types the confirmation, picks the token’s lifetime and how many endpoints it may enroll, and chooses Generate. The page then shows the token, with two ways to install:
-
install-agent.cmd, a one-click script. Save it in the same folder as the MSI and double-click it: it asks for elevation once and runs the silent install. It stops with an error if the MSI is not next to it. -
The command line, for anything else:
msiexec /i wep-agent-<version>.msi /qn WEP_BOOTSTRAP_TOKEN="<token>" WEP_CALLBACK_URL="<your console address>" WEP_HOSTING_PROFILE=Community WEP_TENANT_ID="homelab"
WEP_CALLBACK_URL is the address the agent enrolls and checks in at, taken from the platform’s public address, WEP_PUBLIC_BASE_URI. Where that is not set, the page works one out from the server’s own binding and warns you to check it, which matters behind a reverse proxy or a port mapping. An endpoint that is not the Docker host reaches that address over HTTPS, so it must trust the certificate before the agent installs: endpoint TLS trust says which root goes where.
On a dedicated instance, mint enrollment token on Admin › Agent enrollment issues a token with the same bounds as below: 1 to 24 hours for a token that admits one endpoint and up to 720 hours by default for one that admits more, 1 to 1,000 endpoints, and an optional ring. Since platform 26.11.501 it shows the token once, with the full msiexec command, WEP_TENANT_ID included, to run elevated in the folder that holds the MSI. Before that, the token lasted one hour, enrolled one endpoint and came with no command. Minting there is open only to the accounts on the instance’s operator list, which is set when the instance is deployed, not in the console. Your own admins mint the tokens; Attestree does not.
Tokens
- Lifetime. One hour by default. A token that admits one endpoint can last 1 to 24 hours. A token for more than one endpoint can last up to 720 hours (30 days) by default: the ceiling is the setting
Wep:Enrollment:FleetTtlMaxHours, which is capped at 2,160 hours. It was 168 hours in 26.11.1300 and is 720 since 26.11.1400. A token is spent when it expires, when its redemptions are used up, or when it is revoked. - Redemptions. One endpoint by default; up to 1,000. Each machine that enrolls with a shared token still gets its own identity and key; the token only admits it. Since 26.11.1400 every machine enrolled with a multi-use token waits under “Machines waiting for approval” and is served nothing until an admin approves it. Rejecting it decommissions it.
- The token list. The Agents page lists the live tokens and those that expired in the last three days, each with a short identifier, when it was created and expires, and how many of its redemptions are used.
- Shown once. Since platform 26.11.400 the token never appears in a URL: after minting, the page address carries a short-lived handle that can be read once, and a reload says the token was shown once.
- The inbox follows a shared token. Since platform 26.11.501 a token with more than one redemption raises one amber row in
/inbox, which grows as machines enroll: which machines and when, who minted the token, and whether it can admit more. Each new machine brings the row back unread, and the inbox’s enrollment filter lists these rows. - Revoking. revoke… on a token’s row ends it at once, behind a typed confirmation. Machines already enrolled keep running. A machine that has not enrolled yet cannot, and needs a new token and a changed command.
- Many machines, one address. Since platform 0.242.3 many endpoints behind one public address can enroll at once: a successful enrollment no longer uses up the per-network attempt limit.
- Off your network. On Community Edition the public listener for off-network endpoints accepts only a token minted as remote-redeemable, and the console does not mint one (since platform 0.249.2). Enroll a laptop while it is on your network; after that it can check in through the public listener, if you publish one. On a dedicated instance every token can be redeemed over the internet, since that is its only way in.
- Install logs. Since the agent MSI of platform 0.249.3 the token is masked in a verbose Windows Installer log. A log written by an older MSI can hold it in clear text.
Pushing the agent to a fleet
Since platform 26.11.1600, minting a token for more than one endpoint shows ready outputs. They are an Intune .intunewin (with its install and uninstall commands, detection rule and return codes), a Group Policy startup script, a Configuration Manager application (a Script Installer deployment type with its detection method and return codes), and a batch script for PDQ Deploy or an RMM. Setting Wep:Agents:Deployment:IntuneOutput=false hides the Intune one. The install is one silent msiexec command with four properties, so any tool that can run a command elevated on each machine can deploy it: an Intune Win32 app, a Configuration Manager application, a Group Policy startup script or your RMM.
- One token per batch. Mint one token with enough redemptions for the batch and a lifetime that covers it. A token for more than one endpoint can last up to 720 hours (30 days) by default, so only a rollout that runs longer needs a new token, and the command in your deployment changes with it.
- The token is in your deployment. Anyone who can read the deployment can enroll a machine with it until it is spent. Revoke it when the batch is done.
- The MSI next to the command, in the package you build, or fetched from the console’s download link on Community Edition.
- Upgrades need no token. Running a newer agent MSI over an installed agent keeps its enrollment. You rarely need to: an enrolled agent updates itself once a new agent release is armed (how a release moves through your rings).
- A machine the server still has enrolled is refused a new enrollment. Since platform and agent 26.11.501 such an install stops with “This machine is still enrolled on the server. Decommission it in the console, then re-run the install with a new token”, and the token is not spent. An older agent retries until its token expires. Since agent MSI 26.11.1400 a fresh install first checks its token with the console. The check spends nothing; for a token that admits more than one machine, it holds one of the token’s remaining enrollments for that machine for 15 minutes, so machines that passed the check cannot lose the last places when they enroll. A refused token ends msiexec with 1603 and an unreachable console with 1602, which can be retried, and the console lists the refusals under the token.
- No downgrades. The installer refuses to put an older agent over a newer one (“A newer version of Attestree Agent is already installed”). A deployment that keeps re-running the original MSI on a machine whose agent has since updated itself gets that refusal.
The setup wizard
Since platform 0.252.0 a double-clicked agent MSI opens a setup wizard that starts by asking for your install command, instead of stopping with an error.
- Paste your install command. The first page has one masked field. Paste the command the console made for this computer; setup reads the console address and the enrollment token from it, and the other values the console’s command sets. Nothing else in the text runs, and the command is not written to the setup log.
- A wrong paste is refused, with the reason in red and an empty field: a broker’s install command, a command with no token, a command with no console address, or text it cannot read.
- Install starts the install, with one elevation prompt.
An install with /qn, which install-agent.cmd, the console’s command and the agent’s own updates all use, never sees the wizard. Double-clicking the MSI on a machine that already has the agent offers repair or removal.
Where this stops
- Token lifetimes. A token for one endpoint lives 24 hours at most. A token for more than one endpoint lives up to 720 hours (30 days) by default, so a rollout that outlasts it means a new token and a new command.
- Deployment outputs come with a token for more than one endpoint. Since platform 26.11.1600, minting one shows an Intune
.intunewin, a Group Policy startup script, a Configuration Manager application and a batch script for PDQ Deploy or an RMM.Wep:Agents:Deployment:IntuneOutput=falsehides the Intune one. - Enroll on your network first on Community Edition. A token from the console is refused on the public listener.
- The dedicated console serves the installer to any signed-in account. Since platform 26.11.1300 the MSI it names downloads from the console, 300 downloads per 15 minutes per IP by default. Since 26.11.1600 the
.intunewindoes too. - One identity per install. A machine that is reimaged needs a token again to enroll.