@intellifend/requestshieldjs 2.0.0-qat.202 → 2.0.0-qat.211
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -20
- package/dist/checksums.json +5 -5
- package/dist/intellifend.js +2 -2
- package/dist/intellifend.mjs +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
The RequestShield Browser SDK obtains single-use proof-of-work tokens and either attaches them automatically to configured Fetch and asynchronous XHR requests or returns them for application-controlled transport. The customer backend remains the authority that verifies a token and decides how to handle a missing token.
|
|
4
4
|
|
|
5
|
+
## Choose integration modes
|
|
6
|
+
|
|
7
|
+
Choose the frontend and backend modes independently:
|
|
8
|
+
|
|
9
|
+
| Side | Seamless | Manual |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| Frontend (Browser SDK) | Configure `protect`; the SDK obtains and attaches a token to matching Fetch and asynchronous XHR requests. | Call `getToken()` and attach the returned token in application code. |
|
|
12
|
+
| Java backend | Use the Spring Boot 3 MVC starter and annotate the protected handler; the starter extracts the header, verifies the token and applies its enforcement policy. | Extract the token, call the Java core SDK's `verify(token)` and apply `VerificationResult` before the protected operation. |
|
|
13
|
+
|
|
14
|
+
For a new integration, prefer Seamless on both sides when the browser transport
|
|
15
|
+
is supported and the backend uses Spring Boot 3 MVC. Otherwise, prefer Manual
|
|
16
|
+
on both sides. All four combinations are supported, so an existing combination
|
|
17
|
+
or an explicit choice can be kept. Backend Seamless requires the token in
|
|
18
|
+
`X-IntelliFend-Token`, including when the frontend uses Manual mode.
|
|
19
|
+
|
|
20
|
+
`BLOCK` and `MONITOR` are Spring starter enforcement policies, separate from these
|
|
21
|
+
integration modes. Choosing frontend Seamless does not enable backend protection.
|
|
22
|
+
|
|
5
23
|
## Install
|
|
6
24
|
|
|
7
25
|
### npm / ESM
|
|
@@ -63,9 +81,8 @@ The module is embedded in the SDK bundle; it adds no separate module URL or
|
|
|
63
81
|
download. Pages enforcing CSP must allow `'wasm-unsafe-eval'` in `script-src`.
|
|
64
82
|
Existing script, service, and Web Worker permissions remain necessary.
|
|
65
83
|
|
|
66
|
-
`init()`
|
|
67
|
-
|
|
68
|
-
or fails, `getToken()` resolves to `""`. Seamless mode sends the application
|
|
84
|
+
`init()` is synchronous. If WebAssembly is unavailable, blocked, or fails,
|
|
85
|
+
`getToken()` resolves to `""`. Seamless mode sends the application
|
|
69
86
|
request without adding a token, and the backend applies its missing-token
|
|
70
87
|
policy. Test this path together with your CSP and browser requirements.
|
|
71
88
|
|
|
@@ -142,19 +159,16 @@ IntelliFend.init({
|
|
|
142
159
|
|
|
143
160
|
URLs are normalized for surrounding whitespace and trailing slashes while retaining path prefixes. No secondary hostname is inferred automatically. A missing or identical fallback preserves the existing single-endpoint behavior.
|
|
144
161
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
Successful token acquisition through secondary establishes a fixed 60-second preference in page memory. Further secondary successes, including overlapping fallback flows, do not extend an active window. After expiry the next flow tries primary; recovery clears the preference. Reinitialization resets it. Among overlapping successful flows, the later-started flow determines preference; a late completion from an older flow cannot replace it. No cookies, browser storage, or health-polling requests are used. Both endpoints bypass Seamless interception and preserve omitted credentials and header-free challenge requests. `getToken()` still returns a token or `""`.
|
|
162
|
+
The SDK can retry eligible connection failures through the alternate service.
|
|
163
|
+
All attempts share the configured token timeout, which defaults to 5,000 ms.
|
|
164
|
+
Switching services does not restart that timeout. No cookies or browser storage
|
|
165
|
+
are used. `getToken()` returns a token or `""` if acquisition fails.
|
|
150
166
|
|
|
151
167
|
### Optional browser signal collection
|
|
152
168
|
|
|
153
169
|
`telemetry: true` collects a bounded summary of browser
|
|
154
170
|
interaction and timezone information in page memory for up to five minutes.
|
|
155
|
-
|
|
156
|
-
snapshot with the challenge request. The optional timezone name is resolved
|
|
157
|
-
during idle work and may reflect an earlier timezone setting.
|
|
171
|
+
This summary accompanies token requests and includes timezone information.
|
|
158
172
|
|
|
159
173
|
The collector does not retain raw events, typed text, key values, DOM references,
|
|
160
174
|
or mouse paths. It uses no cookies, browser storage, or persistent identity and
|
|
@@ -194,13 +208,9 @@ serialization, file names, MIME types, and document charset handling. GET/HEAD
|
|
|
194
208
|
bodies remain ignored. If capture fails, the original native `send()` runs
|
|
195
209
|
immediately with the original body and retains its native validation errors.
|
|
196
210
|
|
|
197
|
-
Challenge hostname validation uses the server's canonical DNS spelling,
|
|
198
|
-
including removal of one terminal root dot. This does not change exact-origin
|
|
199
|
-
Seamless endpoint matching.
|
|
200
|
-
|
|
201
211
|
### Token lifetime and single use
|
|
202
212
|
|
|
203
|
-
Tokens are short-lived and single-use. Use one token for one protected application request, obtain a fresh token for a retry, and never reuse a token after native Fetch or XHR dispatch may have sent it. Seamless mode
|
|
213
|
+
Tokens are short-lived and single-use. Use one token for one protected application request, obtain a fresh token for a retry, and never reuse a token after native Fetch or XHR dispatch may have sent it. Seamless mode never gives the same token to two requests.
|
|
204
214
|
|
|
205
215
|
### CORS
|
|
206
216
|
|
|
@@ -208,7 +218,11 @@ For a cross-origin protected application API, allow the `X-IntelliFend-Token` re
|
|
|
208
218
|
|
|
209
219
|
### Manual transport
|
|
210
220
|
|
|
211
|
-
`X-IntelliFend-Token` is the recommended
|
|
221
|
+
`X-IntelliFend-Token` is the recommended carrier for frontend Manual mode and is
|
|
222
|
+
required by backend Seamless. A dedicated request-body or form field is also
|
|
223
|
+
valid with backend Manual, where application code extracts it before verification.
|
|
224
|
+
Never place a token in a URL path, query string, or fragment because those
|
|
225
|
+
locations are commonly logged and cached.
|
|
212
226
|
|
|
213
227
|
### Challenge Server proxies
|
|
214
228
|
|
|
@@ -237,9 +251,9 @@ The SDK targets Chrome/Edge 97+, Firefox 102+, and Safari/iOS 16+ with
|
|
|
237
251
|
WebAssembly and the required CSP permission. Test your integration on the
|
|
238
252
|
browsers and devices your application supports. Proof-of-work runs off the
|
|
239
253
|
main thread in a Web Worker.
|
|
240
|
-
Completion time depends on the device and service-selected challenge.
|
|
241
|
-
|
|
242
|
-
and the backend
|
|
254
|
+
Completion time depends on the device and service-selected challenge. Token
|
|
255
|
+
acquisition has a configurable timeout of five seconds by default. On timeout,
|
|
256
|
+
`getToken()` returns `""`, and the backend applies its missing-token policy.
|
|
243
257
|
|
|
244
258
|
## License
|
|
245
259
|
|
package/dist/checksums.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.0.0-qat.
|
|
2
|
+
"version": "2.0.0-qat.211",
|
|
3
3
|
"algorithm": "sha384",
|
|
4
4
|
"bundles": [
|
|
5
5
|
{
|
|
6
6
|
"name": "intellifend",
|
|
7
7
|
"path": "intellifend.js",
|
|
8
|
-
"version": "2.0.0-qat.
|
|
9
|
-
"integrity": "sha384-
|
|
8
|
+
"version": "2.0.0-qat.211",
|
|
9
|
+
"integrity": "sha384-uSFJiosGxa7BN8DIl3XvpILMhGXyWGuf1bSdW3zszbJc2dnURhUbhPWxMOGxTeHi"
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
"name": "intellifend-esm",
|
|
13
13
|
"path": "intellifend.mjs",
|
|
14
|
-
"version": "2.0.0-qat.
|
|
15
|
-
"integrity": "sha384-
|
|
14
|
+
"version": "2.0.0-qat.211",
|
|
15
|
+
"integrity": "sha384-dFwy9vbHXbjtmymion5tAnmawA+1kqXUMDLUsDqQjktg2fTpfS+Vj7WN7RLQ8QXA"
|
|
16
16
|
}
|
|
17
17
|
]
|
|
18
18
|
}
|