|
Field |
Detail |
|
Applies to |
SonicWall firewalls running SonicOS / SonicOSX with the SonicOS API enabled |
|
Version |
SonicOS 7.3.4 and later [confirm equivalent build for Gen8 and other maintained branches] |
|
Setting location |
Device | Settings | Administration | SonicOS API |
|
In short SonicOS 7.3.4 gives you direct control over how the SonicOS API handles requests from web browsers and how API sessions are authenticated Two settings matter: CORS, which is now disabled by default with an explicit list of allowed origins, and Non-GUI Management Login Bearer Token Session Check, which is now enabled by default. If you are upgrading from an earlier release, check both settings after the upgrade. Your previous configuration may be carried forward rather than taking the new defaults. |

Figure 1 — The SonicOS API page in SonicOS 7.3.4. The two settings covered in this article are (1) CORS and Allow CORS Origins, and (2) Non-GUI Management Login Bearer Token Session Check. Both are shown enlarged in Figures 2 and 3.

Figure 2 — CORS is disabled by default. The Allow CORS Origins field defines the exceptions.
What the setting does
Enables or disables Cross-Origin Resource Sharing (CORS), which permits or blocks web pages from a different domain accessing this firewall’s resources.
When CORS is enabled, SonicOS requires an explicit allow list of permitted origins rather than allowing all origins. You enter these in the Allow CORS Origins field as IP addresses or domain names, including wildcard subdomain patterns. This gives you control over which external sites, if any, may make cross-origin API calls to the firewall.
In plain terms
Web browsers normally stop a page on one website from reading data from another website. That protection is what keeps a page you happen to open from quietly talking to your firewall.
When you need to enable it
Most customers do not. Leave CORS disabled unless you operate a browser-based application that calls the SonicOS API directly. Scripted and server-side integrations do not need CORS at all — see “Will this affect my API integrations?” below.
How to configure allowed origins
Keep the list as short as possible. Every entry is a website you are trusting to make authenticated calls to your firewall.

Figure 3 — Non-GUI Management Login Bearer Token Session Check is enabled by default in SonicOS 7.3.4.
What the setting does
This option applies to non-GUI management login. The bearer token is checked for every API request call. The token is initially obtained from the /auth API response. The API client must include this bearer token in the HTTP header for all API requests after logging in. This setting is enabled by default in SonicOS 7.3.4.
In plain terms
With this setting enabled, every API request must carry its own proof that it belongs to a logged-in session. It is not enough for the request simply to come from the same computer that logged in earlier.
This matters because a web page open in a browser sends requests from the same computer as your management session. Requiring a token on each request means such a page cannot act on your session, because it has no way to obtain the token.
What your API client needs to do
Most SonicWall-supplied and third-party API clients already do this. If you maintain your own client and it does not yet send the token, update it before disabling the setting — do not disable the setting as a shortcut.
Why these defaults are set this way
In earlier releases, an API session was associated with the source IP address of the administrator’s workstation, and API responses permitted cross-origin access without restriction. In combination, these two behaviors meant that a web page open in an administrator’s browser could issue API requests that the firewall accepted as part of the active management session.
The two settings described above close that gap. The bearer token check ensures each request proves it belongs to the session. Disabling CORS by default ensures the firewall does not grant external websites permission to read API responses.
|
Setting |
Recommended |
Notes |
|
SonicOS API |
Disabled if unused |
The API is enabled by default. If no integration depends on it, turn it off. |
|
CORS |
Disabled |
Enable only if a browser-based application must call the API, and always with a specific allow list. |
|
Allow CORS Origins |
Empty, or minimal |
Only required when CORS is enabled. List only origins you trust. |
|
Non-GUI Management Login Bearer Token Session Check |
Enabled |
Default in 7.3.4. Leave enabled. |
|
Session security using RFC-7616 Digest authentication |
Consider enabling |
Provides additional session binding for Digest authentication. Test with your clients first. |
|
RFC-2617 HTTP Basic Access authentication |
Disabled |
Basic authentication transmits credentials with minimal protection. Default is disabled. |
Upgrading does not necessarily apply the new defaults. Where a configuration is carried forward, previous values may be preserved. Verify both settings after the upgrade rather than assuming them.
|
Integration type |
Effect |
|
curl, Postman, Python, PowerShell and other scripted clients |
Not affected by the CORS setting. These clients are not browsers and do not rely on cross-origin permissions. They must send the bearer token, which most already do. |
|
Network Security Manager and SonicWall management platforms |
Not affected. |
|
Your own web application that calls the API from a browser |
May be affected. Enable CORS and add your application’s origin to the Allow CORS Origins list. Ensure the client sends the bearer token on every request. |
|
Captive portal or guest login pages that call the API from a browser |
May be affected. Test in a lab before upgrading production firewalls, and add the origin to the allow list if required. |
|
Local development against a firewall (for example a UI running on localhost) |
Enable CORS and add the development origin to the allow list for the duration of the work. Remove it afterwards. |