Skip to content

Commit c1d57f9

Browse files
committed
Merge branch 'master' into gh-4610-ref-auto-purge
2 parents a46315e + 1a03c5d commit c1d57f9

File tree

54 files changed

+1343
-723
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1343
-723
lines changed

CHANGELOG.md

+53-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,55 @@ DO NOT ADD CHANGES HERE - ADD THEM USING log_change.sh
1313
~~~
1414

1515

16+
## [v7.9-beta.8] - 2025-04-09
17+
18+
* Uplift BCrypt lib to 0.4.3.
19+
20+
* Add BCrypt as a hashing algorithm to data feed keys. Change Data feed key auth to require the header as configured by `dataFeedKeyOwnerMetaKey`. Change `hashAlgorithmId` to `hashAlgorithm` in the data feed keys json file.
21+
22+
23+
## [v7.9-beta.7] - 2025-04-07
24+
25+
* Issue **#4831** : Fix Data Retention -> Impact Summary not showing any data.
26+
27+
* Issue **#4829** : Fix stuck searches.
28+
29+
* Issue **#4830** : Use a cache rather than sessions to maintain auth flow state to avoid creating unnecessary sessions.
30+
31+
* Issue **#4842** : Fix null session when doing OIDC code flow with KeyCloak.
32+
33+
* Issue **#4844** : Fix issue where vis parent table filters are not applied to the right data values.
34+
35+
* Issue **#4837** : Change the fetching of OIDC config to use jersey client instead of Apache http client. The yaml properties `appConfig.security.authentication.openId.httpClient` and `proxyConfig.security.authentication.openId.httpClient` have been removed. Configuration of the jersey client is now done using `jerseyClients.OPEN_ID.` (see https://gchq.github.io/stroom-docs/docs/install-guide/configuration/stroom-and-proxy/common-configuration/#jersey-http-client-configuration).
36+
37+
* Issue **#4849** : Fix the default forwarding queue config so that it retries for HTTP and not for FILE. Add the config prop `queue.queueAndRetryEnabled` to control whether forwarding is queued with retry handling or not. Add the config prop `atomicMoveEnabled` to `forwardFileDestinations` items to allow disabling of atomic file moves when using a remote file system that doesn't support atomic moves.
38+
39+
40+
## [v7.9-beta.6] - 2025-04-07
41+
42+
* Issue **#4109** : Add `receive` config properties `x509CertificateHeader`, `x509CertificateDnHeader` and `allowedCertificateProviders` to control the use of certificates and DNs placed in the request headers by load balancers or reverse proxies that are doing the TLS termination. Header keys were previously hard coded. `allowedCertificateProviders` is an allow list of FQDN/IPs that are allowed to use the cert/DN headers.
43+
44+
* Add Dropwizard Metrics to proxy.
45+
46+
* Change proxy to use the same caching as stroom.
47+
48+
* Remove unused proxy config property `maxAggregateAge`. `aggregationFrequency` controls the aggregation age/frequency.
49+
50+
* Stroom-Proxy instances that are making remote feed status requests using an API key or token, will now need to hold the application permission `Check Receipt Status` in Stroom. This prevents anybody with an API key from checking feed statuses.
51+
52+
* Issue **#4312** : Add Data Feed Keys to proxy and stroom to allow their use in data receipt authentication. Replace `proxyConfig.receive.(certificateAuthenticationEnabled|tokenAuthenticationEnabled)` with `proxyConfig.receive.enabledAuthenticationTypes` that takes values: `DATA_FEED_KEY|TOKEN|CERTIFICATE` (where `TOKEN` means an oauth token or an API key). The feed status check endpoint `/api/feedStatus/v1` has been deprecated. Proxies with a version >=v7.9 should now use `/api/feedStatus/v2`.
53+
54+
* Replace proxy config prop `proxyConfig.eventStore.maxOpenFiles` with `proxyConfig.eventStore.openFilesCache`.
55+
56+
* Add optional auto-generation of the `Feed` attribute using property `proxyConfig.receive.feedNameGenerationEnabled`. This is used alongside properties `proxyConfig.receive.feedNameTemplate` (which defines a template for the auto-generated feed name using meta keys and their values) and `feedNameGenerationMandatoryHeaders` which defines the mandatory meta headers that must be present for a auto-generation of the feed name to be possible.
57+
58+
* Add a new _Content Templates_ screen to stroom (requires `Manage Content Templates` application permission). This screen is used to define rules for matching incoming data where the feed does not exist and creating content to process data for that feed.
59+
60+
* Feed status check calls made by a proxy into stroom now require the application permission `Check Receipt Status`. This is to stop anyone with an API key from discovering the feeds available in stroom. Any existing API keys used for feed status checks on proxy will need to have `Check Receipt Status` granted to the owner of the key.
61+
62+
* Issue **#4844** : Fix issue where vis parent table filters are not applied to the right data values.
63+
64+
1665
## [v7.9-beta.5] - 2025-04-02
1766

