Git Product home page Git Product logo

cf_worker_staging_auth's Introduction

Cloudflare worker staging auth

This repo is designed as an example of how to protect a staging environment in a zero trust environment using cloudflare workers.

Why?

Why would you want to do this? Why isn't normal authentication enough?

There are parts of a web presence that need to be public in production environments. Think brochure pages, announcement pages and even the home page of your website. These are important parts of your web presence and it's important that you are able to develop new features in private and only show them to the correct people. Historically this has been done using allow lists of IP addresses. This works OK but requires that the lists are maintained. Over time they grow and it means that any traffic coming from an IP address on the allow list is able to access your protected sites.

What this repo does is protect https://stage.saladsimulator.com using Auth0 authentication. It doesn't matter what IP address a request is coming from the user must have a cookie present on the request. This cookie can only be obtained by logging in with Auth0. This means it doesn't matter where you are coming from you have to be able to prove who you are before you are able to access the staging environment.

Deploying

This is deployed via Github Actions on push to the main branch.

cf_worker_staging_auth's People

Contributors

kleeut avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

robinminto

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.