Hardening

Hardening baselines for Windows and Linux: a policy of rules per device type, results per device, planning and applying fixes (with undo), exceptions, and the standard as a Group Policy script for domain admins.

MethodPathSummary
GET/api/baselineHardening overview
POST/api/baseline/enableOpt-in: Hardening checks run only for organisations that turned it on
GET/api/baseline/policyThe Hardening policy: which rules, per device type, and applying it to a domain as GPOs
PUT/api/baseline/policyUpdate the hardening policy
POST/api/baseline/policy/applyApply the hardening policy to a domain as Group Policy
POST/api/baseline/policy/applies/:id/undoUndo a Group Policy apply
GET/api/baseline/platformsHardening by platform
GET/api/baseline/platforms/:osOne platform's rules and devices
GET/api/baseline/rules/:idGet a hardening rule
POST/api/baseline/policy/rulesAdd rules to the policy, or take them out, for some device types
POST/api/baseline/policy/apply-nowApply the policy now on one platform's devices outside a domain (Warden fixes them itself)
GET/api/baseline/devices/:idA device's hardening results
PUT/api/baseline/devices/:id/typeA Linux device's type (server / workstation) by hand, or null for detected
POST/api/baseline/checkCheck devices against the baseline now
POST/api/baseline/planPlan hardening fixes
POST/api/baseline/applyApply planned hardening fixes
POST/api/baseline/undoUndo hardening fixes on a device
GET/api/baseline/standardThe Hardening policy as a script a domain admin can run instead of Apply
GET/api/baseline/local-standardThe standard on Windows devices outside a domain (applied by Warden)
PUT/api/baseline/local-standardSet the standard for devices outside a domain
PUT/api/baseline/exceptionsAdd a hardening exception
DELETE/api/baseline/exceptionsRemove a hardening exception

#Hardening overview

GET/api/baseline
Address
https://<your-org>.brambleit.cloud/warden/api/baseline
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Warden.

Response 200

FieldTypeDescription
enabledboolean
can_manageboolean
Example response
JSON
{
  "…o": "…",
  "enabled": true,
  "can_manage": true
}

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline', {
  method: 'GET',
  credentials: 'include',
});
const data = await res.json();

#Opt-in: Hardening checks run only for organisations that turned it on

POST/api/baseline/enable
Address
https://<your-org>.brambleit.cloud/warden/api/baseline/enable
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Warden.
Permission (any of): warden.directory.manage.

Request body JSON

NameTypeDescription
onany

Response 200

FieldTypeDescription
enabledboolean
queuedany
Example response
JSON
{
  "enabled": true,
  "queued": null
}

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/enable', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"on":"…"}),
});
const data = await res.json();

#The Hardening policy: which rules, per device type, and applying it to a domain as GPOs

GET/api/baseline/policy
Address
https://<your-org>.brambleit.cloud/warden/api/baseline/policy
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Warden.

Response 200

FieldTypeDescription
can_manageboolean
Example response
JSON
{
  "…await policy.view(T(req)": "…",
  "can_manage": true
}

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/policy', {
  method: 'GET',
  credentials: 'include',
});
const data = await res.json();

#Update the hardening policy

PUT/api/baseline/policy
Address
https://<your-org>.brambleit.cloud/warden/api/baseline/policy
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Warden.
Permission (any of): warden.directory.manage.

Response 200

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/policy', {
  method: 'PUT',
  credentials: 'include',
});
const data = await res.json();

#Apply the hardening policy to a domain as Group Policy

POST/api/baseline/policy/apply
Address
https://<your-org>.brambleit.cloud/warden/api/baseline/policy/apply
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Warden.
Permission (any of): warden.directory.manage.

Request body JSON

NameTypeDescription
domainstring

Response 200

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/policy/apply', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"domain":"string"}),
});
const data = await res.json();

#Undo a Group Policy apply

POST/api/baseline/policy/applies/:id/undo
Address
https://<your-org>.brambleit.cloud/warden/api/baseline/policy/applies/:id/undo
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Warden.
Permission (any of): warden.directory.manage.

Path parameters

NameTypeDescription
idrequirednumber

Response 200

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/policy/applies/12.5/undo', {
  method: 'POST',
  credentials: 'include',
});
const data = await res.json();

#Hardening by platform

GET/api/baseline/platforms
Address
https://<your-org>.brambleit.cloud/warden/api/baseline/platforms
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Warden.

Response 200

FieldTypeDescription
can_manageboolean
Example response
JSON
{
  "…await views.summary(T(re": "…",
  "can_manage": true
}

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/platforms', {
  method: 'GET',
  credentials: 'include',
});
const data = await res.json();

#One platform's rules and devices

GET/api/baseline/platforms/:os
Address
https://<your-org>.brambleit.cloud/warden/api/baseline/platforms/:os
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Warden.

Path parameters

NameTypeDescription
osrequiredstring

Response 200

FieldTypeDescription
can_manageboolean
Example response
JSON
{
  "…await views.platform(T(r": "…",
  "can_manage": true
}

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/platforms/string', {
  method: 'GET',
  credentials: 'include',
});
const data = await res.json();

#Get a hardening rule

GET/api/baseline/rules/:id
Address
https://<your-org>.brambleit.cloud/warden/api/baseline/rules/:id
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Warden.

Path parameters

NameTypeDescription
idrequiredinteger

Response 200

FieldTypeDescription
can_manageboolean
Example response
JSON
{
  "…await views.rule(T(req),": "…",
  "can_manage": true
}

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/rules/42', {
  method: 'GET',
  credentials: 'include',
});
const data = await res.json();

#Add rules to the policy, or take them out, for some device types

