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

feat: include reason for low security in "node added" parameter #5570

Merged
merged 1 commit into from
Mar 14, 2023

Conversation

AlCalzone
Copy link
Member

@AlCalzone AlCalzone commented Mar 14, 2023

For users it is currently pretty opaque why a node was not added with Security S0/S2. With this PR, we surface a multitude of reasons as part of the "node added" event, so applications can give some more details on why the secure inclusion failed.

The InclusionResult contained in the 2nd event parameter

// "node added"
(node: ZWaveNode, result: InclusionResult) => void

now has a property lowSecurityReason when lowSecurity is true. This is an enum value with the following possibilities:

enum SecurityBootstrapFailure {
	/** Security bootstrapping was canceled by the user */
	UserCanceled,
	/** The required security keys were not configured in the driver */
	NoKeysConfigured,
	/** No Security S2 user callbacks (or provisioning info) were provided to grant security classes and/or validate the DSK. */
	S2NoUserCallbacks,
	/** An expected message was not received within the corresponding timeout */
	Timeout,
	/** There was no possible match in encryption parameters between the controller and the node */
	ParameterMismatch,
	/** Security bootstrapping was canceled by the included node */
	NodeCanceled,
	/** The PIN was incorrect, so the included node could not decode the key exchange commands */
	S2IncorrectPIN,
	/** There was a mismatch in security keys between the controller and the node */
	S2WrongSecurityLevel,
	/** Some other unspecified error happened */
	Unknown,
}

fixes: #3233

@AlCalzone
Copy link
Member Author

@zwave-js-bot automerge

@zwave-js-bot zwave-js-bot merged commit 4facbd9 into master Mar 14, 2023
@zwave-js-bot zwave-js-bot deleted the why-low-security branch March 14, 2023 21:28
AlCalzone added a commit that referenced this pull request Mar 15, 2023
### Features
* Background RSSI is now measured frequently while the controller is idle and exposed as controller statistics (#5545, #5568)
* The last update timestamp of values is now stored and can be read via `Node.getValueTimestamp` (#5554)
* Values for Battery, Meter, Multilevel Switch and (in some cases) Notification CC are now queried periodically or on device wakeup (#5560)
* Added a command to shut down the Z-Wave chip for safe removal (#5553)
* If a node was not included securely, the `"node added"` event now contains information why (#5570)

### Bugfixes
* Before adding associations between nodes, the security classes of those nodes are now checked to determine if the associations are allowed (#5551)
* After adding associations between nodes, routes to the target are now automatically assigned (#5552)
* No longer create values for unsupported `Door Lock CC` features (#5555)
* Fixed an issue where querying the version of CCs that are only supported by endpoints was skipped (#5569)
* The knowledge whether a node supports Security S0 is no longer changed outside of inclusion or re-interview (#5571)
* Improved logging of target node IDs for incoming multicasts (#5572)
* `Device Reset Locally Notifications` are now discarded when they don't exactly match the expected format (#5574)

### Config file changes
* Clean up Zooz ZEN20 product name (#5550)
* Add config file for Alarm.com ADC-SWM150 (#5557)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include reason for failed bootstrapping in "node added" parameter
2 participants