@adobe/helix-config 3.2.14 → 3.2.15
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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/config-legacy.js +1 -0
- package/src/config-view.js +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [3.2.15](https://github.com/adobe/helix-config/compare/v3.2.14...v3.2.15) (2024-06-20)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* legacy sites with apiKey but no allow must not authenticate ([#109](https://github.com/adobe/helix-config/issues/109)) ([421575e](https://github.com/adobe/helix-config/commit/421575eb9093820a824031695f26bbc568dd4505)), closes [#91](https://github.com/adobe/helix-config/issues/91)
|
|
7
|
+
|
|
1
8
|
## [3.2.14](https://github.com/adobe/helix-config/compare/v3.2.13...v3.2.14) (2024-06-20)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/config-legacy.js
CHANGED
package/src/config-view.js
CHANGED
|
@@ -122,8 +122,7 @@ export async function getAccessConfig(ctx, config, partition, rso) {
|
|
|
122
122
|
.filter((hash) => !!hash),
|
|
123
123
|
clientCertDN: toArray(access[partition]?.clientCertDN ?? access.clientCertDN),
|
|
124
124
|
};
|
|
125
|
-
// if an allow is defined but no apiKeyId, create a fake one so that auth is still
|
|
126
|
-
// enforced. later we can remove the allow and the apiKeyId in favor of the tokenHash
|
|
125
|
+
// if an allow is defined but no apiKeyId, create a fake one so that auth is still enforced.
|
|
127
126
|
if (allow.length && !cfg.apiKeyId.length) {
|
|
128
127
|
cfg.apiKeyId.push('dummy');
|
|
129
128
|
}
|
|
@@ -137,7 +136,10 @@ export async function getAccessConfig(ctx, config, partition, rso) {
|
|
|
137
136
|
cfg.tokenHash.push(globalTokenHash);
|
|
138
137
|
} else if (!cfg.tokenHash.length) {
|
|
139
138
|
// add a dummy or global hash if no tokens match the apiKeyIds.
|
|
140
|
-
|
|
139
|
+
if (!config.legacy || allow.length) {
|
|
140
|
+
// but only add for non-legacy sites or legacy with allows
|
|
141
|
+
cfg.tokenHash.push(globalTokenHash || 'n/a');
|
|
142
|
+
}
|
|
141
143
|
}
|
|
142
144
|
}
|
|
143
145
|
|