Skip to content
This repository was archived by the owner on Apr 11, 2021. It is now read-only.

Server auth#25

Open
bcolucci wants to merge 8 commits intoyanc0:masterfrom
bcolucci:server-auth
Open

Server auth#25
bcolucci wants to merge 8 commits intoyanc0:masterfrom
bcolucci:server-auth

Conversation

@bcolucci
Copy link
Contributor

@bcolucci bcolucci commented Jul 8, 2017

** 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...)

@yanc0
Copy link
Owner

yanc0 commented Jul 10, 2017

dep ensure to update your Gopkg

@bcolucci
Copy link
Contributor Author

Dependencies lock updated.

@yanc0
Copy link
Owner

yanc0 commented Jul 10, 2017

Thanks Brice!

Here some examples for testing this PR.

digest-test
digest2

$ ./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

@bcolucci
Copy link
Contributor Author

I thought we can add the -auth-method argument. By default it could be "basic", and we could have "digest".

@yanc0
Copy link
Owner

yanc0 commented Jul 10, 2017

Seems OK for me.

- The default digest method is now 'clear' (no hashing)
- Remove the go-http-auth dependency
@bcolucci
Copy link
Contributor Author

Just made some changes. Please do not merge until I add at least md5 digest mechanism :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants