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

[Backend] action开启环境属性配置 #381

Closed
wklken opened this issue Nov 15, 2021 · 4 comments
Closed

[Backend] action开启环境属性配置 #381

wklken opened this issue Nov 15, 2021 · 4 comments
Assignees
Labels
Layer: Backend bk-iam backend project Priority: High Size: M <=3 days Type: Enhancement New feature or request

Comments

@wklken
Copy link
Collaborator

wklken commented Nov 15, 2021

  • 确定数据结构, 可扩展
  • 操作注册
  • 操作查询
@wklken wklken added Type: Enhancement New feature or request Layer: Backend bk-iam backend project Priority: High Size: M <=3 days labels Nov 15, 2021
@wklken wklken added this to the Y2021M46 milestone Nov 15, 2021
@wklken wklken self-assigned this Nov 15, 2021
@wklken
Copy link
Collaborator Author

wklken commented Nov 15, 2021

注册操作:

[
    {
        "id": "biz_create",
        "name": "业务创建",
        "name_en": "biz_create",
        "description": "业务创建是...",
        "description_en": "biz_create is...",
        "type": "create",
        "related_resource_types": [],
        "version": 1
    },
    {
        "id": "host_edit",
        "name": "主机编辑",
        "name_en": "host_edit",
        "type": "",
        "related_resource_types": [
            {
                "system_id": "bk_cmdb",
                "id": "host",
                "name_alias":  "",
                "name_alias_en": "",
                "selection_mode": "instance",
                "related_instance_selections": [
                    {
                        "system_id": "bk_cmdb",
                        "id": "free_host",
                        "ignore_iam_path": false,
                    }, 
                    {
                        "system_id": "bk_cmdb",
                        "id": "biz_topology",
                        "ignore_iam_path": false,
                    }, 
                    {
                        "system_id": "bk_cmdb",
                        "id": "biz_set_topology",
                        "ignore_iam_path": false,
                    }
                ]
            }
        ],
        "related_actions": ["view", "delete"],
        "version": 1
    }
]

@wklken
Copy link
Collaborator Author

wklken commented Nov 15, 2021

relatedto #232


需要支持:

  • 时间: <=, >=, between; 例如晚上八点到九点; 例如 current_time?
  • IP段: 例如办公网网段, 例如 source_ip = ["192.168.0.0/16", "9.168.0.0/16"]
  • 是否https: true/false, 例如 is_secure_transport = true
  • 来源系统? source_system=["bk_cmdb", "bk_job"]

目前的设计, 时间是权限中心默认算(消化), 其他需要接入系统鉴权的时候传入

@wklken
Copy link
Collaborator Author

wklken commented Nov 15, 2021

协议

[
    {
        "id": "biz_create",
        "name": "业务创建",
        "name_en": "biz_create",
        "description": "业务创建是...",
        "description_en": "biz_create is...",
        "type": "create",
        "related_resource_types": [],
        "related_environments": [
            {
                "type": "current_time",   => 数据 单值/两个值
                "operator": "lte/gte/between"    // 必填, 三选一
            },
            {
                "type": "source_ip",      =>  数据 list
                "operator": "ip_match"  // 不需要填, 默认值
            },
            {
                "type": "source_system"    => 数据 list
                "operator": "in"  // 不需要填, 默认值
            },
            {
                "type": "is_secure_transport"   => 数据 bool
                "operator": "eq"  // 不需要填, 默认值
            }
        ],
        "version": 1
    }
]

@wklken
Copy link
Collaborator Author

wklken commented Nov 16, 2021

move to #391
close

@wklken wklken closed this as completed Nov 16, 2021
@wklken wklken removed this from the Y2021M46 milestone Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Layer: Backend bk-iam backend project Priority: High Size: M <=3 days Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant