Commit Graph
684 Commits
Author SHA1 Message Date
Héctor Hurtadoandpancho horrillo 0021f754fd Changed get resource item and handler ID not found scenarios.
This change is to comply with Go's implementation.

Co-authored-by: pancho horrillo <pedrofelipe.horrillo.@bbva.com>
2019-10-29 15:50:43 +01:00
pancho horrilloandHéctor Hurtado 712d26db89 Tweak Circle CI config not to run skipped tests
Co-authored-by: Héctor Hurtado <hector.hurtado@bbva.com>
2019-10-29 15:18:58 +01:00
pancho horrillo 3dd038e0aa Revert nmap examples, they need more work
Closes: #65
2019-10-28 16:46:02 +01:00
Héctor Hurtado fb50e24836 CLOSES: #71 2019-10-28 11:42:52 +01:00
pancho horrillo 00770650a8 Rename nmap example to nmap-web
* Drop unused CSS section
2019-10-25 19:21:04 +02:00
pancho horrillo c29a17d7e4 Fix handling of arguments
Closes: #67
2019-10-25 18:54:52 +02:00
Héctor Hurtado 9cb9e9335d Closes: #68 2019-10-25 11:50:14 +02:00
Héctor Hurtado d9e072f89a Removed references to reason phrase from spec. Closes #66 2019-10-25 10:15:21 +02:00
Héctor Hurtado c3be29255a Closes: #66 2019-10-25 09:52:12 +02:00
Héctor Hurtado 26a7b690b7 Verify content type on getRoute method 2019-10-25 09:02:36 +02:00
pancho horrillo 56876335b7 Add yet another Nmap example, ideal to be consumed by browser
I intend to replace the nmap-streaming.pow example with this one.
I've realized that nmap-streaming.pow is not actually a streaming example,
since Nmap won't write its output(s) until scan is finished, and hence, kapow
will serve them in one shot.

Check it out, @nilp0inter, @cr0hn.
2019-10-25 08:14:38 +02:00
Héctor Hurtado a54c6f24a1 Added getRoute to control api 2019-10-24 17:52:03 +02:00
pancho horrillo 2fc18b76e3 poc/examples/nmap-{streaming,callback}.pow: minor cleanup
* Update comments.
* Add Content-Type: text/xml header (nmap-streaming.pow) only.
* Wrap the Nmap output in XML comment delimiters, *after* the XML header.
* Write to /response/body (preferred) instead of /response/stream (legacy).
* Use suffix .xml for temp files.
* Move possibly noise-generating calls outside of the block
  that is sent to the /request/body.
