Parameters: #================= #Cluster Configuration #================= VpcCidrBlock: Type: String Description: The CIDR block to be used by the VPC Default: 10.0.0.0/24 PublicSubnetCidrBlock: Type: String Description: The CIDR block to be used by the public subnet Default: 10.0.0.0/28 AvailabilityZone1: Type: String Description: The first availability zone. Leave blank to use default AvailabilityZone2: Type: String Description: The second availability zone. Leave blank to use default NodesSubnet1CidrBlock: Type: String Description: The CIDR block to be used by the first subnet for EKS nodes Default: 10.0.0.128/26 NodesSubnet2CidrBlock: Type: String Description: The CIDR block to be used by the second subnet for EKS nodes Default: 10.0.0.192/26 EksClusterRoleArn: Type: String Description: The ARN of the eksClusterRole. Leave blank to use burp-suite-enterprise-edition-eksClusterRole-arn from SSM. ClusterNodes: Type: Number Description: The number of nodes to create in the EKS cluster MinValue: 2 MaxValue: 100 Default: 2 ClusterNodeSize: Type: String Description: The type of nodes to place in the cluster Default: m5.xlarge AllowedValues: - t2.large - t2.xlarge - t2.2xlarge - t3.large - t3.xlarge - t3.2xlarge - t3a.large - t3a.xlarge - t3a.2xlarge - m4.large - m4.xlarge - m4.2xlarge - m5.large - m5.xlarge - m5.2xlarge - m5a.large - m5a.xlarge - m5a.2xlarge NodeInstanceRoleArn: Type: String Description: The ARN of the NodeInstanceRole. Leave blank to use burp-suite-enterprise-edition-NodeInstanceRole-arn from SSM. EcsTaskExecutionRoleArn: Type: String Description: The ARN of the EcsTaskExecutionRole. Leave blank to use burp-suite-enterprise-edition-EcsTaskExecutionRole-arn from SSM. LambdaRoleArn: Type: String Description: The ARN of the LambdaRole. Leave blank to use burp-suite-enterprise-edition-LambdaRole-arn from SSM. CloudFormationServiceRoleArn: Type: String Description: The ARN of the CloudFormationServiceRole. Leave blank to use burp-suite-enterprise-edition-CloudFormationServiceRole-arn from SSM. #=========================== #BSEE Database Configuration #=========================== BseeAdminRepositoryUrl: Type: String Description: The JDBC URL used to connect to the external database, or leave blank to provision a new database AllowedPattern: (^$|^jdbc:(postgresql|oracle|mysql|mariadb|sqlserver)://.*$) ConstraintDescription: Please enter a valid JDBC connection URL for a supported database, or leave blank to provision a new database Default: "" DatabaseInstanceSize: Type: String Description: Database instance size if provisioning a new database, or select N/A if using a pre-existing database Default: db.t3.large AllowedValues: - db.t3.small - db.t3.medium - db.t3.large - db.t3.xlarge - db.t3.2xlarge - db.m4.large - db.m4.xlarge - db.m4.2xlarge - db.m5.xlarge - db.m5.2xlarge - N/A DatabaseAdminUsername: Type: String Description: The database admin username for the new database, or leave blank if using a pre-existing database MaxLength: 16 AllowedPattern: (^$|^(?!admin$)[a-zA-Z][a-zA-Z0-9]{1,16}$) ConstraintDescription: Please enter a valid database username (alphanumeric characters with max length 16 and no reserved keywords), or leave blank if using a pre-existing database Default: postgres DatabaseAdminPassword: Type: String Description: The database admin password for the new database, or leave blank if using a pre-existing database Default: "" MaxLength: 128 AllowedPattern: (^$|[a-zA-Z0-9]{8,128}$) ConstraintDescription: Please enter a valid database password (alphanumeric characters with min length 8), or leave blank if using a pre-existing database NoEcho: true BseeAdminRepositoryUsername: Type: String Description: The database username for the Enterprise server AllowedPattern: ^.+$ ConstraintDescription: Please enter a database username for the Enterprise server BseeAdminRepositoryPassword: Type: String Description: The database password for the Enterprise server AllowedPattern: ^.+$ ConstraintDescription: Please enter a database password for the Enterprise server NoEcho: true BseeAgentRepositoryUsername: Type: String Description: The database username for Enterprise agents AllowedPattern: ^.+$ ConstraintDescription: Please enter a database username for Enterprise agents BseeAgentRepositoryPassword: Type: String Description: The database password for Enterprise agents AllowedPattern: ^.+$ ConstraintDescription: Please enter a database password for Enterprise agents NoEcho: true #================================ #BSEE Admin Interface Credentials #================================ BseeAdminUsername: Type: String Description: The administrator username AllowedPattern: ^.+$ ConstraintDescription: Please enter a parameter value for parameter key BseeAdminUser BseeAdminPassword: Type: String Description: The administrator password AllowedPattern: ^.+$ ConstraintDescription: Please enter a parameter value for parameter key BseeAdminPassword NoEcho: true BseeAdminEmail: Type: String Description: The administrator email address AllowedPattern: ^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$ MaxLength: 255 ConstraintDescription: Please enter a valid email address (see RFC 5322) (255 characters max) Metadata: AWS::CloudFormation::Interface: ParameterGroups: - Label: default: "Network Configuration" Parameters: - VpcCidrBlock - AvailabilityZone1 - AvailabilityZone2 - PublicSubnetCidrBlock - NodesSubnet1CidrBlock - NodesSubnet2CidrBlock - Label: - default: "EKS Cluster Configuration" Parameters: - ClusterNodes - ClusterNodeSize - EksClusterRoleArn - NodeInstanceRoleArn - Label: - default: "IAM Roles for Deployment" Parameters: - EcsTaskExecutionRoleArn - LambdaRoleArn - CloudFormationServiceRoleArn - Label: default: "Database Configuration" Parameters: - BseeAdminRepositoryUrl - DatabaseAdminUsername - DatabaseAdminPassword - DatabaseInstanceSize - BseeAdminRepositoryUsername - BseeAdminRepositoryPassword - BseeAgentRepositoryUsername - BseeAgentRepositoryPassword - Label: default: "Admin User" Parameters: - BseeAdminUsername - BseeAdminPassword - BseeAdminEmail ParameterLabels: VpcCidrBlock: default: "VPC CIDR Block" PublicSubnetCidrBlock: default: "Public Subnet CIDR Block" AvailabilityZone1: default: "Availability Zone 1" AvailabilityZone2: default: "Availability Zone 2" NodesSubnet1CidrBlock: default: "Nodes Subnet 1 CIDR Block" NodesSubnet2CidrBlock: default: "Nodes Subnet 2 CIDR Block" EksClusterRoleArn: default: "EksClusterRole ARN" ClusterNodes: default: "Number of Nodes" ClusterNodeSize: default: "Node Instance Type" NodeInstanceRoleArn: default: "NodeInstanceRole ARN" EcsTaskExecutionRoleArn: default: "EcsTaskExecutionRole ARN" LambdaRoleArn: default: "LambdaRole ARN" CloudFormationServiceRoleArn: default: "CloudFormationServiceRole ARN" BseeAdminRepositoryUrl: default: "Database URL" BseeAdminRepositoryUsername: default: "Enterprise Server Database Username" BseeAdminRepositoryPassword: default: "Enterprise Server Database Password" BseeAgentRepositoryUsername: default: "Enterprise Agents Database Username" BseeAgentRepositoryPassword: default: "Enterprise Agents Database Password" BseeAdminUsername: default: "Admin Username" BseeAdminPassword: default: "Admin Password" BseeAdminEmail: default: "Admin Email Address" DatabaseInstanceSize: default: "Database Instance Size" DatabaseAdminUsername: default: "Database Admin Username" DatabaseAdminPassword: default: "Database Admin Password" Conditions: UseDefaultAvailabilityZone1: !Equals [!Ref AvailabilityZone1, ""] UseDefaultAvailabilityZone2: !Equals [!Ref AvailabilityZone2, ""] UseDefaultEksClusterRoleArn: !Equals [!Ref EksClusterRoleArn, ""] UseDefaultNodeInstanceRoleArn: !Equals [!Ref NodeInstanceRoleArn, ""] UseDefaultEcsTaskExecutionRoleArn: !Equals [!Ref EcsTaskExecutionRoleArn, ""] UseDefaultLambdaRoleArn: !Equals [!Ref LambdaRoleArn, ""] UseDefaultCloudFormationServiceRoleArn: !Equals [!Ref CloudFormationServiceRoleArn, ""] CreateDbInstance: !Equals [!Ref BseeAdminRepositoryUrl, ""] Resources: Infrastructure: Type: AWS::CloudFormation::Stack Properties: TemplateURL: https://bsee-cloud.s3-eu-west-1.amazonaws.com/2021.12.1-8680/infrastructure.yaml Parameters: VpcCidrBlock: !Ref VpcCidrBlock PublicSubnetCidrBlock: !Ref PublicSubnetCidrBlock AvailabilityZone1: !If - UseDefaultAvailabilityZone1 - !Select - 0 - !GetAZs Ref: 'AWS::Region' - !Ref AvailabilityZone1 AvailabilityZone2: !If - UseDefaultAvailabilityZone2 - !Select - 1 - !GetAZs Ref: 'AWS::Region' - !Ref AvailabilityZone2 EksClusterName: !Sub ${AWS::StackName}-eks-cluster NodesSubnet1CidrBlock: !Ref NodesSubnet1CidrBlock NodesSubnet2CidrBlock: !Ref NodesSubnet2CidrBlock EksClusterRoleArn: !If [UseDefaultEksClusterRoleArn, "{{resolve:ssm:burp-suite-enterprise-edition-eksClusterRole-arn:1}}", !Ref EksClusterRoleArn] ClusterNodes: !Ref ClusterNodes ClusterNodeSize: !Ref ClusterNodeSize NodeInstanceRoleArn: !If [UseDefaultNodeInstanceRoleArn, "{{resolve:ssm:burp-suite-enterprise-edition-NodeInstanceRole-arn:1}}", !Ref NodeInstanceRoleArn] DatabaseAdminUsername: !If [CreateDbInstance, !Ref DatabaseAdminUsername, !Ref AWS::NoValue] DatabaseAdminPassword: !If [CreateDbInstance, !Ref DatabaseAdminPassword, !Ref AWS::NoValue] DatabaseInstanceSize: !If [CreateDbInstance, !Ref DatabaseInstanceSize, !Ref AWS::NoValue] DatabaseInit: Condition: CreateDbInstance Type: AWS::CloudFormation::Stack Properties: TemplateURL: https://bsee-cloud.s3-eu-west-1.amazonaws.com/2021.12.1-8680/database-init.yaml Parameters: DatabaseEndpoint: !GetAtt Infrastructure.Outputs.DatabaseEndpoint DatabaseAdminUsername: !Ref DatabaseAdminUsername DatabaseAdminPassword: !Ref DatabaseAdminPassword BseeAdminRepositoryUsername: !Ref BseeAdminRepositoryUsername BseeAdminRepositoryPassword: !Ref BseeAdminRepositoryPassword BseeAgentRepositoryUsername: !Ref BseeAgentRepositoryUsername BseeAgentRepositoryPassword: !Ref BseeAgentRepositoryPassword LambdaSecurityGroupId: !GetAtt Infrastructure.Outputs.EksClusterSecurityGroupId EcsTaskExecutionRoleArn: !If [UseDefaultEcsTaskExecutionRoleArn, "{{resolve:ssm:burp-suite-enterprise-edition-ecsTaskExecutionRole-arn:1}}", !Ref EcsTaskExecutionRoleArn] LambdaRoleArn: !If [UseDefaultLambdaRoleArn, "{{resolve:ssm:burp-suite-enterprise-edition-lambdaRole-arn:1}}", !Ref LambdaRoleArn] NodesSubnet1Id: !GetAtt Infrastructure.Outputs.NodesSubnet1Id NodesSubnet2Id: !GetAtt Infrastructure.Outputs.NodesSubnet2Id DbInitWaitHandle: Condition: CreateDbInstance DependsOn: DatabaseInit Type: "AWS::CloudFormation::WaitConditionHandle" WaitHandle: Type: "AWS::CloudFormation::WaitConditionHandle" WaitCondition: Type: "AWS::CloudFormation::WaitCondition" Properties: Handle: !If [CreateDbInstance, !Ref DbInitWaitHandle, !Ref WaitHandle] Timeout: "1" Count: 0 Deployment: Type: AWS::CloudFormation::Stack DependsOn: WaitCondition Properties: TemplateURL: https://bsee-cloud.s3-eu-west-1.amazonaws.com/2021.12.1-8680/deployment.yaml Parameters: BseeAdminRepositoryUrl: !If - CreateDbInstance - !Sub "jdbc:postgresql://${Infrastructure.Outputs.DatabaseEndpoint}:5432/burp_enterprise" - !Ref BseeAdminRepositoryUrl BseeAdminRepositoryUsername: !Ref BseeAdminRepositoryUsername BseeAdminRepositoryPassword: !Ref BseeAdminRepositoryPassword BseeAgentRepositoryUsername: !Ref BseeAgentRepositoryUsername BseeAgentRepositoryPassword: !Ref BseeAgentRepositoryPassword BseeAdminUsername: !Ref BseeAdminUsername BseeAdminPassword: !Ref BseeAdminPassword BseeAdminEmail: !Ref BseeAdminEmail BseeNumberOfAgents: !Ref ClusterNodes EksClusterName: !GetAtt Infrastructure.Outputs.EksClusterName EksClusterSecurityGroupId: !GetAtt Infrastructure.Outputs.EksClusterSecurityGroupId EfsFileSystemId: !GetAtt Infrastructure.Outputs.EfsFileSystemId HttpSecurityGroupId: !GetAtt Infrastructure.Outputs.HttpSecurityGroupId EcsClusterName: !Sub ${AWS::StackName}-ecs-cluster EcsTaskExecutionRoleArn: !If [UseDefaultEcsTaskExecutionRoleArn, "{{resolve:ssm:burp-suite-enterprise-edition-ecsTaskExecutionRole-arn:1}}", !Ref EcsTaskExecutionRoleArn] LambdaRoleArn: !If [UseDefaultLambdaRoleArn, "{{resolve:ssm:burp-suite-enterprise-edition-lambdaRole-arn:1}}", !Ref LambdaRoleArn] CloudFormationServiceRoleArn: !If [UseDefaultCloudFormationServiceRoleArn, "{{resolve:ssm:burp-suite-enterprise-edition-CloudFormationServiceRole-arn:1}}", !Ref CloudFormationServiceRoleArn] NodesSubnet1Id: !GetAtt Infrastructure.Outputs.NodesSubnet1Id NodesSubnet2Id: !GetAtt Infrastructure.Outputs.NodesSubnet2Id