45e9cbd269
467 of the 1592 commands carried no `risk:`. An unset risk is read as
destructive by the agent approval gate, so half the catalog's write side sat
behind the same prompt — and, in HarfangLab's case, 39 pure lookups did too.
A gate that stops everything stops being read as a signal, which is the
argument already made for the toolkit and for sentinelone (df27876).
The catalog is now 1027 read, 261 safe_write, 304 destructive, with nothing
defaulted. The line follows the one sentinelone drew: impact on the estate,
not reversibility — isolate-agent is reversible and is the canonical
destructive example.
read only queries; changes nothing outside Riposte
safe_write additive or reversible inside the tool's own case/enrichment
plane: comments, tickets, tags, alert statuses, threat-intel
records, sandbox submissions, collection jobs, outbound messages
destructive changes the estate or weakens a control: containment, blocklists
and allowlists, exclusions and detection rules, every delete,
identity and credential operations, code on a host, generic
API escape hatches
Three calls that were not obvious, and are now applied throughout:
- Undoing a containment is tiered like the containment it lifts. Un-isolating
a host or un-banning an IP mid-incident is its own decision, not a return to
a neutral state. The catalog contradicted itself here — crowdstrike's
lift_containment was destructive while harfanglab's deisolate_from_threat
was safe_write — so deisolate_from_threat and unquarantine_file are
re-tiered to destructive, the only two existing tiers this pass changes.
- Retrieving a live secret is destructive: cyberark get_password, delinea
get_secret, vault read_secret, beyondtrust get_credential. It is a GET, but
the tier describes the stake, not the HTTP verb.
- Sending outward to humans stays safe_write — slack, teams, twilio, telegram,
mail. Irreversible, but it is the collaboration plane, not the estate.
An object created but not yet referenced by a rule is safe_write; editing one
a rule already reads is destructive. That is why fortigate create_address and
panos create_custom_url_category are safe_write while update_address_group and
edit_custom_url_category are not.
The template and README never documented the field, which is how 467 commands
came to omit it. Both now carry the tier table and these rules, so the next
integration declares a tier instead of inheriting one.
111 packages get a MINOR bump and a changelog entry: an instance compares
versions to offer an update, so an unbumped manifest would leave the tiers
sitting in the catalog and never reaching the estates that need them.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
145 lines
7.1 KiB
YAML
145 lines
7.1 KiB
YAML
id: servicenow_iam
|
|
name: ServiceNow IAM
|
|
version: 1.1.0
|
|
description: "ServiceNow identity lifecycle (sys_user table) — look up, create and update employee accounts, enable/disable accounts (with lock-out clearing), and discover the available user fields for mapping. Basic or OAuth 2.0 (password grant) authentication."
|
|
changelog: "1.1.0 — Declare the risk tier on the 4 commands that carried none, all of them destructive. An unset risk was already gated as destructive, so the approval prompt does not move; what changes is that the tier is a stated decision rather than a default, and a command added later cannot inherit it by omission. | 1.0.0 — Initial release: get/create/update user, enable/disable user, user field discovery via sys_dictionary."
|
|
category: identity
|
|
|
|
# Per-instance configuration. The base URL is the instance root, e.g.
|
|
# https://company.service-now.com (scripts append /api/now).
|
|
config_schema:
|
|
properties:
|
|
url:
|
|
type: string
|
|
description: "ServiceNow instance URL, e.g. https://company.service-now.com"
|
|
auth_type:
|
|
type: string
|
|
description: "Authentication method: basic (username + password) or oauth (OAuth 2.0 password grant via /oauth_token.do — also requires client_id/client_secret)"
|
|
default: basic
|
|
username:
|
|
type: string
|
|
description: "ServiceNow username (needs read/write ACLs on the sys_user table)"
|
|
password:
|
|
type: string
|
|
description: "ServiceNow password"
|
|
x-soar-sensitive: true
|
|
client_id:
|
|
type: string
|
|
description: "OAuth client ID (oauth auth_type only — from an Application Registry entry)"
|
|
client_secret:
|
|
type: string
|
|
description: "OAuth client secret (oauth auth_type only)"
|
|
x-soar-sensitive: true
|
|
api_version:
|
|
type: string
|
|
description: "Optional REST API version segment (e.g. v2). Leave empty to use the unversioned endpoints."
|
|
required:
|
|
- url
|
|
- username
|
|
- password
|
|
|
|
# Documented for reference; the bundled scripts build the headers themselves.
|
|
# Basic: Authorization: Basic base64(username:password)
|
|
# OAuth: POST /oauth_token.do (grant_type=password) then Authorization: Bearer <access_token>
|
|
auth:
|
|
- id: basic
|
|
type: basic
|
|
username_field: username
|
|
password_field: password
|
|
|
|
# User resolution: every account command accepts user_id (sys_id), user_name or
|
|
# email — the first one provided wins, in that order.
|
|
commands:
|
|
- id: get_user
|
|
name: servicenow-iam-get-user
|
|
description: "Look up a user account by sys_id, username or email."
|
|
risk: read
|
|
inputs_schema:
|
|
properties:
|
|
user_id: { type: string, description: "User sys_id" }
|
|
user_name: { type: string, description: "Username (user_name field)" }
|
|
email: { type: string, description: "Email address" }
|
|
fields: { type: string, description: "Comma-separated fields to return (sys_id always included)" }
|
|
required: []
|
|
outputs_schema: { properties: {} }
|
|
- id: create_user
|
|
name: servicenow-iam-create-user
|
|
description: "Create a user account. Common fields have named inputs; anything else goes through fields/custom_fields."
|
|
risk: destructive
|
|
inputs_schema:
|
|
properties:
|
|
user_name: { type: string, description: "Username (user_name field)" }
|
|
email: { type: string, description: "Email address" }
|
|
first_name: { type: string, description: "First name" }
|
|
last_name: { type: string, description: "Last name" }
|
|
title: { type: string, description: "Job title" }
|
|
department: { type: string, description: "Department (sys_id or exact name)" }
|
|
manager: { type: string, description: "Manager (sys_id or exact user name)" }
|
|
phone: { type: string, description: "Business phone" }
|
|
mobile_phone: { type: string, description: "Mobile phone" }
|
|
active: { type: boolean, description: "Account active state (default true)" }
|
|
fields: { type: string, description: "Additional sys_user fields as name=value;name2=value2" }
|
|
custom_fields: { type: string, description: "Custom fields as name=value;name2=value2 (u_ prefix added when missing)" }
|
|
required: [user_name]
|
|
outputs_schema: { properties: {} }
|
|
- id: update_user
|
|
name: servicenow-iam-update-user
|
|
description: "Update a user account resolved by sys_id, username or email."
|
|
risk: destructive
|
|
inputs_schema:
|
|
properties:
|
|
user_id: { type: string, description: "User sys_id" }
|
|
user_name: { type: string, description: "Username used to resolve the account when user_id is empty" }
|
|
email: { type: string, description: "Email used to resolve the account when user_id and user_name are empty" }
|
|
first_name: { type: string, description: "First name" }
|
|
last_name: { type: string, description: "Last name" }
|
|
title: { type: string, description: "Job title" }
|
|
department: { type: string, description: "Department (sys_id or exact name)" }
|
|
manager: { type: string, description: "Manager (sys_id or exact user name)" }
|
|
phone: { type: string, description: "Business phone" }
|
|
mobile_phone: { type: string, description: "Mobile phone" }
|
|
fields: { type: string, description: "Additional sys_user fields as name=value;name2=value2" }
|
|
custom_fields: { type: string, description: "Custom fields as name=value;name2=value2 (u_ prefix added when missing)" }
|
|
required: []
|
|
outputs_schema: { properties: {} }
|
|
- id: enable_user
|
|
name: servicenow-iam-enable-user
|
|
description: "Enable a user account (sets active=true and clears locked_out), resolved by sys_id, username or email."
|
|
risk: destructive
|
|
inputs_schema:
|
|
properties:
|
|
user_id: { type: string, description: "User sys_id" }
|
|
user_name: { type: string, description: "Username used to resolve the account when user_id is empty" }
|
|
email: { type: string, description: "Email used to resolve the account when user_id and user_name are empty" }
|
|
required: []
|
|
outputs_schema: { properties: {} }
|
|
- id: disable_user
|
|
name: servicenow-iam-disable-user
|
|
description: "Disable a user account (sets active=false), resolved by sys_id, username or email."
|
|
risk: destructive
|
|
inputs_schema:
|
|
properties:
|
|
user_id: { type: string, description: "User sys_id" }
|
|
user_name: { type: string, description: "Username used to resolve the account when user_id is empty" }
|
|
email: { type: string, description: "Email used to resolve the account when user_id and user_name are empty" }
|
|
required: []
|
|
outputs_schema: { properties: {} }
|
|
- id: list_user_fields
|
|
name: servicenow-iam-list-user-fields
|
|
description: "List the sys_user table fields (name and label) from the sys_dictionary — useful to build field mappings."
|
|
risk: read
|
|
inputs_schema:
|
|
properties:
|
|
limit: { type: number, description: "Maximum dictionary entries (default 500)" }
|
|
required: []
|
|
outputs_schema: { properties: {} }
|
|
|
|
- id: test_connection
|
|
name: servicenow-iam-test-connection
|
|
description: "Verify connectivity and credentials (used by the Test button)."
|
|
risk: read
|
|
inputs_schema:
|
|
properties: {}
|
|
required: []
|
|
outputs_schema: { properties: {} }
|