beeping
beeping copied to clipboard
Server auth
** BASED ON THE BRANCH "removing-gin" ** ** MERGE FIRST "removing-gin" **
- Add a HTTP Basic Auth (digest) mecanism to secure the BeePing server.
- Update the readme file.
TODO: Update the dependencies lock (don't know how to do, sorry...)
dep ensure to update your Gopkg
Dependencies lock updated.
Thanks Brice!
Here some examples for testing this PR.

$ ./beeping -listen "[2002:c000:203::1]" -auth "admin:0821726485a84fcb0d4c90fecf5d40b6"
$ curl -6 '[2002:c000:203::1]:8080/check' -d '{"url": "http://www.nyan.cat/"}' -u "admin:passw0rd" --digest
But digest is a bit complicated if you don't really know how to set correctly Realm or DigestDomain.
This is why I generally implement BasicAuth because it's easier to setup and with a strong password + HTTPS there is no security problem (maybe @insp3ctre can argue on this point).
Also, there is no need for external dependencies, look at this function: https://github.com/yanc0/greedee/blob/master/http.go#L16-L32
Digest is OK for me but I think we have to document (README) how to activate BeePing Auth more precisely with command line only (MacOS and GNU/Linux)?
What do you think guys?
Cheers ! Yann
I thought we can add the -auth-method argument. By default it could be "basic", and we could have "digest".
Seems OK for me.
Just made some changes. Please do not merge until I add at least md5 digest mechanism :)