You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added some formatting suggestions. Reworded the caution tip at the top. Added the suggested section at the top "When To Use A HAR File". Added a new section towards the bottom, "Viewing A HAR File"
Copy file name to clipboardExpand all lines: src/content/docs/identityserver/troubleshooting/export-har-files.md
+15-6Lines changed: 15 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,15 +10,20 @@ sidebar:
10
10
[HTTP Archive (HAR)](https://en.wikipedia.org/wiki/HAR_(file_format)) files are logs of network interactions made by a web browser. They contain headers, request bodies, response payloads, and even sensitive information like cookie values sent and received for each interaction.
11
11
12
12
:::caution[Do not share sensitive information]
13
-
Before sharing any HAR files that contain sensitive values for diagnosing, you can sanitize that data by following the [steps below](#sanitize-a-har-file).
13
+
Before sharing HAR files you should ensure they do not contain any sensitive information. You can sanitize a file by following the [steps below](#sanitize-a-har-file).
14
14
:::
15
15
16
+
## When To Use A HAR File
17
+
18
+
Because HAR files are traces of all network interactions within the browser, they are commonly shared with another party to help diagnose issues. A common scenario is when there are multiple services involved with a use case. You can imagine an application where a user logs in to a site with Duende IdentityServer on the backend, and an external IdP storing the user account. That scenario has three distinct applications and the HAR file is used to trace if/when certain cookies are set within the login flow.
19
+
16
20
## HAR File Considerations
17
21
18
-
* Consider using an **incognito window** of your browser. If you do, close all browser incognito instances you may have open and then open a new one before creating the HAR file to ensure the cache is cleared.
19
-
* Preserve the log across page navigations
20
-
* If you are navigating to different pages (ex: logging in to a site with OAuth redirects), then any network calls made before the last redirect will be lost. Preserving the logs across page navigations aids in diagnosing issues. The below steps include instructions to preserve network logs while navigating across multiple pages.
21
-
* Generate HAR files with sensitive data
22
+
* Consider using an **incognito window** of your browser.
23
+
* If you do, close all browser incognito instances you may have open and then open a new window to ensure the cache is cleared.
24
+
* Preserve the log across page navigation.
25
+
* If you are navigating to different pages (ex: logging in to a site with OAuth redirects), then any network calls made before the last redirect will be lost. Preserving the logs across page navigation aids in diagnosing issues. The below steps include instructions to preserve network logs while navigating across multiple pages.
26
+
* Generate HAR files with sensitive data.
22
27
* It is helpful to know that certain fields are have been set, but not necessarily the actual value. Some browsers will exclude sensitive data in HAR file exports by default. The below steps include instructions to enable sensitive data in HAR file exports for browsers that do not include it by default.
23
28
24
29
## Generating A HAR File
@@ -55,6 +60,10 @@ Generating a HAR file involves steps using your web browser and its associated d
55
60
1. In the browser, visit the page(s) and perform the steps that trigger the issue.
56
61
1. In the Network tab of the dev tools, click the down arrow and select the "Export HAR (with sensitive data)..." option to export the HAR file and save it locally.
57
62
63
+
## Viewing A HAR File
64
+
65
+
HAR files are JSON files with a specific file extension. You can open one with any text editor you would normally open JSON files with. You can also import the HAR file into your browser dev tools to visualize it the same way you could see network interactions before exporting the file.
66
+
58
67
## Sanitize A HAR File
59
68
60
69
Before sharing your HAR file with anyone, you should remove any sensitive data. You can do this manually by opening the HAR file with any JSON text editor and removing the sensitive data. We recommend replacing the data with a placeholder rather than deleting the entry. When diagnosing issues, it's helpful to know whether a field was set.
@@ -66,4 +75,4 @@ If you would like to practice with a small sample, you can login to the Duende D
66
75
1. In your browser, navigate to <https://demo.duendesoftware.com/Account/Login>.
67
76
1. With your browser and dev tools open, the log being preserved, and the ability to export a HAR file with sensitive data, login to the site using one of the built-in users.
68
77
1. Export the HAR file with sensitive data.
69
-
1. Explore the HAR file JSON with a text editor.
78
+
1. Explore the HAR file JSON with a text editor or import it into your browser dev tools.
0 commit comments