Skip to content

Commit b183aff

Browse files
author
Andrei Neagu
committed
using secret string
1 parent de0db8c commit b183aff

File tree

2 files changed

+5
-3
lines changed
  • services/dynamic-scheduler/src/simcore_service_dynamic_scheduler

2 files changed

+5
-3
lines changed

services/dynamic-scheduler/src/simcore_service_dynamic_scheduler/api/frontend/_setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ def setup_frontend(app: FastAPI) -> None:
1212
nicegui.app.include_router(router)
1313

1414
nicegui.ui.run_with(
15-
app, mount_path="/", storage_secret=settings.DYNAMIC_SCHEDULER_UI_STORAGE_SECRET
15+
app,
16+
mount_path="/",
17+
storage_secret=settings.DYNAMIC_SCHEDULER_UI_STORAGE_SECRET.get_secret_value(),
1618
)
1719
set_parent_app(app)

services/dynamic-scheduler/src/simcore_service_dynamic_scheduler/core/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import datetime
22
from typing import Annotated
33

4-
from pydantic import AliasChoices, Field, TypeAdapter, field_validator
4+
from pydantic import AliasChoices, Field, SecretStr, TypeAdapter, field_validator
55
from servicelib.logging_utils_filtering import LoggerName, MessageSubstring
66
from settings_library.application import BaseApplicationSettings
77
from settings_library.basic_types import LogLevel, VersionTag
@@ -80,7 +80,7 @@ class ApplicationSettings(_BaseApplicationSettings):
8080
These settings includes extra configuration for the http-API
8181
"""
8282

83-
DYNAMIC_SCHEDULER_UI_STORAGE_SECRET: str = Field(
83+
DYNAMIC_SCHEDULER_UI_STORAGE_SECRET: SecretStr = Field(
8484
...,
8585
description=(
8686
"secret required to enabled browser-based storage for the UI. "

0 commit comments

Comments
 (0)