Coder Social home page Coder Social logo

cfi-ansible-aws-rds's Introduction

FINOS - Incubating Join us on Slack

CFI Ansible Playbook for AWS RDS

The purpose of this repository is to provide an AWS RDS service that meets the security policies defined by the FINOS Compliant Financial Infrastructure (CFI) Policy Working Group or FINOS Common Cloud Controls.

Validation of compliance with the security policies is measured after the IaC has been deployed, using the RDS Raid for Privateer supplied by the CFI Runtime Validation Working Group.

Runtime Validation of the IaC is achieved through a three-step GitHub workflow, outlined below.

CI Overview

This deploy->validate->destroy workflow can be triggered manually, or will run when code is merged to the dev branch.

For the CI to work it requires for GitHub Action secrets to be setup in the repo. In the main repo these are supplied by FINOS technical support. When working on a fork of the repo, these need to be managed by the repo owner.

Deploy

This step deploys an AWS RDS and applies the security policies that have been selected. The Ansible create-rds-db.yaml playbook used in this CI step both creates the RDS and also applies the required security policies.

Validate

This step uses the RDS Raid to ensure that the defined security policy for Relational Databases has been correctly applied to the deployed AWS RDS. Any failing checks should be promptly investigated and resolved.

Destroy

This step destroys the RDS once validation has been completed, this step runs the Ansible delete-rds-db.yaml playbook

GitHub Action Secrets

The following secrets need to be setup in this GutHub repo

  • AWS_KEY_ID
  • AWS_KEY_SECRET
  • MASTER_USERNAME
  • MASTER_USER_PASSWORD

The MASTER_USERNAME and MASTER_USER_PASSWORD are the master RDS credentials used when the DB is created.

AWS Setup

So that the RDS can be created a default VPC and default subnet need to be created. The following steps can be used to create these when working on a fork of the repo. this is manged by FINOS in the main repo or locally i the AWS region (us-east-2) is coded into the Ansible playbook.

To create a default VPC and Subnet use the AWS cli.

Using the AWS CLI first run the configure command:

This will require an AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and a default AWS Region. In the Ansible playbooks we are using us-east-2.

aws configure

The create the default VPC, this will also create the default subnets. Once created they can be checked in the AWS Console.

aws ec2 create-default-vpc

Database Setup

The database setup is coded into the [create]{ansible/create-rds-db.yaml} Ansible playbook.

Basic DB Setup

The database parameters used are:

  • allocated_storage: 10
  • DB_ENGINE: "mariadb"
  • DB_ID: "CFI-validator-db"

DB Hardening

Encryption

STORAGE_ENCRYPTED: "true"

Storage encryption is enabled by the storage-encrpted variable. If no key is specified then an AWS key will be used. More detail can be found at this link in the AWS documentation.

Usage

To contribute to this repo:

  • Fork repository
  • Update GitHub Secrets to reflect your local setup
  • Update dev branch and test updates locally
  • Open PR to parent repo to contribute back. The project maintainers are responsble for testing and merging PR's

To use this repo:

  • Fork repository
  • Update GitHub Secrets to reflect your local setup
  • Update CI / Playbooks to support use case

Join the Community!

You may request changes via GitHub Issues (we recommend also raising discussion on Slack or in a community meeting to ensure your issue is properly prioritized).

Be sure to join our public community meetings found on the FINOS community calendar, and join us on Slack.

Contributing

For more information about how to engage with the rest of the community and contribute to the project, view the documentation and links here.

License

Distributed under the Apache License, Version 2.0.

SPDX-License-Identifier: Apache-2.0

Security Concerns

If you have any security concerns related to this project, please create an issue on the primary CFI repository or privately report via [email protected].

cfi-ansible-aws-rds's People

Contributors

adrianhammond avatar eddie-knight avatar finos-admin avatar renovate[bot] avatar

Watchers

 avatar  avatar  avatar  avatar

cfi-ansible-aws-rds's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/deploy_validate_destroy_rds.yaml
  • actions/checkout v3
  • actions/setup-python v4
  • actions/upload-artifact v3
  • actions/checkout v2
  • actions/setup-python v4

  • Check this box to trigger a request for Renovate to run again on this repository

Add GitHub secrets for workflow actions

Feature Request

Description of Problem:

For the playbook / workflow we need GutHub secrets to pass credentials. Current repo setup doesn't allow sufficient access to add secrets.

Potential Solutions:

Request access from [email protected].

Once access granted need to setup secrets and test workflow / playbook

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.