Giter Site home page Giter Site logo

cms-ars-3.1-high-eks-cis-node-overlay's Introduction

cms-ars-3.1-high-eks-cis-node-overlay

CMS’ ISPG (Information Security and Privacy Group) decided to discontinue funding the customization of MITRE’s Security Automation Framework (SAF) for CMS after September 2023. This repo is now in archive mode, but still accessible. For more information about SAF with current links, see https://security.cms.gov/learn/security-automation-framework-saf

InSpec profile to validate the secure configuration of AWS EKS nodes, against CIS's CIS Amazon Elastic Kubernetes Service (EKS) Benchmark version 1.0.1 (Node requirements) tailored for CMS ARS 3.1 for CMS systems categorized as High.

The baseline includes tests that must be executed against the Kubernetes API and tests that must be executed against the underlying nodes over SSH. This profile handles only the node tests, and is intended to be run alongside the CMS ARS 3.1 High EKS CIS Cluster Overlay profile.

Getting Started

This profile should be executed from a runner host against each node comprising an EKS cluster in AWS using SSH as a transport. EKS nodes must be configured to accept an SSH connection from the runner host.

The profile may be downloaded to the runner for execution, or simply executed directly off of this GitHub repository. InSpec profiles can use different reporters to present output, such as the cli reporter to print results to the terminal and the json reporter to generate a JSON file of the results.

For the best security of the runner, always install on the runner the latest version of InSpec and supporting Ruby language components.

Latest versions and installation options are available at the InSpec site.

Tailoring to Your Environment

The following inputs may be configured in an inputs ".yml" file for the profile to run correctly for your specific environment. More information about InSpec inputs can be found in the InSpec Profile Documentation.

# Used by check 3.2.3. Set this value to a string containing the full path
# ("/example/of/path/string/for/ca/file.crt")
# to the certificate authority file used for kubelet to authenticate certificates.
client_ca_file_path:

# Used by checks 3.2.10 and 3.2.11. Set this to `false` if your node kubelet processes
# get certificates from the k8s API server, or `true` if your certificates
# are handled by a process outside of k8s.
# Acceptable values (boolean): true false
external_cert_authority_in_use:

Running the Profile

Executing the profile by downloading it to the runner:

git clone https://github.com/CMSgov/cms-ars-3.1-high-eks-cis-node-overlay.git
cd cms-ars-3.1-high-eks-cis-node-overlay
inspec exec . -t ssh://ec2-user@<node 1 IP address> -i private_key.pem --input-file <path_to_your_input_file/name_of_your_input_file.yml> --reporter cli json:node1results.json
...
inspec exec . -t ssh://ec2-user@<node N IP address> -i private_key.pem --input-file <path_to_your_input_file/name_of_your_input_file.yml> --reporter cli json:nodeNresults.json

Executing the profile by executing it from this GitHub repository:

inspec exec https://github.com/CMSgov/cms-ars-3.1-high-eks-cis-node-overlay/archive/main.tar.gz -t ssh://ec2-user@<node 1 IP address> -i private_key.pem --input-file <path_to_your_input_file/name_of_your_input_file.yml> --reporter cli json:node1results.json
...
inspec exec https://github.com/CMSgov/cms-ars-3.1-high-eks-cis-node-overlay/archive/main.tar.gz -t ssh://ec2-user@<node N IP address> -i private_key.pem --input-file <path_to_your_input_file/name_of_your_input_file.yml> --reporter cli json:nodeNresults.json

Running This Baseline from a local Archive copy

If your runner is not always expected to have direct access to GitHub, use the following steps to create an archive bundle of this profile and all of its dependent tests:

(Git is required to clone the InSpec profile using the instructions below. Git can be downloaded from the Git site.)

mkdir profiles
cd profiles
git clone https://github.com/CMSgov/cms-ars-3.1-high-eks-cis-node-overlay.git
inspec archive cms-ars-3.1-high-eks-cis-node-overlay
sudo inspec exec <archive name> -t ssh://ec2-user@<node N IP address> -i private_key.pem --input-file <path_to_your_input_file/name_of_your_input_file.yml> --reporter cli json:nodeNresults.json

For every successive run, follow these steps to always have the latest version of this baseline and dependent profiles:

cd cms-ars-3.1-high-eks-cis-node-overlay
git pull
cd ..
inspec archive cms-ars-3.1-high-eks-cis-node-overlay --overwrite
sudo inspec exec <archive name> -t ssh://ec2-user@<node N IP address> -i private_key.pem --input-file <path_to_your_input_file/name_of_your_input_file.yml> --reporter cli json:nodeNresults.json

Using Heimdall for Viewing the JSON Results

Heimdall Lite 2.0 Demo GIF

The JSON results output file can be loaded into heimdall-lite for a user-interactive, graphical view of the InSpec results.

The JSON InSpec results file may also be loaded into a full heimdall server, allowing for additional functionality such as to store and compare multiple profile runs.

Authors

Special Thanks

Contributing and Getting Help

To report a bug or feature request, please open an issue.

NOTICE

© 2018-2021 The MITRE Corporation.

Approved for Public Release; Distribution Unlimited. Case Number 18-3678.

NOTICE

MITRE hereby grants express written permission to use, reproduce, distribute, modify, and otherwise leverage this software to the extent permitted by the licensed terms provided in the LICENSE.md file included with this project.

NOTICE

This software was produced for the U. S. Government under Contract Number HHSM-500-2012-00008I, and is subject to Federal Acquisition Regulation Clause 52.227-14, Rights in Data-General.

No other use other than that granted to the U. S. Government, or to those acting on behalf of the U. S. Government under that Clause is authorized without the express written permission of The MITRE Corporation.

For further information, please contact The MITRE Corporation, Contracts Management Office, 7515 Colshire Drive, McLean, VA 22102-7539, (703) 983-6000.

NOTICE

CIS Benchmarks are published by the Center for Internet Security (CIS), see: https://www.cisecurity.org/cis-benchmarks/.

cms-ars-3.1-high-eks-cis-node-overlay's People

Contributors

ejaronne avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.