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

[变更说明] SDK 增加string_contains #1297

Closed
wklken opened this issue Jul 20, 2022 · 1 comment
Closed

[变更说明] SDK 增加string_contains #1297

wklken opened this issue Jul 20, 2022 · 1 comment
Assignees
Labels
done 已上线到正式环境并验收通过 Layer: Backend bk-iam backend project Priority: High Type: Proposal

Comments

@wklken
Copy link
Collaborator

wklken commented Jul 20, 2022

SDK 变更

操作符说明:

  • cmdb配置项目->模块->主机 (实例视图)权限的时候, 如果勾选中间节点, 例如模块 1, 那么此时配置的权限策略是 host._bk_iam_path_ string_contains /bk_cmdb,set,1/
  • 鉴权时, 接入系统传入的资源主机 A, 其拓扑路径可能是单个, 也可能有多个, 例如 host._bk_iam_path_ = [/bk_cmdb,project,/bk_cmdb,set,1/, /bk_cmdb,project,y/bk_cmdb,set,2/] 那么, 相当于路径中只要有对应的子串, 就有权限;
  • objectValue string_contains PolicyValue 其中, objectValues可能是单个, 也可能是多个(接入系统传入, 不限制), PolicyValue只会有一个(权限中心表达式生成时控制)
  • golang的实现 strings.Contains(objectValue, PolicyValue); Python 的实现 PolicyValue in objectValue (具体参考上面的 PR)

其他

这一版变更, 对所有 SDK 操作符的左值/右值做了规范, 提前校验(具体参考上面的 PR), 相关的文档说明: #1293 (comment) ;

建议java sdk 也按照这个规范统一加下校验;

@zhu327
Copy link
Member

zhu327 commented Jul 20, 2022

reviewed

@wklken wklken added Layer: Backend bk-iam backend project Priority: High Type: Proposal done 已上线到正式环境并验收通过 labels Jul 20, 2022
@wklken wklken self-assigned this Jul 20, 2022
@wklken wklken closed this as completed Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done 已上线到正式环境并验收通过 Layer: Backend bk-iam backend project Priority: High Type: Proposal
Projects
None yet
Development

No branches or pull requests

2 participants