Skip to content

Add server-side expected ID check - #558

Merged
billphipps merged 1 commit into
wolfSSL:mainfrom
bigbrett:client-id-comm-binding
Nov 3, 2026
Merged

billphipps merged 1 commit into
wolfSSL:mainfrom
bigbrett:client-id-comm-binding

Conversation

@bigbrett

@bigbrett bigbrett commented Nov 3, 2026

Copy link
Copy Markdown
Contributor
  • Adds server-side check for expected client ID on a given server context
  • Adds server-side comm-connect callback for enforcing user-specified constraints on connect

@bigbrett bigbrett self-assigned this Nov 3, 2026
Copilot AI balanced review requested due to automatic review settings November 3, 2026 16:36

Copilot AI 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.

🟢 Approval recommended

No active review issues block approval of the COMM INIT client identity controls.

No open issues 🎉

What changed in this PR

Adds server-side client identity controls to wolfHSM’s COMM INIT handshake, allowing applications to restrict which client ID can bind to a channel.

Changes:

  • Adds an optional expected client ID and application callback, checked before updating the connection’s binding.
  • Tests ID validation, callback rejection, check ordering, and reconnect behavior in both test suites.
  • Documents identity enforcement and updates the quickstart to bind its channel to client 1.
File Description
wolfhsm/​wh_server.h Defines the COMM INIT callback and adds configuration and context fields.
wolfhsm/​wh_comm.h Adds expected client ID fields to server communication structures.
test/​wh_test_clientserver.c Adds client ID binding and callback tests to the existing suite.
test-refactor/​wh_test_list.c Registers the new client ID binding test.
test-refactor/​misc/​wh_test_client_id_binding.c Adds equivalent coverage in the refactored test suite.
src/​wh_server.c Validates configured IDs and enforces ID and callback checks during COMM INIT.
src/​wh_comm.c Copies the configured expected client ID into the server context.
docs/​src/​5-Features.md Explains client identity controls and their role in namespace isolation.
docs/​src/​3-Quickstart.md Configures an expected client ID and explains channel binding.

Review effort: Balanced

@billphipps billphipps 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.

Excellent additional feature!

@billphipps
billphipps merged commit 2345550 into wolfSSL:main Nov 3, 2026
26 checks passed
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.

4 participants