TMA-IBMCLOUD-RESTRICT-API-KEY-CREATION
Ensure creation of platform API keys is restricted
보통레벨 2자동ibmcloud
설명
Restricting API key creation to explicitly authorised users reduces unmanaged long-lived credentials. restrict_create_platform_apikey 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.
점검 방법
감사 방식: 셸 명령
shell
out=$(ibmcloud iam account-settings --output json 2>/dev/null) || exit 1
v=$(printf '%s\n' "$out" | sed -n 's/.*"restrict_create_platform_apikey"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' | head -n 1)
[ "$v" = RESTRICTED ] && echo compliant- 예상 출력
compliant
조치 방법
조치 방식: 가이드 또는 인프라 패치
ibmcloud iam account-settings-update --restrict-create-platform-apikey RESTRICTED, then grant 'User API key creator' only to those who need it.
속성
- 운영 체제
- 모두
- 태그
- ibmcloudiam
- 참고 자료
- CIS IBM Cloud Foundations Benchmark v2.0.0 - Identity and Access Management - restrict user API key creation (verify section number for your release)
이 호스트 점검하기
감사 권한이 있는 시스템에서 실행하세요. 스캔은 읽기 전용입니다.
shell
tmaegis scan --target ibmcloud --level 2