1867
* Issue **#4831** : Fix Data Retention -> Impact Summary not showing any data.
@@ -1329,7 +1378,10 @@ DO NOT ADD CHANGES HERE - ADD THEM USING log_change.sh
13291378
* Issue **#3830** : Add S3 data storage option.
13301379

13311380

1332-
[Unreleased]: https://github.com/gchq/stroom/compare/v7.9-beta.5...HEAD
1381+
[Unreleased]: https://github.com/gchq/stroom/compare/v7.9-beta.8...HEAD
1382+
[v7.9-beta.8]: https://github.com/gchq/stroom/compare/v7.9-beta.7...v7.9-beta.8
1383+
[v7.9-beta.7]: https://github.com/gchq/stroom/compare/v7.9-beta.6...v7.9-beta.7
1384+
[v7.9-beta.6]: https://github.com/gchq/stroom/compare/v7.9-beta.5...v7.9-beta.6
13331385
[v7.9-beta.5]: https://github.com/gchq/stroom/compare/v7.9-beta.4...v7.9-beta.5
13341386
[v7.9-beta.4]: https://github.com/gchq/stroom/compare/v7.9-beta.3...v7.9-beta.4
13351387
[v7.9-beta.3]: https://github.com/gchq/stroom/compare/v7.9-beta.2...v7.9-beta.3

gradle/libs.versions.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ aws-crt = { module = "software.amazon.awssdk.crt:aws-crt", version = "0.29.22" }
3636
aws-s3-transfer-manager = { module = "software.amazon.awssdk:s3-transfer-manager" } # version controlled by AWS BOM
3737
aws-sqs = { module = "software.amazon.awssdk:sqs" } # version controlled by AWS BOM
3838
aws-sts = { module = "software.amazon.awssdk:sts" } # version controlled by AWS BOM
39-
bcrypt = { module = "de.svenkubiak:jBCrypt", version = "0.4.1" }
39+
bcrypt = { module = "de.svenkubiak:jBCrypt", version = "0.4.3" }
4040
bouncy-castle = { module = "org.bouncycastle:bcprov-jdk18on", version = "1.78.1" }
4141
caffeine = { module = "com.github.ben-manes.caffeine:caffeine" } # version controlled by dropwizard-dependencies
4242
commons-beanutils = { module = "commons-beanutils:commons-beanutils", version = "1.9.4" }

