Giter VIP home page Giter VIP logo

c3's Introduction

๐—–๐Ÿฏ: Compliant Cloud Components

The library ๐—–๐Ÿฏ provides configuration to AWS CDK components which is compliant with CIS, GDPR and other security standards.

Build Status Coverage Status

Inspiration

Cyber-security address various threats with data loses thefts, breaches and violation of privacy. Fortunately, we have a group of security experts who looks after these threats. They have developed controls and benchmark protocols to address these challenges. Often, usage of the tools requires a special effort and domain knowledge from software engineers. This library helps AWS cloud developers with controls defined by:

Please find details about supported controls in the checklists

Getting Started

The latest version of the library is available at master branch of the repository. All development, including new features and bug fixes, take place on the master branch using forking and pull requests as described in contribution guidelines.

npm install --save @ssh.com/c3

The library acts as an overlay for existing AWS CDK components. It aims to minimize effort required to enable compliancy with privacy and security best practices. For example:

//
// Your CDK application creates S3 bucket
import * as s3 from '@aws-cdk/aws-s3'

new s3.Bucket(stack, 'MyS3', /* ... */)

//
// It is easy to enable its encryption and disable public access,
// hence making it compliant with GDPR-25 and GDPR-32 1.a.
// 
// Just make following changes:
import * as c3 from '@ssh.com/c3'

const kmsKey = c3.kms.fromAlias(stack, 'alias/MyKey')
new c3.s3.Bucket(stack, 'MyS3', { kmsKey, /* ... */ })

Please notice that each component enforces encryption and requires mandatory kmsKey: kms.IAlias parameter. The KMS Alias is used intentionally to allow flexibility on key management. We do also recommend to create and use key from different stacks. It prevents accidental deletion of key while you dispose an application. See more about KMS key design at ๐—–๐Ÿฏ library here.

//
// Stack A
new c3.kms.SymmetricKey(stack, 'MyKey')

// 
// Stack B
const kmsKey = c3.kms.fromAlias(stack, 'alias/MyKey')

The library support following components, we are actively seeking for contribution. Please see an example about usage of components:

import * as c3 from '@ssh.com/c3'

const stack = new cdk.Stack()
new c3.kms.SymmetricKey(stack, 'MyKey')
new c3.logs.LogGroup(stack, 'MyLogs', /* ... */)
new c3.efs.FileSystem(stack, 'MyEFS', /* ... */)
new c3.rds.DatabaseInstance(stack, 'MyRDS', /* ... */)
new c3.dynamodb.Table(stack, 'MyTable', /* ... */)
new c3.s3.Bucket(stack, 'MyS3', /* ... */)
new c3.codebuild.Project(stack, 'MyCodeBuild', /* ... */)
new c3.secretsmanager.Secret(stack, 'MySecret', /* ... */)

How To Contribute

The project is MIT licensed and accepts contributions via GitHub pull requests:

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Tag each commit with control id ((CIS-2.8) ...)
  5. Push to the branch (git push origin my-new-feature)
  6. Create new Pull Request

The development requires TypeScript and AWS CDK

npm install -g typescript ts-node aws-cdk
git clone https://github.com/SSHcom/c3
cd c3

npm install
npm run build
npm run test
npm run lint

License

See LICENSE

c3's People

Contributors

dependabot[bot] avatar fogfish avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

c3's Issues

retention is mandatory param at LogGroups

Fail with error Missing required key 'retentionInDays' in params

new c3.logs.LogGroup(stack, 'MyLogs', {
  kmsKey,
  logGroupName: 'MyLogs',
  removalPolicy,
})

Ok:

new c3.logs.LogGroup(stack, 'MyLogs', {
  kmsKey,
  logGroupName: 'MyLogs',
  removalPolicy,
  retention: logs.RetentionDays.ONE_DAY,
})

Fix warning about core.Tag api

The API @aws-cdk/core.Tag.add(scope,k,v) is deprecated: Use "Tags.of(scope).add(k,v)" instead. This API will be removed in the next major release

Is there a python package published

Hey,

As in title :).
Would love to play around with this library but my codebase is python based.
Can Python package be published? I am pretty sure I read you can just combile typescript into python, can't find a link though.

Cheers,.

Removal of stack fails if log group do not exists

Removal of custom c3.LogGroup resources fails if log group is removed manually (outside of CF process).

Error message in logs

{
    "Status": "FAILED",
    ...
    "Data": {
        "reason": {
            "message": "The specified log group does not exist.",
            "code": "ResourceNotFoundException",
            ...
        }
    }
}

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.