Git Product home page Git Product logo

fsly-ngwaf-demo's Introduction

what is this

  • short term: a place for me to learn and rough out minimal examples of fastly products with terraform
  • medium term: a foundation on which to build live product demonstrations
  • long term: a resource for managing bespoke partner demonstration environments

what does it do

  • deploys a javascript compute@edge application that uses geoip data, a secret-store, and makes an api call
  • creates a virtual machine on google cloud, installs magento and the fastly magento plugin
  • creates a fastly service with edge rate-limiting, image-optimizaiton and bigquery logging to sit in front of it
  • attaches an ngwaf@edge deployment to the service
  • spools up some attack tooling to generate traffic and graph data

diagrams

edgeapp

flowchart LR
  site[site-name.edgecompute.app] --> xqd[compute service]
  xqd --> secretstore
  xqd --> fastlyapi
Loading

website

flowchart LR
  puppeteer --> site[site-name.freetls.fastly.net]
  randomhack --> site
  site --> varnish[varnish service]
  varnish --> ngwaf
  ngwaf --> origin[origin vm]
  varnish --> bq[bigquery logs]
Loading

pre-reqs

  • a fastly account with the following feature flags enabled
    • security_ui
    • secret_store
    • io_entitlement
    • rate_limiting with hctl commands
    • also, you must navigate to the compute tab in the fastly web interface and enable your compute trial, if you haven't already, by deploying any compute service
  • a sigsci account (corp)
  • a GCP account with access to the SE development project

howto

first time setup

chose one of the following three options for where to run this from

option 1 - a github codespace

  • click the green "Code" button at the top of the github repo
  • click the Codespaces tab within the modal
  • click the green "Create codespace..." button
  • watch and wait for it to setup (takes ~5m)

option 2 - locally using vscode with a devcontainer

  • install the devcontainer extension in vscode
  • open this folder in the devcontainer
  • wait for it (takes ~5m)
  • open another terminal to work in

option 3 - install dependencies on an M1/M2 mac with homebrew

click here

configure authentication(s)

  • create a fastly api token for your user (creating api tokens)
  • configure the fastly cli with it
    fastly profile create
  • configure the google terraform provider's access
    gcloud auth application-default login
  • click on the file named terraform.tfvars in the left menu and populate its values

test loop

  • terraform apply
  • click the links
  • terraform destroy

cleanup (if using codespaces)

  • in the same github web modal that you created the codespace you will now see it listed with a random name
  • click the "..." next to it
  • click Delete

fsly-ngwaf-demo's People

Contributors

jbartus avatar chrisbuckley avatar alokbiyengar 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.