TMA-IBMCLOUD-ACCOUNT-MFA
Ensure multi-factor authentication is enabled for all users in the account
CaoCấp 1Tự độngibmcloud
Mô tả
Account-level MFA forces a second factor for every login. The account setting mfa must not be NONE / NONE_NO_ROPC (TOTP4ALL or a LEVEL setting covers federated users as well). 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/.*"mfa"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' | head -n 1)
case "$v" in
''|NONE|NONE_NO_ROPC) exit 1 ;;
*) echo compliant ;;
esac- Đầ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 --mfa TOTP4ALL (or LEVEL1-3 for IBMid/App ID users), or Manage > Access (IAM) > Settings > Authentication.
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 - account-level MFA (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