Commit Graph
77 Commits
Author SHA1 Message Date
ada23ca04e fix: drop stale Pipfile{,.lock}
We're using now nix for handling dependencies.

Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
Co-authored-by: César Gallego Rodríguez <cesar.gallego.next@bbva.com>
2021-04-05 11:34:03 +02:00
pancho horrillo 7807ccd194 Merge branch 'feature/secure-control-api' 2021-03-12 17:33:28 +01:00
pancho horrilloandRoberto Abdelkader Martínez Pérez 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 horrilloandRoberto Abdelkader Martínez Pérez ab50721f69 test(spec): Control Server API secured via cross-pinning mTLS
. We are now leveraging nix for portable dependency handling.
. There are now three types of tests: client, server and end-to-end.
. server tests exercise the actual kapow server being tested, while the
requests are performed using the test steps.
. client tests exercise the actual kapow client being tested, while the
requests are served using the test steps.
. e2e test exercise the actual kapow program in its dual role of client
and server (¡como tiene que ser!).

Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2021-03-12 17:09:50 +01:00
pancho horrilloandRoberto Abdelkader Martínez Pérez b7b55d2f3b test(poc): Secure Control API using cross-pinning mTLS
Note that we are leveraging nix-shell to provide portable dependency
handling.

Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2021-03-12 17:00:53 +01:00
pancho horrilloandRoberto Abdelkader Martínez Pérez c1ce5add75 doc(legal): reproduce Apache 2 LICENSE verbatim
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2021-01-14 10:21:03 +01:00
pancho horrilloandRoberto Abdelkader Martínez Pérez e6a6f6f683 chore(workflows): build spec test docker image locally
Remove an inherent race condition when using Docker Hub.

Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2021-01-11 18:03:04 +01:00
pancho horrilloandRoberto Abdelkader Martínez Pérez 6821eca6f3 fix: drop black magic that is no longer needed
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2021-01-11 17:59:31 +01:00
pancho horrilloandRoberto Abdelkader Martínez Pérez ec227c2ba3 fix: don't flush status immediately
Closes: #148

Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2021-01-11 17:54:54 +01:00
pancho horrilloandRoberto Abdelkader Martínez Pérez fe9c5281b6 chore(workflows): produce NSIS windows installers (#142)
* chore(workflows): produce NSIS windows installers

Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2020-12-29 16:43:35 +01:00
pancho horrilloandRoberto Abdelkader Martínez Pérez 100b41f482 Merge branch 'feature/exec-pow-files'
Closes: #95 and two stones

Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2020-12-24 14:18:38 +01:00
pancho horrilloandRoberto Abdelkader Martínez Pérez 68a25e68b8 feat: kapow server <initprgs> honors --debug
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2020-12-24 14:16:39 +01:00
pancho horrilloandRoberto Abdelkader Martínez Pérez 26fa12c871 doc: drop mentions to .pow files ($deity REST their soul)
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2020-12-24 14:03:49 +01:00
pancho horrilloandRoberto Abdelkader Martínez Pérez 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 horrilloandRoberto Abdelkader Martínez Pérez 989bf2ed66 doc(examples): mTLS usage
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2020-12-22 13:11:38 +01:00
pancho horrilloandRoberto Abdelkader Martínez Pérez 2ae51b2598 style(tools): drop stale comment
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2020-12-22 12:55:50 +01:00
pancho horrilloandRoberto Abdelkader Martínez Pérez f25b7ee892 feat(tools): add validssclient for mutual tls auth
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2020-12-21 13:00:25 +01:00
pancho horrillo 678a5a217c chore(goreleaser): don't filter feat, filter style 2020-12-19 04:14:51 +01:00
pancho horrilloandRoberto Abdelkader Martínez Pérez 5ffbd83672 chore(goreleaser): fix autochangelog
. don't sort entries
. filter selected semantic commit messages

Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2020-12-18 16:15:26 +01:00
pancho horrilloandRoberto Abdelkader Martínez Pérez 8fe5372ab4 chore(goreleaser): filter certain semantic commits from autochangelog
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2020-12-18 15:45:12 +01:00
pancho horrilloandRoberto Abdelkader Martínez Pérez e792bf9f29 chore: drop GO_VERSION from Docker image tags
If a Kapow! release is rebuilt against a new Go, the Kapow! release
should get a minor release bump.

Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2020-12-18 12:38:01 +01:00
pancho horrilloandRoberto Abdelkader Martínez Pérez 76725555d2 doc: /server/log/<prefix> endpoint
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2020-12-18 12:22:41 +01:00
pancho horrilloandRoberto Abdelkader Martínez Pérez 80abcb727e chore: draft release + allow prereleases with -rc tags
See https://goreleaser.com/customization/release/
for details.

Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2020-12-18 12:01:37 +01:00
pancho horrilloandRoberto Abdelkader Martínez Pérez 929d6bb8ba chore: disable GPG handling for now
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2020-12-18 11:57:14 +01:00
pancho horrilloandRoberto Abdelkader Martínez Pérez 7c4e32a34b feat: add /server/log/{prefix} endpoint
/{prefix} is optional

Sample usage: kapow set /server/log/myapp "$msg"

Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2020-12-18 11:48:25 +01:00
pancho horrilloandRoberto Abdelkader Martínez Pérez ec0fa6d505 chore: add FreeBSD to the list of architectures
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2020-12-17 16:41:46 +01:00
pancho horrilloandRoberto Abdelkader Martínez Pérez 0ba65ef96d chore: drop signatures for now
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2020-12-17 16:41:14 +01:00
pancho horrilloandRoberto Abdelkader Martínez Pérez 4d05223224 feat: Access Logging on the user server
Closes: #98

Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2020-12-17 16:30:55 +01:00
pancho horrilloandRoberto Abdelkader Martínez Pérez 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
pancho horrilloandRoberto Abdelkader Martínez Pérez d62a9dba68 chore: Remove unused code
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2020-12-16 16:41:49 +01:00
pancho horrilloandRoberto Abdelkader Martínez Pérez dbd1a6aa86 Merge branch 'bugfix/issue-138'
Closes: #138

Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2020-12-15 19:02:25 +01:00
pancho horrilloandRoberto Abdelkader Martínez Pérez 4546fc65b6 fix: honor global flag --debug
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2020-12-15 18:59:29 +01:00
pancho horrilloandRoberto Abdelkader Martínez Pérez 58fae53e2e test: logStream() behaves correctly like a good kiddo
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2020-12-15 18:37:44 +01:00
pancho horrilloandRoberto Abdelkader Martínez Pérez 6ec9b54670 fix: add missing spawner reset code to test
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2020-12-15 18:37:44 +01:00
pancho horrillo 847c1bd7a0 chore(actions): bump golangci-lint-action
To work around the deprection of `set-env`
2020-11-18 19:31:48 +01:00
pancho horrillo faea65688d chore(gomod): bump spf13/cobra to v1.0.0
Minor changes since v0.0.7.  Seems simple formalization that the
interface is now stable.

See https://github.com/spf13/cobra/releases/tag/v1.0.0
2020-10-02 14:32:37 +02:00
pancho horrillo 19b6df4742 chore(gomod): run go mod tidy 2020-10-02 14:30:38 +02:00
pancho horrillo abac3ee772 chore(dependabot): ping dependabot 2020-10-02 14:12:25 +02:00
pancho horrillo 0dc0b741ff Merge pull request #126 from BBVA/dependabot/github_actions/golangci/golangci-lint-action-v2.2.0
chore(deps): bump golangci/golangci-lint-action from v1 to v2.2.0
2020-10-02 13:52:14 +02:00
pancho horrilloandRoberto Abdelkader Martínez Pérez aa86efdcc5 chore(workflows): fix golangci version
The patch version should not be specified, only minor.

Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2020-10-02 13:47:32 +02:00
pancho horrilloandRoberto Abdelkader Martínez Pérez f67e7c1938 Bump golangci-lint to v1.31.0
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2020-10-02 13:44:15 +02:00
pancho horrillo 630006f49f chore: remove obsolete workflow 'Bump Go'
Superseded by dependabot
2020-10-01 18:01:51 +02:00
pancho horrillo f0758bb9f4 chore: obtain Go version from ad-hoc Dockerfile 2020-10-01 17:55:33 +02:00
pancho horrillo d9c840f70f chore: enable dependabot
. Check GitHub Actions, Go modules and Docker
2020-10-01 17:44:35 +02:00
pancho horrillo 1f5ea34a44 chore(workflows): fix YAML syntax error 2020-10-01 17:34:41 +02:00
pancho horrillo 1666c093c2 chore: tweak automatic PR for Go Bump 2020-10-01 17:31:47 +02:00
pancho horrillo 7cb0e72302 chore: use ubuntu-20.04 in release workflow
Consistent with the other workflows defined here.
2020-09-30 16:45:39 +02:00
pancho horrillo 66f68e0219 style: don't pollute the env with secrets
Also, it's a bit less boilerplate code.

Seen here¹:

¹: https://github.com/dependabot/dependabot-core/blob/v0.120.3/.github/workflows/docker.yml#L27-L29
2020-09-30 16:34:25 +02:00
pancho horrillo 4e1084c092 style: don't pollute env, use step outputs instead (go version) 2020-09-30 11:44:30 +02:00
pancho horrillo f12cce1884 chore: update bump-go workflow
. Fix path to repo for 'Bump Go' action
. Use and update the same PR until accepted, to reduce noise
2020-09-30 08:02:29 +02:00
pancho horrilloandHéctor Hurtado 94f1e7e6ea chore: leverage panchoh/go-bump action
Co-authored-by: Héctor Hurtado <hector.hurtado@bbva.com>
2020-06-26 13:30:17 +02:00
pancho horrillo 2e5e11cc47 doc: fix typo 2020-06-16 11:23:47 +02:00
pancho horrillo edeafdd881 doc: fix reference 2020-06-12 13:20:44 +02:00
pancho horrillo c04f89bdc5 doc: drop spurious underscore 2020-06-12 13:15:00 +02:00
pancho horrillo 9da4b4b91d doc: fix dangling link
Fixes #111
2020-06-12 13:06:14 +02:00
pancho horrilloandHéctor Hurtado 307e348b62 chore: update test badge
No longer using CircleCI for this, but GitHub Actions.

Co-authored-by: Héctor Hurtado <hector.hurtado@bbva.com>
2020-06-12 12:48:06 +02:00
pancho horrilloandHéctor Hurtado b44c3b4658 chore: fix path to action in workflow
Co-authored-by: Héctor Hurtado <hector.hurtado@bbva.com>
2020-06-12 10:11:02 +02:00
pancho horrilloandHéctor Hurtado b91a5ac998 chore: add missing actions/checkout to workflow
Co-authored-by: Héctor Hurtado <hector.hurtado@bbva.com>
2020-06-12 10:09:51 +02:00
pancho horrilloandHéctor Hurtado 598856b9ca chore: try to fix lint run
Co-authored-by: Héctor Hurtado <hector.hurtado@bbva.com>
2020-06-12 10:06:39 +02:00
pancho horrilloandHéctor Hurtado 17e473ab45 chore: try to fix lint run
Co-authored-by: Héctor Hurtado <hector.hurtado@bbva.com>
2020-06-12 10:02:59 +02:00
pancho horrilloandHéctor Hurtado 2b56e0ea27 chore: add GitHub Actions "Test" workflow
Co-authored-by: Héctor Hurtado <hector.hurtado@bbva.com>
2020-06-12 09:40:16 +02:00
pancho horrillo a311da0d87 doc: drop shebang lines in .pow files
For now, Kapow! treats .pow files as shell scripts, not executables.
See https://github.com/BBVA/kapow/issues/62
2020-06-11 20:04:11 +02:00
pancho horrillo 77b358e3c8 doc: style fixes 2020-06-11 19:48:47 +02:00
pancho horrillo 09b6d54487 doc: wording and style fixes 2020-06-11 19:45:57 +02:00
pancho horrillo 87ec20519a fix: typo in docs 2020-06-11 19:14:32 +02:00
pancho horrillo 8160a1b893 fix: typo in docs 2020-06-11 19:10:04 +02:00
pancho horrilloandHéctor Hurtado d877ab1e38 fix: unify definition of GO_VERSION in workflow
Co-authored-by: Héctor Hurtado <hector.hurtado@bbva.com>
2020-06-09 16:56:37 +02:00
pancho horrilloandHéctor Hurtado 8d72cc1b71 chore: replace azure action with inline code (docker login)
Co-authored-by: Héctor Hurtado <hector.hurtado@bbva.com>
2020-06-05 12:46:07 +02:00
pancho horrilloandHéctor Hurtado 5f5d867c24 chore: handle gpg manually
Co-authored-by: Héctor Hurtado <hector.hurtado@bbva.com>
2020-06-05 12:35:00 +02:00
pancho horrilloandHéctor Hurtado 4f9ad6f69f chore: prepare release v0.5.4
Co-authored-by: Héctor Hurtado <hector.hurtado@bbva.com>
2020-06-05 11:33:54 +02:00
pancho horrilloandHéctor Hurtado 797b85b228 chore: use external gpg handling action
Co-authored-by: Héctor Hurtado <hector.hurtado@bbva.com>
2020-06-05 11:10:34 +02:00
pancho horrilloandRoberto Abdelkader Martínez Pérez ddeb119522 chore: update name of secrets
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
2020-05-26 10:58:28 +02:00
pancho horrillo dca957bd14 chore: bump go version 2020-05-19 12:15:09 +02:00
pancho horrillo 87aec0196e chore: prepare release v0.5.3 2020-05-19 12:04:14 +02:00
pancho horrilloandCésar Gallego Rodríguez b362d04167 chore: prepare release v0.5.2
Co-authored-by: César Gallego Rodríguez <gallego.cesar@gmail.com>
2020-05-11 17:26:44 +02:00
pancho horrilloandCésar Gallego Rodríguez 975aea88ae fix: prevent spurious stack trace with misbehaving clients
See https://github.com/golang/go/commit/9997545a8626bf1a73002f44a7b7538988da4e76
and the previous commit.

Co-authored-by: César Gallego Rodríguez <gallego.cesar@gmail.com>
2020-05-11 15:57:25 +02:00
pancho horrilloandCésar Gallego Rodríguez 13adcc37b6 fix: panic sentinel value if http client misbehaves
When an http client does not consume the whole body, we panic'ed a
custom message instead of the required sentinel value.

For the details, check ¹ and look for ErrAbortHandler.

¹: https://pkg.go.dev/net/http

Co-authored-by: César Gallego Rodríguez <gallego.cesar@gmail.com>
2020-05-11 13:59:09 +02:00