Giter VIP home page Giter VIP logo

clubhouse-bouncer's Introduction

clubhouse-bouncer

A thin logic layer over the Clubhouse API, clubhouse-bouncer acts as a proxy for complex requests.

Deployment

Download and run the docker image from Docker Hub

Environment variables

For required environment variables, see .env.example. The app will panic if these are not present.

Variable Default Description
Required
BOUNCER_CREDENTIALS Comma delimited alphanumeric strings, each of which is a valid Authorization header for API requests. Example: foo,bar,qux allows Authorization: foo requests.
CLUBHOUSE_API_TOKEN Required to make authorised calls to your Clubhouse account. See https://app.clubhouse.io/<your_organisataion_name>/settings/account/api-tokens
Respected
ADDRESS 0.0.0.0 Server binding address
PORT 2686 Server binding port
RUST_LOG Logging output control. A sane choice is bouncer=info

Development

During development, you may wish to set

export RUST_LOG=bouncer=trace

to see logs.

Hot reloading is reccommended via:

cargo install cargo-watch
cargo watch -x run

For tested rust versions, see .travis.yml. Docker image rust version is currently 1.26 (alpine 3.8).

Use

Shell scripts

For integration with the API, copy and use the deployable.sh script. You will need the environment:

  • CLUBHOUSE_BOUNCER_API_KEY=<alphanumeric_secret>
    • set with BOUNCER_CREDENTIALS, see above
  • CLUBHOUSE_BOUNCER_URL=https://<base_hostname>

Then run ./deployable.sh 1234 where 1234 is a valid ticket number (from a story such as ch1234).

HTTP API

An example use of the app might be to test whether a series of tickets are deployable, such as:

curl -X GET localhost:2686/deployable -d '{"story_ids":["9812", "9813", "8810", "8812"]}' -H "Authorization: <api_key>" | jq '.deployable'

clubhouse-bouncer's People

Contributors

tommilligan avatar tommilligan-plutoflume avatar

Watchers

 avatar  avatar  avatar

clubhouse-bouncer's Issues

Credential management

Currently only single static string which must be rotated. Add support for multiple users/file sourcing

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.