Gardience Documentation gardience.com →
Docs / Using Gardience

Jira and ServiceNow

Gardience works with Jira (Cloud, Data Center, and Server) and ServiceNow in both directions.

Everything is set up under Administration > Integrations (admins only). Nothing else in Gardience ever waits on Jira or ServiceNow: if one is down, runs go ahead as usual, the page says what failed, and the next sync tries again. The one exception is the approved ticket rule described below, which fails closed on purpose.

Connect Jira

#
  1. Create the credential Gardience signs in with.

    • Jira Cloud uses an account's email address and an API token. Sign in to id.atlassian.com as that account and choose Security > API tokens > Create API token.
    • Jira Data Center and Server use a personal access token. In Jira, open your profile and choose Personal Access Tokens > Create token.

    Use a service account that can create, comment on, and transition issues in the project, and read your change tickets if you use Jira for those.

  2. Open Administration > Integrations and fill in Connect Jira. Choose Jira Cloud or Jira Data Center or Server, then enter the address (for example https://acme.atlassian.net, or https://jira.acme.com/jira with a context path), the account email (Cloud only), the token, the project key (SEC for issues like SEC-12), and the issue type for findings (Task by default; Bug and Vulnerability are common choices).
  3. Optionally map Gardience severities to your Jira priorities, add labels (gardience by default) and components, and name the done transition (for example Done). Leave a priority empty and Gardience does not set one.
  4. Choose Save, then Test connection. The test reads the project and confirms the issue type exists in it.

Gardience calls Jira's REST API version 2, which Jira Cloud, Data Center, and Server all support.

Connect ServiceNow

#
  1. Create a ServiceNow user with the itil role (it creates and updates incidents or problems, and reads and adds work notes to change requests), or an OAuth bearer token.
  2. Open Administration > Integrations and fill in Connect ServiceNow. Enter the instance address (for example https://acme.service-now.com), the user and password (leave the user empty to use a bearer token), and whether findings become incidents or problems.
  3. Optionally set an assignment group, the resolved state number (6 on a standard incident table), and a close code (for example Solved (Permanently)). Without a resolved state, Gardience adds the evidence as a work note and leaves closing the record to people.
  4. Choose Save, then Test connection.

How credentials are kept

#

The token or password is write-only. It is sealed in the vault, never shown again, and bound to the address and account it was saved with. If you change the address or the account, the saved credential is discarded and you enter it again, so a saved credential can never be pointed at another server. Saving a credential is recorded in the audit log as itsm.credential_set, without the value.

Addresses must be https. For a Jira Data Center or ServiceNow server inside your network that has no HTTPS, tick Allow plain HTTP to an internal address. Gardience then accepts http only when the name resolves to a private address (10.x, 172.16 to 172.31, 192.168.x, or an IPv6 unique local address). The token crosses that network unencrypted, so use HTTPS whenever you can. Gardience never calls loopback, link-local, or cloud metadata addresses, or its own services, and it does not follow redirects.

Open issues for findings

#

Choose where findings go under What Gardience does with them > Findings go to. If only one system is connected, findings go there.

Once an issue exists, its key and status show next to the finding instead of the button. Admins and Compliance people open issues for findings. People limited to some node groups cannot, because an issue lists every machine a finding is on.

An issue that someone deletes in Jira or ServiceNow is not recreated by the sync. Choosing the button again opens a new one.

Automatic rules

#

Under What Gardience does with them:

Both are off until an admin turns them on.

When a finding is fixed

#

Gardience syncs every 15 minutes, and soon after each vulnerability check and STIG scan. For each linked issue it reads the issue's status, shown next to the finding and on Administration > Integrations, and checks whether the finding is fixed:

When a finding is fixed, Gardience comments on the issue with the evidence: when Gardience last checked, the run that changed those machines (its name and link, who launched it, who approved it, when it finished, and its change ticket), or a note that no Gardience run changed them. Then it moves the issue through the done transition you named (in Jira, the transition with that name, or the one that leads to a status with that name) or sets the resolved state (in ServiceNow). If the finding comes back later, the issue gets a comment saying so; reopening it is left to people.

While a finding is still open, Gardience keeps its issue current: when the machine list or the due date changes, it updates the summary, description, and due date. It never changes the priority, labels, components, or assignee after the issue is opened, so your team's triage stays.

Sync now on the Integrations page runs a sync at once.

Change tickets

#

Change tickets are set up under Settings > Change tickets (see Workflows and approvals). On the Integrations page, choose where your change tickets live under Change tickets live in. A ticket like SEC-12 is a Jira issue; one like CHG0012345 is a ServiceNow change request.

With Comment on a run's change ticket on (the default), every run that carries a ticket comments on it:

ServiceNow change requests get these as work notes. Each comment is posted once. If Jira or ServiceNow cannot be reached, the run goes ahead and the comment is tried again at each sync for a day. Each posted comment is recorded in the audit log as itsm.change.commented with the ticket number.

Only approved change tickets

#

With Start a run only while its change ticket is in an approved state on, Gardience asks Jira or ServiceNow for the ticket's status when the run is requested, and again when a second person approves it in Gardience. The run starts only if the status is one of the approved statuses you list (Jira, by default Approved) or, for ServiceNow, the change request's state or approval is one of them (by default Approved, Scheduled, and Implement).

This rule fails closed. If the ticket is in another status, if it does not exist, or if Jira or ServiceNow cannot be reached, nothing starts and the person sees why, for example "Change ticket SEC-12 is In Review in Jira, not approved (Approved). Nothing was started; try again once it is approved." It applies to runs that carry a ticket; to make every change carry one, set Settings > Change tickets to Required for every change.

Status webhook (optional)

#

Without the webhook, statuses update at each sync. With it, Jira or ServiceNow tells Gardience at once when a status changes. The webhook only changes the status Gardience shows next to a finding. It cannot open, change, or run anything.

  1. On the Integrations page, choose Make a secret and copy it. It is shown once.
  2. In Jira, create a webhook for the issue updated event that calls the Jira address shown on the page, and enter the secret as the webhook's secret (Jira signs each call with it). If your Jira cannot sign webhooks, add ?token= and the secret to the address instead.
  3. In ServiceNow, create a business rule on your incident or problem table that posts JSON such as {"number": "INC0012345", "state": "Resolved"} to the ServiceNow address shown on the page, with the secret in an X-Gardience-Token header.

Making a new secret stops the old one from working.

Limits and safety

#
#
Gardience by Bouziden Management LLC.