Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New: [AEA-4497] - deploy cognito #138

Open
wants to merge 186 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
186 commits
Select commit Hold shift + click to select a range
4c4cf3d
[AEA-4461] initial cloudfront cdk
Orkastrated Sep 26, 2024
0a7db54
[AEA-4461] adds additional resources and config
Orkastrated Oct 7, 2024
433bffe
[AEA-4461] adds code and tests for s3 content uri rewrite function an…
Orkastrated Oct 11, 2024
9908ac0
[AEA-4461] adds code and tests for s3 content uri rewrite function an…
Orkastrated Oct 11, 2024
933e633
[AEA-4461] adds other cf functions and tests
Orkastrated Oct 11, 2024
5a75f0a
[AEA-4461] added generic functions for path stripping and s3 fixed ob…
Orkastrated Oct 14, 2024
560413b
[AEA-4461] refactored cloudfront function to seperate construct
Orkastrated Oct 14, 2024
fb3d12a
[AEA-4461] refactoring shared resources stack
Orkastrated Oct 14, 2024
1bb96b1
[AEA-4461] resolving merge
Orkastrated Oct 16, 2024
a685c87
[AEA-4461] updated pipelines to deploy both apps, and misc tweaks
Orkastrated Oct 17, 2024
e21e2f8
[AEA-4461] resolve merge conflicts
Orkastrated Oct 17, 2024
da7fdf5
[AEA-4461] remove unused tests
Orkastrated Oct 17, 2024
9354b21
[AEA-4461] fixed path for moved helpers
Orkastrated Oct 17, 2024
af312bb
[AEA-4461] parameterize cdk make commands
Orkastrated Oct 17, 2024
72ce848
[AEA-4461] misc fixes
Orkastrated Oct 17, 2024
dafda7d
Merge remote-tracking branch 'origin/main' into feat/AEA-4461_cloudfront
anthony-nhs Oct 18, 2024
698cc26
[AEA-4461] testing cf in shared stack
Orkastrated Oct 22, 2024
9b21ff2
[AEA-4461] resolve merge conflict
Orkastrated Oct 22, 2024
41caade
[AEA-4461] resolve merge conflict
Orkastrated Oct 22, 2024
7d0a391
[AEA-4461] tempt disable nag
Orkastrated Oct 22, 2024
97ea715
[AEA-4461] add guard metadata bits
Orkastrated Oct 22, 2024
005782d
[AEA-4461] add guard suppressions
Orkastrated Oct 22, 2024
b110dd5
[AEA-4461] updating pipelines
Orkastrated Oct 22, 2024
17ae4ed
[AEA-4461] resolving conflict
Orkastrated Oct 22, 2024
458d7bd
[AEA-4461] fix makefile
Orkastrated Oct 22, 2024
2495620
[AEA-4461] debugging pipeline
Orkastrated Oct 22, 2024
deb08b1
[AEA-4461] debug pipeline
Orkastrated Oct 22, 2024
a0f67bf
[AEA-4461] debug pipeline
Orkastrated Oct 22, 2024
7982df8
[AEA-4461] debug pipeline
Orkastrated Oct 23, 2024
a2ac342
[AEA-4461] fix kvs store source
Orkastrated Oct 23, 2024
b77c486
[AEA-4461] tweak cf functions to not use list deconstruction
Orkastrated Oct 24, 2024
d151913
[AEA-4461] resolve merge conflict
Orkastrated Oct 24, 2024
f4bdbea
[AEA-4461] pipeline debug
Orkastrated Oct 24, 2024
44c0d2a
[AEA-4461] pipeline debug
Orkastrated Oct 24, 2024
358559f
[AEA-4461] use logging bucket
Orkastrated Oct 24, 2024
0f36e68
[AEA-4461] resolve merge conflict
Orkastrated Oct 24, 2024
247d8a2
[AEA-4461] refactor resources
Orkastrated Oct 28, 2024
e6f8782
[AEA-4461] resolving nag/guard errors and updating pipeline
Orkastrated Oct 29, 2024
5b9c0a5
[AEA-4461] resolving merge conflict
Orkastrated Oct 29, 2024
dab66a3
[AEA-4461] fixing tests
Orkastrated Oct 29, 2024
a61bc5d
[AEA-4461] resolve merge conflict
Orkastrated Oct 29, 2024
5613977
[AEA-4461] fix app references in pipeline
Orkastrated Oct 29, 2024
f00a296
[AEA-4461] tmisc fix and tweak cf function definitions
Orkastrated Oct 29, 2024
95c26d3
[AEA-4461] misc fixs
Orkastrated Oct 29, 2024
de6e67a
[AEA-4461] fix kvs usage
Orkastrated Oct 29, 2024
f6e98c1
[AEA-4461] resolve merge conflict
Orkastrated Oct 29, 2024
fcfba5e
[AEA-4461] misc fixes
Orkastrated Oct 29, 2024
1f60afd
[AEA-4461] fix release notes workflows
Orkastrated Oct 29, 2024
40662ca
[AEA-4461] misc fixes
Orkastrated Oct 29, 2024
c58bb1f
Merge branch 'main' of github.com:NHSDigital/eps-prescription-tracker…
Orkastrated Oct 29, 2024
8e7e6b8
[AEA-4461] fixed release job dependencies
Orkastrated Oct 29, 2024
d653d54
[AEA-4461] misc fixes
Orkastrated Oct 29, 2024
a927505
[AEA-4461] resolving review comments
Orkastrated Oct 30, 2024
7bfa9c8
[AEA-4461] resolve merge conflict
Orkastrated Oct 30, 2024
4ef0821
[AEA-4461] misc fixes
Orkastrated Oct 30, 2024
ecb2114
[AEA-4461] misc fixes
Orkastrated Oct 30, 2024
b47b677
[AEA-4461] misc fixes
Orkastrated Oct 30, 2024
9cbfbfb
[AEA-4461] fix export names
Orkastrated Oct 30, 2024
c7ce3a2
[AEA-4461] misc fixes
Orkastrated Oct 30, 2024
af55357
[AEA-4461] fixing pipeline order
Orkastrated Oct 30, 2024
a913a08
[AEA-4461] misc fixes
Orkastrated Oct 30, 2024
23473d6
deploy website
anthony-nhs Oct 30, 2024
f2ec5bf
fix workflow
anthony-nhs Oct 30, 2024
6a8ca6b
correct alias
anthony-nhs Oct 30, 2024
eaa0902
fix getting export
anthony-nhs Oct 30, 2024
461e1eb
correct path
anthony-nhs Oct 30, 2024
86093f1
correct name
anthony-nhs Oct 30, 2024
a1a6594
Update StaticContentBucket.ts
anthony-nhs Oct 30, 2024
e24a9f5
add more files
anthony-nhs Oct 31, 2024
47a5909
fix synth issues
anthony-nhs Oct 31, 2024
8c50f4e
fix static
anthony-nhs Oct 31, 2024
0e3a3e5
Merge remote-tracking branch 'origin/main' into deploy_website
anthony-nhs Oct 31, 2024
f531228
format error pages
anthony-nhs Oct 31, 2024
5725bd0
add permissions for kms stuff
anthony-nhs Oct 31, 2024
38acc18
fix jobs
anthony-nhs Oct 31, 2024
875a19f
new policies for bucket
anthony-nhs Oct 31, 2024
c1d66c2
fix it
anthony-nhs Oct 31, 2024
e86df9a
fix policy
anthony-nhs Oct 31, 2024
d5939de
trigger build
anthony-nhs Oct 31, 2024
ed35322
fix policy to avoid circular
anthony-nhs Oct 31, 2024
6a30d64
tidy up code
anthony-nhs Oct 31, 2024
95e062c
try a different issue number
anthony-nhs Oct 31, 2024
6024291
revert version
anthony-nhs Nov 1, 2024
8df101b
different way of bumping version
anthony-nhs Nov 1, 2024
7b468b7
update kvs after deployment
anthony-nhs Nov 1, 2024
5dbd334
fix workflow
anthony-nhs Nov 1, 2024
5e49552
no need for script
anthony-nhs Nov 1, 2024
5bac1e3
fix stack
anthony-nhs Nov 1, 2024
433d08a
try changing version
anthony-nhs Nov 1, 2024
e9e7264
go back to old value
anthony-nhs Nov 1, 2024
684cc72
Merge branch 'main' into deploy_website
anthony-nhs Nov 1, 2024
e5839e3
update exclusions
anthony-nhs Nov 1, 2024
f679c1c
fix html
anthony-nhs Nov 1, 2024
adce064
start of cognito
anthony-nhs Nov 1, 2024
7a15387
fix name
anthony-nhs Nov 1, 2024
902afae
fix synth
anthony-nhs Nov 1, 2024
2ffa9d5
add nag
anthony-nhs Nov 1, 2024
4972ff4
correct jq command
anthony-nhs Nov 1, 2024
28e3763
fix workflows
anthony-nhs Nov 1, 2024
97d0626
fix vars
anthony-nhs Nov 1, 2024
9bce239
fix domain
anthony-nhs Nov 1, 2024
da60320
Merge branch 'main' into deploy_website
anthony-nhs Nov 1, 2024
a07d1c3
fix synth
anthony-nhs Nov 1, 2024
b843664
pass in token endpoint
anthony-nhs Nov 1, 2024
2ca61a5
Merge remote-tracking branch 'origin/main' into deploy_cognito
anthony-nhs Nov 1, 2024
10b5a7e
invalidate cache after switch
anthony-nhs Nov 1, 2024
90dbbaf
create a record in the us
anthony-nhs Nov 1, 2024
910205b
try without name
anthony-nhs Nov 1, 2024
832b6c3
add dns
anthony-nhs Nov 1, 2024
88de78e
remove unneeded supression
anthony-nhs Nov 1, 2024
78499c5
Merge branch 'deploy_website' into deploy_cognito
anthony-nhs Nov 1, 2024
9a9418c
a record in us stack
anthony-nhs Nov 1, 2024
1b5fcb3
correct record name
anthony-nhs Nov 1, 2024
82982f4
refactor domain names
anthony-nhs Nov 2, 2024
1b49b3f
pass domain around
anthony-nhs Nov 2, 2024
c76a88f
only set domain names once
anthony-nhs Nov 2, 2024
876c979
get context in stacks only
anthony-nhs Nov 2, 2024
381233c
fix tests
anthony-nhs Nov 2, 2024
4b0a938
add dynamo table
anthony-nhs Nov 2, 2024
86be9ac
add function
anthony-nhs Nov 2, 2024
7cf1a64
use cloudfront for token
anthony-nhs Nov 2, 2024
6b89e2e
put token endpoint in
anthony-nhs Nov 2, 2024
e566d14
add CognitoFunctions
anthony-nhs Nov 2, 2024
8ab1011
add endpoint with authorisera
anthony-nhs Nov 2, 2024
1cfd8f3
more nag supression
anthony-nhs Nov 2, 2024
bbe7ba7
fix makefile and nag
anthony-nhs Nov 2, 2024
1dc3558
fix export
anthony-nhs Nov 2, 2024
35f5959
fix export/import
anthony-nhs Nov 2, 2024
9edeb1b
fix export
anthony-nhs Nov 2, 2024
9d4577d
remove error
anthony-nhs Nov 3, 2024
e6612d9
fix api
anthony-nhs Nov 3, 2024
582f444
add nag supression
anthony-nhs Nov 3, 2024
b8977f5
unit tests for lambda
anthony-nhs Nov 3, 2024
6ddcf21
update lint
anthony-nhs Nov 3, 2024
90603c5
have correct response
anthony-nhs Nov 3, 2024
310a461
correct method for token
anthony-nhs Nov 3, 2024
8550fdc
do not send back custom error if lambda fails
anthony-nhs Nov 3, 2024
8f5b6b3
fix responso
anthony-nhs Nov 3, 2024
1fdd3e1
fix mocks
anthony-nhs Nov 3, 2024
7db7003
more tests
anthony-nhs Nov 3, 2024
6993a1f
fix deps
anthony-nhs Nov 3, 2024
f8bc36a
fix packages
anthony-nhs Nov 3, 2024
9d48b17
fix build
anthony-nhs Nov 3, 2024
6bc648e
fix build
anthony-nhs Nov 3, 2024
54d41b6
fix build
anthony-nhs Nov 3, 2024
689e173
better tests for token
anthony-nhs Nov 3, 2024
39363ac
fix mocks
anthony-nhs Nov 4, 2024
c0cc90e
fix response
anthony-nhs Nov 4, 2024
bc90842
add auth_demo
anthony-nhs Nov 4, 2024
c230757
refactor
anthony-nhs Nov 4, 2024
d213b01
fix warnings
anthony-nhs Nov 4, 2024
203776a
trigger build
anthony-nhs Nov 4, 2024
feaf50d
fix auth_demo deployment
anthony-nhs Nov 4, 2024
691f3d0
fix function name
anthony-nhs Nov 4, 2024
0b5d700
tidy up by refactoring
anthony-nhs Nov 4, 2024
7d58f5c
fix rewrite
anthony-nhs Nov 4, 2024
d9fbc8e
Merge remote-tracking branch 'origin/main' into deploy_cognito
anthony-nhs Nov 4, 2024
96ceb9e
update uuid
anthony-nhs Nov 4, 2024
a3c666e
put url into code
anthony-nhs Nov 4, 2024
e1386d4
Merge remote-tracking branch 'origin/main' into deploy_cognito
anthony-nhs Nov 4, 2024
13ad942
fix lint
anthony-nhs Nov 4, 2024
ded233f
Merge remote-tracking branch 'origin/main' into deploy_cognito
anthony-nhs Nov 4, 2024
0742510
trigger build
anthony-nhs Nov 4, 2024
68f5402
Merge branch 'main' into deploy_cognito
anthony-nhs Nov 4, 2024
504af20
set the private key at deployment time
anthony-nhs Nov 4, 2024
18472ec
Merge remote-tracking branch 'refs/remotes/origin/deploy_cognito' int…
anthony-nhs Nov 4, 2024
d851c18
correct comment
anthony-nhs Nov 4, 2024
c7dd127
make code consistent
anthony-nhs Nov 4, 2024
f46e42f
use correct name for export
anthony-nhs Nov 4, 2024
7ee2a85
remove unneeded attributes
anthony-nhs Nov 4, 2024
7424e96
fix tests
anthony-nhs Nov 5, 2024
849b8f6
fix workspace
anthony-nhs Nov 5, 2024
e84bd0f
minor tweaks
anthony-nhs Nov 5, 2024
24b29d2
make tests work in vscode
anthony-nhs Nov 5, 2024
c0e16d0
add AAAA record
anthony-nhs Nov 5, 2024
7ccd012
add AAAA record
anthony-nhs Nov 5, 2024
76b4e96
update comments
anthony-nhs Nov 5, 2024
35146c1
fixes following sonar
anthony-nhs Nov 5, 2024
dbb76af
minor tweaks
anthony-nhs Nov 5, 2024
1a9988b
Merge remote-tracking branch 'origin/main' into deploy_cognito
anthony-nhs Nov 5, 2024
9aee7f5
Merge branch 'main' into deploy_cognito
anthony-nhs Nov 5, 2024
ebb0489
update readme for auth_demo project
anthony-nhs Nov 5, 2024
8557b37
Merge remote-tracking branch 'origin/main' into deploy_cognito
anthony-nhs Nov 6, 2024
d4fef95
remove unneeded whitespace
anthony-nhs Nov 6, 2024
08b6bcd
remove unnecessary lines
anthony-nhs Nov 6, 2024
411af8b
Merge branch 'main' into deploy_cognito
anthony-nhs Nov 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/cdk_package_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
- name: make install
run: |
make install
make compile-node

