github.com/khulnasoft-lab/defsec@v1.0.5-0.20230827010352-5e9f46893d95/pkg/providers/aws/cloudfront/cloudfront.go (about) 1 package cloudfront 2 3 import ( 4 defsecTypes "github.com/khulnasoft-lab/defsec/pkg/types" 5 ) 6 7 type Cloudfront struct { 8 Distributions []Distribution 9 } 10 11 type Distribution struct { 12 Metadata defsecTypes.Metadata 13 WAFID defsecTypes.StringValue 14 Logging Logging 15 DefaultCacheBehaviour CacheBehaviour 16 OrdererCacheBehaviours []CacheBehaviour 17 ViewerCertificate ViewerCertificate 18 } 19 20 type Logging struct { 21 Metadata defsecTypes.Metadata 22 Bucket defsecTypes.StringValue 23 } 24 25 type CacheBehaviour struct { 26 Metadata defsecTypes.Metadata 27 ViewerProtocolPolicy defsecTypes.StringValue 28 } 29 30 const ( 31 ViewerPolicyProtocolAllowAll = "allow-all" 32 ViewerPolicyProtocolHTTPSOnly = "https-only" 33 ViewerPolicyProtocolRedirectToHTTPS = "redirect-to-https" 34 ) 35 36 const ( 37 ProtocolVersionTLS1_2 = "TLSv1.2_2021" 38 ) 39 40 type ViewerCertificate struct { 41 Metadata defsecTypes.Metadata 42 MinimumProtocolVersion defsecTypes.StringValue 43 }