Skip to content

Releases: globaldatanet/aws-firewall-factory

4.5.1

03 Sep 09:51
3ca5a69
Compare
Choose a tag to compare

Added

  • Renamed Type: Changed the type name WafConfig to wafConfig in the Config module to follow naming conventions and improve consistency across the codebase.
  • Change the ManagedRuleGroup interface, to extends the wafv2.CfnWebACL.ManagedRuleGroupStatementProperty.
  • Changed structure in lib and improved Documentation, extended jsdoc with examples.

Fixed

  • Corrected the regex pattern for IPSet descriptions to ensure accurate validation
  • Fixed Bug on IPSet capacity check
  • Bump aws-cdk: 2.148.0 to 2.154.1
  • Bump aws-cdk-lib: ^2.148.0 to ^2.150.0
  • Bump @aws-sdk/client-cloudformation: 3.606.0 to 3.637.0
  • Bump @aws-sdk/client-cloudfront: ^3.606.0 to ^3.637.0
  • Bump @aws-sdk/client-cloudwatch: 3.606.0 to 3.637.0
  • Bump @aws-sdk/client-config-service: ^3.606.0 to ^3.637.0
  • Bump @aws-sdk/client-ec2: ^3.606.0 to ^3.637.0
  • Bump @aws-sdk/client-fms: 3.606.0 to 3.637.0
  • Bump @aws-sdk/client-pricing: 3.606.0 to 3.637.0
  • Bump @aws-sdk/client-s3: ^3.606.0 to ^3.637.0
  • Bump @aws-sdk/client-secrets-manager: ^3.606.0 to ^3.637.0
  • Bump @aws-sdk/client-service-quotas: 3.606.0 to 3.637.0
  • Bump @aws-sdk/client-shield: 3.606.0 to 3.637.0
  • Bump @aws-sdk/client-iam: 3.606.0 to 3.637.0
  • Bump @aws-sdk/client-ssm: 3.606.0 to 3.637.0
  • Bump @aws-sdk/client-wafv2: 3.606.0 to 3.637.0
  • Bump @aws-solutions-constructs/aws-eventbridge-stepfunctions: ^2.60.0 to ^2.65.0
  • Bump @babel/traverse: ^7.24.7 to ^7.25.4
  • Bump @types/node: ^20.14.9 to ^22.5.0
  • Bump @types/aws-lambda: ^8.10.140 to ^8.10.143
  • Bump @types/lodash: 4.17.6 to 4.17.7
  • Bump axios: ^1.7.2 to ^1.7.5
  • Bump cdk-sops-secrets: ^1.12.0 to ^1.13.1
  • Bump cfonts: ^3.2.0 to ^3.3.0
  • Bump constructs: 10.2.0 to 10.3.0
  • Bump lodash: 4.17.20 to 4.17.21
  • Bump npm: 10.8.1 to 10.8.2
  • Bump table: ^6.8.0 to ^6.8.2
  • Bump i: ^0.3.6 to ^0.3.7
  • Bump typedoc-plugin-extras: ^3.0.0 to ^3.1.0
  • Bump uuid: ^10.0.0 to ^10.0.0
  • Bump typescript: 5.4.5 to 5.5.4
  • Bump ts-jest: 29.1.5 to 29.2.5
  • Bump adaptivecards: 3.0.2 to 3.0.4
  • Bump aws-lambda: ^1.0.6 to ^1.0.7

4.5.0

08 Jul 15:40
efa9b32
Compare
Choose a tag to compare

Added

  • Added support for deploying Shield Advanced policies, including the ability to calculate pricing. AWS Shield Advanced provides customized detection based on traffic patterns to your protected resources, detects and alerts on smaller DDoS attacks, and identifies application layer attacks by baselining traffic and spotting anomalies.
    For Shield Advanced policies, we have introduced an Advanced Shield stack with sample configurations.
    Note: If you are deploying WAF in a CI/CD environment, make sure you set your environment variable STACK_NAME for the resource you want to deploy.
    • export STACK_NAME=PreRequisiteStack => _prerequisites-stack.ts
    • export STACK_NAME=WAFStack => _web-application-firewall-stack.ts
    • export STACK_NAME=ShieldAdvancedStack => _shield-advanced-stack.ts
  • Add Shield Cloudwatch Dashboard - Example Shield Dashboard- The Firewall Factory is able to provision a centralized CloudWatch Dashboard.
  • Add Cloudwatch Alarms: Cloudwatch Alarms are now part of the prerequisite stack and can be used to triger the SNS topics incase of DDoS.
    The Dashboard shows the ammount of DDoS attacks detected
  • Add Grafana Dashbording - Example Grafana Dashboard- AWS Glue crawler job, an Amazon Athena table and an Amazon Athena view to build a Managed Grafana dashboard to visualize the events in near real time - This is an optional component in the Prequisite Stack.
    Example Grafana Dashboard can be found here
    Note:
    • Your need to configure Amazon Athena Data Source in Amazon Managed Grafana
      • Example Role template for Cross Account Access can be found here
    • ⚠️ You need to adjust the json and replace the uid of your grafana-athena-datasource - while importing into your Grafana.