- name: 'Tar files'
run: |
Expand All @@ -67,6 +68,3 @@ jobs:
with:
name: build_artifact
path: artifact.tar



72 changes: 70 additions & 2 deletions .github/workflows/cdk_release_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,42 @@ on:
LOG_RETENTION_IN_DAYS:
required: true
type: string
useMockOidc:
type: boolean
default: false
primaryOidcIssuer:
type: string
primaryOidcAuthorizeEndpoint:
type: string
primaryOidcTokenEndpoint:
type: string
primaryOidcUserInfoEndpoint:
type: string
primaryOidcjwksEndpoint:
type: string
mockOidcIssuer:
type: string
mockOidcAuthorizeEndpoint:
type: string
mockOidcTokenEndpoint:
type: string
mockOidcUserInfoEndpoint:
type: string
mockOidcjwksEndpoint:
type: string
secrets:
CLOUD_FORMATION_DEPLOY_ROLE:
required: true
CDK_PULL_IMAGE_ROLE:
required: true

primaryOidcClientId:
required: false
primaryOidClientSecret:
required: false
mockOidcClientId:
required: false
mockOidClientSecret:
required: false
jobs:
release_code:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -96,6 +126,10 @@ jobs:
cloudfrontDistributionId=$(aws cloudformation list-exports --region eu-west-2 --query "Exports[?Name=='"${{ inputs.SERVICE_NAME }}-stateless-resources:cloudfrontDistribution:Id"'].Value" --output text)
# shellcheck disable=SC2140
cloudfrontCertArn=$(aws cloudformation list-exports --region us-east-1 --query "Exports[?Name=='"${{ inputs.SERVICE_NAME }}-us-certs:cloudfrontCertificate:Arn"'].Value" --output text)
# shellcheck disable=SC2140
shortCloudfrontDomain=$(aws cloudformation list-exports --region us-east-1 --query "Exports[?Name=='"${{ inputs.SERVICE_NAME }}-us-certs:shortCloudfrontDomain:Name"'].Value" --output text)
# shellcheck disable=SC2140
fullCloudfrontDomain=$(aws cloudformation list-exports --region us-east-1 --query "Exports[?Name=='"${{ inputs.SERVICE_NAME }}-us-certs:fullCloudfrontDomain:Name"'].Value" --output text)
jq \
--arg serviceName "${{ inputs.SERVICE_NAME }}" \
--arg VERSION_NUMBER "${{ inputs.VERSION_NUMBER }}" \
Expand All @@ -106,6 +140,23 @@ jobs:
--arg allowAutoDeleteObjects "true" \
--arg cloudfrontDistributionId "${cloudfrontDistributionId}" \
--arg cloudfrontCertArn "${cloudfrontCertArn}" \
--arg useMockOidc "${{ inputs.useMockOidc }}" \
--arg primaryOidcClientId "${{ secrets.primaryOidcClientId }}" \
--arg primaryOidClientSecret "${{ secrets.primaryOidClientSecret }}" \
--arg primaryOidcIssuer "${{ inputs.primaryOidcIssuer }}" \
--arg primaryOidcAuthorizeEndpoint "${{ inputs.primaryOidcAuthorizeEndpoint }}" \
--arg primaryOidcTokenEndpoint "${{ inputs.primaryOidcTokenEndpoint }}" \
--arg primaryOidcUserInfoEndpoint "${{ inputs.primaryOidcUserInfoEndpoint }}" \
--arg primaryOidcjwksEndpoint "${{ inputs.primaryOidcjwksEndpoint }}" \
--arg mockOidcClientId "${{ secrets.mockOidcClientId }}" \
--arg mockOidClientSecret "${{ secrets.mockOidClientSecret }}" \
--arg mockOidcIssuer "${{ inputs.mockOidcIssuer }}" \
--arg mockOidcAuthorizeEndpoint "${{ inputs.mockOidcAuthorizeEndpoint }}" \
--arg mockOidcTokenEndpoint "${{ inputs.mockOidcTokenEndpoint }}" \
--arg mockOidcUserInfoEndpoint "${{ inputs.mockOidcUserInfoEndpoint }}" \
--arg mockOidcjwksEndpoint "${{ inputs.mockOidcjwksEndpoint }}" \
--arg shortCloudfrontDomain "${shortCloudfrontDomain}" \
--arg fullCloudfrontDomain "${fullCloudfrontDomain}" \
'.context += {
"serviceName": $serviceName,
"VERSION_NUMBER": $VERSION_NUMBER,
Expand All @@ -115,7 +166,24 @@ jobs:
"epsHostedZoneId": $epsHostedZoneId,
"allowAutoDeleteObjects": $allowAutoDeleteObjects,
"cloudfrontDistributionId": $cloudfrontDistributionId,
"cloudfrontCertArn": $cloudfrontCertArn}' \
"cloudfrontCertArn": $cloudfrontCertArn,
"shortCloudfrontDomain": $shortCloudfrontDomain,
"fullCloudfrontDomain": $fullCloudfrontDomain,
"useMockOidc": $useMockOidc,
"primaryOidcClientId": $primaryOidcClientId,
"primaryOidClientSecret": $primaryOidClientSecret,
"primaryOidcIssuer": $primaryOidcIssuer,
"primaryOidcAuthorizeEndpoint": $primaryOidcAuthorizeEndpoint,
"primaryOidcTokenEndpoint": $primaryOidcTokenEndpoint,
"primaryOidcUserInfoEndpoint": $primaryOidcUserInfoEndpoint,
"primaryOidcjwksEndpoint": $primaryOidcjwksEndpoint,
"mockOidcClientId": $mockOidcClientId,
"mockOidClientSecret": $mockOidClientSecret,
"mockOidcIssuer": $mockOidcIssuer,
"mockOidcAuthorizeEndpoint": $mockOidcAuthorizeEndpoint,
"mockOidcTokenEndpoint": $mockOidcTokenEndpoint,
"mockOidcUserInfoEndpoint": $mockOidcUserInfoEndpoint,
"mockOidcjwksEndpoint": $mockOidcjwksEndpoint}' \
.build/cdk.json > .build/cdk.new.json
mv .build/cdk.new.json .build/cdk.json