2019-10-24 17:05:54 +02:00
pancho horrilloandCésar Gallego Rodríguez 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
pancho horrillo d2c3138036 Give nmap examples some lovin'.
* Add legal headers.
* Add default values for params and forms.
* Cleanup code a bit.
* Wrap nmap output in XML comments; not legal, but perhaps better than the alternative.
2019-10-24 07:27:20 +02:00
cr0hn 73308cebeb Add - 2 new examples using nmap (#61)
add - two examples using nmap
2019-10-23 18:56:01 +02:00
pancho horrillo 52ae3375a4 Drop stale TODO comment
Close #42
2019-10-23 18:52:20 +02:00
pancho horrillo ae3bd76434 Leverage ioutil.ReadAll() and ioutil.ReadFile() to simplify logic
Related to: #46
2019-10-23 18:01:58 +02:00
pancho horrillo 7674725658 Drop TODO line of solved issue
Related to #46
2019-10-23 17:59:37 +02:00
Héctor Hurtado f4b9a96a06 Added note to spec to state cookie name case sensitivity: FIXES: #43 2019-10-23 16:40:04 +02:00
Héctor Hurtado 90449773e4 Added legal header to all features and step definitions files 2019-10-23 13:45:54 +02:00
Héctor Hurtado 723e4787b3 Added legal header to all Go source files 2019-10-23 13:35:01 +02:00
César Gallego Rodríguez aa6d59fa56 Fix for - and file adding a route. Move null routes to their own issue.
Closes: #46
2019-10-23 13:20:31 +02:00
pancho horrilloandRoberto Abdelkader Martínez Pérez 034a5ab677 Fix typo in comment
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2019-10-22 16:29:54 +02:00
Roberto Abdelkader Martínez PérezandHector Hurtado be6a2efcc4 Wait less time between retries
Co-authored-by: Hector Hurtado <hector.hurtado@bbva.com>
2019-10-22 13:23:49 +02:00
Roberto Abdelkader Martínez PérezandHector Hurtado d465d10b49 Add missing pattern in data server resource endpoints
Co-authored-by: Hector Hurtado <hector.hurtado@bbva.com>
2019-10-22 13:16:06 +02:00
Roberto Abdelkader Martínez Pérez fe894628d7 Change Data API bind address for spec tests 2019-10-22 12:40:00 +02:00
Roberto Abdelkader Martínez Pérez 0762728ef5 Remove unused dependency 2019-10-22 12:24:10 +02:00
Roberto Abdelkader Martínez Pérezandpancho horrillo 28a0be1d87 Allow kapow server to run without .pow file and non-interactive
Co-authored-by: pancho horrillo <pedrofelipe.horrillo@bbva.com>
2019-10-22 11:56:18 +02:00
Roberto Abdelkader Martínez PérezandHector Hurtado fa394ce997 Call server.StartServer() from cmd
Co-authored-by: Hector Hurtado <hector.hurtado@bbva.com>
2019-10-22 10:23:12 +02:00
Roberto Abdelkader Martínez PérezandHector Hurtado 44a9471a57 Implement server.StartServer() to run all three servers
Co-authored-by: Hector Hurtado <hector.hurtado@bbva.com>
2019-10-22 10:22:47 +02:00
Roberto Abdelkader Martínez PérezandHector Hurtado 8994b8da8c Implement Run function for data server.
Co-authored-by: Hector Hurtado <hector.hurtado@bbva.com>
2019-10-22 10:22:10 +02:00
Roberto Abdelkader Martínez PérezandHector Hurtado 6a05b31320 Implement configRouter
Co-authored-by: Hector Hurtado <hector.hurtado@bbva.com>
2019-10-22 09:48:58 +02:00
Roberto Abdelkader Martínez PérezandHector Hurtado 5eae018ee6 Data server decorators implementation.
Co-authored-by: Hector Hurtado <hector.hurtado@bbva.com>
2019-10-21 17:54:47 +02:00
Roberto Abdelkader Martínez PérezandHector Hurtado 63cd125327 Implement setResponseBody
Co-authored-by: Hector Hurtado <hector.hurtado@bbva.com>
2019-10-21 10:25:34 +02:00
Roberto Abdelkader Martínez PérezandHector Hurtado 0f8d0266b9 Implement setResponseCookies.
Co-authored-by: Hector Hurtado <hector.hurtado@bbva.com>
2019-10-21 10:01:34 +02:00
Roberto Abdelkader Martínez PérezandHector Hurtado ffc737d1b7 Pending test for header validation.
Co-authored-by: Hector Hurtado <hector.hurtado@bbva.com>
2019-10-21 09:26:56 +02:00
pancho horrillo 5bbc341e10 Update internal/cmd/server.go
- Honour --bind, --control-bind, --data-bind
- Drop unused params (--interactive, --url, --control-url, --data-url)
- Minimize environment for running the powfile shell script
- Drop debug code

TODO: actual key and cert handling for https
2019-10-20 18:39:50 +02:00
pancho horrillo 341768ace8 internal/cmd/server.go: sort imports 2019-10-20 18:38:29 +02:00
pancho horrillo bb5843ec35 Fix lowercase ID in human-readable messages 2019-10-20 18:32:46 +02:00
pancho horrillo d31165c82f Drop trailing slash in URL to query routes
This one slipped through the tests, I think because the automagic handling of
trailing slashes by the net/http muxer.

With it, the command:

    $ kapow route list

fails with a 'Not Found'.
2019-10-20 18:20:46 +02:00
Roberto Abdelkader Martínez Pérez 5e2a15b34e Relax lint error about SA1008 because is actually needed in tests 2019-10-18 23:57:12 +02:00
Roberto Abdelkader Martínez Pérez 304276db47 Fix dummy return. Closes #34 2019-10-18 23:55:25 +02:00
Roberto Abdelkader Martínez PérezandHector Hurtado ecfa3dfa74 WIP implementation of setResponseHeaders
Co-authored-by: Hector Hurtado <hector.hurtado@bbva.com>
2019-10-18 14:11:56 +02:00
Roberto Abdelkader Martínez PérezandHector Hurtado 03e138396d Fix mispelled handler name.
Co-authored-by: Hector Hurtado <hector.hurtado@bbva.com>
2019-10-18 13:15:08 +02:00
Roberto Abdelkader Martínez PérezandHector Hurtado bf791a36c6 Implement setResponseStatus.
Co-authored-by: Hector Hurtado <hector.hurtado@bbva.com>
2019-10-18 13:07:57 +02:00
Roberto Abdelkader Martínez PérezandHector Hurtado e161e14fd6 Implement getRequestFiles.
Co-authored-by: Hector Hurtado <hector.hurtado@bbva.com>
2019-10-18 10:06:26 +02:00
Roberto Abdelkader Martínez PérezandHector Hurtado d2427b722c Implement getRequestFileName
Co-authored-by: Hector Hurtado <hector.hurtado@bbva.com>
2019-10-18 09:22:58 +02:00
Héctor Hurtado 06c1c49d8e First test for files feature 2019-10-18 08:35:33 +02:00