Fixed

  • Bump @aws-sdk/client-cloudformation to 3.606.0
  • Bump @aws-sdk/client-cloudfront to 3.606.0
  • Bump @aws-sdk/client-cloudwatch to 3.606.0
  • Bump @aws-sdk/client-config-service to 3.606.0
  • Bump @aws-sdk/client-ec2 to 3.606.0
  • Bump @aws-sdk/client-fms to 3.606.0
  • Bump @aws-sdk/client-pricing to 3.606.0
  • Bump @aws-sdk/client-s3 to 3.606.0
  • Bump @aws-sdk/client-iam to 3.606.0
  • Bump @aws-sdk/client-secrets-manager to 3.606.0
  • Bump @aws-sdk/client-service-quotas to 3.606.0
  • Bump @aws-sdk/client-shield to 3.606.0
  • Bump @aws-sdk/client-ssm to 3.606.0
  • Bump @aws-sdk/client-wafv2 to 3.606.0
  • Bump @aws-solutions-constructs/aws-eventbridge-stepfunctions to 2.60.0
  • Bump @babel/traverse to 7.24.7
  • Bump @mhlabs/cfn-diagram to 1.1.40
  • Bump @slack/types to 2.12.0
  • Bump @types/aws-lambda to 8.10.140
  • Bump @types/lodash to 4.17.6
  • Bump @types/uuid to 10.0.0
  • Bump adaptivecards to 3.0.4
  • Bump aws-cdk-lib to 2.148.0
  • Bump axios to 1.7.2
  • Bump cdk-sops-secrets to 1.12.0
  • Bump cfonts to 3.3.0
  • Bump npm to 10.8.1
  • Bump table to 6.8.2
  • Bump uuid to 10.0.0
  • Bump @types/node to 20.14.9
  • Bump @typescript-eslint/eslint-plugin to 7.14.1
  • Bump @typescript-eslint/parser to 7.14.1
  • Bump aws-cdk to 2.147.2
  • Bump ts-jest to 29.1.5

4.3.1

27 May 12:03
a078d04
Compare
Choose a tag to compare

Added

  • Issue#365 UnutilizedWafs - Implemented automated identification and notification system in Firewall Factory to manage unused WAFs, leveraging Lambda and notification services to streamline infrastructure, optimize costs, and enhance security by addressing WAF sprawl proactively and ensuring efficient resource utilization.
  • Added example IAM Role which can be used for ci-cd deployments

Fixed

  • Issue#380 Fixes on the CloudWatch dashboard.
  • Restructure Lambda code with ShareComonents to reduce code duplicates
  • Using cdk-sops-secrets now for all Webhooks - see WebHookSecretDefinition:
 {
   WebhookUrl: string
   Messenger: "Slack" | "Teams"
 }
  • Adding missing: Optional Lambda function to prerequisite Stack that send notifications about potential DDoS activity for protected resources to messengers (Slack/Teams) - [AWS Shield Advanced] - this was removed while migrating lambdas from python to typescript
  • Bump @aws-sdk/client-cloudformation from 3.554.0 to 3.556.0
  • Bump @aws-sdk/client-cloudfront from 3.568.0 to 3.577.0
  • Bump @aws-sdk/client-cloudwatch from 3.554.0 to 3.556.0
  • Bump @aws-sdk/client-config-service from 3.568.0 to 3.577.0
  • Bump @aws-sdk/client-ec2 from 3.568.0 to 3.577.0
  • Bump @aws-sdk/client-fms from 3.554.0 to 3.577.0
  • Bump @aws-sdk/client-pricing from 3.554.0 to 3.556.0
  • Bump @aws-sdk/client-s3 from 3.569.0 to 3.577.0
  • Bump @aws-sdk/client-service-quotas from 3.554.0 to 3.577.0
  • Bump @aws-sdk/client-shield from 3.554.0 to 3.556.0
  • Bump @aws-sdk/client-ssm from 3.554.0 to 3.577.0
  • Bump @aws-sdk/client-wafv2 from 3.554.0 to 3.556.0
  • Bump aws-cdk from 2.137.0 to 2.142.0
  • Bump aws-cdk-lib from 2.137.0 to 2.142.0
  • Bump @typescript-eslint/eslint-plugin from 7.6.0 to 7.9.0
  • Bump @typescript-eslint/parser from 7.6.0 to 7.9.0
  • Bump @types/lodash from 4.17.0 to 4.17.1