Expand Down
35 changes: 34 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,26 @@ jobs:
TARGET_ENVIRONMENT: dev
VERSION_NUMBER: ${{needs.tag_release.outputs.version_tag}}
COMMIT_ID: ${{needs.get_commit_id.outputs.commit_id}}
useMockOidc: true
primaryOidcIssuer: "https://am.nhsint.auth-ptl.cis2.spineservices.nhs.uk:443/openam/oauth2/realms/root/realms/NHSIdentity/realms/Healthcare"
primaryOidcAuthorizeEndpoint: "https://am.nhsint.auth-ptl.cis2.spineservices.nhs.uk:443/openam/oauth2/realms/root/realms/NHSIdentity/realms/Healthcare/authorize"
primaryOidcTokenEndpoint: "https://am.nhsint.auth-ptl.cis2.spineservices.nhs.uk:443/openam/oauth2/realms/root/realms/NHSIdentity/realms/Healthcare/access_token"
primaryOidcUserInfoEndpoint: "https://am.nhsint.auth-ptl.cis2.spineservices.nhs.uk:443/openam/oauth2/realms/root/realms/NHSIdentity/realms/Healthcare/userinfo"
primaryOidcjwksEndpoint: "https://am.nhsint.auth-ptl.cis2.spineservices.nhs.uk:443/openam/oauth2/realms/root/realms/NHSIdentity/realms/Healthcare/connect/jwk_uri"
mockOidcIssuer: "https://identity.ptl.api.platform.nhs.uk/realms/Cis2-mock-internal-dev"
mockOidcAuthorizeEndpoint: "https://identity.ptl.api.platform.nhs.uk/realms/Cis2-mock-internal-dev/protocol/openid-connect/auth"
mockOidcTokenEndpoint: "https://identity.ptl.api.platform.nhs.uk/realms/Cis2-mock-internal-dev/protocol/openid-connect/token"
mockOidcUserInfoEndpoint: "https://identity.ptl.api.platform.nhs.uk/realms/Cis2-mock-internal-dev/protocol/openid-connect/userinfo"
mockOidcjwksEndpoint: "https://identity.ptl.api.platform.nhs.uk/realms/Cis2-mock-internal-dev/protocol/openid-connect/certs"
secrets:
CDK_PULL_IMAGE_ROLE: ${{ secrets.DEV_CDK_PULL_IMAGE_ROLE }}
CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_DEPLOY_ROLE }}

