summaryrefslogtreecommitdiffstats
path: root/tedge/Cargo.toml
AgeCommit message (Collapse)Author
2022-05-13Make logging non-optionalMatthias Beyer
Before this patch, the logging code was optional in tedge-cli. But we always want to build this piece of code. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-05-13Remove console-subscriberMatthias Beyer
console-subscriber needs unstable tokio features and we do not want that right now to be included. This also simplifies building tedge-cli with all features enabled. Before, one had to specify them and to take care of not specifying "core_debugging", now `--all-features` should suffice. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-05-10Wire up notification plugin in tedge-cliMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-04-20Integrate MQTT plugins into CLIMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-04-14Fix: Use miette with "fancy" feature in CLIMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-04-13Add measurement-filter plugin in CLIMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-04-13tedge-cli: Adapt for miette as error handling crateMatthias Beyer
This patch adapts the tedge-cli crate for the changes from commit 9ccd86589db8f9a72c4d7f545813e8da40b4d039 ("Replace PluginError with miette::Error") which replaced anyhow with miette. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-03-23Add httpstop plugin to tedge CLI implementationMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com> Signed-off-by: Marcel Müller <m.mueller@ifm.com>
2022-03-23Adapt tedge-cli to new core interfaceMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-03-23Revert "Remove plugin_log"Matthias Beyer
This reverts commit 52031edacfac8f4ba6d4d9af27bb5951b80636a4.
2022-03-23Remove plugin_logMatthias Beyer
Remove implementation, because the log plugin does not have a usecase anymore, not even for debugging. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com> Signed-off-by: Marcel Müller <m.mueller@ifm.com>
2022-03-17Add tedge-cli binaryMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2021-11-24Restructure directories of the workspace (#559)Lukasz Woznicki
* Restructure directories of the workspace * Rename c8y_translator_lib to c8y_translator * Update comment on how to get dummy plugin path Signed-off-by: Lukasz Woznicki <lukasz.woznicki@softwareag.com>
2021-11-24(cargo release) bump version 0.4.3github-actions[bot]
Co-authored-by: Versioneer <info@thin-edge.io>
2021-11-11Patch version bump (#573)github-actions[bot]
* (cargo release) bump version * Update get-thin-edge_io.sh to 0.4.2 Co-authored-by: Versioneer <info@thin-edge.io> Co-authored-by: Lukasz Woznicki <75632179+makr11st@users.noreply.github.com>
2021-11-10[CIT 515] Fix the tests of the MQTT component. (#561)Didier Wenzek
* Add a test helper to except a message on MQTT * Fix doc string Signed-off-by: Wenzek <diw@softwareag.com> * Move the test_mqtt_server in a dev-dependency * The tests of the agent are not dependent of MQTT * Working around sub ack * Refactor the test message logger * Add test helper functions * Make test clearer * Use test helper functions to simplify the tests * Rename module * Launch the test MQTT broker just once * Encapsulate the port of the MQTT test broker * Display the first 30 bytes of the messages recieved by the test MQTT broker * Make serial the agent tests * Upgrade to rumqtt latest * Fix mqtt test broker log * Reproduce the issue with lost messages when the sm_mapper is down * Cargo fmt * Addressing comments * Update test * Remove test_serial attribute * Ignore test `tedge_agent_check_no_multiple_instances_running` * Run commit-workflow tests with no-fail-fast * ignore test requesting sudo * Make helper functions method of the test broker handler * Cargo fmt * Wait for the mapper under test to start Co-authored-by: Wenzek <diw@softwareag.com>
2021-10-29(cargo release) bump version (#538)github-actions[bot]
Co-authored-by: Versioneer <info@thin-edge.io> Co-authored-by: Sebastian Büttner <sebastian.buettner@softwareag.com>
2021-10-15Fix issue #495 (#511)Didier Wenzek
On `tedge connect` the configuration files are created in temporary files that are renamed once finalized. This rename cannot be done across file-systems, causing the issue #495. The fix is to create the temporary file along the target file in the same directory. Signed-off-by: Wenzek <diw@softwareag.com> Co-authored-by: Wenzek <diw@softwareag.com>
2021-10-14Release 0.4.0 (#493)Lukasz Woznicki
* (cargo release) bump version 0.4
2021-10-11Update all dependencies (#487)Lukasz Woznicki
* Update all dependencies for 0.4 Signed-off-by: Lukasz Woznicki <lukasz.woznicki@softwareag.com>
2021-09-29(cargo release) bump version (#457)github-actions[bot]
Co-authored-by: Versioneer <info@thin-edge.io>
2021-09-15(cargo release) bump version (#429)github-actions[bot]
Co-authored-by: Versioneer <info@thin-edge.io>
2021-09-13[CIT-538] Directly use rumqttc to implement `tedge mqtt sub` (#418)Didier Wenzek
* [CIT-538] Directly use rumqttc to implement `tedge mqtt sub` * [CIT-538] Re-implement `tedge mqtt pub` directly on top of `rumqttc` * [CIT-538] Re-implementing `tedge connect c8y` directly on top of rumqttc * [CIT-538] Re-implement `tedge connect az` directly on top of rumqttc * [CIT-538] Remove last depencies to the `mqtt_client` library * [CIT-538] Fix typo * [CIT-538] Clean `tedge connect` output Co-authored-by: Wenzek <diw@softwareag.com>
2021-08-31Release 0.3.0 (#410)Lukasz Woznicki
2021-08-19Patch version bump (#390) 0.2.4github-actions[bot]
* (cargo release) bump version Co-authored-by: Versioneer <info@thin-edge.io>
2021-08-08[CIT-450] Tedge Agent - SM feature (#354)Lukasz Woznicki
* Add basic tedge_agent code and service * Add tedge_utils::fs atomically write file * Add short documentation notes for tedge_agent * Make sm-plugins path dynamic for agent * Update dependencies due to cargo audit hyper vuln Signed-off-by: Lukasz Woznicki <lukasz.woznicki@softwareag.com>
2021-07-29Move utils from tedge cli to separate crate to be usable by other tedge ↵Lukasz Woznicki
components (#358) Signed-off-by: Lukasz Woznicki <lukasz.woznicki@softwareag.com>
2021-07-21(cargo release) bump version (#352)github-actions[bot]
Co-authored-by: Versioneer <info@thin-edge.io>
2021-07-13Add system service manager abstraction (#338)Michael Neumann
* Refactor code to use abstract `SystemServiceManager`. * Implement Debug for UserManager This simplifies code that embeds a `UserManager` and has to implement `Debug` on it's own as `Debug` cannot be automatically derived. * Add `SystemdServiceManager` * Add NullSystemServiceManager that always fail This can be used as fallback manager where commands that don't need a SystemServiceManager would still work. * Bring in support for OpenRC / BSD service(8) * Add feature flag "openrc" to override the default system service manager that is selected based on the target operation system. For instance, Gentoo has target_os = "linux", but uses OpenRC. OpenRC can also be used on other systems. * Code roughly based on PR #196.
2021-07-08Update crates dependencies versions (#337)Lukasz Woznicki
Signed-off-by: Lukasz Woznicki <lukasz.woznicki@softwareag.com>
2021-07-08Patch version bump to 0.2.2github-actions[bot]
* (cargo release) bump version Co-authored-by: Versioneer <info@thin-edge.io>
2021-07-05[CIT-403] Address issue with self signed certificates not allowed when ↵Lukasz Woznicki
uploading to certificate (#312) * Add `How to add self signed cert` how to guide * Add error extraction for webpki::Error from reqwest::Error Signed-off-by: Lukasz Woznicki <lukasz.woznicki@softwareag.com>
2021-06-29Get rid of MqttClient#publish_with_ack functionality (#306)Michael Neumann
* This removes lots of complexity * No need to maintain a separate branch of rumqttc.
2021-06-23(cargo release) bump version (#308)github-actions[bot]
Co-authored-by: Versioneer <info@thin-edge.io>
2021-06-09(cargo release) bump version (#284)Lukasz Woznicki
2021-06-04Cargo outdated (#268)Didier Wenzek
* Cargo outdated * Update the version of the rcgen crate to actually zeroize the keys Co-authored-by: Wenzek <diw@softwareag.com>
2021-06-03[CIT-394] fix build on windows (#267)Didier Wenzek
* [CIT-394] Create unix/windows module for flockfile * [CIT-394] Extract the `users` module into the `common/tedge_users` crate * [CIT-394] cargo fmt * [CIT-394] Use `tedge_users` rather than `users` Co-authored-by: Wenzek <diw@softwareag.com>
2021-04-13[CIT-218] Extract the device identifier from the device certificate (#176)Didier Wenzek
* [CIT-218] Extract certificate related code to a new crate * [CIT-218] Cargo fmt * [CIT-218] Add tests * [CIT-218] Add PemCertificate::subject_common_name() * [CIT-218] Cargo fmt Co-authored-by: Wenzek <diw@softwareag.com>
2021-04-07Refactor TEdge config (#155)Michael Neumann
- Refactor TEdgeConfig - Move configuration into `tedge_config` crate. - Add `ConfigSetting` trait. Each "thing" that we want to make configurable will have it's own struct-type. For example `struct DeviceIdSetting` or `C8yUrlSetting`. - The `ConfigSetting` trait does not provide any means of how to read/write/unset a configuration setting. It only provides the key, description and the value type of the setting, but no implementation. - Use trait `ConfigSettingAccessor` to implemenent `query`, `update` and `unset` methods. - `TEdgeConfigRepository` implements functionality to read/write a `TEdgeConfig`. The `TEdgeConfig` struct itself just holds data. - Add `TEdgeConfigLocation` which holds all data that we need to resolve the defaults in TEdgeConfig, including the name of the config file (TODO: we might want to split these two apart). The defaults differ depending on the location of the `tedge.toml`, whether it's located in `/etc` or a users `$HOME/.tedge` (or in tests). - Only add the `tedge_config` crate. `tedge` is currently not modified to use the new API. - Remove remaining `unwrap`s, also from tests - No longer create intermediate directories upon saving configuration # FOLLOW-UP TASKS - Refactor the `tedge` crate to use `tedge_config`. - Compute the `device.id` from the certificate stored in `device.cert.path`, if any. - Ensure that the config is updated only by `tedge config set/unset`. - Extend tedge_config_location to also manage the paths to the bridge configuration files. - Update `ConfigRepository::store()` to properly set file ownership.
2021-03-29two bug fixes: include in mosquitto config, maintainer script path of tedge ↵Sebastian Büttner
(#125) fixing to small bugs: include shouldn`t be added multiple times to mosquitto.conf maintainer scripts path for tedge should be relative to repo root (as in tedge-mapper)
2021-03-26feature/cit 290/update contact email (#123)Sebastian Büttner
Updating email to info@thin-edge.io
2021-03-26Commit Cargo.lock to fix dependency versions (#117)Albin Suresh
2021-03-25[CIT-273] Clean security model (#107)Didier Wenzek
* [CIT-273] Run certificate creation as mosquitto * [CIT-273] Add integration test * [CIT-273] Fix windows build & test * [CIT-273] Fix $PATH in integration tests * [CIT-273] Cargo fmt * [CIT-273] Fix users mod. * [CIT-273] Update the user model * [CIT-273] Make UserManager not Send * [CIT-273] Improve test Remove the dev-dependencies to openssl * [CIT-273] Workaround test * [CIT-273] Cargo fmt * [CIT-273] Ensure UserGuard is !Send * [CIT-273] Add a constant ROOT_USER * [CIT-273] Removing unnecessary clone * [CIT-273] Remove dead code * [CIT-273] Improve message on panic * [CIT-273] Add `tedge-user` feature to tag integration tests * [CIT-273] Cargo fmt * [CIT-273] Inject an ExecutionContext * [CIT-273] Cargo fmt Co-authored-by: Wenzek <diw@softwareag.com>
2021-03-25Tie der-parser version to specific version (#116)Michael Abel
2021-03-25[CIT-280] Remove inadvertent dev-dependency to openssl (#112)Didier Wenzek
Co-authored-by: Wenzek <diw@softwareag.com>
2021-03-23[CIT-280] Show certificate thumbprint (#101)PradeepKiruvale
* [CIT-280] Show certificate thumbprint * [CIT-280] create a new function to show thumbprint * [CIT-280] refactored code and added a tests to verify the thumbprint * [CIT-280] replace openssl with b64|sha1 * [CIT-280] fixed a typo in test name * [CIT-280] Fixed tests to avoid updaing tedge.toml Co-authored-by: Pradeep K J <pradeekumar.kj@softwareag.com>
2021-03-12[CIT-264] Enhance tedge debian package with maintainer-script (#91)Sebastian Büttner
* [CIT-264] Adding postinst script for tedge debian package. The posinst script contains creation of - users - groups - /etc/tedge folder - file to /etc/sudoers.d * Extended comments with --gecos arguments moved the postinst script to new place to be aligned with tedge-mapper * changed to check for already existent users and groups using install for directory creation in one command * Update configuration/debian/tedge/postinst Co-authored-by: Rina Fujino <18257209+rina23q@users.noreply.github.com> * Update configuration/debian/tedge/postinst Co-authored-by: Rina Fujino <18257209+rina23q@users.noreply.github.com> * removed optionsystemd-units = { enable = false } Co-authored-by: Rina Fujino <18257209+rina23q@users.noreply.github.com>
2021-03-11[CIT-191] tedge cert upload c8y (#81)Lukasz Woznicki
* Add tedge cert upload c8y command. * Add url split to remove port number.
2021-03-10[FIX] Remove useless dependencies (#85)Didier Wenzek
Co-authored-by: Wenzek <diw@softwareag.com>
2021-03-09[CIT-195] Add cfg-flag to integration and system tests (#65)Michael Abel
* Add feature * Add integration test feature * Add feature also to mapper * Use feature integration-test * Also disable use statements to avoid warnings ... when feature is not active * Refactor: move use statements into function * Add feature and move tests to tests folder * Remove tests that depend on HOME * run cargo fmt