4.3.0

17 Apr 14:08
5ea87b1
Compare
Choose a tag to compare

Added

  • Allow reusing ipsets with same name. This commit differentiate ipsets from different FMS configs by adding the name of the webacl to it. Without this commit, trying to run aws-firewall-factory for two configs which uses a ipset with the same name would give a error on CloudFormation ('IpSet with name x already exists') - (Add Name of web application firewall to the IPSet Name) - ⚠️ Existing IPsets will be replaced during next update.
  • CheckCapacity: see which rule failed. This commit helps a lot by immediately letting us know which rule failed capacity checking and requires fixes
  • Save chars on ManagedServiceData FMS prop. The ManagedServiceData has a hard limit of 8192 characters. I've asked AWS about raising it and they said that this is a hard limit and they can't raise it. This commit is for saving as much chars as we can out of the ManagedServiceData prop, for squeezing in our rules (even if they have a ton of RuleActionOverrides on them)
  • Values: allow async code. This adds a dynamic import of the firewall config for enabling people that want to run async code on then, ensuring that all async code will run during the import
  • Issue#317 Evaluation time windows for request aggregation with rate-based rules. You can now select time windows of 1 minute, 2 minutes or 10 minutes, in addition to the previously supported 5 minutes.
  • Extend Guidance Helper to check for valid Evaluation time windows.
  • CustomRule StatementType is now part of the log Capacity Table

Fixed

  • RateBasedStatement.CustomKeys is a array of objects, not a object
  • Recursive code for adding RateBasedStatement.ScopeDownStatement. The prop ScopeDownStatement of RateBasedStatements can have And, Or and Not statements, just like any other Statement. Without this fix, deploying RateBasedStatements with complex ScopeDownStatements fails on capacity checking.
  • Don't enforce update if EnforceUpdate prop is not defined. If its not defined, set EnforceUpdate to false.
  • Enhance the enumcheck to handle API throttling by adding sleep functionality.
  • Bumped Jest from version 29.7.0 to 29.7.0
  • Bumped TypeScript from version 5.3.3 to 5.4.5
  • Bumped ESLint from version 8.56.0 to 8.56.0
  • Bumped Axios from version 1.6.5 to 1.6.8
  • Bumped @typescript-eslint/parser and @typescript-eslint/eslint-plugin from version 6.19.0 to 7.6.0
  • Bumped AWS CDK from version 2.121.1 to 2.137.0
  • Bumped @aws-sdk/client-cloudformation, @aws-sdk/client-cloudwatch, @aws-sdk/client-fms, @aws-sdk/client-pricing, @aws-sdk/client-service-quotas, @aws-sdk/client-shield, @aws-sdk/client-ssm, and @aws-sdk/client-wafv2 from version 3.490.0 to 3.554.0
  • Removed redundant declaration of "@typescript-eslint/eslint-plugin" and "@typescript-eslint/parser" dependencies.
  • Removed redundant declaration of "@types/lodash" dependency.
  • Added missing comma after TypeScript version 5.3.3 in devDependencies.
  • Add CDK ToolKit StackName to cdk diff using taskfile - Sometimes the following error occurred if the template is more than 50kb in size this was because the cdk toolkit stackname was not set.
    • eg.: The template for stack "YOURSTACKNAME" is 64KiB. Templates larger than 50KiB must be uploaded to S3.

4.2.3

23 Feb 09:53
ec896aa
Compare
Choose a tag to compare

Added

  • Initial release of Enum Checker script. Implemented functionality to check for new Labels and Rules available for Managed Rule Groups. Provides clear output indicating any new Labels or Rules discovered.
  • Issue#295 - Optional Athena table added to Prerequisites stack: Introducing support for the Athena WAF (web application firewall) log table. Users can now easily query and analyse WAF log data using Athena. Gain insight into web application security events, including blocked requests, allowed traffic and threat patterns.