primaryOidcClientId: ${{ secrets.PTL_PRIMARY_OIDC_CLIENT_ID }}
primaryOidClientSecret: ${{ secrets.PTL_PRIMARY_OIDC_CLIENT_SECRET }}
mockOidcClientId: ${{ secrets.PTL_MOCK_CLIENT_ID }}
mockOidClientSecret: ${{ secrets.PTL_MOCK_CLIENT_SECRET }}
CIS2_PRIVATE_KEY: ${{ secrets.PTL_CIS2_PRIVATE_KEY }}

create_release_notes:
needs: [tag_release, package_code, get_commit_id, release_dev]
uses: ./.github/workflows/create_release_notes.yml
Expand All @@ -130,6 +146,23 @@ jobs:
TARGET_ENVIRONMENT: qa
VERSION_NUMBER: ${{needs.tag_release.outputs.version_tag}}
COMMIT_ID: ${{needs.get_commit_id.outputs.commit_id}}
useMockOidc: true
primaryOidcIssuer: "https://am.nhsint.auth-ptl.cis2.spineservices.nhs.uk:443/openam/oauth2/realms/root/realms/NHSIdentity/realms/Healthcare"
primaryOidcAuthorizeEndpoint: "https://am.nhsint.auth-ptl.cis2.spineservices.nhs.uk:443/openam/oauth2/realms/root/realms/NHSIdentity/realms/Healthcare/authorize"
primaryOidcTokenEndpoint: "https://am.nhsint.auth-ptl.cis2.spineservices.nhs.uk:443/openam/oauth2/realms/root/realms/NHSIdentity/realms/Healthcare/access_token"
primaryOidcUserInfoEndpoint: "https://am.nhsint.auth-ptl.cis2.spineservices.nhs.uk:443/openam/oauth2/realms/root/realms/NHSIdentity/realms/Healthcare/userinfo"
primaryOidcjwksEndpoint: "https://am.nhsint.auth-ptl.cis2.spineservices.nhs.uk:443/openam/oauth2/realms/root/realms/NHSIdentity/realms/Healthcare/connect/jwk_uri"
mockOidcIssuer: "https://identity.ptl.api.platform.nhs.uk/realms/Cis2-mock-internal-dev"
mockOidcAuthorizeEndpoint: "https://identity.ptl.api.platform.nhs.uk/realms/Cis2-mock-internal-dev/protocol/openid-connect/auth"
mockOidcTokenEndpoint: "https://identity.ptl.api.platform.nhs.uk/realms/Cis2-mock-internal-dev/protocol/openid-connect/token"
mockOidcUserInfoEndpoint: "https://identity.ptl.api.platform.nhs.uk/realms/Cis2-mock-internal-dev/protocol/openid-connect/userinfo"
mockOidcjwksEndpoint: "https://identity.ptl.api.platform.nhs.uk/realms/Cis2-mock-internal-dev/protocol/openid-connect/certs"
secrets:
CDK_PULL_IMAGE_ROLE: ${{ secrets.QA_CDK_PULL_IMAGE_ROLE }}
CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.QA_CLOUD_FORMATION_DEPLOY_ROLE }}
primaryOidcClientId: ${{ secrets.PTL_PRIMARY_OIDC_CLIENT_ID }}
primaryOidClientSecret: ${{ secrets.PTL_PRIMARY_OIDC_CLIENT_SECRET }}
mockOidcClientId: ${{ secrets.PTL_MOCK_CLIENT_ID }}
mockOidClientSecret: ${{ secrets.PTL_MOCK_CLIENT_SECRET }}
CIS2_PRIVATE_KEY: ${{ secrets.PTL_CIS2_PRIVATE_KEY }}

