Repository navigation
修复设备绑定与发布审计缺失请求来源信息 - #1458
Merged
Merged
修复设备绑定与发布审计缺失请求来源信息#1458
Conversation
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.
设备通过 WebSocket 绑定身份或发布时,业务审计没有继承握手请求信息,导致来源 IP、客户端和请求 ID 同时为空。本次在鉴权后附加握手上下文,沿用现有来源 IP 解析规则,并在只有用户 ID 时从数据库补全操作人信息。
请求信息仅在操作人匹配时写入,不自动生成额外请求审计。历史记录不回填;前置代理环境仍需配置可信代理。
验证:
go test ./...、go vet ./...和go run ./tools/sqlcschema -check通过;全量测试未配置外部服务,依赖外部服务的用例按原逻辑跳过。