Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix(api): wire dedicated timeout into inner RBAC requests (#38150)

Xiyuan Chen0d5f43520c85
diff --git a/api/configs/enterprise/__init__.py b/api/configs/enterprise/__init__.py
index 27318911201..3aeffe4c0f4 100644
--- a/api/configs/enterprise/__init__.py
+++ b/api/configs/enterprise/__init__.py
@@ -34,6 +34,12 @@ class EnterpriseFeatureConfig(BaseSettings):
default=False,
)
+ ENTERPRISE_RBAC_REQUEST_TIMEOUT: int = Field(
+ ge=1,
+ description="Maximum timeout in seconds for inner RBAC requests.",
+ default=30,
+ )
+
class EnterpriseTelemetryConfig(BaseSettings):
"""
diff --git a/api/services/enterprise/rbac_service.py b/api/services/enterprise/rbac_service.py
index 11d7fa82399..ff790b1690c 100644
--- a/api/services/enterprise/rbac_service.py
+++ b/api/services/enterprise/rbac_service.py
@@ -743,6 +743,7 @@ def _inner_call(
account_id=account_id,
json=json,
params=params,
+ timeout=dify_config.ENTERPRISE_RBAC_REQUEST_TIMEOUT,
)