stroom-config/stroom-config-app/src/test/resources/stroom/config/app/expected.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,6 @@ appConfig:
882882
clientSecret: null
883883
expectedSignerPrefixes: []
884884
formTokenRequest: true
885-
httpClient: null
886885
identityProviderType: "INTERNAL_IDP"
887886
issuer: null
888887
jwksUri: null
+130
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# Reference Data Load/Lookup Design
2+
3+
## LMDB DB Structure
4+
5+
### ProcessingInfoDb
6+
7+
**Key** - `RefStreamDefinition`
8+
9+
```text
10+
< pipe doc UUID >< pipe version UUID >< stream ID >< part index >
11+
< ? bytes >< ? bytes >< 8 bytes long >< 8 bytes long >
12+
```
13+
14+
**Value** - `RefDataProcessingInfo`
15+
16+
```text
17+
< create time ms >< last access time ms >< effective time ms >< processing state ID >
18+
< 8 bytes long >< 8 bytes long >< 8 bytes long >< 1 byte >
19+
```
20+
21+
One entry per ref data stream.
22+
23+
24+
### MapUidForwardDb
25+
26+
**Key** - `KeyValueStoreKey`
27+
28+
```text
29+
< pipe doc UUID >< pipe version UUID >< stream ID >< part index >< map name >
30+
< ? bytes >< ? bytes >< 8 bytes long >< 8 bytes long >< ? bytes String >
31+
```
32+
33+
**Value** - `ValueStoreKey`
34+
35+
```text
36+
< map UID >
37+
< 4 bytes >
38+
```
39+
40+
One entry per ref data stream and map name.
41+
42+
43+
### MapUidReverseDb
44+
45+
**Key** - `KeyValueStoreKey`
46+
47+
```text
48+
< map UID >
49+
< 4 bytes >
50+
```
51+
52+
**Value** - `ValueStoreKey`
53+
54+
```text
55+
< pipe doc UUID >< pipe version UUID >< stream ID >< part index >< map name >
56+
< ? bytes >< ? bytes >< 8 bytes long >< 8 bytes long >< ? bytes String >
57+
```
58+
59+
One entry per ref data stream and map name.
60+
61+
62+
### KeyValueStoreDb
63+
64+
**Key** - `KeyValueStoreKey`
65+
66+
```text
67+
< map UID >< reference data key >
68+
< 4 bytes UID >< ? bytes String >
69+
```
70+
71+
**Value** - `ValueStoreKey`
72+
73+
```text
74+
< value hash code >< unique ID >
75+
< 8 bytes long >< 2 bytes short >
76+
```
77+
78+
One entry per key/value ref data entry.
79+
80+
81+
### RangeStoreDb
82+
83+
**Key** - `RangeStoreKey`
84+
85+
```text
86+
< map UID >< rangeStartInc >< rangeEndExc >
87+
< 4 bytes UID >< 8 bytes long >< 8 bytes long >
88+
```
89+
90+
**Value** - `ValueStoreKey`
91+
92+
See above
93+
94+
One entry per range/value ref data entry.
95+
96+
97+
### ValueStoreDb
98+
99+
**Key** - `ValueStoreKey`
100+
101+
See above
102+
103+
104+
**Value** - `RefDataValue`
105+
106+
```text
107+
< reference data value >
108+
< ? bytes string/fastInfoset >
109+
```
110+
111+
One entry per distinct reference data value, i.e. de-duplicates values.
112+
113+
114+
### ValueStoreMetaDb
115+
116+
**Key** - `ValueStoreKey`
117+
118+
See above
119+
120+
121+
**Value** - `ValueStoreMeta`
122+
123+
```text
124+
< type ID >< reference count >
125+
< 1 byte >< 3 bytes UnsignedBytes >
126+
```
127+
128+
One entry per entry in ValueStoreDb.
129+
Holds the value type information (string/fastInfoset) and the reference count of key/range entries that reference it.
130+

stroom-proxy/stroom-proxy-app/src/main/java/stroom/proxy/app/ProxyOpenIdConfig.java

+3-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import stroom.security.openid.api.AbstractOpenIdConfig;
44
import stroom.security.openid.api.IdpType;
5-
import stroom.util.http.HttpClientConfiguration;
65
import stroom.util.shared.IsProxyConfig;
76

87
import com.fasterxml.jackson.annotation.JsonCreator;
@@ -42,8 +41,7 @@ public ProxyOpenIdConfig(
4241
@JsonProperty("validIssuers") final Set<String> validIssuers,
4342
@JsonProperty("uniqueIdentityClaim") final String uniqueIdentityClaim,
4443
@JsonProperty("userDisplayNameClaim") final String userDisplayNameClaim,
45-
@JsonProperty(PROP_NAME_EXPECTED_SIGNER_PREFIXES) final Set<String> expectedSignerPrefixes,
46-
@JsonProperty("httpClient") final HttpClientConfiguration httpClient) {
44+
@JsonProperty(PROP_NAME_EXPECTED_SIGNER_PREFIXES) final Set<String> expectedSignerPrefixes) {
4745

4846
super(identityProviderType,
4947
openIdConfigurationEndpoint,
@@ -62,8 +60,7 @@ public ProxyOpenIdConfig(
6260
validIssuers,
6361
uniqueIdentityClaim,
6462
userDisplayNameClaim,
65-
expectedSignerPrefixes,
66-
httpClient);
63+
expectedSignerPrefixes);
6764
}
6865

6966
@JsonIgnore
@@ -113,7 +110,6 @@ public ProxyOpenIdConfig withIdentityProviderType(final IdpType identityProvider
113110
getValidIssuers(),
114111
getUniqueIdentityClaim(),
115112
getUserDisplayNameClaim(),
116-
getExpectedSignerPrefixes(),
117-
getHttpClient());
113+
getExpectedSignerPrefixes());
118114
}
119115
}

