HTTP
HTTP 検証は、顧客のオリジンに DCV トークンを追加することを含みます。
カスタムホスト名にワイルドカードが含まれていない場合、Cloudflare は常に自動的に HTTP 検証 を通じて DCV を完了しようとします。たとえ検証方法として TXT を選択していてもです。
この HTTP 検証は、顧客がカスタムホスト名を指しており、選択した証明書発行機関をブロックする CAA レコード がない限り、成功するはずです。
ワイルドカード証明書に対する HTTP DCV 検証は もはや許可されていません。代わりに TXT 検証 を使用する必要があります。
シンプルさを重視し、顧客が数分間のダウンタイムを受け入れられる場合、Cloudflare の自動 HTTP 検証に依存できます。
新しいホスト名を 作成し、http 検証方法を選択すると、顧客は $CNAME_TARGET に CNAME を追加するだけで、Cloudflare が残りを処理します。
カスタムホスト名を作成した後の動作
Cloudflare contacts one of our Certificate Authority providers and asks them to issue certificates for the specified hostname. The CA will then inform Cloudflare that we need to “demonstrate control” of this hostname by returning a $DCV_TOKEN at a specified $DCV_FILENAME; both the token and the filename are randomly generated by the CA and not known to Cloudflare ahead of time.
For example, if you create a new custom hostname for site.example.com, the CA might ask us to return the value ca3-38734555d85e4421beb4a3e6d1645fe6 for a request to http://site.example.com/.well-known/pki-validation/ca3-39f423f095be4983922ca0365308612d.txt". As soon as we receive that value from the CA we make it accessible at our edge and ask the CA to confirm it’s there so that they can complete validation and the certificate order.
顧客に CNAME を更新させる前に発行プロセスを完了したい場合(またはターゲット CNAME の解決を Cloudflare にプロキシさせる前に)、別の検証方法を選択してください。
Once you create a new hostname and choose this validation method, you will see the following values after a few seconds:
- API:
sslオブジェクト内で、validation_records配列に存在する値(特にhttp_urlとhttp_body)を保存します。 - ダッシュボード: SSL/TLS > カスタムホスト名 で個々の証明書を表示する際、証明書検証リクエスト と 証明書検証レスポンス の値を参照します。
オリジンで、http_body を http_url に指定されたパスの TXT レコードで利用可能にします。このパスは、CA がアクセスできるようにインターネット上の誰でも公開アクセス可能である必要があります。
トークンを返す NGINX 設定の例は次のとおりです:
location "/.well-known/pki-validation/ca3-0052344e54074d9693e89e27486692d6.txt" { return 200 "ca3-be794c5f757b468eba805d1a705e44f6\n";}設定がライブになったら、curl を使って DCV テキストファイルが配置されていることをテストします:
$ curl "http://http-preval.example.com/.well-known/pki-validation/ca3-0052344e54074d9693e89e27486692d6.txt"ca3-be794c5f757b468eba805d1a705e44f6トークンは1回のチェックサイクルに対して有効です。次のチェックサイクルでは、Cloudflare が CA に URL を再確認し、検証を完了し、証明書を発行するように依頼します。
If you would like to request an immediate recheck, rather than wait for the next retry, send a PATCH request with the same values as your initial POST request.