Skip to content

Move Auto-provisioning to a new provisioningv2 topic - #3590

Merged
richturner merged 5 commits into
mainfrom
enhancement/rename_autoprov_handler
Dec 1, 2026
Merged

richturner merged 5 commits into
mainfrom
enhancement/rename_autoprov_handler

Conversation

@richturner

Copy link
Copy Markdown
Member

At least one user of the platform was using the old provisioning mechanism on edge devices for other purposes in the field which cannot be easily replaced. To allow their continued usage of the old mechanism within a custom project the built in provisioning topic should be renamed as it is a breaking change anyway that requires a code change to utilitise.

@richturner richturner self-assigned this Nov 18, 2026
@richturner
richturner requested a review from a team November 18, 2026 16:22
@richturner richturner added the Breaking Change Indicates that a PR includes a breaking change label Nov 18, 2026
@richturner

Copy link
Copy Markdown
Member Author

Also updated documentation accordingly: openremote/documentation#210

@MartinaeyNL MartinaeyNL left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not sure whether this solution makes the most sense from an "open source user perspective".
It feels odd to "just rename v1 to v2, so custom projects can keep using v1 and copy-paste the old provisioning logic."
I guess it's because we didn't apply versioning to the topics in the first place,
but this doesn't feel like the right solution either.

But maybe I'm not the best user to judge 😅

MartinaeyNL

This comment was marked as resolved.

@MartinaeyNL
MartinaeyNL requested a review from a team November 27, 2026 09:28
@ebariaux

Copy link
Copy Markdown
Contributor

Have we already made some modifications to the current provisioning mechanism that would not be compatible with the user installation or is this pure preparation work ?
Is there a security issue with the current mechanism ?

My thought would be to duplicate in the current manager and have the same logic behind the 2 topics.
If there's a security issue, protect the current topic with an environment variable.

@richturner

richturner commented Nov 30, 2026 •

Copy link
Copy Markdown
Member Author

Have we already made some modifications to the current provisioning mechanism that would not be compatible with the user installation or is this pure preparation work ? Is there a security issue with the current mechanism ?

My thought would be to duplicate in the current manager and have the same logic behind the 2 topics. If there's a security issue, protect the current topic with an environment variable.

auto provisioning handler was updated to fix a security vulnerability where the client wasn't challenged for ownership of the private key, it was later identified that one customer was using this mechanism for automated system initialisation on edge gateways in the field via the PLC (which doesn't have a HTTP stack). This is simply to allow them to continue using the old topic name without having to make physical site visits to update each PLC, even then they couldn't support the new mechanism.

A custom handler should have been created and used in the first place but it wasn't unfortunately. Anyone who is able to update the devices to use the new challenge mechanism can trivially also change the topic name as part of that update.

@richturner
richturner requested a review from ebariaux November 30, 2026 16:23
@sonarqubecloud

sonarqubecloud Bot commented Dec 1, 2026

Copy link
Copy Markdown

@ebariaux ebariaux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Introducing local constant in test to define topic name is an option, not mandatory for merge.

@richturner
richturner enabled auto-merge December 1, 2026 13:21
@MartinaeyNL
MartinaeyNL dismissed their stale review December 1, 2026 14:15

After a short internal discussion, it's a conscious decision to make the breaking change for all OR users.

@richturner
richturner added this pull request to the merge queue Dec 1, 2026
Merged via the queue into main with commit aacc96c Dec 1, 2026
25 checks passed
@richturner
richturner deleted the enhancement/rename_autoprov_handler branch December 1, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Breaking Change Indicates that a PR includes a breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants