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

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

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

];

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

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