@adobe/helix-config 3.5.0 → 3.6.1
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 +14 -0
- package/package.json +2 -2
- package/src/config-view.js +4 -3
- package/src/schemas/access.schema.json +3 -0
- package/types/profile-config.d.ts +1 -0
- package/types/site-config.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [3.6.1](https://github.com/adobe/helix-config/compare/v3.6.0...v3.6.1) (2024-07-13)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update dependency ajv to v8.17.1 ([45bd512](https://github.com/adobe/helix-config/commit/45bd51267c9046b499bef0d9a00b745e561fa567))
|
|
7
|
+
|
|
8
|
+
# [3.6.0](https://github.com/adobe/helix-config/compare/v3.5.0...v3.6.0) (2024-07-11)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* allow to specify access.site ([#129](https://github.com/adobe/helix-config/issues/129)) ([83f7142](https://github.com/adobe/helix-config/commit/83f714215903315158ccacbf3ecfdb14d9d97c31)), closes [#62](https://github.com/adobe/helix-config/issues/62)
|
|
14
|
+
|
|
1
15
|
# [3.5.0](https://github.com/adobe/helix-config/compare/v3.4.4...v3.5.0) (2024-07-10)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-config",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.1",
|
|
4
4
|
"description": "Helix Config",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@adobe/helix-shared-git": "3.0.12",
|
|
65
65
|
"@adobe/helix-shared-storage": "1.0.2",
|
|
66
66
|
"@adobe/helix-shared-utils": "3.0.2",
|
|
67
|
-
"ajv": "8.
|
|
67
|
+
"ajv": "8.17.1",
|
|
68
68
|
"ajv-formats": "3.0.1",
|
|
69
69
|
"jose": "5.6.3"
|
|
70
70
|
}
|
package/src/config-view.js
CHANGED
|
@@ -111,8 +111,9 @@ async function getGlobalTokenHash(ctx, rso) {
|
|
|
111
111
|
*/
|
|
112
112
|
export async function getAccessConfig(ctx, config, partition, rso) {
|
|
113
113
|
const { access, tokens = {} } = config;
|
|
114
|
-
const
|
|
115
|
-
const
|
|
114
|
+
const pAccess = access[partition] ?? {};
|
|
115
|
+
const apiKeyId = toArray(pAccess.apiKeyId ?? access.site?.apiKeyId ?? access.apiKeyId);
|
|
116
|
+
const allow = toArray(pAccess.allow ?? access.allow);
|
|
116
117
|
const cfg = {
|
|
117
118
|
apiKeyId,
|
|
118
119
|
tokenHash: apiKeyId
|
|
@@ -120,7 +121,7 @@ export async function getAccessConfig(ctx, config, partition, rso) {
|
|
|
120
121
|
.map((jti) => jti.replaceAll('/', '_').replaceAll('+', '-'))
|
|
121
122
|
.map((id) => tokens[id]?.hash)
|
|
122
123
|
.filter((hash) => !!hash),
|
|
123
|
-
clientCertDN: toArray(access
|
|
124
|
+
clientCertDN: toArray(pAccess.clientCertDN ?? access.site?.clientCertDN ?? access.clientCertDN),
|
|
124
125
|
};
|
|
125
126
|
// if an allow is defined but no apiKeyId, create a fake one so that auth is still enforced.
|
|
126
127
|
if (allow.length && !cfg.apiKeyId.length) {
|