Skip to content

Commit e7ea776

Browse files
authored
Merge pull request #41 from govuk-one-login/LIME-2113
LIME-2113 Add common param for test-resources
2 parents 5646680 + 474c4a2 commit e7ea776

2 files changed

Lines changed: 30 additions & 16 deletions

File tree

.secrets.baseline

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -133,58 +133,58 @@
133133
"filename": "deploy/template.yaml",
134134
"hashed_secret": "aa1dd0ad4d2da161dd67db89e3d1aff921426385",
135135
"is_verified": false,
136-
"line_number": 111
136+
"line_number": 115
137137
},
138138
{
139139
"type": "Secret Keyword",
140140
"filename": "deploy/template.yaml",
141141
"hashed_secret": "5f784906cd85d6336c8506e9da9d102405771429",
142142
"is_verified": false,
143-
"line_number": 114
143+
"line_number": 118
144144
},
145145
{
146146
"type": "Secret Keyword",
147147
"filename": "deploy/template.yaml",
148148
"hashed_secret": "1ef0d2ac7a97bfe12f63f5d79979f912500adae1",
149149
"is_verified": false,
150-
"line_number": 117
150+
"line_number": 121
151151
},
152152
{
153153
"type": "Secret Keyword",
154154
"filename": "deploy/template.yaml",
155155
"hashed_secret": "5f399dc88587898510cf56b7503b482c870d0121",
156156
"is_verified": false,
157-
"line_number": 120
157+
"line_number": 124
158158
},
159159
{
160160
"type": "Secret Keyword",
161161
"filename": "deploy/template.yaml",
162162
"hashed_secret": "dc2050b23f4157e1b630f2bdf2f0a76b82f0f51a",
163163
"is_verified": false,
164-
"line_number": 123
164+
"line_number": 127
165165
},
166166
{
167167
"type": "Secret Keyword",
168168
"filename": "deploy/template.yaml",
169169
"hashed_secret": "b811ac90fe7fab03f6144a17aaebc38dcf3e007b",
170170
"is_verified": false,
171-
"line_number": 136
171+
"line_number": 140
172172
},
173173
{
174174
"type": "Secret Keyword",
175175
"filename": "deploy/template.yaml",
176176
"hashed_secret": "690de9fd42add772818ae392cb68a4f81d1511e3",
177177
"is_verified": false,
178-
"line_number": 152
178+
"line_number": 156
179179
},
180180
{
181181
"type": "Base64 High Entropy String",
182182
"filename": "deploy/template.yaml",
183183
"hashed_secret": "407b058c0f67be53116117c4b021b5e95f9dca9e",
184184
"is_verified": false,
185-
"line_number": 178
185+
"line_number": 182
186186
}
187187
]
188188
},
189-
"generated_at": "2026-03-19T14:43:34Z"
189+
"generated_at": "2026-04-22T11:27:34Z"
190190
}

deploy/template.yaml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ Conditions:
8787
- 0
8888
UseParameterPrefix: !Not
8989
- !Equals [ !Ref ParameterPrefix, "none"]
90+
IsNotProduction: !Not [ !Equals [ !Ref Environment, production ] ]
91+
CreateTestResourcesParam: !And
92+
- !Condition IsDeployedFromPipeline
93+
- !Condition IsNotProduction
9094

9195
Globals:
9296
Function:
@@ -191,7 +195,7 @@ Resources:
191195
Properties:
192196
Location:
193197
ApplicationId: arn:aws:serverlessrepo:eu-west-2:667736788427:applications/di-ipv-cri-oauth-common
194-
SemanticVersion: 0.0.0
198+
SemanticVersion: 0.3.0
195199
Parameters:
196200
AuditEventNamePrefix: !Ref AuditEventNamePrefix
197201
CriIdentifier: !Ref CriIdentifier
@@ -569,6 +573,16 @@ Resources:
569573
ArnLike:
570574
"kms:EncryptionContext:aws:logs:arn": !Sub "arn:aws:logs:${AWS::Region}:${AWS::AccountId}:*"
571575

