Authentication Overview
The Watchman Tower WordPress integration uses two stages of authentication:- a register token to complete the initial pairing
- a paired shared secret + site ID for ongoing authenticated heartbeat traffic
Stage 1: Register Token
The initial connection starts with a register token. The plugin stores that token inwthb_options and uses it to complete the
first connection heartbeat.
That first request is what allows Watchman Tower to return pairing data such as:
siteIdsecretKeyorhmacSecretdesiredIntervalSecpause
The docs should not assume a public token format, fixed expiry window, or
wp-config-based setup flow unless that behavior is explicitly implemented by
the product.
Stage 2: Paired Authentication
After the first successful pairing heartbeat, the plugin stores:site_idhmac_secretconnected
Outgoing Heartbeat Authentication
For paired outbound requests, the plugin signs the heartbeat payload and sends headers such as:X-WT-KeyX-WT-TimestampX-WT-Signature
Inbound WT-Triggered Authentication
The plugin also exposes an authenticated REST route at:site_id and hmac_secret before the heartbeat job is executed.
Where State Is Stored
Most pairing state is stored in:wthb_options:
tokenagent_jwthmac_secretsite_idconnected
Practical Security Notes
The current plugin behavior supports these safe assumptions:- pairing is site-specific
- ongoing traffic becomes secret-based after connection succeeds
- unlinking clears pairing state locally
- fixed token prefixes
- environment-specific token naming
- wp-config constants as the primary setup path
- dashboard-driven token rotation UI inside the plugin docs
