Skip to content

Commit d42add3

Browse files
Merge pull request #26 from NHSDigital/APM-5266-NHS-login-target-header-forwarding
APM-5266 NHS login target header forwarding
2 parents fafea69 + 661399a commit d42add3

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

specification/proxygen.yaml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -431,15 +431,18 @@ info:
431431
432432
#### Target Identity Headers
433433
434-
Each item under `x-nhsd-apim.target-identity` is the name of an authentication mechanism for which you intend to pass identity headers through to the backend. Currently, only CIS2 authentication is supported.
434+
Each item under `x-nhsd-apim.target-identity` is the name of an authentication mechanism for which you intend to pass identity headers through to the backend. Currently, CIS2 and NHS login authentication is supported.
435435
436-
Under the `x-nhsd-apim.target-identity.cis2` the `included` boolean will determine whether the identity headers will be present in the request to the backend.
436+
Under the `cis2` and `nhs-login` block, the `included` boolean will determine whether the identity headers will be present in the request to the backend for the corresponding auth provider.
437437
438-
The individual header names are optional. In their absence, defaults of `NHSD-Session-URID` and `NHSD-Session-UUID` will be used.
438+
The individual header names are optional. In their absence, the following defaults will be used:
439+
- uuid-header-name: `NHSD-Session-UUID`
440+
- urid-header-name: `NHSD-Session-URID`
441+
- nhs-number-header-name: `NHSD-NHSlogin-NHS-Number`
439442
440-
The headers will have their values populated with the User ID and Role ID associated with the CIS2 authentication.
441-
442-
The User ID value is obtained from the access token in the request, with the Role ID value being obtained via the shared UserRoleServiceV2.
443+
The headers will have their values populated using the auth token associated with the CIS2 or NHS login authentication.
444+
445+
The CIS2 UUID or NHS login NHS number value is obtained from the access token in the request. The Role ID value is obtained via the shared UserRoleServiceV2.
443446
444447
If the request to the _proxy_ includes the default Role ID header `NHSD-Session-URID`, this will flow through to the backend as the urid-header-name defined in your specification (or remain as the default header name, in the absence of a provided header name).
445448
@@ -450,9 +453,12 @@ info:
450453
included: true
451454
uuid-header-name: "custom-uuid-header-name"
452455
urid-header-name: "custom-urid-header-name"
456+
nhs-login:
457+
included: true
458+
nhs-number-header-name: "custom-nhs-number-header"
453459
```
454460
455-
The value of the included field must be a boolean and the two header-name fields must be strings.
461+
The value of the included field must be a boolean and the header-name fields must be strings.
456462
457463
458464
## Usage limits

0 commit comments

Comments
 (0)