20 changes: 20 additions & 0 deletions .github/workflows/deploy_website_content.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,30 @@ jobs:
cd .build
make react-build

- name: build auth_demo react app (temp step for testing)
run: |
REACT_APP_hostedLoginDomain=$(aws cloudformation list-exports --region us-east-1 --query "Exports[?Name=='${{ inputs.SERVICE_NAME }}-us-certs:fullCognitoDomain:Name'].Value" --output text)
REACT_APP_userPoolClientId=$(aws cloudformation list-exports --region eu-west-2 --query "Exports[?Name=='${{ inputs.SERVICE_NAME }}-stateful-resources:userPoolClient:userPoolClientId'].Value" --output text)
REACT_APP_userPoolId=$(aws cloudformation list-exports --region eu-west-2 --query "Exports[?Name=='${{ inputs.SERVICE_NAME }}-stateful-resources:userPool:Id'].Value" --output text)
fullCloudfrontDomain=$(aws cloudformation list-exports --region us-east-1 --query "Exports[?Name=='${{ inputs.SERVICE_NAME }}-us-certs:fullCloudfrontDomain:Name'].Value" --output text)
REACT_APP_redirectSignIn="https://${fullCloudfrontDomain}/auth_demo/"

export REACT_APP_hostedLoginDomain
export REACT_APP_userPoolClientId
export REACT_APP_userPoolId
export REACT_APP_redirectSignIn
cd .build
make auth_demo_build

