refs #703: configure smilegate mcp token presets
This commit is contained in:
@@ -94,7 +94,7 @@ VPD_TOKEN_PRESETS_FILE = ROOT / "config" / "vpd_token_presets.json"
|
|||||||
DEMO_SCENARIOS_FILE = ROOT / "config" / "smilegate_demo_scenarios.json"
|
DEMO_SCENARIOS_FILE = ROOT / "config" / "smilegate_demo_scenarios.json"
|
||||||
APP_PROFILE_FILE = ROOT / "config" / "app_profile.json"
|
APP_PROFILE_FILE = ROOT / "config" / "app_profile.json"
|
||||||
CHAT_DB_FILE = ROOT / "data" / "poc4_mcp_chat.sqlite3"
|
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/"
|
VPD_OPERATIONS_URL = "https://smilegate-backoffice.cloud-handson.com/"
|
||||||
PORTAL_AUTHENTICATED_KEY = "poc4_portal_authenticated"
|
PORTAL_AUTHENTICATED_KEY = "poc4_portal_authenticated"
|
||||||
PORTAL_AUTH_USER_KEY = "poc4_portal_auth_user"
|
PORTAL_AUTH_USER_KEY = "poc4_portal_auth_user"
|
||||||
@@ -2193,12 +2193,10 @@ def load_vpd_token_presets(
|
|||||||
for item in raw_presets:
|
for item in raw_presets:
|
||||||
if not isinstance(item, Mapping) or item.get("enabled", True) is not True:
|
if not isinstance(item, Mapping) or item.get("enabled", True) is not True:
|
||||||
continue
|
continue
|
||||||
token_env = str(
|
token = _normalized_bearer(item.get("token"))
|
||||||
item.get("mcp_token_env") or item.get("token_env") or ""
|
if not token:
|
||||||
).strip()
|
token_env = str(item.get("token_env") or "").strip()
|
||||||
token = _normalized_bearer(
|
token = _normalized_bearer(_runtime_env_value(token_env)) if token_env else ""
|
||||||
_runtime_env_value(token_env) if token_env else item.get("token")
|
|
||||||
)
|
|
||||||
user_id = str(item.get("user_id") or "").strip()
|
user_id = str(item.get("user_id") or "").strip()
|
||||||
if not user_id or user_id in seen:
|
if not user_id or user_id in seen:
|
||||||
continue
|
continue
|
||||||
|
|||||||
@@ -1,14 +1,24 @@
|
|||||||
{
|
{
|
||||||
"presets": [
|
"presets": [
|
||||||
{
|
{
|
||||||
"enabled": false,
|
"enabled": true,
|
||||||
"default": true,
|
"default": true,
|
||||||
"token": "vpd_live_REPLACE_WITH_USER_TOKEN",
|
"user_id": "1001",
|
||||||
"user_id": "FC00789",
|
"name": "Data & AI TF 팀장",
|
||||||
"name": "김설계",
|
"role": "DATA_AI_POC_ADMIN",
|
||||||
"role": "설계사",
|
"channel": "DATA_AI_TF",
|
||||||
"channel": "설계사",
|
"scope": "SGMP_POC 게임 데이터 전체",
|
||||||
"scope": "본인 담당 계약 고객"
|
"token_env": "SMILEGATE_TEAMLEAD_BEARER_TOKEN"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"enabled": true,
|
||||||
|
"default": false,
|
||||||
|
"user_id": "1002",
|
||||||
|
"name": "Data & AI TF 팀원",
|
||||||
|
"role": "DATA_AI_POC_ADMIN",
|
||||||
|
"channel": "DATA_AI_TF",
|
||||||
|
"scope": "SGMP_POC 게임 데이터 전체",
|
||||||
|
"token_env": "SMILEGATE_TEAMMEMBER_BEARER_TOKEN"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user