Skip to content

Commit 55cbb8e

Browse files
authored
feat: DTOSS-10962 Add Service Now, PDS and CIS config to Prod environment variables (#1689)
Add config for PDS, CIs, Service Now
1 parent 8331d99 commit 55cbb8e

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

application/CohortManager/src/Web/app/lib/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const NHS_CIS2: OAuthConfig<Profile> = {
1515
clientSecret: process.env.AUTH_CIS2_CLIENT_SECRET,
1616
authorization: {
1717
params: {
18-
acr_values: "AAL2_OR_AAL3_ANY",
18+
acr_values: process.env.AUTH_CIS2_ACR_VALUES || "AAL2_OR_AAL3_ANY",
1919
scope: "openid profile nationalrbacaccess",
2020
response_type: "code",
2121
max_age: 240, // 4 minutes [Required by CIS2]

infrastructure/tf-core/environments/preprod.tfvars

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,7 @@ function_apps = {
10431043
}
10441044
]
10451045
env_vars_static = {
1046-
RetrievePdsParticipantURL = "https://int.api.service.nhs.uk/personal-demographics/FHIR/R4/Patient"
1046+
RetrievePdsParticipantURL = "https://api.service.nhs.uk/personal-demographics/FHIR/R4/Patient"
10471047
Kid = "RetrievePdsDemographic-prod"
10481048
Audience = "https://api.service.nhs.uk/oauth2/token"
10491049
AuthTokenURL = "https://api.service.nhs.uk/oauth2/token"
@@ -1199,11 +1199,12 @@ linux_web_app = {
11991199
app_service_plan_key = "NonScaling"
12001200
env_vars = {
12011201
static = {
1202-
AUTH_CIS2_ISSUER_URL = ""
1203-
AUTH_CIS2_CLIENT_ID = ""
1202+
AUTH_CIS2_ISSUER_URL = "https://am.nhsint.auth-ptl.cis2.spineservices.nhs.uk:443"
1203+
AUTH_CIS2_CLIENT_ID = "5780695865.cohort_manager_preprod.b099494b-7c49-4d78-9e3c-3a801aac691b.apps"
12041204
AUTH_TRUST_HOST = "true"
12051205
NEXTAUTH_URL = "https://cohort-pre.screening.nhs.uk/api/auth"
12061206
SERVICE_NAME = "Cohort Manager"
1207+
AUTH_CIS2_ACR_VALUES = "AAL3_ANY"
12071208
}
12081209
from_key_vault = {
12091210
# env_var_name = "key_vault_secret_name"

infrastructure/tf-core/environments/production.tfvars

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ function_apps = {
412412
env_var_name = "RetrievePdsDemographicURL"
413413
function_app_key = "RetrievePDSDemographic"
414414
},
415-
{
415+
{
416416
env_var_name = "ManageNemsSubscriptionUnsubscribeURL"
417417
function_app_key = "ManageNemsSubscription"
418418
endpoint_name = "Unsubscribe"
@@ -980,10 +980,10 @@ function_apps = {
980980
}
981981
]
982982
env_vars_static = {
983-
ServiceNowRefreshAccessTokenUrl = "" # TODO: Get value
984-
ServiceNowUpdateUrl = "" # TODO: Get value
985-
ServiceNowResolutionUrl = "" # TODO: Get value
986-
ServiceNowGrantType = "" # TODO: Get value
983+
ServiceNowRefreshAccessTokenUrl = "https://nhsdigitallive.service-now.com/oauth_token.do"
984+
ServiceNowUpdateUrl = "https://nhsdigitallive.service-now.com/api/x_nhsd_intstation/nhs_integration/7ce726ef1b4b66d0772fa756b04bcb2a/CohortCaseUpdate"
985+
ServiceNowResolutionUrl = "https://nhsdigitallive.service-now.com/api/x_nhsd_intstation/nhs_integration/7ce726ef1b4b66d0772fa756b04bcb2a/CohortCaseResolution"
986+
ServiceNowGrantType = "client_credentials"
987987
ServiceNowParticipantManagementTopic = "servicenow-participant-management" # Sends messages to the servicenow participant manage topic
988988
}
989989
}
@@ -1077,6 +1077,7 @@ function_apps = {
10771077
}
10781078
]
10791079
env_vars_static = {
1080+
# TODO: Add PDS details when available
10801081
RetrievePdsParticipantURL = ""
10811082
Kid = ""
10821083
Audience = ""
@@ -1233,11 +1234,13 @@ linux_web_app = {
12331234
app_service_plan_key = "NonScaling"
12341235
env_vars = {
12351236
static = {
1236-
AUTH_CIS2_ISSUER_URL = ""
1237+
# TODO: Add CIS details when available
1238+
AUTH_CIS2_ISSUER_URL = "https://am.nhsidentity.spineservices.nhs.uk:443/openam/oauth2/realms/root/realms/NHSIdentity/realms/Healthcare"
12371239
AUTH_CIS2_CLIENT_ID = ""
12381240
AUTH_TRUST_HOST = "true"
12391241
NEXTAUTH_URL = "https://cohort.screening.nhs.uk/api/auth"
12401242
SERVICE_NAME = "Cohort Manager"
1243+
AUTH_CIS2_ACR_VALUES = "AAL3_ANY"
12411244
}
12421245
from_key_vault = {
12431246
# env_var_name = "key_vault_secret_name"

0 commit comments

Comments
 (0)