github.com/khulnasoft-lab/defsec@v1.0.5-0.20230827010352-5e9f46893d95/pkg/providers/aws/apigateway/v1/apigateway.go (about) 1 package v1 2 3 import ( 4 defsecTypes "github.com/khulnasoft-lab/defsec/pkg/types" 5 ) 6 7 type APIGateway struct { 8 APIs []API 9 DomainNames []DomainName 10 } 11 12 type API struct { 13 Metadata defsecTypes.Metadata 14 Name defsecTypes.StringValue 15 Stages []Stage 16 Resources []Resource 17 } 18 19 type Stage struct { 20 Metadata defsecTypes.Metadata 21 Name defsecTypes.StringValue 22 AccessLogging AccessLogging 23 XRayTracingEnabled defsecTypes.BoolValue 24 RESTMethodSettings []RESTMethodSettings 25 } 26 27 type Resource struct { 28 Metadata defsecTypes.Metadata 29 Methods []Method 30 } 31 32 type AccessLogging struct { 33 Metadata defsecTypes.Metadata 34 CloudwatchLogGroupARN defsecTypes.StringValue 35 } 36 37 type RESTMethodSettings struct { 38 Metadata defsecTypes.Metadata 39 Method defsecTypes.StringValue 40 CacheDataEncrypted defsecTypes.BoolValue 41 CacheEnabled defsecTypes.BoolValue 42 } 43 44 const ( 45 AuthorizationNone = "NONE" 46 AuthorizationCustom = "CUSTOM" 47 AuthorizationIAM = "AWS_IAM" 48 AuthorizationCognitoUserPools = "COGNITO_USER_POOLS" 49 ) 50 51 type Method struct { 52 Metadata defsecTypes.Metadata 53 HTTPMethod defsecTypes.StringValue 54 AuthorizationType defsecTypes.StringValue 55 APIKeyRequired defsecTypes.BoolValue 56 } 57 58 type DomainName struct { 59 Metadata defsecTypes.Metadata 60 Name defsecTypes.StringValue 61 SecurityPolicy defsecTypes.StringValue 62 }