Coder Social home page Coder Social logo

vmj / upcloud-proxy Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 22 KB

Proxy that handles authentication and encryption of UpCloud API traffic

Home Page: https://hub.docker.com/r/vmj0/upcloud-proxy/

License: GNU General Public License v3.0

Go 92.98% Dockerfile 7.02%
upcloud ambassador sidecar container sidecar-container kubernetes

upcloud-proxy's Introduction

UpCloud proxy

Proxy that handles authentication and encryption of UpCloud API traffic.

In other words, this proxy allows clients to use plain HTTP without HTTP Basic authentication, and still the traffic from the proxy to the API is encrypted and authenticated. Think of kubectl proxy.

Main use case is to deploy this as an ambassador container in a Kubernetes Pod.

Usage

Run this proxy from command line:

$ upcloud-proxy -username foo -password bar -addr localhost:8080 &

or, alternatively, using Docker:

$ docker run -p 8080:8080 \
  -e UPCLOUD_API_USERNAME=foo \
  -e UPCLOUD_API_PASSWORD=bar \
  vmj0/upcloud-proxy:latest

Both of those would allow you to run

$ curl http://localhost:8080/1.2/account

and expect to get the UpCloud account info associated with 'foo' username.

Without the proxy, the same request would have to be

$ curl -H "Authorization: Basic $(echo foo:bar |base64)" \
  -H "Accept: application/json; charset=UTF-8" \
  https://api.upcloud.com/1.2/account

The proxy will add the Authorization and Accept headers. Also, if you’re sending data, it will add the Content-Type: application/json header.

upcloud-proxy's People

Contributors

vmj avatar

Watchers

 avatar  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.