Envoy ext_authz筛选器未调用远程授权http服务

时间:2019-03-01 14:32:53

标签: envoyproxy

我正在尝试使用envoy的ext_authz过滤器来对某个远程服务进行其他调用,以进行授权和一些其他的jwt令牌工作,这些工作无法由默认的envoy jwt过滤器处理。 不幸的是,由于某些原因,该方法无法正常工作-请求被正确路由,但我看不到日志或Wireshark中对远程身份验证服务的任何调用。

这是我的envoy.yaml

admin:
  access_log_path: /tmp/admin_access.log
  address:
    socket_address:
      protocol: TCP
      address: 0.0.0.0
      port_value: 9901
static_resources:
  listeners:
  - name: listener_0
    address:
      socket_address:
        protocol: TCP
        address: 0.0.0.0
        port_value: 10000
    filter_chains:
    - filters:
      - name: envoy.http_connection_manager
        config:
          stat_prefix: ingress_http
          route_config:
            name: local_route
            virtual_hosts:
            - name: local_service
              domains: ["*"]
              routes:
              - match:
                  prefix: "/"
                route:
                  host_rewrite: 10.0.2.2
                  cluster: cluster1
          http_filters:
          - name: envoy.ext_authz
            config:
              http_service:
                server_uri:
                  uri: 10.0.2.2:1188/auth
                  cluster: cluster1
                  timeout: 0.25s
              failure_mode_allow: true
          - name: envoy.router
  clusters:
  - name: cluster1
    connect_timeout: 0.25s
    hosts:
      - socket_address:
          address: 10.0.2.2
          port_value: 1188

这只是从ubuntu虚拟机(即10.0.2.2)中运行到1188端口的本地springboot应用程序的简单路由。我正在呼叫的端点和授权/auth都从单个spring控制器运行,因此该部分肯定有效。

我在发送的请求中是否在配置中缺少某些内容,因此authz筛选器不会触发?

0 个答案:

没有答案