Skip to content

Commit 338e66d

Browse files
updates to use new APIM shared flow
1 parent bdbcaf6 commit 338e66d

File tree

4 files changed

+37
-6
lines changed

4 files changed

+37
-6
lines changed

macros/manifest_macros.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
products:
44
{% endmacro %}
55

6-
{%- macro product(ENV, MODE, TITLE, product_name, display_name) -%}
6+
{%- macro product(ENV, MODE, TITLE, product_name, display_name, euo_allowlist_required) -%}
77
- name: e-referrals-service-api-{{ product_name }}{{ MODE.nameSuffix }}
88
approvalType: {{ ENV.approval_type | default('auto') }}
99
attributes:
1010
- name: access
1111
value: public
12+
- name: EUOAllowlistRequired
13+
value: {{ euo_allowlist_required }}
1214
- name: ratelimiting
1315
value:
1416
e-referrals-service-api-{{ product_name }}:

manifest_template.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,34 @@ APIGEE_ENVIRONMENTS:
1616
variants:
1717
- name: alpha-internal-dev
1818
display_name: Internal Development - alpha
19+
euo_allowlist_required: true
1920
- name: rc-internal-dev
2021
display_name: Internal Development - rc
22+
euo_allowlist_required: true
2123
- name: fix-internal-dev
2224
display_name: Internal Development - fix
25+
euo_allowlist_required: true
2326
- name: fti-internal-dev
2427
display_name: Internal Development - ft01
28+
euo_allowlist_required: true
2529
- name: ftiv-internal-dev
2630
display_name: Internal Development - ft04
31+
euo_allowlist_required: true
2732
- name: ftv-internal-dev
2833
display_name: Internal Development - ft05
34+
euo_allowlist_required: true
2935
- name: ftix-internal-dev
3036
display_name: Internal Development - ft09
37+
euo_allowlist_required: true
3138
- name: ftxxii-internal-dev
3239
display_name: Internal Development - ft22
40+
euo_allowlist_required: true
3341

3442
- name: internal-dev-sandbox
3543
variants:
3644
- name: internal-dev-sandbox
3745
display_name: Internal Development Sandbox
46+
euo_allowlist_required: true
3847

3948
- name: int
4049
additional_proxies:
@@ -43,6 +52,7 @@ APIGEE_ENVIRONMENTS:
4352
variants:
4453
- name: int
4554
display_name: Integration Testing
55+
euo_allowlist_required: true
4656

4757
- name: internal-qa
4858
additional_proxies:
@@ -51,29 +61,34 @@ APIGEE_ENVIRONMENTS:
5161
variants:
5262
- name: internal-qa
5363
display_name: Internal QA
64+
euo_allowlist_required: true
5465

5566
- name: internal-qa-sandbox
5667
variants:
5768
- name: internal-qa-sandbox
5869
display_name: Internal QA Sandbox
70+
euo_allowlist_required: true
5971

6072
- name: sandbox
6173
variants:
6274
- name: sandbox
6375
display_name: Sandbox
76+
euo_allowlist_required: true
6477

6578
- name: dev
6679
additional_proxies:
6780
- identity-service-dep-dev
6881
variants:
6982
- name: dep-dev
7083
display_name: Dev - dep
84+
euo_allowlist_required: true
7185

7286
- name: prod
7387
approval_type: manual
7488
variants:
7589
- name: prod
7690
display_name: Production
91+
euo_allowlist_required: false
7792

7893
ACCESS_MODES:
7994
- name: healthcare-worker
@@ -106,7 +121,7 @@ apigee:
106121

107122
{% for VARIANT in ENV.variants %}
108123
{% for MODE in ACCESS_MODES %}
109-
{{ macros.product(ENV, MODE, TITLE, VARIANT.name, VARIANT.display_name) }}
124+
{{ macros.product(ENV, MODE, TITLE, VARIANT.name, VARIANT.display_name, VARIANT.euo_allowlist_required) }}
110125
{% endfor %}
111126
{% endfor %}
112127

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<FlowCallout async="false" continueOnError="false" enabled="true" name="FlowCallout.EUOAllowlistRequired">
3+
<DisplayName>EUOAllowlistRequired</DisplayName>
4+
<SharedFlowBundle>EUOAllowlistRequired</SharedFlowBundle>
5+
</FlowCallout>

proxies/live/apiproxy/targets/ers-target.xml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,19 @@
118118
<Step>
119119
<Name>OauthV2.VerifyAccessToken</Name>
120120
</Step>
121+
<!-- Must be placed after Authentication -->
122+
<Step>
123+
<Name>FlowCallout.EUOAllowlistRequired</Name>
124+
<Condition>(accesstoken.auth_type == "user")</Condition>
125+
</Step>
126+
<Step>
127+
<Name>FlowCallout.ExtendedAttributes</Name>
128+
<Condition>(flow.shouldInvokeEUOAllowlist = true)</Condition>
129+
</Step>
130+
<Step>
131+
<Name>FlowCallout.EUOAllowlistVerify</Name>
132+
<Condition>(flow.shouldInvokeEUOAllowlist = true)</Condition>
133+
</Step>
121134
<Step>
122135
<Name>RaiseFault.MissingAsid</Name>
123136
<Condition>(app.asid == null) Or (app.asid == "")</Condition>
@@ -157,10 +170,6 @@
157170
<Response/>
158171
<Request><Step>
159172
<Name>FlowCallout.ExtendedAttributes</Name>
160-
</Step> <Step>
161-
<Name>FlowCallout.EUOAllowlistVerify</Name>
162-
<!-- Change this to be inline using the app attribute -->
163-
<Condition>(verifyapikey.Verify‑API‑Key.app.EUOAllowlistEnabled == true)</Condition>
164173
</Step> <!--AUTHORISED_APPLICATION business function is not supported in user restricted flow --><Step>
165174
<Name>RaiseFault.403Forbidden</Name>
166175
<Condition>(request.header.nhsd-ers-business-function == "AUTHORISED_APPLICATION")</Condition>

0 commit comments

Comments
 (0)