Skip to content

Commit

Permalink
Don't set a min-length on encryption key for reportin (#69827) (#69859)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Griffith authored Jun 25, 2020
1 parent 8bc04a9 commit 0138448
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions x-pack/plugins/reporting/server/config/schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ describe('Reporting Config Schema', () => {
.encryptionKey
).toBe('qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq');

expect(ConfigSchema.validate({ encryptionKey: 'weaksauce' }).encryptionKey).toBe('weaksauce');

// disableSandbox
expect(
ConfigSchema.validate({ capture: { browser: { chromium: { disableSandbox: true } } } })
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/reporting/server/config/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ const CsvSchema = schema.object({
const EncryptionKeySchema = schema.conditional(
schema.contextRef('dist'),
true,
schema.maybe(schema.string({ minLength: 32 })), // default value is dynamic in createConfig$
schema.string({ minLength: 32, defaultValue: 'a'.repeat(32) })
schema.maybe(schema.string()), // default value is dynamic in createConfig$
schema.string({ defaultValue: 'a'.repeat(32) })
);

const RolesSchema = schema.object({
Expand Down

0 comments on commit 0138448

Please sign in to comment.