Git Product home page Git Product logo

ip-bound-hmac's Introduction

IP-Bound-HMAC

A Cloudflare Worker that returns a SHA-256 HMAC based on requestor IP address and provided URL path.

In effect this allows a client to make a HTTP GET request and receive a Base64 response which can be used for purposes such as unsealing a local key store.

Public Deployment

This worker is deployed at https://ip-bound-hmac.acegi.com.au. This instance is freely provided on a "best efforts" basis and as such may be removed or stop working at any time. Nevertheless you are welcome to use it if it assists your use case and you are only making a small number of requests. It also lets you quickly test the worker without deploying it yourself (eg use different IP addresses and/or paths and observe the HMAC changes):

Hosting Your Own Deployment

  1. Sign up for a Cloudflare Account and create a zone
  2. Add a DNS A record for ip-bound-hmac.YOUR-DOMAIN to 192.0.2.1
  3. Install Wrangler
  4. Configure with wrangler login
  5. Clone this repository
  6. Copy wrangler.yaml.example to wrangler.yaml and adjust to your domain
  7. Create a secret using wrangler secret put SECRET
  8. Deploy using wrangler publish

Usage

Simply request https://ip-bound-hmac.YOUR-DOMAIN/any-path and you will receive back a SHA-256 HMAC specific to that path, IP address and worker SECRET.

See PiTang for a practical example of how to use this worker to unlock LUKS volumes.

ip-bound-hmac's People

Contributors

benalexau avatar

Watchers

 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.