576+
OAuthCommonStackNameParam:
577+
Type: AWS::SSM::Parameter
578+
Condition: CreateTestResourcesParam
579+
Properties:
580+
Name: /common-cri/oauth-common/stack-name
581+
Type: String
582+
Value: !GetAtt OAuth.Outputs.StackName
583+
Description: The stack currently used for OAuth (oauth-common). Only required for test-resources.
584+
585+
572586
####################################################################
573587
# #
574588
# Alarms #
@@ -718,7 +732,7 @@ Resources:
718732
Properties:
719733
Name: !Sub
720734
- "/${OAuthStackName}/clients/ipv-core-stub-local/jwtAuthentication/redirectUri"
721-
- OAuthStackName: !Select [1, !Split ['/', !Select [5, !Split [':', !Ref OAuth]]]]
735+
- OAuthStackName: !GetAtt OAuth.Outputs.StackName
722736
Type: String
723737
Value: !FindInMap [ IPVCoreStubLocalMapping, !Ref Environment, redirectUri ]
724738

@@ -728,7 +742,7 @@ Resources:
728742
Properties:
729743
Name: !Sub
730744
- "/${OAuthStackName}/clients/ipv-core-stub-local/jwtAuthentication/issuer"
731-
- OAuthStackName: !Select [1, !Split ['/', !Select [5, !Split [':', !Ref OAuth]]]]
745+
- OAuthStackName: !GetAtt OAuth.Outputs.StackName
732746
Type: String
733747
Value: !FindInMap [ IPVCoreStubLocalMapping, !Ref Environment, issuer ]
734748

@@ -738,7 +752,7 @@ Resources:
738752
Properties:
739753
Name: !Sub
740754
- "/${OAuthStackName}/clients/ipv-core-stub-local/jwtAuthentication/audience"
741-
- OAuthStackName: !Select [1, !Split ['/', !Select [5, !Split [':', !Ref OAuth]]]]
755+
- OAuthStackName: !GetAtt OAuth.Outputs.StackName
742756
Type: String
743757
Value:
744758
!FindInMap [ IPVCoreStubLocalMapping, !Ref Environment, audience ]
@@ -749,7 +763,7 @@ Resources:
749763
Properties:
750764
Name: !Sub
751765
- "/${OAuthStackName}/clients/ipv-core-stub-local/jwtAuthentication/publicSigningJwkBase64"
752-
- OAuthStackName: !Select [1, !Split ['/', !Select [5, !Split [':', !Ref OAuth]]]]
766+
- OAuthStackName: !GetAtt OAuth.Outputs.StackName
753767
Type: String
754768
Value: !FindInMap [ IPVCoreStubLocalMapping, !Ref Environment, publicSigningJwkBase64Mapping ]
755769

@@ -759,7 +773,7 @@ Resources:
759773
Properties:
760774
Name: !Sub
761775
- "/${OAuthStackName}/clients/ipv-core-stub-local/jwtAuthentication/jwksEndpoint"
762-
- OAuthStackName: !Select [1, !Split ['/', !Select [5, !Split [':', !Ref OAuth]]]]
776+
- OAuthStackName: !GetAtt OAuth.Outputs.StackName
763777
Type: String
764778
Value: !FindInMap [ IPVCoreStubLocalMapping, !Ref Environment, jwksEndpoint ]
765779

@@ -769,7 +783,7 @@ Resources:
769783
Properties:
770784
Name: !Sub
771785
- "/${OAuthStackName}/clients/ipv-core-stub-local/jwtAuthentication/authenticationAlg"
772-
- OAuthStackName: !Select [1, !Split ['/', !Select [5, !Split [':', !Ref OAuth]]]]
786+
- OAuthStackName: !GetAtt OAuth.Outputs.StackName
773787
Type: String
774788
Value: !FindInMap [ IPVCoreStubLocalMapping, !Ref Environment, authenticationAlg ]
775789

0 commit comments

Comments
 (0)