-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support Cumulocity SmartREST 1.0 #3196
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/credentials Contents [c8y]
username = "octocat"
password = "abcd1234" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>
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_one The 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-plugin
tedge config
and MQTT bridges.How to use basic auth instead of device certs and SmartREST1.0?
/etc/tedge/credentials
by 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.id
is 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 c8y
is disabled since it uses JWT token. However, the connection check is actually done by sending100
message, and supposed to receive71, device already exists
.Types of changes
Paste Link to the issue
#3036
Checklist
cargo fmt
as mentioned in CODING_GUIDELINEScargo clippy
as mentioned in CODING_GUIDELINESFurther comments