stroom-proxy/stroom-proxy-app/src/main/java/stroom/proxy/app/handler/ForwardException.java

+42-8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import stroom.meta.api.AttributeMap;
44
import stroom.meta.api.StandardHeaderArguments;
55
import stroom.proxy.StroomStatusCode;
6+
import stroom.proxy.app.handler.HttpSender.ResponseStatus;
67
import stroom.util.shared.NullSafe;
78

89
import java.util.Objects;
@@ -12,15 +13,18 @@ public class ForwardException extends RuntimeException {
1213
private final StroomStatusCode stroomStatusCode;
1314
private final String feedName;
1415
private final boolean isRecoverable;
16+
private final int httpResponseCode; // In the case of UNKNOWN_ERROR, this may differ from 999
1517

1618
private ForwardException(final StroomStatusCode stroomStatusCode,
1719
final AttributeMap attributeMap,
1820
final String message,
21+
final int httpResponseCode,
1922
final boolean isRecoverable,
2023
final Throwable cause) {
2124
super(message, cause);
2225
this.isRecoverable = isRecoverable;
2326
this.stroomStatusCode = stroomStatusCode;
27+
this.httpResponseCode = httpResponseCode;
2428
this.feedName = NullSafe.get(
2529
attributeMap,
2630
attrMap -> attrMap.get(StandardHeaderArguments.FEED));
@@ -30,26 +34,52 @@ public static ForwardException recoverable(final StroomStatusCode stroomStatusCo
3034
final AttributeMap attributeMap,
3135
final String message,
3236
final Throwable cause) {
33-
return new ForwardException(stroomStatusCode, attributeMap, message, true, cause);
37+
return new ForwardException(
38+
stroomStatusCode,
39+
attributeMap,
40+
message,
41+
stroomStatusCode.getHttpCode(),
42+
true,
43+
cause);
3444
}
3545

36-
public static ForwardException recoverable(final StroomStatusCode stroomStatusCode,
46+
public static ForwardException recoverable(final ResponseStatus responseStatus,
3747
final AttributeMap attributeMap) {
38-
Objects.requireNonNull(stroomStatusCode);
39-
return new ForwardException(stroomStatusCode, attributeMap, stroomStatusCode.getMessage(), true, null);
48+
Objects.requireNonNull(responseStatus);
49+
final StroomStatusCode stroomStatusCode = responseStatus.stroomStatusCode();
50+
return new ForwardException(
51+
stroomStatusCode,
52+
attributeMap,
53+
Objects.requireNonNullElse(responseStatus.message(), stroomStatusCode.getMessage()),
54+
responseStatus.httpResponseCode(),
55+
true,
56+
null);
4057
}
4158

4259
public static ForwardException nonRecoverable(final StroomStatusCode stroomStatusCode,
4360
final AttributeMap attributeMap,
4461
final String message,
4562
final Throwable cause) {
46-
return new ForwardException(stroomStatusCode, attributeMap, message, false, cause);
63+
return new ForwardException(
64+
stroomStatusCode,
65+
attributeMap,
66+
message,
67+
stroomStatusCode.getHttpCode(),
68+
false,
69+
cause);
4770
}
4871

49-
public static ForwardException nonRecoverable(final StroomStatusCode stroomStatusCode,
72+
public static ForwardException nonRecoverable(final ResponseStatus responseStatus,
5073
final AttributeMap attributeMap) {
51-
Objects.requireNonNull(stroomStatusCode);
52-
return new ForwardException(stroomStatusCode, attributeMap, stroomStatusCode.getMessage(), false, null);
74+
Objects.requireNonNull(responseStatus);
75+
final StroomStatusCode stroomStatusCode = responseStatus.stroomStatusCode();
76+
return new ForwardException(
77+
stroomStatusCode,
78+
attributeMap,
79+
Objects.requireNonNullElse(responseStatus.message(), stroomStatusCode.getMessage()),
80+
responseStatus.httpResponseCode(),
81+
false,
82+
null);
5383
}
5484

5585
public boolean isRecoverable() {
@@ -59,4 +89,8 @@ public boolean isRecoverable() {
5989
public String getFeedName() {
6090
return feedName;
6191
}
92+
93+
public int getHttpResponseCode() {
94+
return httpResponseCode;
95+
}
6296
}

0 commit comments

Comments
 (0)