@friggframework/devtools 2.0.0--canary.663.9683f8b.0 → 2.0.0--canary.664.a0b36e4.0
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/infrastructure/README.md
CHANGED
|
@@ -163,11 +163,9 @@ const appDefinition = {
|
|
|
163
163
|
enableVPCEndpoints: true // Optional: create VPC endpoints
|
|
164
164
|
},
|
|
165
165
|
|
|
166
|
-
//
|
|
167
|
-
// A deployed stage with no key refuses to start; 'none' is the explicit
|
|
168
|
-
// plaintext opt-out (sets FRIGG_ENCRYPTION_DISABLED=true).
|
|
166
|
+
// KMS encryption
|
|
169
167
|
encryption: {
|
|
170
|
-
fieldLevelEncryptionMethod: 'kms',
|
|
168
|
+
fieldLevelEncryptionMethod: 'kms',
|
|
171
169
|
createResourceIfNoneFound: true
|
|
172
170
|
},
|
|
173
171
|
|
|
@@ -72,16 +72,6 @@ function addLoggingEnv(appDefinition, envVars) {
|
|
|
72
72
|
envVars.FRIGG_LOG_LEVEL = normalized;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
// Field-level encryption fails closed in a deployed stage with no key (core's
|
|
76
|
-
// encryption-config.js). `fieldLevelEncryptionMethod: 'none'` is the explicit,
|
|
77
|
-
// documented way to run a stage in plaintext; core logs a warning on every
|
|
78
|
-
// cold start while it is set.
|
|
79
|
-
function addEncryptionEnv(appDefinition, envVars) {
|
|
80
|
-
if (appDefinition?.encryption?.fieldLevelEncryptionMethod === 'none') {
|
|
81
|
-
envVars.FRIGG_ENCRYPTION_DISABLED = 'true';
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
75
|
/**
|
|
86
76
|
* Get environment variables from AppDefinition
|
|
87
77
|
*
|
|
@@ -159,7 +149,6 @@ function getAppEnvironmentVars(appDefinition) {
|
|
|
159
149
|
}
|
|
160
150
|
|
|
161
151
|
addLoggingEnv(appDefinition, envVars);
|
|
162
|
-
addEncryptionEnv(appDefinition, envVars);
|
|
163
152
|
|
|
164
153
|
if (envKeys.length > 0) {
|
|
165
154
|
console.log(
|
|
@@ -198,7 +187,7 @@ function getAppEnvironmentVars(appDefinition) {
|
|
|
198
187
|
function buildEnvironment(appEnvironmentVars, discoveredResources) {
|
|
199
188
|
const environment = {
|
|
200
189
|
...appEnvironmentVars,
|
|
201
|
-
STAGE: '${self:provider.stage}', //
|
|
190
|
+
STAGE: '${self:provider.stage}', // Used by encryption bypass logic
|
|
202
191
|
FRIGG_STACK: '${self:service}',
|
|
203
192
|
FRIGG_STAGE: '${self:provider.stage}',
|
|
204
193
|
FRIGG_REGION: '${self:provider.region}',
|
|
@@ -468,26 +468,6 @@ describe('Environment Builder', () => {
|
|
|
468
468
|
});
|
|
469
469
|
});
|
|
470
470
|
|
|
471
|
-
describe('field-level encryption opt-out', () => {
|
|
472
|
-
it("emits FRIGG_ENCRYPTION_DISABLED=true for fieldLevelEncryptionMethod: 'none'", () => {
|
|
473
|
-
const result = getAppEnvironmentVars({
|
|
474
|
-
encryption: { fieldLevelEncryptionMethod: 'none' },
|
|
475
|
-
});
|
|
476
|
-
|
|
477
|
-
expect(result.FRIGG_ENCRYPTION_DISABLED).toBe('true');
|
|
478
|
-
});
|
|
479
|
-
|
|
480
|
-
it.each([
|
|
481
|
-
['kms', { fieldLevelEncryptionMethod: 'kms' }],
|
|
482
|
-
['aes', { fieldLevelEncryptionMethod: 'aes' }],
|
|
483
|
-
['no encryption block', undefined],
|
|
484
|
-
])('does not opt out for %s', (_label, encryption) => {
|
|
485
|
-
const result = getAppEnvironmentVars({ encryption });
|
|
486
|
-
|
|
487
|
-
expect(result.FRIGG_ENCRYPTION_DISABLED).toBeUndefined();
|
|
488
|
-
});
|
|
489
|
-
});
|
|
490
|
-
|
|
491
471
|
describe('buildEnvironment()', () => {
|
|
492
472
|
it('should combine app vars with standard Frigg variables', () => {
|
|
493
473
|
const appEnvironmentVars = {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@friggframework/devtools",
|
|
3
3
|
"prettier": "@friggframework/prettier-config",
|
|
4
|
-
"version": "2.0.0--canary.
|
|
4
|
+
"version": "2.0.0--canary.664.a0b36e4.0",
|
|
5
5
|
"bin": {
|
|
6
6
|
"frigg": "./frigg-cli/index.js"
|
|
7
7
|
},
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"@babel/eslint-parser": "^7.18.9",
|
|
27
27
|
"@babel/parser": "^7.25.3",
|
|
28
28
|
"@babel/traverse": "^7.25.3",
|
|
29
|
-
"@friggframework/core": "2.0.0--canary.
|
|
30
|
-
"@friggframework/schemas": "2.0.0--canary.
|
|
31
|
-
"@friggframework/test": "2.0.0--canary.
|
|
29
|
+
"@friggframework/core": "2.0.0--canary.664.a0b36e4.0",
|
|
30
|
+
"@friggframework/schemas": "2.0.0--canary.664.a0b36e4.0",
|
|
31
|
+
"@friggframework/test": "2.0.0--canary.664.a0b36e4.0",
|
|
32
32
|
"@hapi/boom": "^10.0.1",
|
|
33
33
|
"@inquirer/prompts": "^5.3.8",
|
|
34
34
|
"axios": "^1.18.0",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"validate-npm-package-name": "^5.0.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@friggframework/eslint-config": "2.0.0--canary.
|
|
60
|
-
"@friggframework/prettier-config": "2.0.0--canary.
|
|
59
|
+
"@friggframework/eslint-config": "2.0.0--canary.664.a0b36e4.0",
|
|
60
|
+
"@friggframework/prettier-config": "2.0.0--canary.664.a0b36e4.0",
|
|
61
61
|
"aws-sdk-client-mock": "^4.1.0",
|
|
62
62
|
"aws-sdk-client-mock-jest": "^4.1.0",
|
|
63
63
|
"jest": "^30.1.3",
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
"publishConfig": {
|
|
90
90
|
"access": "public"
|
|
91
91
|
},
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "a0b36e4677d1a9b2b0387e9b2b6b59ab76cf8098"
|
|
93
93
|
}
|