solo-io / gloo-portal-issues

Public tracker for issues related to Gloo Portal
https://docs.solo.io/gloo-portal/latest/
1 stars 3 forks source link

Cannot apply new-header transform at route level #75

Closed jameshbarton closed 3 years ago

jameshbarton commented 3 years ago

Describe the bug I'm experimenting with adding a new header (foo: bar) in a requestTransformation and cannot get it to apply to the request.

I began with an example like the standard Portal docs but modified it to use httpbin as upstream rather than petstore. The basics work fine. I can access it use api-key authNZ from both CLI and portal UI. I then tried to use the new request transformation integration at the route level with Edge. The user transformation does not appear to be merged into the generated RouteTable alongside the Portal-generated transforms.

To Reproduce Note that this config is deployed in a solo-test GKE project.

  1. curl the httpbin endpoint exposed through portal VS.
    
    curl http://34.139.42.235/get -i -H 'api-key: MTZjODUxYmMtOGExZi05NDA3LTViYTAtNjZlN2RmOTc1NGUz' -H 'Host: api.example.com'
    HTTP/1.1 200 OK
    server: envoy
    date: Wed, 07 Jul 2021 18:42:26 GMT
    content-type: application/json
    content-length: 415
    access-control-allow-origin: *
    access-control-allow-credentials: true
    x-envoy-upstream-service-time: 2

{ "args": {}, "headers": { "Accept": "/", "Api-Key": "MTZjODUxYmMtOGExZi05NDA3LTViYTAtNjZlN2RmOTc1NGUz", "Host": "api.example.com", "User-Agent": "curl/7.64.1", "X-Envoy-Expected-Rq-Timeout-Ms": "15000", "X-Solo-Plan": "basic", "X-User-Id": "httpbin-product-basic-0c2bfac7-7097-36f9-1537-f6568cd44e4e" }, "origin": "10.92.0.7", "url": "http://api.example.com/get"


2. Note that `foo: bar` header is not present in the httpbin output.

Attaching a [zip](https://github.com/solo-io/gloo-portal-issues/files/6785536/xform.zip) with the APIDoc, APIProduct that specifies the route-level transform, Environment, the generated RT and VS, and the Envoy proxy config.

**Expected behavior**
The `foo: bar` header should be present as part of httpbin "headers" output.

**Additional context**
- Gloo Portal version 1.0.0
- Gateway technology and version: Gloo Edge Enterprise v1.8.0
jameshbarton commented 3 years ago

User Error: Bad config was specified. Closing this issue out. May open a separate issue around lack of negative feedback when invalid config was applied.