You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
4 months ago | |
---|---|---|
assets | 4 months ago | |
proxy | 4 months ago | |
.gitignore | 4 months ago | |
.goreleaser.yml | 4 months ago | |
Dockerfile | 4 months ago | |
LICENSE | 4 months ago | |
README.md | 4 months ago | |
authn.yaml | 4 months ago | |
go.mod | 4 months ago | |
go.sum | 4 months ago | |
main.go | 4 months ago |
README.md
Basic Auth Reverse Proxy
This project offers a way to securize your backends with a basic golang reverse proxy with basic auth configuration.
TLDR;
Expose your services with basic authentication.
$ wget -O basic-auth-reverse-proxy.tar.gz -q https://github.com/angelbarrera92/basic-auth-reverse-proxy/releases/download/v0.1.2/basic-auth-reverse-proxy_0.1.2_linux_amd64.tar.gz
$ tar -zxvf basic-auth-reverse-proxy.tar.gz
README.md
basic-auth-reverse-proxy
$ cat >> authn.yaml <<EOL
users:
- username: Angel
password: Barrera
EOL
$ ./basic-auth-reverse-proxy serve
Then a local server is started. Try to access it:
$ curl http://localhost:11811/get
Unauthorised
$ curl http://Angel:Barrera@localhost:11811/get
{
"args": {},
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip",
"Authorization": "Basic QW5nZWw6QmFycmVyYQ==",
"Host": "httpbin.org",
"User-Agent": "curl/7.58.0",
"X-Forwarded-Host": "localhost:11811"
},
"origin": "127.0.0.1, 80.25.227.133, 127.0.0.1",
"url": "https://localhost:11811/get"
}