GithubHelp home page GithubHelp logo

fmenesesg / grc-ansible-integration Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jalvarez-rh/grc-ansible-integration

0.0 0.0 0.0 23 KB

An example of the ACM GRC integration with Ansible

License: GNU General Public License v3.0

grc-ansible-integration's Introduction

ACM GRC Ansible Integration Example

An example of the Red Hat Advanced Cluster Management (ACM) Governance, Risk, and Compliance (GRC) integration with Ansible for a blog post.

The scenario is that we want a Service Now incident to be created when a TLS (i.e. SSL) certificate is close to expiring based on an ACM GRC policy.

OpenShift Setup

This creates a self-signed TLS (i.e. SSL) certifcate. This sets the expiration date to 25 days from now since the GRC policy to be used will alert in 30 days.

mkdir -p tls
openssl req \
    -new \
    -newkey rsa:4096 \
    -days 25 \
    -nodes \
    -x509 \
    -subj "/C=US/ST=NC/L=Raleigh/O=Example/CN=www.example.com" \
    -keyout tls/tls.key \
    -out tls/tls.crt

This creates a namespace called acm-grc-ansible-example and creates a simple Apache web server deployment using the self-signed certificate generated previously. Note that the secret stores the TLS key in the key tls.crt. This is the default key name that GRC will check.

oc create ns acm-grc-ansible-example
oc -n acm-grc-ansible-example create secret generic certs \
    --from-file=tls.key=tls/tls.key \
    --from-file=tls.crt=tls/tls.crt 
oc -n acm-grc-ansible-example apply -f openshift/app.yml

Ansible Setup

The ansible/playbooks/create_ticket.yml playbook runs locally and creates a temporary Python virtual environment and installs the Python dependencies in it that are required for the servicenow.servicenow.snow_record Ansible module. The playbook then creates a Service Now incident.

  1. Fork this repository.
  2. Create ansible/vaults/secret-vars.yml as a new Ansible vault file with the Ansible variables of snow_host (the FQDN of ServiceNow), snow_password, and snow_username.
  3. Commit and push the changes to your fork.
  4. Configure Ansible Tower to have a job template that utilizes the playbook in ansible/playbooks/create_ticket.yml.

grc-ansible-integration's People

Contributors

jalvarez-rh avatar mprahl 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.