Alibaba Cloud
TMA-ALIBABA-5.4
Ensure that 'Secure transfer required' is set to 'Enabled'
Description
Enable the data encryption in transit. The secure transfer enhances the security of OSS bucket by only allowing requests to the storage account by a secure connection. For example, when calling REST APIs to access storage accounts, the connection must use ... Every bucket policy must contain a Deny statement conditioned on acs:SecureTransport (requests over plain HTTP are rejected); a bucket without a policy fails. Read-only aliyun CLI calls; credentials and default region come from the CLI's normal profile (aliyun configure, ~/.aliyun/config.json or ALIBABA_CLOUD_* environment variables). JSON output is parsed with sed/awk. A missing CLI or credential fails the check.
Méthode de vérification
Méthode d'audit: Commande shell
out=$(aliyun oss ls -s 2>/dev/null) || exit 1
bs=$(printf '%s\n' "$out" | grep -o 'oss://[^[:space:]]*' | sed 's#^oss://##; s#/$##')
bad=0
for b in $bs; do
pl=$(aliyun oss bucket-policy --method get "oss://$b" 2>&1) || { printf '%s\n' "$pl" | grep -q 'NoSuchBucketPolicy' || exit 1; pl=""; }
if printf '%s\n' "$pl" | grep -q 'acs:SecureTransport' && printf '%s\n' "$pl" | grep -q '"Deny"'; then :; else echo "HTTP not denied: $b"; bad=1; fi
done
[ "$bad" -eq 0 ] && echo compliant- Sortie attendue
compliant
Méthode de correction
Méthode de correction: Recommandation ou correctif d'infrastructure
Add a bucket policy statement {"Effect":"Deny","Action":["oss:*"],"Principal":["*"],"Resource":["acs:oss:*:*:<bucket>","acs:oss:*:*:<bucket>/*"],"Condition":{"Bool":{"acs:SecureTransport":["false"]}}} (aliyun oss bucket-policy --method put oss://<bucket> policy.json).
Propriétés
- Systèmes d'exploitation
- Tous
- Étiquettes
- alibabaoss
- Référence
- CIS Alibaba Cloud Foundation Benchmark v2.0.1 - 5.4 Ensure that 'Secure transfer required' is set to 'Enabled'
Vérifier cet hôte
Exécutez cette commande sur une machine que vous êtes autorisé à auditer. L'analyse est en lecture seule.
tmaegis scan --target alibaba