AS AgentScopeAPI 手册 / API Reference

DataSecurityConfig

@Configuration @EnableWebFluxSecurity public class DataSecurityConfig
源码Source 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 by EnvironmentKeyAuthFilter (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.

参数Parameters
名称Name类型Type说明Description
httpServerHttpSecurityHTTP(类型 `ServerHttpSecurity`)。The http.
jwtServiceJwtServiceJWT 服务(类型 `JwtService`)。The jwt service.
controlPlaneClientControlPlaneClient控制面客户端(类型 `ControlPlaneClient`)。The control plane client.
internalTokenString内部令牌(类型 `String`)。The internal token.
返回Returns SecurityWebFilterChain
返回SecurityWebFilterChain。Returns security web filter chain.
源码Source io/agentscope/builder/web/config/DataSecurityConfig.java:65–96

corsConfigurationSource

public CorsConfigurationSource corsConfigurationSource()

返回 corsConfigurationSource 结果。

Returns the cors configuration source.

返回Returns CorsConfigurationSource
返回CorsConfigurationSource。Returns cors configuration source.
源码Source io/agentscope/builder/web/config/DataSecurityConfig.java:98–108
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.