9 Commits

Author SHA1 Message Date
pancho horrillo
1e63f3c104 feat: Control API uses automatic cross-pinning mTLS (Closes #119)
. kapow server generates on startup a pair of certificates
that will use to secure communications to its control server.
It will communicate the server and client certificates as well
as the client private key to the init programs it launches,
via environment variables.

. kapow server now understands a new flag --control-reachable-addr
which accepts either a IP address or a DNS name, that can be used
to ensure that the generated server certificate will be appropiate
in case the control server must be accessed from something other
than localhost.

Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2021-03-12 17:24:17 +01:00
pancho horrillo
81c677c3be internal/http/request.go: replace GetReason() with GetReasonFromBody()
Update tests to inject the required JSON error body with reason.
2019-11-19 21:17:49 +01:00
pancho horrillo
2d5743af84 Add blank line between legal header and package declaration
Otherwise, the legal header is rendered as package documentation.
2019-11-13 18:18:44 +01:00
Héctor Hurtado
723e4787b3 Added legal header to all Go source files 2019-10-23 13:35:01 +02:00
Roberto Abdelkader Martínez Pérez
7e54c26cb8 Don't test for false boolean value 2019-10-07 07:34:57 +02:00
Roberto Abdelkader Martínez Pérez
17020ad134 Some tests for Get/Post/Put/Delete utility functions 2019-10-07 07:33:35 +02:00
Roberto Abdelkader Martínez Pérez
9f7fc8ce62 Allow user specify Content-Type header 2019-10-03 20:55:11 +02:00
Roberto Abdelkader Martínez Pérez
b1c2db057c Shorthand functions request with common HTTP methods 2019-10-03 15:06:26 +02:00
Roberto Abdelkader Martínez Pérez
681ee3cba8 http becomes an internal package 2019-10-03 14:12:14 +02:00