Geo Key Manager v2 では、キーを保存する地理的な範囲を柔軟に選べます。
policy フィールドを使い、秘密鍵を保存する国またはリージョンの許可リストとブロックリストを含むポリシーを定義できます。
API で Geo Key Manager v2 を使う場合は、原則として カスタム証明書をアップロードする 手順に従います。
POST リクエストを送るときに、policy パラメータを含め、秘密鍵を保存する国またはリージョンの許可リストとブロックリストを定義します。
秘密鍵を EU と米国に保存する
Required API token permissions
At least one of the following token permissions is required:Access: Mutual TLS Certificates WriteSSL and Certificates Write
curl "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/custom_certificates" \
--request POST \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--json '{
"certificate": "certificate",
"private_key": "<PRIVATE_KEY>",
"policy": "(country: US) and (region: EU)",
"type": "sni_custom"
}'秘密鍵を EU に保存し、フランスには保存しない
Required API token permissions
At least one of the following token permissions is required:Access: Mutual TLS Certificates WriteSSL and Certificates Write
curl "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/custom_certificates" \
--request POST \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--json '{
"certificate": "certificate",
"private_key": "<PRIVATE_KEY>",
"policy": "(region: EU) and (not country: FR)",
"type": "sni_custom"
}'Geo Key Manager の最初のバージョンは、米国、EU、および一連の High Security Data Centers の 3 リージョンに対応しています。秘密鍵を別の国またはリージョンに制限したい場合は、新バージョンの クローズドベータに申し込みます ↗。
ダッシュボードで Geo Key Manager を使う手順は次のとおりです。
- カスタム証明書をアップロードする 手順に従います。
- Private Key Restriction で、次のいずれかを選びます。
- Distribute to all Cloudflare data centers (optimal performance)
- Distribute only to U.S. data centers
- Distribute only to E.U. data centers
- Distribute only to highest security data centers(詳細)
- Upload Custom Certificate を選択します。
API で Geo Key Manager を使う場合は、原則として カスタム証明書をアップロードする 手順に従います。
POST リクエストを送るときに、geo_restrictions パラメータを次のいずれかに設定します。
useuhighest_security(詳細)