fix: expose office Dex secret to deployment
This commit is contained in:
parent
ccca1af004
commit
92a1d0352e
|
|
@ -327,12 +327,13 @@ required = [
|
|||
"DEX_USER_ID",
|
||||
"DEX_USER_PASSWORD",
|
||||
]
|
||||
optional = ["DEX_OFFICE_CLIENT_SECRET"]
|
||||
missing = [key for key in required if not values.get(key)]
|
||||
if missing:
|
||||
print(f"Missing Dex secret keys: {', '.join(missing)}", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
for key in required:
|
||||
for key in required + [key for key in optional if values.get(key)]:
|
||||
value = str(values[key])
|
||||
if "\n" in value or "\r" in value:
|
||||
print(f"Secret value for {key} cannot contain a newline", file=sys.stderr)
|
||||
|
|
|
|||
Loading…
Reference in New Issue