-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dev/NPA-1711_add_format_to_search_params
- Loading branch information
Showing
13 changed files
with
188 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
proxies/live/apiproxy/policies/AssignMessage.AddProxyURL.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<AssignMessage async="false" continueOnError="false" enabled="true" name="AddProxyURL"> | ||
<DisplayName>Add Proxy URL</DisplayName> | ||
<Add> | ||
<Headers> | ||
<Header name="Proxy-Url">{proxy.url}</Header> | ||
</Headers> | ||
</Add> | ||
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables> | ||
<AssignTo createNew="false" transport="http" type="request"/> | ||
</AssignMessage> |
11 changes: 11 additions & 0 deletions
11
proxies/live/apiproxy/policies/AssignMessage.AddUserAuthLevel.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<AssignMessage async="false" continueOnError="false" enabled="true" name="AddUserAuthLevel"> | ||
<DisplayName>Add User Auth Level</DisplayName> | ||
<Add> | ||
<Headers> | ||
<Header name="accesstoken.auth_level">{toUpperCase(accesstoken.auth_level)}</Header> | ||
</Headers> | ||
</Add> | ||
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables> | ||
<AssignTo createNew="false" transport="http" type="request"/> | ||
</AssignMessage> |
11 changes: 11 additions & 0 deletions
11
proxies/live/apiproxy/policies/AssignMessage.AddUserNHSNumber.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<AssignMessage async="false" continueOnError="false" enabled="true" name="AddUserNHSNumber"> | ||
<DisplayName>Add User NHS Number</DisplayName> | ||
<Add> | ||
<Headers> | ||
<Header name="accesstoken.auth_user_id">{accesstoken.auth_user_id}</Header> | ||
</Headers> | ||
</Add> | ||
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables> | ||
<AssignTo createNew="false" transport="http" type="request"/> | ||
</AssignMessage> |
4 changes: 0 additions & 4 deletions
4
proxies/live/apiproxy/policies/OAuthV2.VerifyAccessTokenAppLevel3OrCis2Aal3.xml
This file was deleted.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
proxies/live/apiproxy/policies/OAuthV2.VerifyAccessTokenUserNhsLoginP9.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<OAuthV2 async="false" continueOnError="false" enabled="true" name="VerifyAccessTokenUserNhsLoginP9"> | ||
<Operation>VerifyAccessToken</Operation> | ||
<Scopes>urn:nhsd:apim:user-nhs-login:P9:validated-relationships-service-api</Scopes> | ||
</OAuthV2> |
35 changes: 32 additions & 3 deletions
35
proxies/live/apiproxy/policies/RaiseFault.401Unauthorized.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,43 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<!-- | ||
This policy raises a 401 error response for an invalid or missing access token. | ||
Raisefault policies stop the execution of the current flow and move to the error flow, which returns the error response defined here to the requesting application. | ||
For more information on RaiseFault policies within Apigee see the following resource: | ||
* https://docs.apigee.com/api-platform/reference/policies/raise-fault-policy | ||
--> | ||
<RaiseFault async="false" continueOnError="false" enabled="true" name="RaiseFault.401Unauthorized"> | ||
<DisplayName>RaiseFault.401Unauthorized</DisplayName> | ||
<Properties/> | ||
<FaultResponse> | ||
<Set> | ||
<Headers/> | ||
<Payload contentType="text/plain"/> | ||
<StatusCode>401</StatusCode> | ||
<ReasonPhrase>Access Denied</ReasonPhrase> | ||
<ReasonPhrase>Unauthorized</ReasonPhrase> | ||
<Payload> | ||
{ | ||
"issue": [ | ||
{ | ||
"code": "forbidden", | ||
"details": { | ||
"coding": [ | ||
{ | ||
"code": "ACCESS_DENIED", | ||
"display": "Missing or invalid OAuth 2.0 bearer token in request.", | ||
"system": "https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode", | ||
"version": "1" | ||
} | ||
] | ||
}, | ||
"diagnostics": "Invalid access token - Access Denied.", | ||
"severity": "error" | ||
} | ||
], | ||
"resourceType": "OperationOutcome" | ||
} | ||
</Payload> | ||
</Set> | ||
</FaultResponse> | ||
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables> | ||
</RaiseFault> | ||
</RaiseFault> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.