> 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/s/symantec-cloud-secure-web-gateway.md).

# Symantec Cloud Secure Web Gateway

Symantec Cloud Secure Web Gateway (Cloud SWG) is a cloud proxy service. OctoXLabs reads the configured locations as devices. When Fetch Agents is on, it reads agent devices from the Sync API logs instead.

## Use cases

* List the locations configured in Cloud SWG.

```
Adapters = symantec-cloud-secure-web-gateway
```

* Find devices that appear in Cloud SWG but not in the endpoint inventory.

```
Adapters = symantec-cloud-secure-web-gateway AND NOT Adapters = falcon-crowdstrike
```

## Before you begin

### Network

| Source              | Destination        | Port          | Protocol |
| ------------------- | ------------------ | ------------- | -------- |
| OctoXLabs connector | Cloud SWG API host | 443 (default) | HTTPS    |

Port 443 is the default of the Port parameter. An optional HTTP proxy can be set. The connector uses HTTPS when Is Secure is on, and HTTP otherwise.

### Required permissions

| Scope or role                           | Permission | Needed for                           |
| --------------------------------------- | ---------- | ------------------------------------ |
| API credential: Location Management     | Read       | Locations (when Fetch Agents is off) |
| Sync API access for the API credentials | Read       | Agents (when Fetch Agents is on)     |

The source instructions select Location Management when the API credentials are created. The Sync API permission for Fetch Agents comes from the connector error text (HTTP 403 means the credentials cannot access the Sync API).

## Create credentials in Symantec Cloud Secure Web Gateway

{% stepper %}
{% step %}

### Open API Credentials

In the Cloud SWG portal, select **Account Configuration** > **API Credentials**.
{% endstep %}

{% step %}

### Add credentials

Click **Add API Credentials**. The portal shows the New API Credential dialog with a generated username and password.
{% endstep %}

{% step %}

### Set the expiry

Set the API Expiry as you need. Setting it to **Never** is recommended.
{% endstep %}

{% step %}

### Select the permission

Select **Location Management**.
{% endstep %}

{% step %}

### Copy the credentials

Copy the username and the password.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter    | Required | Type     | Default | Description                                                                 |
| ------------ | -------- | -------- | ------- | --------------------------------------------------------------------------- |
| IP           | Yes      | Text     |         | IP address or host name of the Cloud SWG host.                              |
| Port         | No       | Integer  | 443     | Port.                                                                       |
| Username     | Yes      | Text     |         | API credential username. With Fetch Agents on, it is sent as X-APIUsername. |
| Password     | Yes      | Password |         | API credential password. With Fetch Agents on, it is sent as X-APIPassword. |
| Fetch Agents | No       | Boolean  | False   | Fetch agents from the Sync API instead of locations.                        |
| Proxy        | No       | Text     |         | Proxy address.                                                              |
| Is Secure?   | No       | Boolean  | True    | Use HTTPS.                                                                  |
| Timeout      | No       | Integer  | 60      | Seconds to wait for API responses.                                          |

## Troubleshooting

| Error message                                                                                                                                                | Cause                                                                                               | Fix                                                                               |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| Status code 401. The credentials included in the authentication headers(X-APIUsername and X-APIPassword) are incorrect.                                      | The Sync API rejected the credentials.                                                              | Check the API credential username and password.                                   |
| Status code 403. The credentials included in the authentication headers(X-APIUsername and X-APIPassword) were valid, but do not have access to the Sync API. | The credentials have no Sync API access.                                                            | Enable Sync API access for the API credentials.                                   |
| Status code 400. {message}                                                                                                                                   | The Sync API refused the request, for example because a token is not allowed for some more seconds. | Read the message. The connector waits when the message gives a number of seconds. |

## Change history

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