static_resources:
  listeners:
  - name: listener_0
    address:
      socket_address:
        address: 0.0.0.0
        port_value: 10000
    filter_chains:
    - filters:
      - name: envoy.filters.network.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: local-backend-service
          http_filters:
          - name: envoy.filters.http.credential_injector
            typed_config:
              "@type": type.googleapis.com/envoy.extensions.filters.http.credential_injector.v3.CredentialInjector
              credential:
                name: envoy.http.injected_credentials.oauth2
                typed_config:
                  "@type": type.googleapis.com/envoy.extensions.http.injected_credentials.oauth2.v3.OAuth2
                  token_endpoint:
                    cluster: okta.ad
                    timeout: 3s
                    uri: "https://dev-1178504991.okta.com/oauth2/default/v1/token"
                  client_credentials:
                    client_id: some-client-id
                    client_secret:
                      name: client-secret
          - name: envoy.filters.http.router
            typed_config:
              "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router

  clusters:
  - lb_policy: ROUND_ROBIN
    load_assignment:
      cluster_name: okta.ad
      endpoints:
      - lb_endpoints:
        - endpoint:
            address:
              socket_address:
                address: dev-1178504991.okta.com
                port_value: 443
    name: okta.ad
    transport_socket:
      name: envoy.transport_sockets.tls
      typed_config:
        '@type': type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext
        sni: dev-1178504991.okta.com
    type: LOGICAL_DNS
  - name: local-backend-service
    type: LOGICAL_DNS
    dns_lookup_family: V4_ONLY
    lb_policy: ROUND_ROBIN
    load_assignment:
      cluster_name: local-backend-service
      endpoints:
      - lb_endpoints:
        - endpoint:
            address:
              socket_address:
                address: 127.0.0.1
                port_value: 8000

  secrets:
  - name: client-secret
    generic_secret:
      secret:
        inline_string: "lL0FWQUMnWizwG0JPop3ccEaC1pNZn5uYYnTbVQM"
