-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
The server currently uses a custom HMAC implementation for request authentication. It's a pretty naive method that isn't any better than just sending the password in plaintext since the same HMAC/RequestID pair will always authenticate. Furthermore because it's a custom method it makes it harder to use existing tools to test the API. If we made the HMAC method more secure (such as including a current timestamp, the request path, and request body in the hash basis) it would just make tooling that much more difficult. Really the solution is the server needs to be behind TLS and then we can fall back to the much easier HTTP Basic Auth.
For this issue i think this is sufficient
- Delete the
HMACandCheckMACfuncs fromutil.goand theTestHMACfunc fromutil_test.go - Change funcs
signRequestandrequestIsSignedto set and get the basic auth headers on the request. - Change
cmd/magopie/test_helpers_test.gofuncmustNewRequestto set an auth user/pass. Replace thevar testKeywith something appropriately magpie themed. - Change
mwAuthenticationCheckincmd/magopie/main.go
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels