[https://nvbugs/5922880][fix] Enable HMAC authentication in VisualGen ZMQ IPC channels#12680
Conversation
📝 WalkthroughWalkthroughThese changes add HMAC encryption support to the diffusion executor's inter-process communication. The client generates random HMAC keys and passes them to worker processes, which then configure ZeroMQ IPC channels to use authenticated encryption. Changes
Sequence DiagramsequenceDiagram
participant Client as DiffusionRemoteClient
participant Worker as Worker Process
participant ZMQ as ZeroMQ IPC
Client->>Client: Generate req_hmac_key (32 bytes)
Client->>Client: Generate resp_hmac_key (32 bytes)
Client->>Worker: Spawn mp.Process with HMAC keys in kwargs
Worker->>Worker: DiffusionExecutor.__init__(req_hmac_key, resp_hmac_key)
Worker->>ZMQ: Configure request queue with req_hmac_key + use_hmac_encryption=True
Worker->>ZMQ: Configure response queue with resp_hmac_key + use_hmac_encryption=True
Client->>ZMQ: Send encrypted request message
ZMQ->>Worker: Receive and decrypt request
Worker->>ZMQ: Send encrypted response message
ZMQ->>Client: Receive and decrypt response
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/bot run |
Signed-off-by: Yibin Li <[email protected]>
Signed-off-by: Yibin Li <[email protected]>
dd8ed8d to
007688d
Compare
|
/bot run |
|
PR_Github #41723 [ run ] triggered by Bot. Commit: |
|
PR_Github #41723 [ run ] completed with state
|
|
/bot run |
|
PR_Github #41753 [ run ] triggered by Bot. Commit: |
|
PR_Github #41753 [ run ] completed with state |
|
@hchings pipeline has passed, could you please review this PR? Thank you! |
|
@zhenhuaw-me could you help to review this as @chang-l is OOO? Thanks! |
… ZMQ IPC channels (NVIDIA#12680) Signed-off-by: Yibin Li <[email protected]>
Summary by CodeRabbit
Release Notes
Description
Test Coverage
PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.