Skip to content

Commit 00f48bf

Browse files
Merge pull request #18 from NHSDigital/NPA-1970-authenticate-with-waf-using-api-key
Added secret for WAF API token
2 parents dbc8192 + a75cd6d commit 00f48bf

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

manifest_template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
SERVICE_NAME: validated-relationships-service-api
22
PRODUCT_DISPLAY_NAME: validated-relationships-service-api
3-
DESCRIPTION: example description
3+
DESCRIPTION: Validated Relationships Service API
44
APIGEE_ENVIRONMENTS:
55
- name: internal-dev
66
display_name: Internal Development
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<AssignMessage async="false" continueOnError="false" enabled="true" name="AddAPIToken">
3+
<DisplayName>Add API Token</DisplayName>
4+
<Add>
5+
<Headers>
6+
<Header name="x-origin-shared-secret">{private.environment_kvm_data.apikey}</Header>
7+
</Headers>
8+
</Add>
9+
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
10+
<AssignTo createNew="false" transport="http" type="request"/>
11+
</AssignMessage>

proxies/live/apiproxy/targets/target.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
<Step>
88
<Name>FlowCallout.ApplyRateLimiting</Name>
99
</Step>
10+
<Step>
11+
<Name>AddAPIToken</Name>
12+
</Step>
1013
</Request>
1114
</PreFlow>
1215
<FaultRules>
@@ -24,7 +27,7 @@
2427
<!--TODO: The target needs to configured on a per enironment basis (NPA-1979)
2528
This URL will also need to change once we have DNS in place (NPA-1669)
2629
-->
27-
<URL>https://6e6ljoc1a5.execute-api.eu-west-2.amazonaws.com/default/api</URL>
30+
<URL>https://jfhedvdn0k.execute-api.eu-west-2.amazonaws.com/default/api</URL>
2831
<Properties>
2932
<Property name="supports.http10">true</Property>
3033
<Property name="request.retain.headers">User-Agent,Referer,Accept-Language</Property>

0 commit comments

Comments
 (0)