Skip to content

Commit e1bd5a2

Browse files
Merge branch 'master' into NPA-1868-update-target-server
2 parents f081fca + 3d83647 commit e1bd5a2

File tree

8 files changed

+68
-76
lines changed

8 files changed

+68
-76
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
This is a specification for the *validated-relationships-service-api* API.
66

7+
78
* `specification/` This [Open API Specification](https://swagger.io/docs/specification/about/) describes the endpoints, methods and messages exchanged by the API. Use it to generate interactive documentation; the contract between the API and its consumers.
89
* `sandbox/` This NodeJS application implements a mock implementation of the service. Use it as a back-end service to the interactive documentation to illustrate interactions and concepts. It is not intended to provide an exhaustive/faithful environment suitable for full development and testing.
910
* `scripts/` Utilities helpful to developers of this specification.

azure/azure-release-pipeline.yml

Lines changed: 31 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -36,37 +36,34 @@ extends:
3636
- template: ./templates/run-tests.yml
3737
parameters:
3838
full: true
39-
# - environment: internal-dev-sandbox
40-
# proxy_path: sandbox
41-
# post_deploy:
42-
# - template: ./templates/run-tests.yml
43-
# - environment: internal-qa
44-
# post_deploy:
45-
# - template: ./templates/run-tests.yml
46-
# parameters:
47-
# full: true
48-
# - environment: internal-qa-sandbox
49-
# proxy_path: sandbox
50-
# post_deploy:
51-
# - template: ./templates/run-tests.yml
52-
# - environment: ref
53-
# depends_on:
54-
# - internal_qa
55-
# - internal_qa_sandbox
56-
# post_deploy:
57-
# - template: ./templates/run-tests.yml
58-
# - environment: sandbox
59-
# proxy_path: sandbox
60-
# post_deploy:
61-
# - template: ./templates/run-tests.yml
62-
# # Enable int environment when ready by uncommenting:
63-
# - environment: int
64-
# depends_on:
65-
# - internal_qa
66-
# - internal_qa_sandbox
67-
# post_deploy:
68-
# - template: ./templates/run-tests.yml
69-
# parameters:
70-
# full: true
71-
# test-command: prod
72-
# smoketest-command: prod
39+
- environment: internal-dev-sandbox
40+
proxy_path: sandbox
41+
post_deploy:
42+
- template: ./templates/run-tests.yml
43+
- environment: internal-qa
44+
post_deploy:
45+
- template: ./templates/run-tests.yml
46+
parameters:
47+
full: true
48+
- environment: internal-qa-sandbox
49+
proxy_path: sandbox
50+
post_deploy:
51+
- template: ./templates/run-tests.yml
52+
- environment: ref
53+
depends_on:
54+
- internal_qa
55+
- internal_qa_sandbox
56+
post_deploy:
57+
- template: ./templates/run-tests.yml
58+
- environment: sandbox
59+
proxy_path: sandbox
60+
# post_deploy:
61+
# - template: ./templates/run-tests.yml
62+
- environment: int
63+
depends_on:
64+
- internal_qa
65+
- internal_qa_sandbox
66+
# post_deploy:
67+
# - template: ./templates/run-tests.yml
68+
# parameters:
69+
# full: true

manifest_template.yml

Lines changed: 17 additions & 17 deletions
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
@@ -11,22 +11,22 @@ APIGEE_ENVIRONMENTS:
1111
- name: ref
1212
display_name: Reference
1313
has_mock_auth: true
14-
# Enable environments when ready by uncommenting:
15-
# - name: internal-dev-sandbox
16-
# display_name: Internal Development Sandbox
17-
# portal_visibility: false
18-
# - name: internal-qa
19-
# display_name: Internal QA
20-
# has_mock_auth: true
21-
# portal_visibility: false
22-
# - name: internal-qa-sandbox
23-
# display_name: Internal QA Sandbox
24-
# portal_visibility: false
25-
# - name: sandbox
26-
# display_name: Sandbox
27-
# portal_visibility: false
28-
# - name: int
29-
# display_name: Integration Testing
14+
- name: internal-dev-sandbox
15+
display_name: Internal Development Sandbox
16+
portal_visibility: false
17+
- name: internal-qa
18+
display_name: Internal QA
19+
has_mock_auth: true
20+
portal_visibility: false
21+
- name: internal-qa-sandbox
22+
display_name: Internal QA Sandbox
23+
portal_visibility: false
24+
- name: sandbox
25+
display_name: Sandbox
26+
portal_visibility: false
27+
- name: int
28+
display_name: Integration Testing
29+
has_mock_auth: true
3030
---
3131
meta:
3232
api:
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/policies/OAuthV2.VerifyAccessTokenAppLevel3OrCis2Aal3.xml

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<OAuthV2 async="false" continueOnError="false" enabled="true" name="VerifyAccessTokenUserNhsLoginP9">
2+
<Operation>VerifyAccessToken</Operation>
3+
<Scopes>urn:nhsd:apim:user-nhs-login:P9:validated-relationships-service-api</Scopes>
4+
</OAuthV2>

proxies/live/apiproxy/targets/target.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
<PreFlow>
33
<Request>
44
<Step>
5-
<Name>OauthV2.VerifyAccessTokenAppLevel3OrCis2Aal3</Name>
5+
<Name>VerifyAccessTokenUserNhsLoginP9</Name>
66
</Step>
77
<Step>
88
<Name>FlowCallout.ApplyRateLimiting</Name>
99
</Step>
10+
<Step>
11+
<Name>AddAPIToken</Name>
12+
</Step>
1013
</Request>
1114
</PreFlow>
1215
<FaultRules>

tests/test_endpoints.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,3 @@ def test_wait_for_status(nhsd_apim_proxy_url, status_endpoint_auth_headers):
7272
def test_app_level0(nhsd_apim_proxy_url, nhsd_apim_auth_headers):
7373
resp = requests.get(f"{nhsd_apim_proxy_url}", headers=nhsd_apim_auth_headers)
7474
assert resp.status_code == 401 # unauthorized
75-
76-
77-
@pytest.mark.skip(reason="TBC: Are we supporting Application level 3 access to the API?")
78-
@pytest.mark.nhsd_apim_authorization({"access": "application", "level": "level3"})
79-
def test_app_level3(nhsd_apim_proxy_url, nhsd_apim_auth_headers):
80-
resp = requests.get(f"{nhsd_apim_proxy_url}", headers=nhsd_apim_auth_headers)
81-
assert resp.status_code == 200
82-
83-
84-
@pytest.mark.skip(reason="Requires API key to be shared with proxy and decision on endpoint and user to use")
85-
@pytest.mark.nhsd_apim_authorization(
86-
{
87-
"access": "patient",
88-
"level": "P9",
89-
"login_form": {"username": "TBC"}
90-
}
91-
)
92-
def test_nhs_login_p9(nhsd_apim_proxy_url, nhsd_apim_auth_headers):
93-
resp = requests.get(f"{nhsd_apim_proxy_url}", headers=nhsd_apim_auth_headers)
94-
assert resp.status_code == 200

0 commit comments

Comments
 (0)