> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/j/jira-assets-policies.md).

# Jira Assets Policies

Jira Assets is the asset and configuration management module of Jira Service Management. This adapter reads the objects of one object type that represents firewall or access rules and adds them to the policy inventory.

## Use cases

* **Review rules recorded in the CMDB.** List every rule that Jira Assets provides.

```
Adapters = jira-assets-policies
```

* **Find inbound rules.** Show rules whose direction is Inbound.

```
Adapters = jira-assets-policies AND Direction = Inbound
```

## Before you begin

### Network

| Source              | Destination                                            | Port               | Protocol |
| ------------------- | ------------------------------------------------------ | ------------------ | -------- |
| OctoXLabs connector | Jira Assets host (Jira Service Management Data Center) | 443 (configurable) | HTTPS    |

The port is the value of the **Port** parameter. Use HTTP and the matching port if you clear **SSL**.

### Required permissions

Not verified: the connector code does not name a Jira permission. The account must be able to read the object type set in **Object Name** and its attributes. The baseline only states that an **API-User** is needed.

## Create credentials in Jira Assets

{% stepper %}
{% step %}

### Create an API user

In Jira, open the settings section and create an **API-User**. The Jira Assets API access of the adapter uses this account.
{% endstep %}

{% step %}

### Give the account read access to the object type

Make sure the account can view the objects of the object type you plan to fetch. Not verified in the connector code, see the note at the end of the page.
{% endstep %}

{% step %}

### Note the object type name

Copy the exact name of the Jira Assets object type. You enter it as **Object Name** in OctoXLabs.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
Objects without a value in the policy id field are skipped. Internet exposure and the inbound and outbound flags are derived from the direction, action, status and address fields by the platform.
{% endhint %}

## Connection parameters

| Parameter                 | Required | Type    | Default             | Description                                                                                                                                                                                          |
| ------------------------- | -------- | ------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| IP & Domain               | Yes      | String  | None                | IP address or domain of the Jira Assets host.                                                                                                                                                        |
| Port                      | No       | Integer | 443                 | Port of the Jira Assets host.                                                                                                                                                                        |
| Username                  | Yes      | String  | None                | Username of the API user.                                                                                                                                                                            |
| Password                  | Yes      | String  | None                | Password of the API user.                                                                                                                                                                            |
| SSL                       | No       | Boolean | True                | Connect over HTTPS.                                                                                                                                                                                  |
| Object Name               | Yes      | String  | None                | Name of the Jira Assets object type to fetch. Child object types are included.                                                                                                                       |
| Per Page                  | No       | Integer | 500                 | Number of objects requested per page.                                                                                                                                                                |
| Policy Type               | No       | Choice  | NetworkPolicy       | Kind of policy the object type represents. One connection fetches one object type, so the type is fixed per connection. The list of allowed values comes from the platform and is not verified here. |
| Policy Id Field           | No       | String  | objectKey           | Object field or Jira Assets attribute name. Unique identifier of each rule.                                                                                                                          |
| Rule Name Field           | No       | String  | name                | Object field or Jira Assets attribute name. Rule name.                                                                                                                                               |
| Description Field         | No       | String  | Description         | Object field or Jira Assets attribute name. Free-text description.                                                                                                                                   |
| Action Field              | No       | String  | Action              | Object field or Jira Assets attribute name. Rule action, for example `Allow` or `Deny`.                                                                                                              |
| Status Field              | No       | String  | Status              | Object field or Jira Assets attribute name. Whether the rule is enabled.                                                                                                                             |
| Direction Field           | No       | String  | Direction           | Object field or Jira Assets attribute name. Traffic direction: `Inbound`, `Outbound` or `Both`.                                                                                                      |
| Source Address Field      | No       | String  | Source Address      | Object field or Jira Assets attribute name. Source networks. Separate several values with commas. `any` is stored as the wildcard address.                                                           |
| Destination Address Field | No       | String  | Destination Address | Object field or Jira Assets attribute name. Destination networks, same format as the source.                                                                                                         |
| Application Field         | No       | String  | Application         | Object field or Jira Assets attribute name. Application the rule applies to.                                                                                                                         |
| Timeout                   | No       | Integer | 120                 | Seconds to wait for an API response.                                                                                                                                                                 |
| Thread Count              | No       | Integer | 16                  | Number of parallel threads used to request result pages.                                                                                                                                             |

## Troubleshooting

| Error message                                                                   | Cause                                                                                     | Fix                                                                                            |
| ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| AQL response for page {page} carries no 'objectEntries'; the page is skipped.   | A result page came back without an `objectEntries` list.                                  | Check the object type and the account permissions, then run discovery again.                   |
| AQL response carries no 'totalFilterCount'; only the first page is fetched.     | The first response did not include a total count, so the page count cannot be calculated. | Check that the host exposes the Assets AQL endpoint and that the object type returns objects.  |
| AQL response carries no 'objectTypeAttributes'; asset attributes will be empty. | The attribute definitions are missing from the response.                                  | Check that the object type has attributes and that the account can read them.                  |
| Status Code: `, followed by URL, Method and the response body`                  | The API answered with a status other than 200. This is the shared REST connector error.   | Read the status code and body in the message, then check the credentials, permissions and URL. |

## Change history

{% hint style="info" %}
Available starting from version 6.8.1.
{% endhint %}