- name: deploy website
run: |
staticBucketName=$(aws cloudformation list-exports --query "Exports[?Name=='${{ inputs.SERVICE_NAME }}-stateful-resources:StaticContentBucket:Name'].Value" --output text)
aws s3 cp ".build/packages/staticContent/404.html" "s3://${staticBucketName}/404.html"
aws s3 cp ".build/packages/staticContent/500.html" "s3://${staticBucketName}/500.html"
aws s3 cp ".build/packages/staticContent/jwks/dev/jwks.json" "s3://${staticBucketName}/jwks.json"
aws s3 cp --recursive ".build/packages/cpt-ui/out/" "s3://${staticBucketName}/${{ inputs.VERSION_NUMBER }}/"

- name: deploy auth_demo website (temp for testing)
run: |
staticBucketName=$(aws cloudformation list-exports --query "Exports[?Name=='${{ inputs.SERVICE_NAME }}-stateful-resources:StaticContentBucket:Name'].Value" --output text)
aws s3 cp --recursive ".build/packages/auth_demo/build/" "s3://${staticBucketName}/auth_demo/"
17 changes: 16 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,22 @@ jobs:
TARGET_ENVIRONMENT: dev-pr
VERSION_NUMBER: PR-${{ needs.get_issue_number.outputs.issue_number }}
COMMIT_ID: ${{ needs.get_commit_id.outputs.commit_id }}
useMockOidc: true
primaryOidcIssuer: "https://am.nhsint.auth-ptl.cis2.spineservices.nhs.uk:443/openam/oauth2/realms/root/realms/NHSIdentity/realms/Healthcare"
primaryOidcAuthorizeEndpoint: "https://am.nhsint.auth-ptl.cis2.spineservices.nhs.uk:443/openam/oauth2/realms/root/realms/NHSIdentity/realms/Healthcare/authorize"
primaryOidcTokenEndpoint: "https://am.nhsint.auth-ptl.cis2.spineservices.nhs.uk:443/openam/oauth2/realms/root/realms/NHSIdentity/realms/Healthcare/access_token"
primaryOidcUserInfoEndpoint: "https://am.nhsint.auth-ptl.cis2.spineservices.nhs.uk:443/openam/oauth2/realms/root/realms/NHSIdentity/realms/Healthcare/userinfo"
primaryOidcjwksEndpoint: "https://am.nhsint.auth-ptl.cis2.spineservices.nhs.uk:443/openam/oauth2/realms/root/realms/NHSIdentity/realms/Healthcare/connect/jwk_uri"
mockOidcIssuer: "https://identity.ptl.api.platform.nhs.uk/realms/Cis2-mock-internal-dev"
mockOidcAuthorizeEndpoint: "https://identity.ptl.api.platform.nhs.uk/realms/Cis2-mock-internal-dev/protocol/openid-connect/auth"
mockOidcTokenEndpoint: "https://identity.ptl.api.platform.nhs.uk/realms/Cis2-mock-internal-dev/protocol/openid-connect/token"
mockOidcUserInfoEndpoint: "https://identity.ptl.api.platform.nhs.uk/realms/Cis2-mock-internal-dev/protocol/openid-connect/userinfo"
mockOidcjwksEndpoint: "https://identity.ptl.api.platform.nhs.uk/realms/Cis2-mock-internal-dev/protocol/openid-connect/certs"
secrets:
CDK_PULL_IMAGE_ROLE: ${{ secrets.DEV_CDK_PULL_IMAGE_ROLE }}
CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_DEPLOY_ROLE }}

primaryOidcClientId: ${{ secrets.PTL_PRIMARY_OIDC_CLIENT_ID }}
primaryOidClientSecret: ${{ secrets.PTL_PRIMARY_OIDC_CLIENT_SECRET }}
mockOidcClientId: ${{ secrets.PTL_MOCK_CLIENT_ID }}
mockOidClientSecret: ${{ secrets.PTL_MOCK_CLIENT_SECRET }}
CIS2_PRIVATE_KEY: ${{ secrets.PTL_CIS2_PRIVATE_KEY }}
Loading