Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Existing consumers are not migrated on normal upgrades because reconciliation is incorrectly gated by the initialization flag.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds Mosquitto ACL role lifecycle management for consumers.
Changes:
- Creates consumer access/write roles at startup and creation.
- Removes roles when consumers are deleted.
File summaries
| File | Description |
|---|---|
mosquitto_dynsec.py |
Reconciles consumer ACL roles during initialization. |
command.py |
Manages roles when consumers are added or removed. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+146
to
+149
| for consumer in SubData.consumer_data.values(): | ||
| add_acl_role("consumer-<id>-access", consumer.num) | ||
| if consumer.data.module is not None and consumer.data.module.type == "mqtt": | ||
| add_acl_role("consumer-<id>-write-access", consumer.num) |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new role provisioning exposes unscoped commands that permit cross-consumer modifications.
Get a fresh assessment by requesting another Copilot review.
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Balanced
| Pub().pub("openWB/set/command/max_id/hierarchy", new_id) | ||
| # add ACL roles for consumer access, if user management is active | ||
| if SubData.system_data["system"].data["security"]["user_management_active"]: | ||
| add_acl_role("consumer-<id>-access", new_id) |
| self._loop_all_received_topics(upgrade) | ||
| self._append_datastore_version(148) | ||
|
|
||
| def upgrade_datastore_149(self) -> None: |
benderl
self-requested a review
September 22, 2026 12:17
LKuemmel
force-pushed
the
consumer_dev
branch
from
September 22, 2026 12:22
fcb338f to
c1acaca
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.