refs #703: configure smilegate mcp token presets

This commit is contained in:
devmrko
2026-07-22 16:16:57 +09:00
parent 211dd2b2c8
commit 90d76f1033
2 changed files with 21 additions and 8 deletions

View File

@@ -80,7 +80,7 @@ VPD_TOKEN_PRESETS_FILE = ROOT / "config" / "vpd_token_presets.json"
DEMO_SCENARIOS_FILE = ROOT / "config" / "smilegate_demo_scenarios.json"
APP_PROFILE_FILE = ROOT / "config" / "app_profile.json"
CHAT_DB_FILE = ROOT / "data" / "poc4_mcp_chat.sqlite3"
DEFAULT_VPD_USER_ID = "sg-teamlead"
DEFAULT_VPD_USER_ID = "1001"
VPD_OPERATIONS_URL = "https://smilegate-backoffice.cloud-handson.com/"
PORTAL_AUTHENTICATED_KEY = "poc4_portal_authenticated"
PORTAL_AUTH_USER_KEY = "poc4_portal_auth_user"
@@ -3644,6 +3644,9 @@ def load_vpd_token_presets(
if not isinstance(item, Mapping) or item.get("enabled", True) is not True:
continue
token = _normalized_bearer(item.get("token"))
if not token:
token_env = str(item.get("token_env") or "").strip()
token = _normalized_bearer(_runtime_env_value(token_env)) if token_env else ""
user_id = str(item.get("user_id") or "").strip()
if not token or not user_id or user_id in seen:
continue