TMAegisBeta
Thêm quy tắc cho ibmcloud

IBM Cloud

TMA-IBMCLOUD-RESTRICT-SERVICE-ID-CREATION

Ensure creation of service IDs is restricted

Trung bìnhCấp 2Tự độngibmcloud

Mô tả

Restricting service ID creation keeps machine identities under central control. restrict_create_service_id must be RESTRICTED. Read-only ibmcloud CLI calls using the current CLI session and targeted region (ibmcloud login, or IBMCLOUD_API_KEY); JSON output is parsed with grep/sed/awk. A missing CLI, plugin or session fails the check.

Cách kiểm tra

Phương pháp kiểm tra: Lệnh shell

shell
out=$(ibmcloud iam account-settings --output json 2>/dev/null) || exit 1
v=$(printf '%s\n' "$out" | sed -n 's/.*"restrict_create_service_id"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' | head -n 1)
[ "$v" = RESTRICTED ] && echo compliant
Đầu ra mong đợi
compliant

Cách khắc phục

Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng

ibmcloud iam account-settings-update --restrict-create-service-id RESTRICTED, then grant 'Service ID creator' only where needed.

Thuộc tính

Hệ điều hành
Bất kỳ
Thẻ
ibmcloudiam
Tham chiếu
CIS IBM Cloud Foundations Benchmark v2.0.0 - Identity and Access Management - restrict service ID creation (verify section number for your release)

Kiểm tra máy này

Chạy lệnh này trên máy bạn được phép kiểm tra. Lần quét chỉ ở chế độ đọc.

shell
tmaegis scan --target ibmcloud --level 2