https://github.com/vmj/upcloud-proxy
Proxy that handles authentication and encryption of UpCloud API traffic
https://github.com/vmj/upcloud-proxy
ambassador container kubernetes sidecar sidecar-container upcloud
Last synced: about 1 month ago
JSON representation
Proxy that handles authentication and encryption of UpCloud API traffic
- Host: GitHub
- URL: https://github.com/vmj/upcloud-proxy
- Owner: vmj
- License: gpl-3.0
- Created: 2018-02-05T20:24:56.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-08-20T09:03:30.000Z (about 5 years ago)
- Last Synced: 2025-08-10T22:48:04.786Z (about 2 months ago)
- Topics: ambassador, container, kubernetes, sidecar, sidecar-container, upcloud
- Language: Go
- Homepage: https://hub.docker.com/r/vmj0/upcloud-proxy/
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
# 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:latestBoth 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/accountThe proxy will add the `Authorization` and `Accept` headers.
Also, if you're sending data, it will add the `Content-Type: application/json` header.