DataSecurityConfig
@Configuration @EnableWebFluxSecurity public class DataSecurityConfig
io/agentscope/builder/web/config/DataSecurityConfig.java:61–146数据 Security 配置,保存相关配置项。位于 io.agentscope.builder.web.config 包。核心成员包括 securityWebFilterChain、corsConfigurationSource。
WebFlux Security configuration for the builder data plane.
-
/actuator/health|info— public -
/api/environments/{id}/work/**and self-hosted session routes — authenticated byEnvironmentKeyAuthFilter(X-Builder-Environment-Key) -
/api/**— requires an authenticated principal: a user JWT (same signing secret as the control plane), an environment key, or the internal token (X-Builder-Internal-Token) for plane-to-plane calls from the scheduler / control plane -
/**— public (the data plane serves no browser assets; only/api/**is protected)
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http, JwtService jwtService, ControlPlaneClient controlPlaneClient, String internalToken) | 执行 `securityWebFilterChain` 方法。 Performs the security web filter chain operation. |
public CorsConfigurationSource corsConfigurationSource() | 返回 `corsConfigurationSource` 结果。 Returns the cors configuration source. |
方法详情Method Detail
securityWebFilterChain
public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http, JwtService jwtService, ControlPlaneClient controlPlaneClient, String internalToken)
执行 securityWebFilterChain 方法。
Performs the security web filter chain operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
http | ServerHttpSecurity | HTTP(类型 `ServerHttpSecurity`)。The http. |
jwtService | JwtService | JWT 服务(类型 `JwtService`)。The jwt service. |
controlPlaneClient | ControlPlaneClient | 控制面客户端(类型 `ControlPlaneClient`)。The control plane client. |
internalToken | String | 内部令牌(类型 `String`)。The internal token. |
SecurityWebFilterChainio/agentscope/builder/web/config/DataSecurityConfig.java:65–96corsConfigurationSource
public CorsConfigurationSource corsConfigurationSource()
返回 corsConfigurationSource 结果。
Returns the cors configuration source.
CorsConfigurationSourceio/agentscope/builder/web/config/DataSecurityConfig.java:98–108