backend-common: make configuration objects optional in config schema

The previous schema meant that if any other plugin introduced something
under backend.auth, the keys property would be mandatory, which isn't
correct. This commit relaxes the requirement so that backend.auth.keys
is always optional, even if backend.auth is configured.

Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
Mike Lewis
2022-02-21 18:23:47 +00:00
parent 78e31e6b68
commit b2f8bb99d3
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/backend-common': patch
---
Make backend.auth.keys optional in config schema. Previously backend.auth was optional but keys was not, which meant that if another plugin introduced additional properties under backend.auth, it would implicitly make backend.auth.keys mandatory.
+1 -1
View File
@@ -23,7 +23,7 @@ export interface Config {
/** Backend configuration for when request authentication is enabled */
auth?: {
/** Keys shared by all backends for signing and validating backend tokens. */
keys: {
keys?: {
/**
* Secret for generating tokens. Should be a base64 string, recommended
* length is 24 bytes.