feat: support Cumulocity SmartREST 1.0#3196
Conversation
Codecov ReportAttention: Patch coverage is Additional details and impacted files📢 Thoughts on this report? Let us know! |
|
@rina23q What about changing the default credential location to the following, keeping in mind that it would allow us to add additional credentials to it (maybe in the future adding the c8y device bootstrapping credentials might be necessary). Below is an example of using a single credentials file with multiple secrets, where keys are used to classify the secrets: File /etc/tedge/credentialsContents [c8y]
username = "octocat"
password = "abcd1234" |
didier-wenzek
left a comment
There was a problem hiding this comment.
The switch between JWT versus BasicAuth is implemented in the correct place. i.e. under c8y_api which is used both by the mapper and the remote access plugin.
However, the C8yAuthRetriever can be simplified.
crates/common/tedge_config/src/tedge_config_cli/tedge_config.rs
Outdated
Show resolved
Hide resolved
Robot Results
|
eaff09b to
9f634db
Compare
9f634db to
3b7b531
Compare
3b7b531 to
1774e4f
Compare
1774e4f to
4caf2bb
Compare
1a5d441 to
4e41c4e
Compare
4e41c4e to
f48924b
Compare
Signed-off-by: Rina Fujino <rina.fujino.23@gmail.com>
6523016 to
f4352e0
Compare
Signed-off-by: Rina Fujino <rina.fujino.23@gmail.com>
Flaky test update (resolved)I did 20 iterations in my local for the suite smartrest_one suite by using the flake-finder. invoke flake-finder --iterations 20 --outputdir output_flake_finder_3 --suite smartrest_oneThe result was 9 passed, 11 failed. So, the test is absolutely flaky. Failed iterations are: [2, 4, 6, 8, 9, 10, 11, 13, 14, 19, 20] There were two patterns of failures. 1.
|
Signed-off-by: Rina Fujino <rina.fujino.23@gmail.com>
69db2d4 to
39f1354
Compare
Signed-off-by: Rina Fujino <rina.fujino.23@gmail.com>
This reported issue is resolved in b1ace67. |
Proposed changes
To support SmartREST1.0, this PR includes:
c8y-remote-access-plugintedge configand MQTT bridges.How to use basic auth instead of device certs and SmartREST1.0?
/etc/tedge/credentialsby default. Configurable byc8y.credentials_path.tedge connect c8y! The appropriate bridge for Basic Auth and SmartREST1.0 will be created.Note: if a device is already registered via certificate, you cannot switch to basic auth for the device.
Current limitations:
device.idis still referring the value from the device certificate.tedge connect c8y. It expects to use bulk operation API to get credentials (username/password) beforehand.tedge connect c8yis disabled since it uses JWT token. However, the connection check is actually done by sending100message, and supposed to receive71, device already exists.Types of changes
Paste Link to the issue
#3036
Checklist
cargo fmtas mentioned in CODING_GUIDELINEScargo clippyas mentioned in CODING_GUIDELINESFurther comments