-
Notifications
You must be signed in to change notification settings - Fork 140
feat: 【日志平台】自定义上报创建与更新支持 owners 主动授权 --story=137294541 #12038
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
Merged
jayjiahua
merged 1 commit into
TencentBlueKing:master
from
yiqiwang-17:feat/custom_report_owners_grant/#1010158081137294541
Aug 19, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1623,6 +1623,12 @@ class CustomCollectorBaseSerializer(CollectorETLParamsFieldSerializer, ParentInd | |
| label=_("备注说明"), max_length=64, required=False, allow_null=True, allow_blank=True | ||
| ) | ||
| is_display = serializers.BooleanField(label=_("是否展示"), default=True, required=False) | ||
| owners = serializers.ListField( | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [P1] 请限制 owners 数量,避免无界串行 IAM 调用
建议按产品上限设置 |
||
| label=_("授权用户列表"), | ||
| required=False, | ||
| default=list, | ||
| child=serializers.CharField(max_length=64), | ||
| ) | ||
|
|
||
| def validate(self, attrs: dict) -> dict: | ||
| # 先进行校验 | ||
|
|
||
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P1] 幂等创建会绕过实例权限给已有资源授权
custom_create入口只校验业务级create_collection_v2;当ignore_exists=true命中已有英文名时,这里直接对existing调用_authorization_owners。于是仅有“采集新建”权限的用户可以把自己放进owners,获得已有采集项的 view/manage 以及关联索引集的 manage 权限,而无需持有这两个实例的管理权限。建议在
created=False分支通过现有 IAM 实例鉴权入口校验调用者对已有采集项及索引集的相应管理权限后再授权,并补充“create-only 用户不能认领已有资源”的回归测试。