Skip to content

Commit 8157d36

Browse files
NinaTombsgps035
andauthored
FLAGSAPI-1203 Update summary-care-record.yaml (#654)
* Update summary-care-record.yaml https://nhsd-jira.digital.nhs.uk/browse/FLAGSAPI-1203 Updated to show that AAL2 is now supported in addition to AAL3. * Remove branch name check on PRs in favour of a check on the title IMO there is no value in requiring branch names to be in a certain format, and just causes people to have to redo work, like would be done here if not for this change --------- Co-authored-by: Sophie Somerville <12125546+gps035@users.noreply.github.com>
1 parent 2b5c2a8 commit 8157d36

File tree

2 files changed

+17
-28
lines changed

2 files changed

+17
-28
lines changed

.github/workflows/pr-lint.yaml

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,14 @@
11
name: PR Quality Check
2-
on: pull_request
2+
on:
3+
pull_request:
4+
types: [opened, synchronize, edited, reopened]
35
jobs:
46
link-ticket:
57
runs-on: ubuntu-latest
68
steps:
7-
- name: Check ticket name conforms to requirements
8-
run: echo ${{ github.event.pull_request.head.ref }} | grep -i -E -q "((apm|niad|amb|flagsapi)-[0-9]+)|(dependabot\/)"
9-
10-
- name: Grab ticket name
11-
if: contains(github.event.pull_request.head.ref, 'apm-') || contains(github.event.pull_request.head.ref, 'APM-') || contains(github.event.pull_request.head.ref, 'niad-') || contains(github.event.pull_request.head.ref, 'NIAD-') || contains(github.event.pull_request.head.ref, 'amb-') || contains(github.event.pull_request.head.ref, 'AMB-')
12-
run: echo ::set-env name=TICKET_NAME::$(echo ${{ github.event.pull_request.head.ref }} | tr '[:lower:]' '[:upper:]' | grep -i -o '^\(APM\|NIAD\|AMB\)-[0-9]\+')
9+
- name: Check PR title starts with Jira reference
1310
env:
14-
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
15-
16-
- name: Comment on PR
17-
if: contains(github.event.pull_request.head.ref, 'apm-') || contains(github.event.pull_request.head.ref, 'APM-') || contains(github.event.pull_request.head.ref, 'niad-') || contains(github.event.pull_request.head.ref, 'NIAD-') || contains(github.event.pull_request.head.ref, 'amb-') || contains(github.event.pull_request.head.ref, 'AMB-')
18-
uses: unsplash/comment-on-pr@master
19-
env:
20-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21-
with:
22-
msg: |
23-
This branch is work on a ticket in the NHS Digital APM JIRA Project. Here's a handy link to the ticket:
24-
# [${{ env.TICKET_NAME }}](https://nhsd-jira.digital.nhs.uk/browse/${{ env.TICKET_NAME}})
11+
PR_TITLE: ${{ github.event.pull_request.title }}
12+
run: |
13+
JIRA_REGEX="^(APM|NIAD|AMB|FLAGSAPI)-([[:digit:]]+)"
14+
[[ "$PR_TITLE" =~ $JIRA_REGEX ]] && exit 0 || exit 1

specification/summary-care-record.yaml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,24 +81,23 @@ info:
8181
This API has two authorisation methods. The first is [user-restricted](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis), meaning an end user must be present and authenticated to use it.
8282
8383
The end user must be:
84-
- a health or care staff providing direct care to patients
85-
- strongly authenticated, using either an [NHS smartcard or a modern alternative](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/nhs-smartcards-for-developers) available via [NHS Care Identity Service 2 (NHS CIS2)](https://digital.nhs.uk/services/nhs-identity)
84+
- a health or care worker providing direct care to patients
85+
- strongly authenticated, using either an [NHS smartcard or a modern alternative](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/nhs-smartcards-for-developers) available via [CIS2 Authentication](https://digital.nhs.uk/services/care-identity-service/applications-and-services/cis2-authentication)
86+
- authenticated to assurance level AAL2 or AAL3
8687
87-
The API uses OAuth 2.0 to authorise the calling system. It only supports CIS2 combined authentication and authorisation (see link below). Do not use separate authentication and authorisation:
88-
- [user-restricted RESTful API - using NHS CIS2 - combined authentication and authorisation](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/user-restricted-restful-apis-nhs-cis2-combined-authentication-and-authorisation)
89-
90-
For more details, see [user-restricted APIs](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).
91-
92-
The second authorisation method is [application-restricted](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#application-restricted-apis) (signed JWT authentication), meaning a few specific API calls can be authorised by the application making the requests. This is typically provided so that GPs can perform batch updates of multiple Summary Care Records without having to log in as a specific user.
88+
The API uses OAuth 2.0 to authorise the calling system. It supports the following security patterns:
89+
- [user-restricted RESTful API - CIS2 - combined authentication and authorisation](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/user-restricted-restful-apis-nhs-cis2-combined-authentication-and-authorisation)
90+
- [user-restricted RESTful API - CIS2 - seperate authentication and authorisation](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/user-restricted-restful-apis-cis2-separate-authentication-and-authorisation)
91+
92+
The second authorisation method is [application-restricted](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#application-restricted-apis), meaning a few specific API calls can be authorised by the application making the requests. This is typically provided so that GPs can perform batch updates of multiple Summary Care Records without having to log in as a specific user.
9393
9494
The following specific endpoint and method combinations can be used with application-restricted authentication, in addition to user-restricted authentication:
9595
9696
- GET DocumentReference
9797
- GET Bundle
9898
- POST Bundle
9999
100-
For more details, see:
101-
- [application-restricted APIs](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#application-restricted-apis) and
100+
For more details, see the following security pattern:
102101
- [application-restricted RESTful APIs - signed with JWT authentication](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/application-restricted-restful-apis-signed-jwt-authentication)
103102
104103
## Environments and testing

0 commit comments

Comments
 (0)