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
e72c65c859
feat: os-dependent default entrypoint
...
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com >
2020-12-24 14:03:49 +01:00
pancho horrillo
41be4f9344
refactor: use a common logger for consistency
...
All kapow messages will end up in stderr (incl. debug mode).
stdout is reserved for the access logs.
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com >
2020-12-16 17:29:26 +01:00
Héctor Hurtado
e1788b2874
Default handlers for NotFound and MethodNotAllowed returning json reason added to control y data servers
2020-04-07 12:22:15 +02:00
Héctor Hurtado
e6e25f25c7
Fix #102
2020-04-06 18:02:29 +02:00
pancho horrillo
206aac5747
Rename package srverrors to httperror
...
- Package names are preferred to be in singular form¹.
- Since errors are just for HTTP and not generic, I changed the base name to
'http'.
- I didn't name it simply 'error', because it would then conflict with the
- standard 'error' interface.
¹: https://rakyll.org/style-packages/
2019-11-20 07:54:45 +01:00
pancho horrillo
0d66fe9963
Rename WriteErrorResponse() to simply ErrorJSON() and reorder arguments
...
This way we better mimic net/http.Error()
https://pkg.go.dev/net/http?tab=doc#Error
2019-11-20 07:37:35 +01:00
pancho horrillo
83e4523dc7
Simplify files via gofmt -s (thanks, Go Report Card!)
2019-11-19 14:14:55 +01:00
Héctor Hurtado
7bca5b8577
New error handling added to module resource in package data. Minor coding improvements.
2019-11-18 19:09:55 +01:00
Héctor Hurtado
edff842c3b
New srverrors package added. New error handling added to control package
2019-11-18 14:32:54 +01:00
pancho horrillo
402bbf00d7
Fix style in comment
2019-11-15 21:00:21 +01:00
Héctor Hurtado
ec788f68c2
Added documentation comments to the control package
2019-11-14 12:10:00 +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
26a7b690b7
Verify content type on getRoute method
2019-10-25 09:02:36 +02:00
Héctor Hurtado
a54c6f24a1
Added getRoute to control api
2019-10-24 17:52:03 +02:00
pancho horrillo
b0c16ca684
Validate url_pattern format in control API append operation
...
Closes : #38
Co-authored-by: César Gallego Rodríguez <cesar.gallego.next@bbva.com >
2019-10-24 14:10:58 +02:00
Héctor Hurtado
84a71815e4
FIXES : #44
2019-10-24 10:44:57 +02:00
Héctor Hurtado
723e4787b3
Added legal header to all Go source files
2019-10-23 13:35:01 +02:00
Héctor Hurtado
a3a9158cfe
Configure funcRemove in control server
2019-10-14 16:03:41 +02:00
César Gallego Rodríguez
b82b0d2ef1
validation of routes
2019-10-10 09:44:41 +02:00
Héctor Hurtado
007923de8a
Added test for checking router configuration in control api
2019-10-09 17:27:17 +02:00
Héctor Hurtado
f85660c97b
TestAddRouteReturns422ErrorWhenMandatoryFieldsMissing refactor
2019-10-09 16:30:52 +02:00
César Gallego Rodríguez
ecc54a51f6
fix style
2019-10-09 16:27:26 +02:00
César Gallego Rodríguez
2c14e05229
fix test comparsion
2019-10-09 16:26:22 +02:00
César Gallego Rodríguez
b7a7f6a006
some list implemented
2019-10-09 16:19:52 +02:00
Héctor Hurtado
2e2fcc4edd
Skip WIP in listRoutes tests
2019-10-09 15:50:14 +02:00
Héctor Hurtado
876e4da43a
Fixed tests for listRoutes and removeRoute
2019-10-09 15:46:49 +02:00
César Gallego Rodríguez
6e387eab37
new WIP Tests about mandatory fields
2019-10-09 14:26:44 +02:00
César Gallego Rodríguez
12579c7ac3
fixme about routes added
2019-10-09 14:19:58 +02:00
César Gallego Rodríguez
046d8ffe7d
linter fixes
2019-10-09 14:18:54 +02:00
César Gallego Rodríguez
f60c8a2423
control delete route no content on sucess
2019-10-09 14:10:18 +02:00
César Gallego Rodríguez
7c95726a8c
442 when missing mandatory fields (WIP)
2019-10-09 13:51:34 +02:00
Héctor Hurtado
7d1f0bf97c
Added content type check in responses for control api tests
2019-10-09 13:04:11 +02:00
Héctor Hurtado
9b5e39ee9c
Added test fot removeRoute and listRoutes in control api
2019-10-09 12:02:43 +02:00
Héctor Hurtado
b794af01e0
Coorected control api test function names
2019-10-09 12:00:47 +02:00
César Gallego Rodríguez
0249dc722b
Merge branch 'master' of personal.github.com:BBVA/kapow
2019-10-09 10:27:46 +02:00
César Gallego Rodríguez
4ca5ef0d54
When marformed route then bad request implementation
2019-10-09 10:27:38 +02:00
Héctor Hurtado
95aea4bce1
Replaced calls to Snapshot by List when accessing Routes state package
2019-10-09 10:22:43 +02:00
Héctor Hurtado
4164f3e3de
Added control api validation test for addRoute
2019-10-09 09:39:36 +02:00
Héctor Hurtado
6df4369358
Added test for checking Index
2019-10-08 16:18:51 +02:00
pancho horrillo
9ad61249b3
Fix linter warning
...
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com >
Co-authored-by: Héctor Hurtado <hector.hurtado@bbva.com >
2019-10-08 15:33:32 +02:00
Héctor Hurtado
198584f517
First green in control server
2019-10-08 15:14:50 +02:00
Héctor Hurtado
3fa2357f71
First failing test in control package
2019-10-08 12:35:05 +02:00
Héctor Hurtado
fe7d962581
Reworking in module definition
2019-10-08 12:02:46 +02:00
Héctor Hurtado
e32116abad
Rewrite
2019-10-08 09:20:58 +02:00
Héctor Hurtado
56db1ce2ac
Moved to internal
2019-10-08 08:54:07 +02:00