POST/api/baseline/policy/rules
Address
https://<your-org>.brambleit.cloud/warden/api/baseline/policy/rules
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Warden.
Permission (any of): warden.directory.manage.

Request body JSON

NameTypeDescription
rule_idsarray of any
profilesarray of any
onboolean

Response 200

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/policy/rules', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"rule_ids":[],"profiles":[],"on":false}),
});
const data = await res.json();

#Apply the policy now on one platform's devices outside a domain (Warden fixes them itself)

POST/api/baseline/policy/apply-now
Address
https://<your-org>.brambleit.cloud/warden/api/baseline/policy/apply-now
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Warden.
Permission (any of): warden.directory.manage.

Request body JSON

NameTypeDescription
osstring: "windows" | "linux"
device_idsarray of any
profilestring
rule_idsarray of any

Response 200

Errors

StatusMessage
400Choose Windows or Linux

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/policy/apply-now', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"os":"windows","device_ids":[],"profile":"string","rule_ids":[]}),
});
const data = await res.json();

#A device's hardening results

GET/api/baseline/devices/:id
Address
https://<your-org>.brambleit.cloud/warden/api/baseline/devices/:id
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Warden.

Path parameters

NameTypeDescription
idrequiredinteger

Response 200

Errors

StatusMessage
404Not found

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/devices/42', {
  method: 'GET',
  credentials: 'include',
});
const data = await res.json();

#A Linux device's type (server / workstation) by hand, or null for detected

PUT/api/baseline/devices/:id/type
Address
https://<your-org>.brambleit.cloud/warden/api/baseline/devices/:id/type
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Warden.
Permission (any of): warden.directory.manage.

Path parameters

NameTypeDescription
idrequiredinteger

Request body JSON

NameTypeDescription
profileany

Response 200

FieldTypeDescription
messagestring
Example response
JSON
{
  "message": "Saved"
}

Errors

StatusMessage
404Not found

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/devices/42/type', {
  method: 'PUT',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"profile":"…"}),
});
const data = await res.json();

#Check devices against the baseline now

POST/api/baseline/check
Address
https://<your-org>.brambleit.cloud/warden/api/baseline/check
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Warden.

Request body JSON

NameTypeDescription
device_idsarray of any

Response 200

FieldTypeDescription
queuedany
Example response
JSON
{
  "queued": null
}

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/check', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"device_ids":[]}),
});
const data = await res.json();

#Plan hardening fixes

POST/api/baseline/plan
Address
https://<your-org>.brambleit.cloud/warden/api/baseline/plan
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Warden.

Request body JSON

NameTypeDescription
device_idsarray of any
rule_idsarray of any

Response 200

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/plan', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"device_ids":[],"rule_ids":[]}),
});
const data = await res.json();

#Apply planned hardening fixes

POST/api/baseline/apply
Address
https://<your-org>.brambleit.cloud/warden/api/baseline/apply
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Warden.

Request body JSON

NameTypeDescription
itemsarray of any

Response 200

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/apply', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"items":[]}),
});
const data = await res.json();

#Undo hardening fixes on a device

POST/api/baseline/undo
Address
https://<your-org>.brambleit.cloud/warden/api/baseline/undo
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Warden.

Request body JSON

NameTypeDescription
device_idinteger
rule_idsarray of any

Response 200

Errors

StatusMessage
404Not found

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/undo', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"device_id":7,"rule_ids":[]}),
});
const data = await res.json();

#The Hardening policy as a script a domain admin can run instead of Apply

GET/api/baseline/standard
Address
https://<your-org>.brambleit.cloud/warden/api/baseline/standard
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Warden.

Query parameters

NameTypeDescription
downloadstring

Response

A body.

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/standard', {
  method: 'GET',
  credentials: 'include',
});
const data = await res.json();

#The standard on Windows devices outside a domain (applied by Warden)

GET/api/baseline/local-standard
Address
https://<your-org>.brambleit.cloud/warden/api/baseline/local-standard
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Warden.

Response 200

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/local-standard', {
  method: 'GET',
  credentials: 'include',
});
const data = await res.json();

#Set the standard for devices outside a domain

PUT/api/baseline/local-standard
Address
https://<your-org>.brambleit.cloud/warden/api/baseline/local-standard
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Warden.
Permission (any of): warden.directory.manage.

Request body JSON

NameTypeDescription
osany
enabledboolean
scope_typestring: "all" | "site" | "group" | "device"
scope_idsarray of any
platformsarray of any
include_strictany

Response 200

FieldTypeDescription
messagestring
Example response
JSON
{
  "message": "Saved"
}

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/local-standard', {
  method: 'PUT',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"os":"…","enabled":true,"scope_type":"all","scope_ids":[],"platforms":[],"include_strict":"…"}),
});
const data = await res.json();

#Add a hardening exception

PUT/api/baseline/exceptions
Address
https://<your-org>.brambleit.cloud/warden/api/baseline/exceptions
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Warden.

Request body JSON

NameTypeDescription
device_idstringThe device.
rule_idintegerThe rule it's excused from.
reasonstringWhy.

Response 200

FieldTypeDescription
messagestring
Example response
JSON
{
  "message": "Saved"
}

Errors

StatusMessage
404Not found

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/exceptions', {
  method: 'PUT',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"device_id":"string","rule_id":7,"reason":"string"}),
});
const data = await res.json();

#Remove a hardening exception

DELETE/api/baseline/exceptions
Address
https://<your-org>.brambleit.cloud/warden/api/baseline/exceptions
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Warden.

Request body JSON

NameTypeDescription
rule_idinteger
device_idstring

Response 200

FieldTypeDescription
messagestring
Example response
JSON
{
  "message": "Saved"
}

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/warden/api/baseline/exceptions', {
  method: 'DELETE',
  credentials: 'include',
});
const data = await res.json();