Skip to content
Detection & ResponseMarkdown

Group configuration

One configuration that every security sensor in the realm shares, read and edited through the API, and pushed to each device.

AvailableAPI

Every sensor in your realm runs one shared configuration on top of its own defaults: which extra folders to watch, which extra logs to read, and how often assessments and tamper checks run. Change it once, and every device in the realm picks it up within a minute or two.

  • Who: an administrator of the realm, in a group holding RealmOwner on the realm or a realm above it (see Delegated administration). Detection & Response doesn’t yet tell RealmViewer apart from RealmOwner: a viewer can change this configuration too, so give RealmViewer only to people you’d trust to.
  • Where: the API.
  • First: the settings you can use are in the Configuration reference.

The configuration is one text, in XML. When you save it, each device receives it over its own connection, checks it arrived whole, applies it and restarts its sensor. A device that’s offline receives it when it reconnects.

Every write names the revision it was read at, an opaque value the read gives you, so a change made over someone else’s is refused rather than silently lost.

Through the API (Call the API), read the configuration:

Terminal window
curl https://foobar.cvyuh.com/api/v0/endpoint/dar/v1/group/configuration \
-H "Cookie: x-cvyuh-token=$CVYUH_SESSION"
{ "revision": "<revision>", "xml": "<agent_config>…</agent_config>" }

Write the whole text back, with the revision you read:

Terminal window
curl -X PUT https://foobar.cvyuh.com/api/v0/endpoint/dar/v1/group/configuration \
-H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \
-H "Content-Type: application/json" \
-d '{"xml": "<the whole configuration>", "revision": "<revision>"}'

The answer is the new revision. GET https://foobar.cvyuh.com/api/v0/endpoint/dar/v1/group lists the group’s files, each with its checksum. Watch another folder on your devices makes a change start to finish.

AnswerWhyWhat to do
400, “can’t run commands”The text would run a command on a deviceRemove it; see what is refused
400, with a reason and lineA setting or value the sensor doesn’t take, or text that isn’t well formedFix the line named
412The configuration changed since you read itRead it again, redo your change, write it with the new revision
413The text is over 512 KBRemove what you don’t need

Nothing reaches any device until a write succeeds.

LimitValue
Configurations per realmOne, shared by every device in the realm
Size512 KB
Time to reach a connected deviceUsually within two minutes
A new realm’s configurationEmpty: devices run their defaults
  • Whole text, every time. A write replaces the configuration. Add your change to what you read.
  • No commands on your devices. Nothing in the configuration can run a command on a device.
  • What one device runs. See one device’s running configuration in its device view.
SymptomCauseFix
A device doesn’t show the changeIt’s offline, or hasn’t reloaded yetCheck its status is active, wait two minutes, then restart its sensor (Sensor actions)
Every write answers 412Another administrator, or a script, keeps writingRead and write back in one step, as the guide’s jq does

None yet. Configuration writes aren’t recorded in the realm’s audit trail; keep the text you replaced, so you can put it back and know what changed.