Fixed

  • Issue293 Warning on task deploy: "aws-cdk-lib.aws_lambda.FunctionOptions#logRetention is deprecated." - We are creating now a fully customizable log group with logs.LogGroup.
    ℹ️ Migrating from logRetention to logGroup will cause the name of the log group to change.
  • False Positive for Guidance: noManageRuleGroups
  • Added new Labels and Rules which are available for Managed Rule Groups to enum.ts
  • Bump @types/node from 20.11.5 to 20.11.19
  • Bump @typescript-eslint/eslint-plugin from 6.19.0 to 7.0.0
  • Bump @aws-sdk/client-wafv2 from 3.496.0 to 3.515.0
  • Bump aws-cdk-lib from 2.121.1 to 2.128.0
  • Bump @types/uuid from 9.0.7 to 9.0.8

4.2.2

26 Jan 15:52
f408e47
Compare
Choose a tag to compare

Added

  • Guidance Helper v1: This Helper is designed to provide comprehensive assistance in implementing Best Practices for AWS Firewalls. Additionally, it addresses Issue279, ensuring a more robust and effective implementation. Guidances have severities: ℹ️ - can be adapted, ⚠️ should be adapted, 🚨 must be adapted - exceptions of course confirm the rules.

Fixed

  • The conversion of rules from CDK to SDK for RateBasedStatement was experiencing issues, impacting the proper functioning essential for WCU Calculation. I'm pleased to inform you that this issue has been successfully addressed and resolved.

4.2.1

22 Jan 16:25
d6e9080
Compare
Choose a tag to compare

Fixed

  • Issue285 - Resolved an issue where the redeployment of changed capacity was not functioning correctly due to inconsistencies in the writing of ProcessProperties for DeployedRuleGroups.
  • Bump ts-jest from 29.1.1 to 29.1.2
  • Bump @aws-sdk/client-wafv2 from 3.490.0 to 3.496.0
  • Bump @aws-sdk/client-service-quotas from 3.490.0 to 3.496.0
  • Bump @types/node from 20.11.4 to 20.11.5
  • Bump @aws-sdk/client-pricing from 3.490.0 to 3.496.0

4.2.0

16 Jan 14:15
e0dd8d7
Compare
Choose a tag to compare

Fixed

  • Output of the correct ManagedRuleGroup version if the stack has already been deployed, no version has been specifically set or Enforce Update has been set
  • Restructuring helpers to facilitate smoother integration with the code, particularly for all contributors. Helpers are now seperated into different files and directories grouped by aws service / usage.
  • Fixed Codesmells which where found by SonarQube
  • VersionEnabled behavior fixed for ManageRuleGroups
  • Python Lambda translated into typescript
  • Code was improved by removing Code duplications and enriched by more comments and descriptions.
  • Bump @aws-sdk/client-service-quotas from 3.427.0 to 3.490.0
  • Bump @aws-sdk/client-pricing from 3.427.0 to 3.490.0
  • Bump @aws-sdk/client-shield from 3.433.0 to 3.490.0
  • Bump @aws-sdk/client-cloudformation from 3.428.0 to 3.490.0
  • Bump @aws-sdk/client-cloudwatch from 3.427. to 3.490.0
  • Bump @aws-sdk/client-fms from 3.427.to 3.490.0
  • Bump @aws-sdk/client-wafv2 from 3.427.0 to 3.490.0
  • Bump @types/node 20.8.10 from to 20.11.4
  • Bump @typescript-eslint/parser from 6.7.5 to 6.19.0
  • Bump @typescript-eslint/eslint-plugin from 6.13.2 to 6.19.0
  • Bump aws-cdk-lib from 2.100.0 to 2.121.1
  • Bump eslint from 8.53.0 to 8.56.0
  • Bump ts-node from 10.9.1 to 10.9.2
  • Bump typescript from 5.2.2 to 5.3.3
  • Bump @types/lodash from 4.14.178 to 4.14.202
  • Bump constructs from 10.2.25 to 10.3.0
  • Bump typedoc-plugin-keywords from 1.5.0 to 1.6.0

4.1.6

15 Dec 10:31
8ac079d
Compare
Choose a tag to compare

Fixed

  • Fixed Region addression in CloudWatch expressions for Dashboard
  • Bump @types/aws-lambda from 8.10.124 to 8.10.130
  • Bump @typescript-eslint/eslint-plugin from 6.10.0 to 6.13.2

Added

4.1.5

17 Nov 08:58
6d948bf
Compare
Choose a tag to compare

Fixed

  • Addressed issue with missing WCU Calculation OR statement within AND statement. - Issues232
  • Addressed issue with missing WCU Calculation AND statement within OR statement.
  • Bump @typescript-eslint/eslint-plugin from 6.7.5 to 6.10.0
  • Bump eslint from 8.51.0 to 8.53.0