Skip to content

Commit

Permalink
docs: Added a new topic on generating HAR files (#2015)
Browse files Browse the repository at this point in the history
* docs: Added a new topic on generating HAR files

* Optimised images with calibre/image-actions

* docs: Implement SME and peer review

* docs: Move Safari note to prerequisites and fix list formatting

* docs: Remove the @fortawesome/free-regular-svg-icons import

* docs: Add Lenny's fix to the Troubleshooting page layout

Co-authored-by: Lenny Chen <[email protected]>

* add one link on parent page

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Lenny Chen <[email protected]>
Co-authored-by: Lenny Chen <[email protected]>
  • Loading branch information
4 people authored Jan 12, 2024
1 parent b3e3f5a commit bad9d45
Show file tree
Hide file tree
Showing 5 changed files with 187 additions and 20 deletions.
180 changes: 180 additions & 0 deletions docs/docs-content/troubleshooting/generate-har-files.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
---
sidebar_label: "Generate HAR Files"
title: "Generate and Sanitize HTTP Archive Files"
description: "Learn how to generate and sanitize HAR files to speed up issue resolution."
sidebar_position: 70
tags: ["troubleshooting", "har", "support"]
---

When you report issues with Palette to Spectro Cloud Support, we may ask you to generate an HTTP Archive (HAR) file to help us identify and resolve those issues.

:::caution
HAR files contain all network activity for a specific page, including sensitive and confidential information, such as API keys, secrets, cookies, passwords, and more. Before sending your HAR files to us, sanitize the sensitive data. We do not recommend using any third-party tools for HAR sanitization, as they can overlook some details.
:::

This guide explains how you can generate HAR files in Chrome, Safari, and Firefox and sanitize the sensitive data they contain.

## Prerequisites

- A browser of choice (we recommend Chrome, Safari, or Firefox). If you're using Safari, make sure to [enable its web development features](https://developer.apple.com/documentation/safari-developer-tools/enabling-developer-features) first.
- A text editor of choice (we recommend [Visual Studio Code](https://code.visualstudio.com/) or [Sublime](https://www.sublimetext.com/)).

## Generate and Sanitize HARs

### Generate HAR Files

<Tabs>
<TabItem value="chrome" label="Chrome" default>
1. Open the page with issues in Chrome.
2. On your keyboard, open Developer Tools:
- For Windows and Linux, press **F12** or **Ctrl + Shift + I**.
- For Mac, press **Fn + F12** or **Cmd + Option + I**.

For alternative methods to open Developer Tools, refer to [Open Chrome DevTools](https://developer.chrome.com/docs/devtools/open).
3. In Developer Tools, select the **Network** tab, and, on the **Network** pane:
1. If the leftmost icon displays a circle within a circle, click it to start recording network activity.
2. Click the **Clear network log** icon that follows it to clear the current network log.
3. Select the **Preserve log** and **Disable cache** checkboxes.

![View of the configured Chrome Developer Tools](/troubleshooting_generate-har-files_chrome-dev-tools-settings.png.png)

4. On the page, reproduce the issues you've encountered.
5. In the network log, right-click any item and select **Save all as HAR with content**.

</TabItem>
<TabItem value="safari" label="Safari">
1. Open the page with issues in Safari.
2. On your keyboard, press **⌥ + ⌘ + I** to open Web Inspector.
3. Select the **Network** tab, and, in the **Network** tab menu:

1. Press **⌘ + K** to clear the current network items.
2. Next to the **All** drop-down menu, click the **Other filter options** icon > **Preserve Log**.
3. Select the **Disable Caches** checkbox.

![View of the configured Safari Web Inspector](/troubleshooting_generate-har-files_safari-web-inspector.png)

4. On the page, reproduce the issues you've encountered.
5. In the **Network** tab menu, select **Export**.

</TabItem>
<TabItem value="firefox" label="Firefox">
1. Open the page with issues in Firefox.
2. On your keyboard, open DevTools:
- For Windows and Linux, press **F12** or **Ctrl + Shift + I**.
- For Mac, press **Fn + F12** or **Cmd + Option + I**.

For alternative methods to open DevTools, refer to [Firefox DevTools User Docs](https://firefox-source-docs.mozilla.org/devtools-user/).

3. In DevTools, select the **Network** tab and, in the **Network** tab menu:

1. Click the trash can icon to clear the current network log.
2. If the icon next to the **Filter URLs** field displays a play button, click it to start recording network activity.
3. Click the **Network Settings** icon > **Persist Logs**.

![View of the configured Firefox DevTools](/troubleshooting_generate-har-files_firefox-devtools.png)

4. On the page, reproduce the issues you've encountered.
5. In the network log, right-click any item and select **Save All As HAR**.

</TabItem>
</Tabs>

### Sanitize HAR Files

1. Open the generated HAR file in a text editor.
2. Carefully examine the file contents and either remove or redact sensitive information.

:::tip
If you're using a built-in search feature, ensure it's case-insensitive and check every instance of confidential data it highlights.
:::

You can use the following keywords for reference.

<details>
<summary>Keywords for sanitization</summary>

:::caution
This list is not exhaustive. You should also check for data that is considered sensitive or confidential within your organization.
:::

- **state**
- **shdf**
- **usg**
- **password**
- **code**
- **code_verifier**
- **client_secret**
- **token**
- **Access_token**
- **refresh_token**
- **authenticity_token**
- **Id_token**
- **SAMLResponse**
- **SAML Request**
- **appID**
- **challenge**
- **facetID**
- **assertion**
- **fcParams**
- **serverData**
- **Authorization**
- **auth**
- **key**
- **pem**
- **rsa**
- **dsa**
- **ecdsa**
- **signature**
- **passkey**

</details>

Consider the following examples of how to approach redacting passwords, tokens, and cookies.

<Tabs>
<TabItem value="passwords" label="Passwords" default>
```json
"postData": {
"mimeType": "application/json",
// highlight-next-line
"text": "{\"emailId\":\"REDACTED\",\"password\":\"REDACTED\",\"org\":\"spectro-cloud\"}"
}
```
</TabItem>
<TabItem value="tokens" label="Tokens">
```json
"queryString": [
{
"name": "access_token",
// highlight-next-line
"value": "REDACTED"
}
],
```
</TabItem>
<TabItem value="cookies" label="Cookies">
```json
"cookies": [
{
"name": "__stripe_mid",
// highlight-next-line
"value": "REDACTED",
"path": "/",
"domain": "console.spectrocloud.com",
"expires": "2025-01-10T20:51:03.000Z",
"httpOnly": false,
"secure": true,
"sameSite": "Strict"
},
]
```
</TabItem>
</Tabs>

## Validate

Review the generated HAR file against the list of keywords we provided for reference, and make sure you've redacted every instance of sensitive information.

## Next Steps

After you've successfully generated and sanitized your HAR file, send it to the Support Specialist who asked you for this file.
27 changes: 7 additions & 20 deletions docs/docs-content/troubleshooting/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,42 @@ sidebar_label: "Troubleshooting"
title: "Common issues and their solutions"
description: "Common issues and their solutions in the deployment of Spectro Cloud Clusters"
hide_table_of_contents: false
sidebar_custom_props:
sidebar_custom_props:
icon: "screwdriver-wrench"
tags: ["troubleshooting"]
---




# Troubleshooting

Use the following troubleshooting resources to help you address issues that may arise. You can also reach out to our support team by opening up a ticket through our [support page](http://support.spectrocloud.io/).

<br />

- [Cluster Deployment](cluster-deployment.md)


- [Edge](edge.md)


- [Enterprise Install](enterprise-install.md)


- [Nodes & Clusters](nodes.md)



- [Kubernetes Debugging](kubernetes-tips.md)



- [Packs](pack-issues.md)


- [Palette Dev Engine](palette-dev-engine.md)


- [Palette Upgrade](palette-upgrade.md)


- [Private Cloud Gateway](pcg.md)

## Generate HAR Files

When you report issues with Palette to Spectro Cloud Support, we may ask you to generate an HTTP Archive (HAR) file to help us identify and resolve those issues.



- [Generate HAR files](generate-har-files.md)

## Download Cluster Logs

At times it might be required to work with the Spectro Cloud support team to troubleshoot an issue. Spectro Cloud provides the ability to aggregate logs from the clusters it manages. Problems that occur during the orchestration life cycle may require access to the various containers, nodes, and Kube system logs. Spectro Cloud automates this log collection process and provides an easy download option from the Spectro Cloud UI console. Hence reduces the burden on the operator to login into various cluster nodes individually and fetch these logs.

Follow the link for more details: [Download Cluster Logs](../clusters/clusters.md#download-cluster-logs)
Expand All @@ -63,12 +51,11 @@ Spectro Cloud maintains an event stream with low-level details of the various or

:::caution

Due to Spectro Cloud’s reconciliation logic, intermittent errors show up in the event stream. As an example, after launching a node, errors might show up in the event stream regarding being unable to reach the node. However, the errors clear up once the node comes up.<p></p>
Error messages that persist over a long time or errors indicating issues with underlying infrastructure are an indication of a real problem.
Due to Spectro Cloud’s reconciliation logic, intermittent errors show up in the event stream. As an example, after launching a node, errors might show up in the event stream regarding being unable to reach the node. However, the errors clear up once the node comes up.<p></p>
Error messages that persist over a long time or errors indicating issues with underlying infrastructure are an indication of a real problem.

:::


## Lifecycle Behaviors

Typically when a cluster life cycle action such as provisioning, upgrade, or deletion runs into a failure, it does not result in an outright error on the cluster. The Spectro Cloud orchestration engine follows the reconciliation pattern wherein the system repeatedly tries to perform various orchestration tasks to bring the cluster to its desired state until it succeeds. Initial cluster provisioning or subsequent updates can run into a variety of issues related to cloud infrastructure availability, lack of resources, networking issues, etc.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bad9d45

Please sign in to comment.