Our adapter is supposed to process attributes of messages directed to
Orion. For the sake of testing though, there's no need to deploy Orion
& friends, any dummy HTTP service will do but a better option is httpbin
which can echo back HTTP messages too—this will come in handy to e.g.
check the adapter removes IDS token headers before the HTTP request gets
passed down to the target service.
$ cd $GOPATH/src/orchestracities/boost/
$ kubectl apply -f deployment/httpbin_service.yaml
$ kubectl apply -f deployment/ingress_routing.yaml
Another thing the adapter is supposed to do is getting an IDS identity token from a DAPS service. Again, since we're just testing locally here, we can get away with deploying our mock DAPS we dockerised earlier:
$ kubectl apply -f deployment/mock_daps_service.yaml
Wait a bit until httpbin
, mockdaps
and all Istio services/pods are
alive & kicking. (If you don't have a beefy box, this will take a while,
like even 5 mins, go for coffee!)
Then you should be able to see what HTTP headers the httpbin
service
gets to see when you curl
a request:
$ source scripts/cluster-url.sh
$ curl -v "$BASE_URL"/headers
Should we have some fun with HTTP headers?
$ curl -v "$BASE_URL"/headers \
-H this-wont-be-dropped:cool-bananas! \
-H header:will-be-dropped
The header
header gets dropped from the HTTP request before it
gets to the httpbin
service (see ingress_routing.yaml
) whereas
any other header gets passed on. Uh? header
header? Yep, you heard
right, the IDS header is aptly called header
:-)
Note. Header removal. We disabled this at the moment since it gets in the way of token validation—see #11. So, much to your disappointment, the above won't work—i.e. the IDS header won't get dropped.