fix(ownership): fail closed on WASM default-scope fallback - #2465
Merged
ilblackdragon merged 3 commits intoApr 18, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request removes legacy fallback logic for broadcast metadata to ensure strict owner-scoping and hardens WASM tool credential resolution by denying default scope fallbacks. It also improves error reporting for missing credentials and introduces a mock settings store for testing. However, the mock's has_settings method is inconsistently implemented compared to other methods in the store and should be updated to correctly verify the presence of stored values.
henrypark133
approved these changes
Apr 16, 2026
henrypark133
left a comment
Collaborator
There was a problem hiding this comment.
Review: fail-closed ownership fix looks correct
I verified the two ownership-scope changes in the checked-out code and did not find a blocker.
Positives:
- WASM tool credential resolution now uses
DefaultFallback::Denied, so the runtime no longer borrowsdefault-scoped secrets when a user-specific secret is missing. - WASM channel startup only reads owner-scoped broadcast metadata and no longer probes
default. - The new regressions cover both the tool path and the channel-startup path, which is the right caller-level coverage for this boundary.
Residual risk:
- Approval is based on code inspection plus the new targeted tests; I did not run the full suite from this review pass.
5 of 7 tasks
Merged
theredspoon
pushed a commit
to theredspoon/ironclaw
that referenced
this pull request
Jun 21, 2026
* fix(wasm): fail closed on default-scope fallback * fix(wasm): implement settings-store has_settings mock
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.
Fixes #2069
Refs #2070
What changed
defaultscope for admin users.ironclaw secrets set.defaultbroadcast metadata when the owner scope has no stored value.default.Notes
#2070overlaps on the same ownership boundary. The setup docs already documentconfig.owner_idas the correct owner scope for instance-level channel secrets, so this PR keeps the runtime fix focused on the unsafe fallback behavior.