Skip to content
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

POC: check compatibility of thin-edge.io with Cumulocity IoT basic auth device users and SmartREST 1.0 #3039

Closed

Conversation

reubenmiller
Copy link
Contributor

Proposed changes

⚠️ Do not merge this PR as it contains very rough Rust code to verify the functionality

Proof of concept / validation, that if thin-edge.io would support Cumulocity IoT's basic auth device users (e.g. not cert based authentication), would enable usage of SmartREST 1.0 to allow existing SmartREST 1.0 users the ability to even use thin-edge.io (which manages the cloud connection and provides a usable local Cumulocity IoT proxy)

The following items are included in the POC.

  • Add system test to check the SmartREST 1.0 by registering templates with HTTP and then using them via MQTT
  • Add hacked Rust code to verify if the basic auth users can support SmartREST 1.0

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
  • Documentation Update (if none of the other choices apply)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Paste Link to the issue

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA (in all commits with git commit -s)
  • I ran cargo fmt as mentioned in CODING_GUIDELINES
  • I used cargo clippy as mentioned in CODING_GUIDELINES
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
@reubenmiller reubenmiller force-pushed the feat-smartrest-one-support branch from 9ca8f4a to d9aa6b1 Compare August 1, 2024 07:11
@reubenmiller reubenmiller temporarily deployed to Test Pull Request August 1, 2024 07:11 — with GitHub Actions Inactive
@reubenmiller reubenmiller added theme:c8y Theme: Cumulocity related topics theme:mqtt Theme: mqtt and mosquitto related topics labels Aug 1, 2024
];

let use_legacy_auth = remote_username.is_some() && remote_password.is_some();
if use_legacy_auth {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the logic should be opposite. If use_legacy_auth == true, not adding JWT token topics to bridge.

Suggested change
if use_legacy_auth {
if !use_legacy_auth {

Question: Do we even have to change the bridge file as per auth method? If mapper doesn't subscribe to JWT token, isn't it enough? I mean the bridge still maps the JWT tokens c8y/, but no actor subscribes to the JWT topic.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think it still needs to be conditional because otherwise an error message is published on the s/e topic

@reubenmiller
Copy link
Contributor Author

Closing as this has been implemented in #3196

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme:c8y Theme: Cumulocity related topics theme:mqtt Theme: mqtt and mosquitto related topics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants