Coder Social home page Coder Social logo

cloud-contracts-as-code's Introduction

Cloud Contracts as Code

Overview

Cloud Contracts as Code are examples of using the Dome9 Terraform Provider to build a Cloud Security Contract or Compliance Ruleset for the public cloud. By using Terraform for your cloud contracts you automate the process of creating and maintaining your policies and guardrails.

What does it do?

The example configuration supports building custom rules for Azure, AWS and GCP with the Dome9 GSL language. It creates a mail alert and attaches the alert with the specified cloud account through a notification policy.

A additional CloudBot alert and notification policy gets configured with the specified SNS topic ARN for automatic remediation with Cloudbots.io. For the remediative action to happen the CloudBots should be installed in your cloud account first.

Requirements

Sample Cloud Security Contract

  • Storage Buckets must always be encrypted
  • Storage buckets must always be Private unless tagged with: PublicBucketXYZ
  • Load Balancers use TLS 1.2 and above
  • In PROD and STAGE only use RHEL 7.3
  • Everyone must use SSO with MFA enabled
  • DEV should only use US-East2 or US-West2

Usage

  • Clone the repository and create a terraform.tfvars file within the root folder with contents like these (use your details):
### General settings
dome9_access_id = ""
dome9_secret_key = ""
email_recipients = ""
sns_topic_arn = ""

### AWS Settings, if applicable
use_aws = true
aws_cloud_account_id = ""
aws_account_number = ""

### Azure Settings, if applicable
use_azure = true
azure_cloud_account_id = ""
azure_account_subscription = ""

### Google Settings, if applicable
use_gcp = true
gcp_cloud_account_id = ""
gcp_project_id = ""
  • From a command line initialize the Terraform configuration directory:

    terraform init

  • Create an execution plan:

    terraform plan

  • Create or modify the deployment:

    terraform apply

References

cloud-contracts-as-code's People

Contributors

stevendeboer avatar steven-de-boer avatar

Stargazers

Martin Koldovský @ CHKP avatar

Watchers

Chris Beckett avatar Geert De Ron avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.