requestshield 2.1.0-stg.427 → 2.2.0-qat.440
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/config/.env.qat +7 -0
- package/package.json +4 -4
- package/skills/requestshield/SKILL.md +2 -0
- package/skills/requestshield/references/backend-java-core.md +8 -1
- package/skills/requestshield/references/backend-spring-boot.md +10 -3
- package/skills/requestshield/references/integration-planning.md +9 -2
- package/config/.env.stg +0 -7
package/config/.env.qat
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Public QAT settings for the QAT npm release and source runner. Never add secrets.
|
|
2
|
+
API_URL=https://management-api-qat.intellifend.ai
|
|
3
|
+
CHALLENGE_URL=https://challenge-dev.intellifend.ai
|
|
4
|
+
DOCS_URL=https://docs-qat.intellifend.ai
|
|
5
|
+
OAUTH_ISSUER=https://auth-qat.intellifend.ai
|
|
6
|
+
OAUTH_CLIENT_ID=requestshield-cli
|
|
7
|
+
OAUTH_RESOURCE=urn:theair:management-api:dev
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "requestshield",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0-qat.440",
|
|
4
4
|
"description": "Customer CLI for IntelliFend RequestShield.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
"publishConfig": {
|
|
10
10
|
"access": "public",
|
|
11
11
|
"registry": "https://registry.npmjs.org/",
|
|
12
|
-
"tag": "
|
|
12
|
+
"tag": "qat"
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
15
15
|
"src/",
|
|
16
|
-
"config/.env.
|
|
16
|
+
"config/.env.qat",
|
|
17
17
|
"skills/",
|
|
18
18
|
"README.md"
|
|
19
19
|
],
|
|
@@ -22,6 +22,6 @@
|
|
|
22
22
|
},
|
|
23
23
|
"license": "UNLICENSED",
|
|
24
24
|
"requestshield": {
|
|
25
|
-
"profile": "
|
|
25
|
+
"profile": "qat"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -111,6 +111,8 @@ writing integration code: **Detect existing integration** →
|
|
|
111
111
|
2. **Backend side** — follow the selected path's reference:
|
|
112
112
|
[Spring Boot 3 starter](references/backend-spring-boot.md) or
|
|
113
113
|
[Java core SDK](references/backend-java-core.md). Enforce before the mutation.
|
|
114
|
+
Java 2.1.0+ passes the request host to `verify` for the phishing check and
|
|
115
|
+
requires Browser SDK 2.x; Browser SDK 1.x tokens are blocked in `BLOCK` mode.
|
|
114
116
|
3. **Static install verification** — run **Verifying**, then focused builds/tests
|
|
115
117
|
without starting a credential-dependent runtime. Fix failures before finishing.
|
|
116
118
|
|
|
@@ -79,7 +79,7 @@ all our users" — a startup failure is far cheaper to diagnose than that.
|
|
|
79
79
|
|
|
80
80
|
```java
|
|
81
81
|
String token = request.getHeader("X-IntelliFend-Token");
|
|
82
|
-
VerificationResult result = requestShield.verify(token);
|
|
82
|
+
VerificationResult result = requestShield.verify(token, request.getServerName());
|
|
83
83
|
|
|
84
84
|
if (!result.isAllowed()) {
|
|
85
85
|
rejectRequest(result.getReason().getCode());
|
|
@@ -99,6 +99,13 @@ continueProtectedOperation();
|
|
|
99
99
|
application code.** Reason codes explain a decision; they do not amend it, and an
|
|
100
100
|
override that allows a blocked reason quietly removes the protection.
|
|
101
101
|
|
|
102
|
+
Pass the host the API was called on (`request.getServerName()` or the `Host`
|
|
103
|
+
header), never `Origin`. Java 2.1.0+ then blocks requests relayed through a
|
|
104
|
+
phishing proxy with reason `phishing`, without consuming the token. This needs
|
|
105
|
+
Browser SDK 2.x on the v2 API, a backend that sees the public host (configure
|
|
106
|
+
forwarded headers behind a proxy), and a page and API on the same root domain.
|
|
107
|
+
On Java 2.0.0, `verify(token, host)` does not exist; use `verify(token)`.
|
|
108
|
+
|
|
102
109
|
Backend Manual names this explicit integration style. The core SDK has no starter
|
|
103
110
|
`mode` property; documentation should describe the application's observed handling of
|
|
104
111
|
`isAllowed()` rather than inventing a `BLOCK` or `MONITOR` configuration option.
|
|
@@ -44,7 +44,7 @@ a handler covered by the annotation must not also call `verify()`.
|
|
|
44
44
|
<dependency>
|
|
45
45
|
<groupId>com.intellifend.requestshield</groupId>
|
|
46
46
|
<artifactId>requestshield-spring-boot3-starter</artifactId>
|
|
47
|
-
<version>2.
|
|
47
|
+
<version>2.1.0</version>
|
|
48
48
|
</dependency>
|
|
49
49
|
```
|
|
50
50
|
|
|
@@ -54,11 +54,11 @@ repositories {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
dependencies {
|
|
57
|
-
implementation("com.intellifend.requestshield:requestshield-spring-boot3-starter:2.
|
|
57
|
+
implementation("com.intellifend.requestshield:requestshield-spring-boot3-starter:2.1.0")
|
|
58
58
|
}
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
The starter includes `requestshield-backend-sdk:2.
|
|
61
|
+
The starter includes `requestshield-backend-sdk:2.1.0` — do not declare both.
|
|
62
62
|
|
|
63
63
|
## 2. Configure
|
|
64
64
|
|
|
@@ -81,6 +81,13 @@ intellifend:
|
|
|
81
81
|
Java SDK 2.0.0 uses API v2 for verification and availability checks; there is no
|
|
82
82
|
API-version setting. Existing Java 1.0.0 integrations continue using v1.
|
|
83
83
|
|
|
84
|
+
From 2.1.0 the starter also passes `request.getServerName()` to the phishing check:
|
|
85
|
+
`BLOCK` rejects a `phishing` result, `MONITOR` lets it through. It requires Browser
|
|
86
|
+
SDK 2.x on the v2 API (see `integration-planning.md`). Behind a reverse proxy or load
|
|
87
|
+
balancer, set `server.forward-headers-strategy` so `getServerName()` is the public
|
|
88
|
+
host; otherwise every request returns `phishing`. Page and API must share a root
|
|
89
|
+
domain.
|
|
90
|
+
|
|
84
91
|
Bind the secret with no fallback default, so an environment that fails to inject it
|
|
85
92
|
fails at startup. A backend that starts with a placeholder secret rejects every real
|
|
86
93
|
token, which surfaces days later as "RequestShield is blocking all our users" — a
|
|
@@ -130,9 +130,16 @@ their browser, CSP, or Java requirements.
|
|
|
130
130
|
| Browser 2.0.0 | v2 by default; `apiVersion: 'v1' \| 'v2'` or `data-api-version` selects it. |
|
|
131
131
|
| Java 1.0.0 | v1, without an API-version option. |
|
|
132
132
|
| Java 2.0.0 core and Spring Boot starter | v2 only; no builder or Spring API-version option. |
|
|
133
|
+
| Java 2.1.0+ core and Spring Boot starter | v2 only; requires Browser 2.x tokens (v2 API) for the phishing check. |
|
|
133
134
|
|
|
134
|
-
|
|
135
|
-
|
|
135
|
+
Java 2.1.0 and later require Browser SDK 2.x on the v2 API. Browser 1.0.0, or
|
|
136
|
+
Browser 2.x with `apiVersion: 'v1'`, with Java 2.1.0+ is not a supported pair:
|
|
137
|
+
its tokens fail the phishing check, so `verify(token, requestHost)` and the
|
|
138
|
+
Spring starter return `phishing` and block in `BLOCK` mode. Upgrade the browser
|
|
139
|
+
before or together with the backend. Do not pin Java 2.1.0+ behind a v1 browser.
|
|
140
|
+
|
|
141
|
+
For new integrations, use matching browser and backend versions. With Java 2.0.0,
|
|
142
|
+
mixed versions can verify compatible tokens, and a token remains single-use across
|
|
136
143
|
both APIs. Backend availability checks observe only the API used by its SDK.
|
|
137
144
|
If the browser's other API cannot issue a token while the backend's API is
|
|
138
145
|
healthy, the backend can reject with `missing_token`. Check this behavior when
|
package/config/.env.stg
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# Public staging settings for the STG npm release and source runner. Never add secrets.
|
|
2
|
-
API_URL=https://management-api-stg.intellifend.ai
|
|
3
|
-
CHALLENGE_URL=https://challenge-stg.intellifend.ai
|
|
4
|
-
DOCS_URL=https://docs-stg.intellifend.ai
|
|
5
|
-
OAUTH_ISSUER=https://auth-stg.intellifend.ai
|
|
6
|
-
OAUTH_CLIENT_ID=requestshield-cli
|
|
7
|
-
OAUTH_RESOURCE=urn:theair:management-api:stg
|