dependabot[bot]
ae85d0ed2b
build(deps): bump clap from 4.5.15 to 4.5.16
...
Bumps [clap](https://github.com/clap-rs/clap ) from 4.5.15 to 4.5.16.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.15...clap_complete-v4.5.16 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-08-16 17:28:51 +02:00
Karolin Varner
163f66f20e
Merge – API Feature: Adding listen sockets
...
Merge pull request #395 from rosenpass/dev/karo/api-add-listen-socket
2024-08-16 17:16:44 +02:00
Paul Spooren
3caff91515
rosenpass: fallback for empty api section in config
...
The [api] section is newly added and causes existing installation to
break since they lack the configuration options. Instead, use a serde
default function.
Signed-off-by: Paul Spooren <mail@aparcar.org >
Co-authored-by: Karolin Varner <karo@cupdev.net >
2024-08-16 14:37:42 +02:00
Karolin Varner
24eebe29a1
feat(API): AddListenSocket endpoint
2024-08-16 14:37:42 +02:00
Karolin Varner
1d2fa7d038
feat(api): API Feature – Add server keys via API
...
Merge pull request #392 from rosenpass/dev/karo/api-supply-server-keys
2024-08-16 11:22:46 +02:00
Karolin Varner
edf1e774c1
feat(API): SupplyKeypair endpoint
2024-08-16 11:13:34 +02:00
Karolin Varner
7a31b57227
chore(API): Infrastructure to use endpoints with fd. passing
2024-08-16 08:39:27 +02:00
Karolin Varner
d5a8c85abe
chore(API): Specifying a keypair should be opt. at startup
...
…so we can specify it later using the API.
2024-08-16 08:34:07 +02:00
Karolin Varner
48f7ff93e3
chore(API, AppServer): Deal with CryptoServer being uninit.
...
Before this, we would just raise an error.
2024-08-16 08:34:07 +02:00
Karolin Varner
5f6c36e773
chore(AppServer): Decouple AppServer from CryptoServer::timebase
2024-08-16 08:34:07 +02:00
Karolin Varner
7b3b7612cf
chore(api): API should have access to AppServer
...
The borrow checker does not approve, hence there are many shenanigans
with extension traits.
2024-08-16 08:34:07 +02:00
Karolin Varner
c1704b1464
fix(API): Wrong response size set
2024-08-16 08:34:07 +02:00
dependabot[bot]
2785aaf783
build(deps): bump serde from 1.0.207 to 1.0.208
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.207 to 1.0.208.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.207...v1.0.208 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-08-16 08:30:08 +02:00
Karolin Varner
15002a74cc
Merge: Experimental PSK Broker Support
...
Merge pull request #376 from pqcfox/feat/netlink-broker-cli
Add broker support to Rosenpass using `MioBrokerClient` (backport of dev/broker-architecture)
2024-08-16 08:26:15 +02:00
Karolin Varner
0fe2d9825b
fix: Remove ineffectual broker integration test
2024-08-16 00:35:46 +02:00
Karolin Varner
ab805dae75
fix: libc & rustix are making problems in CI for unknown reasons
2024-08-16 00:35:46 +02:00
Karolin Varner
08653c3338
chore: clippy
2024-08-16 00:35:46 +02:00
Karolin Varner
520c8c6eaa
chore: Feature naming scheme fully applied
...
experimental_broker_api -> experiment_broker_api
2024-08-15 22:47:20 +02:00
Karolin Varner
258efe408c
fix: PSK broker integration did not work
...
This commit resolves multiple issues with the PSK broker integration.
- The manual testing procedure never actually utilized the brokers
due to the use of the outfile option, this led to issues with the
broker being hidden.
- The manual testing procedure omitted checking whether a PSK was
actually sent to WireGuard entirely. This was fixed by writing an
entirely new manual integration testing shell-script that can serve
as a blueprint for future integration tests.
- Many parts of the PSK broker code did not report (log) errors
accurately; added error logging
- BrokerServer set message.payload.return_code to the msg_type value,
this led to crashes
- The PSK broker commands all omitted to set the memfd policy, this led
to immediate crashes once secrets where actually allocated
- The MioBrokerClient IO state machine was broken and the design was
too obtuse to debug. The state machine returned the length prefix as
a message instead of actually interpreting it as a state machine.
Seems the code was integrated but never actually tested. This was
fixed by rewriting the entire state machine code using the new
LengthPrefixEncoder/Decoder facilities. A write-buffer that was not
being flushed is now handled by flushing the buffer in blocking-io
mode.
2024-08-15 22:47:20 +02:00
Karolin Varner
fd0f35b279
chore: gen-key subcommand should show canonical paths
2024-08-15 22:12:02 +02:00
Karolin Varner
8808ed5dbc
fix: Quiet log level should be warn
2024-08-15 09:43:25 +02:00
Karolin Varner
6fc45cab53
chore: prettier
2024-08-15 08:55:13 +02:00
Katherine Watson
1f7196e473
doc: Add documentation for testing
2024-08-14 19:49:00 -07:00
Katherine Watson
c359b87d0c
chore: Convert broker interface setup to use mio's UnixStream where possible
2024-08-14 19:03:45 -07:00
Katherine Watson
355b48169b
chore: Make MiobrokerClient import conditional
2024-08-14 19:03:45 -07:00
Katherine Watson
274d245bed
chore: Unify enable_wg_broker and enable_broker_api features
2024-08-14 19:03:45 -07:00
Katherine Watson
065b0fcc8a
feat: Add enable_wg_broker feature using MioBrokerClient
...
doc: Add documentation for new methods and arguments
fix: Require new psk_broker_spawn flag to use broker without extra parameters, to make all-features cargo test pass
fix: Fix MioBrokerClient buffer size to allow room for length prefix
fix: Fix remaining issue with panic
2024-08-14 19:03:44 -07:00
dependabot[bot]
191fb10663
build(deps): bump mio from 1.0.1 to 1.0.2
...
Bumps [mio](https://github.com/tokio-rs/mio ) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/tokio-rs/mio/releases )
- [Changelog](https://github.com/tokio-rs/mio/blob/master/CHANGELOG.md )
- [Commits](https://github.com/tokio-rs/mio/compare/v1.0.1...v1.0.2 )
---
updated-dependencies:
- dependency-name: mio
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-08-14 09:28:27 +02:00
dependabot[bot]
3faa84117f
build(deps): bump tokio from 1.39.1 to 1.39.2
...
Bumps [tokio](https://github.com/tokio-rs/tokio ) from 1.39.1 to 1.39.2.
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.39.1...tokio-1.39.2 )
---
updated-dependencies:
- dependency-name: tokio
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-08-13 13:14:15 +02:00
dependabot[bot]
fda75a0184
build(deps): bump serde from 1.0.204 to 1.0.207
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.204 to 1.0.207.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.204...v1.0.207 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-08-13 13:14:03 +02:00
dependabot[bot]
96b1f6c0d3
build(deps): bump procspawn from 1.0.0 to 1.0.1 ( #390 )
...
Bumps [procspawn](https://github.com/mitsuhiko/procspawn ) from 1.0.0 to 1.0.1.
- [Changelog](https://github.com/mitsuhiko/procspawn/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mitsuhiko/procspawn/compare/1.0.0...1.0.1 )
---
updated-dependencies:
- dependency-name: procspawn
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-13 08:15:57 +02:00
dependabot[bot]
fb73c68626
build(deps): bump tempfile from 3.10.1 to 3.11.0 ( #387 )
...
Bumps [tempfile](https://github.com/Stebalien/tempfile ) from 3.10.1 to 3.11.0.
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md )
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.10.1...v3.11.0 )
---
updated-dependencies:
- dependency-name: tempfile
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-13 08:15:46 +02:00
dependabot[bot]
42b0e23695
build(deps): bump clap from 4.5.13 to 4.5.15 ( #397 )
...
Bumps [clap](https://github.com/clap-rs/clap ) from 4.5.13 to 4.5.15.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.13...clap_complete-v4.5.15 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-13 08:13:06 +02:00
Karolin Varner
c58f832727
Merge pull request #391 from aparcar/pb
...
add test cases for util modules
2024-08-12 16:26:01 +02:00
Paul Spooren
7b6a9eebc1
ci: test full workspace with codecov
...
Previously only the default members were checked for coverage.
Signed-off-by: Paul Spooren <mail@aparcar.org >
2024-08-12 12:10:47 +02:00
Paul Spooren
4554dc4bb3
ci: drop codecov token
...
It's not needed to see generate results for pull requests.
Signed-off-by: Paul Spooren <mail@aparcar.org >
2024-08-12 11:44:33 +02:00
Paul Spooren
465c6beaab
ci: switch to codecov action v4 branch
...
Instead of using a specific version, use branch v4 which stays API
compatible.
Signed-off-by: Paul Spooren <mail@aparcar.org >
2024-08-12 11:43:26 +02:00
Paul Spooren
1853e0a3c0
feat: add test case and check fd value
...
Signed-off-by: Paul Spooren <mail@aparcar.org >
2024-08-12 11:37:15 +02:00
Benjamin Lipp
245d4d1a0f
feat: add tests for util file.rs
...
Co-authored-by: Paul Spooren <mail@aparcar.org >
2024-08-12 11:37:15 +02:00
Karolin Varner
d5d15cd9bc
Merge Rosenpass API infrastructure
...
Pull request #388 from rosenpass/dev/karo/api
2024-08-08 22:02:04 +02:00
Katherine Watson
9fd3df67ed
chore: Fix typos and add various comments
2024-08-07 23:11:13 -07:00
Karolin Varner
6d47169a5c
feat: Set CLOEXEC flag on claimed fds and mask them
...
Masking the file descriptors (by replaying them with a file descriptor pointing towards /dev/null)
mitigates use after free (on file descriptor) attacks. In case some
piece of code still holds a reference to the file descriptor, that
file descriptor now merely holds a reference to /dev/null.
Otherwise, the file descriptor might be reused and the reference
could now mistakenly point to all sorts of – potentially more harmful – files, such as memfd_secret
file descriptors, storing our secret keys.
2024-08-05 16:16:09 +02:00
Karolin Varner
4bcd38a4ea
feat: Infrastructure for the Rosenpass API
2024-08-03 16:51:18 +02:00
Karolin Varner
730a03957a
feat: A variety of utilities in preparation for implementing the API
2024-08-03 16:50:21 +02:00
Karolin Varner
ea071f5363
feat: Convenience functions and traits to automatically handle ErrorKind::{Interrupt, WouldBlock}
2024-08-03 16:49:02 +02:00
Karolin Varner
3063d3e4c2
feat: Convenience traits to get the ErrorKind of an io error for match clauses
2024-08-03 16:48:25 +02:00
Karolin Varner
1bf0eed90a
feat: Convenience function to just call a function
2024-08-03 16:46:48 +02:00
Karolin Varner
138e6b6553
chore: to crate documentation indendation (purely cosmetic)
2024-08-03 16:32:02 +02:00
Karolin Varner
2dde0a2b47
chore: Refactor integration_tests (purely cosmetic)
2024-08-03 16:31:19 +02:00
Karolin Varner
3cc3b6009f
chore: Move CliCommand::run -> CliArgs::run; do not mutate the configuration
...
This way CliArgs::run has access to all command line parameters.
Avoided mutating the CliArgs (or rather CliCommand) structure here,
because doing so is simply bad style. There is no good reasoning for
why this function should mutate CliCommand, except for a bit of
convenience.
2024-08-03 16:29:19 +02:00