@@ -10,7 +10,7 @@ Parameters:
1010
1111 EnableMutualTLS :
1212 Type : String
13-
13+
1414 TruststoreVersion :
1515 Type : String
1616
@@ -20,33 +20,35 @@ Parameters:
2020 GetMyPrescriptionsStateMachineName :
2121 Type : String
2222 Default : none
23-
23+
2424 GetMyPrescriptionsStateMachineArn :
2525 Type : String
2626 Default : none
27-
27+
2828 CapabilityStatementFunctionName :
2929 Type : String
3030 Default : none
31-
31+
3232 CapabilityStatementFunctionArn :
3333 Type : String
3434 Default : none
35-
35+
3636 StatusFunctionName :
3737 Type : String
3838 Default : none
39-
39+
4040 StatusFunctionArn :
4141 Type : String
4242 Default : none
43-
43+
4444 LogRetentionInDays :
4545 Type : Number
46-
46+
4747 EnableSplunk :
4848 Type : String
49-
49+ ForwardCsocLogs :
50+ Type : String
51+ Default : false
5052Conditions :
5153 ShouldUseMutualTLS : !Equals
5254 - true
@@ -68,7 +70,7 @@ Resources:
6870 - - !Ref StackName
6971 - !ImportValue eps-route53-resources:EPS-domain
7072 HostedZoneId : !ImportValue eps-route53-resources:EPS-ZoneID
71-
73+
7274 RestApiGateway :
7375 Type : AWS::ApiGateway::RestApi
7476 Properties :
@@ -80,7 +82,7 @@ Resources:
8082 EndpointConfiguration :
8183 Types :
8284 - REGIONAL
83-
85+
8486 RestApiDomain :
8587 Type : AWS::ApiGateway::DomainName
8688 Properties :
@@ -89,7 +91,7 @@ Resources:
8991 - - !Ref StackName
9092 - !ImportValue eps-route53-resources:EPS-domain
9193 RegionalCertificateArn : !Ref GenerateCertificate
92- EndpointConfiguration :
94+ EndpointConfiguration :
9395 Types :
9496 - REGIONAL
9597 SecurityPolicy : TLS_1_2
@@ -110,7 +112,7 @@ Resources:
110112 - ShouldUseMutualTLS
111113 - !Ref TruststoreVersion
112114 - !Ref AWS::NoValue
113-
115+
114116 RestApiRecordSet :
115117 Type : AWS::Route53::RecordSet
116118 Properties :
@@ -123,7 +125,7 @@ Resources:
123125 AliasTarget :
124126 DNSName : !GetAtt RestApiDomain.RegionalDomainName
125127 HostedZoneId : !GetAtt RestApiDomain.RegionalHostedZoneId
126-
128+
127129 GetMyPrescriptionsResource :
128130 Type : AWS::ApiGateway::Resource
129131 Properties :
@@ -223,7 +225,7 @@ Resources:
223225
224226 $payload.Payload.body
225227 MethodResponses :
226- - StatusCode : " 200"
228+ - StatusCode : " 200"
227229
228230 CapabilityStatementResource :
229231 Type : AWS::ApiGateway::Resource
@@ -251,7 +253,7 @@ Resources:
251253 RestApiId : !Ref RestApiGateway
252254 ParentId : !GetAtt RestApiGateway.RootResourceId
253255 PathPart : _status
254-
256+
255257 StatusMethod :
256258 Type : AWS::ApiGateway::Method
257259 Properties :
@@ -278,7 +280,7 @@ Resources:
278280 - StatusMethod
279281 Properties :
280282 RestApiId : !Ref RestApiGateway
281-
283+
282284 RestApiGatewayStage :
283285 Type : AWS::ApiGateway::Stage
284286 Properties :
@@ -289,15 +291,15 @@ Resources:
289291 TracingEnabled : true
290292 AccessLogSetting :
291293 DestinationArn : !GetAtt RestApiGatewayResources.Outputs.ApiGwAccessLogsArn
292- Format: '{ "requestTime": "$context.requestTime", "apiId": "$context.apiId", "accountId": "$context.accountId", "resourcePath": "$context.resourcePath", "stage": "$context.stage", "requestId": "$context.requestId", "extendedRequestId": "$context.extendedRequestId", "status": "$context.status", "httpMethod": "$context.httpMethod", "protocol": "$context.protocol", "path": "$context.path", "responseLatency": "$context.responseLatency", "responseLength": "$context.responseLength", "domainName": "$context.domainName", "identity": { "sourceIp": "$context.identity.sourceIp", "userAgent": "$context.identity.userAgent", "clientCert":{ "subjectDN": "$context.identity.clientCert.subjectDN", "issuerDN": "$context.identity.clientCert.issuerDN", "serialNumber": "$context.identity.clientCert.serialNumber", "validityNotBefore": "$context.identity.clientCert.validity.notBefore", "validityNotAfter": "$context.identity.clientCert.validity.notAfter" }}, "integration":{ "error": "$context.integration.error", "integrationStatus": "$context.integration.integrationStatus", "latency": "$context.integration.latency", "requestId": "$context.integration.requestId", "status": "$context.integration.status" }}'
293-
294+ Format: '{ "requestId": "$context.requestId", "ip": "$context.identity.sourceIp", "caller":"$context.identity.caller", "user":"$context.identity.user","requestTime":"$context.requestTime", "httpMethod":"$context.httpMethod","resourcePath":"$context.resourcePath", "status":"$context.status","protocol":"$context.protocol", "responseLength":"$context.responseLength", "accountId":"$context.accountId", "apiId":"$context.apiId", "stage" : "$context.stage", "api_key" : "$context.identity.apiKey", "identity": { "sourceIp": "$context.identity.sourceIp", "userAgent": "$context.identity.userAgent", "clientCert":{ "subjectDN": "$context.identity.clientCert.subjectDN", "issuerDN": "$context.identity.clientCert.issuerDN", "serialNumber": "$context.identity.clientCert.serialNumber", "validityNotBefore": "$context.identity.clientCert.validity.notBefore", "validityNotAfter": "$context.identity.clientCert.validity.notAfter" }}, "integration":{ "error": "$context.integration.error", "integrationStatus": "$context.integration.integrationStatus", "latency": "$context.integration.latency", "requestId": "$context.integration.requestId", "status": "$context.integration.status" } }'
295+
294296 RestApiDomainMapping :
295297 Type : AWS::ApiGateway::BasePathMapping
296298 Properties :
297299 DomainName : !Ref RestApiDomain
298300 RestApiId : !Ref RestApiGateway
299301 Stage : !Ref RestApiGatewayStage
300-
302+
301303 RestApiGatewayResources :
302304 Type : AWS::Serverless::Application
303305 Properties :
@@ -311,3 +313,4 @@ Resources:
311313 ApiName : !Sub ${StackName}-apigw
312314 LogRetentionInDays : !Ref LogRetentionInDays
313315 EnableSplunk : !Ref EnableSplunk
316+ ForwardCsocLogs : !Ref ForwardCsocLogs
0 commit comments