datawire/ambassador-envoy该镜像基于Envoy代理,集成了Ambassador的外部认证HTTP过滤器,旨在为服务网格或微服务架构中的服务提供便捷的外部认证解决方案。通过该镜像,用户可快速部署具备外部认证能力的代理服务,实现对HTTP请求的认证逻辑处理,增强服务访问的安全性。
主要用途:作为服务代理接收并处理HTTP请求,通过集成的Ambassador外部认证过滤器与外部认证服务交互,完成请求的认证校验,适用于需要集中管理认证逻辑的服务架构场景。
通过docker run命令快速启动容器,需挂载Envoy配置文件以启用外部认证过滤器:
bashdocker run -d \ --name envoy-auth-proxy \ -p 8080:8080 \ # 代理服务端口(接收客户端请求) -p 9901:9901 \ # Envoy管理端口(用于监控和配置查询) -v /host/path/to/envoy-config.yaml:/etc/envoy/envoy.yaml \ # 挂载本地Envoy配置文件 [镜像名称]
需在Envoy配置文件中定义外部认证过滤器,以下为关键配置片段:
yamlstatic_resources: listeners: - name: main address: socket_address: { address: 0.0.0.0, port_value: 8080 } filter_chains: - filters: - name: envoy.http_connection_manager typed_config: "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager stat_prefix: ingress_http route_config: name: local_route virtual_hosts: - name: local_service domains: ["*"] routes: - match: { prefix: "/" } route: { cluster: target_service } # 目标服务集群 http_filters: # 外部认证过滤器(需放在router过滤器之前) - name: envoy.filters.http.ext_authz typed_config: "@type": type.googleapis.com/udpa.type.v1.TypedStruct type_url: type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthz value: http_service: server_uri: uri: http://auth-service:8080 # 外部认证服务地址(需替换为实际地址) cluster: auth_service_cluster # 认证服务集群名称 timeout: 5s # 认证请求超时时间 path_prefix: "/check" # 认证服务的请求路径 authorization_request: allowed_headers: patterns: - exact: "Authorization" # 允许传递给认证服务的请求头 failure_mode_allow: false # 认证服务不可用时是否允许请求通过(false为拒绝) # 路由过滤器(必须放在最后) - name: envoy.filters.http.router typed_config: {} clusters: - name: target_service # 目标服务集群(需替换为实际服务地址) connect_timeout: 0.25s type: STRICT_DNS lb_policy: ROUND_ROBIN load_assignment: cluster_name: target_service endpoints: - lb_endpoints: - endpoint: address: socket_address: { address: target-service, port_value: 80 } - name: auth_service_cluster # 认证服务集群(需与上述server_uri.cluster对应) connect_timeout: 0.25s type: STRICT_DNS lb_policy: ROUND_ROBIN load_assignment: cluster_name: auth_service_cluster endpoints: - lb_endpoints: - endpoint: address: socket_address: { address: auth-service, port_value: 8080 } # 认证服务地址
| 配置路径 | 描述 | 示例值 |
|---|---|---|
http_filters[].typed_config.value.http_service.server_uri.uri | 外部认证服务的完整URI | http://auth-service:8080 |
http_filters[].typed_config.value.http_service.server_uri.timeout | 认证请求的超时时间 | 5s |
http_filters[].typed_config.value.http_service.path_prefix | 发送到认证服务的请求路径前缀 | /check |
http_filters[].typed_config.value.failure_mode_allow | 认证服务不可用时是否允许请求通过 | false(默认,拒绝请求)/ true(允许请求) |
http_filters[].typed_config.value.authorization_request.allowed_headers | 允许传递给认证服务的请求头 | [{ exact: "Authorization" }, { exact: "Cookie" }] |
-v参数挂载本地Envoy配置文件,配置文件中需正确定义外部认证过滤器及相关集群信息。--mode validate参数验证配置文件合法性:
bashdocker run --rm -v /host/path/to/envoy-config.yaml:/etc/envoy/envoy.yaml [镜像名称] --mode validate -c /etc/envoy/envoy.yaml






探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务