3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Cloudflare で設定できるエッジ証明書まとめ

Last updated at Posted at 2021-08-06

エッジ証明書

主に、以下の証明書タイプがあります。
例えば、手動で更新したくない場合は ユニバーサルかアドバンストが選択肢になり、自組織に紐づいた EV / OV 証明書を使いたい場合は、カスタム証明書になります。

Universal Certificate Advanced Certificate
(旧 Dedicated Certificate)
Custom Certificate
Provision Cloudflare Cloudflare User
Auto-renew Yes Yes Manual(通知あり)
Certificate Authority DigiCert
Let's Encrypt
DigiCert
Let's Encrypt
Any
Host root (example.com)
first-level subdomains (*.example.com)のみ
root (example.com)
first-level subdomains (*.example.com)
second, third, and fourth-level subdomains ( dev.www.example.com , app3.dev.www.example.com )などの任意のホスト名
root (example.com)
first-level subdomains (*.example.com)
second, third, and fourth-level subdomains ( dev.www.example.com , app3.dev.www.example.com )などの任意のホスト名
Domain Validation (DV) - - Yes
Organization Validated (OV) Yes (Cloudflare, Inc.) Yes (Cloudflare, Inc.) Yes (Your Org)
Extended Validated (EV) No No Yes
Cost & Plan Free for All Plan - $10/month add-on per zone (Free, Pro, and Business)
- Ask for Quote (Enterprise)
- One Cert per Domain (for Business and Enterprise)
- More Certs : Ask for Quote (Enterprise)

適用順位

複数の証明書が存在する場合の適用順位について、以下に詳細の記述がありますが、

Certificate and hostname priority · Cloudflare SSL docs

概要は以下の通りです。

  1. ホスト名指定チェック
    • ワイルドカードよりも、明示的にホスト名の指定がある証明書が優先されます
  2. 証明書タイプチェック
    • 1 が同じ証明書がある場合、Custom (Legacy) --> Custom (Modern) --> Advanced --> Universal の順で優先されます。
  3. 発行日チェック
    • 1 も 2 も同じ証明書がある場合、新しい証明書が優先されます。

Cipher Control

ACM の機能が有効化済みであれば、ゾーンまたはホスト名に対して Cipher Control が可能です。

Cipher suites · Cloudflare SSL docs
With Advanced Certificate Manager (ACM), you can restrict connections to specific cipher suites.

ただし、TLS 1.3 に関して Cipher はハードコード実装のため、Cipher Control は効きません。
TLS 1.2 以下の場合のみ、Cipher Control が有効です。

export EMAIL='YOUR_EMAIL'
export APIKEY='YOUR_APIKEY'
export ZONE_ID='YOUR_ZONE_ID'

% curl -X PATCH "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/settings/ciphers" \
     -H "X-Auth-Email: $EMAIL" \
     -H "X-Auth-Key:$APIKEY" \
     -H "Content-Type: application/json" \
--data '{"value":["AEAD-AES128-GCM-SHA256"]}'
{"success":false,"errors":[{"code":1007,"message":"Invalid value for zone setting ciphers"}],"messages":[],"result":null}

% curl -X PATCH "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/settings/ciphers" \
     -H "X-Auth-Email: $EMAIL" \
     -H "X-Auth-Key:$APIKEY" \
     -H "Content-Type: application/json" \
--data '{"value":["AEAD-AES256-GCM-SHA384"]}'
{"success":false,"errors":[{"code":1007,"message":"Invalid value for zone setting ciphers"}],"messages":[],"result":null}

%  curl -X PATCH "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/settings/ciphers" \
     -H "X-Auth-Email: $EMAIL" \
     -H "X-Auth-Key:$APIKEY" \
     -H "Content-Type: application/json" \
--data '{"value":["AEAD-CHACHA20-POLY1305-SHA256"]}'
{"success":false,"errors":[{"code":1007,"message":"Invalid value for zone setting ciphers"}],"messages":[],"result":null}

参考

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?