-
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
fix: use MQTT as well as HTTP host to determine possible tenant url #2977
fix: use MQTT as well as HTTP host to determine possible tenant url #2977
Conversation
Signed-off-by: James Rhodes <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
|
Robot Results
|
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 logic is pretty straightforward for those having separate c8y.http
and c8y.mqtt
settings, and implemented as described in the ticket.
But, my understanding was that the end user sometimes may not even be aware of the internal URLs and they are only exposed to the external custom domains. So, they probably wouldn't even know that they need to configure both settings separately. This is the reason why querying the https://your.custom.domain/tenant/loginOptions
endpoint was proposed as a better fix approach in #2804.
But, if it is guaranteed that custom domain users would configure their tedge
like this with both the settings, then I'm happy to approve this PR once the tests pass (a rebase required).
We can address the "easy of configuration" aspect to a separate PR. This PR is purely focusing on the case where the user knows that they have to use two separate URLs for the MQTT and HTTP traffic, however thin-edge.io may receive binaries either using the internal URL OR the custom domain name (as the user can manually use the custom domain when uploading binaries to their tenant). |
0c2144f
to
1c68fab
Compare
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.
Approved
There is a flaky test (unrelated to this PR) failing the merge queue :
|
Proposed changes
Determine whether URLs are Cumulocity URLs based on both the HTTP and MQTT host, not just the HTTP host.
Types of changes
Paste Link to the issue
Checklist
cargo fmt
as mentioned in CODING_GUIDELINEScargo clippy
as mentioned in CODING_GUIDELINESFurther comments