TLS証明書検証のためのトラスト・ストアのカスタマイズ
Find out how to add Certificate Authorities (CAs) and CA bundles to custom trust stores with API Gateway.
The API gateways you create with the API Gateway service verify TLS certificates presented to them using a trust store. The trust store can contain Certificate Authority (CA) root certificates, and CA bundles of root and intermediate certificates. A default CA bundle is added to each API gateway's trust store, containing certificates of well-known public CAs. The default CA bundle enables the API gateway to verify TLS certificates presented by back-end services.
In addition to the default CA bundle, you can choose to add the root certificates of other CAs, and other CA bundles, to an API gateway's trust store. These additional CAs and CA bundles are referred to as custom CAs and custom CA bundles. To add a custom CA or CA bundle to an API gateway's trust store, you have to first create a CA resource or CA bundle resource in the Certificates service. Having created the resource in the Certificates service, you can then add it to the API gateway's trust store. Adding custom CAs and CA bundles enables you to customize the trust store to meet your requirements.
Having added custom CAs and CA bundles to the trust store, TLS connections to the API gateway (including from HTTPS back ends, and from the response cache) are verified using both the default CA bundle, and the custom CAs and CA bundles. In addition, if you have specified mTLS support for an API deployment, the API gateway uses custom CAs and custom CA bundles to verify API client certificates. Note that the API gateway does not use the default CA bundle to verify API client certificates during an mTLS handshake. So if you want an API gateway to support mTLS, you must add custom CAs and CA bundles to the API gateway's trust store
For some customers, it's obligatory for security reasons to use custom trust stores that contain only private CAs, and no public CAs.また、商業的な要件によってカスタム・トラスト・ストアの使用が必要になる場合もあります。
Adding Custom CAs and CA Bundles to an API Gateway's Trust Store
To customize an API gateway's trust store by adding a custom Certificate Authority (CA) or CA bundle, first create a Certificate Authority (CA) resource or CA bundle resource in the Certificates service, and then add it to the API gateway's trust store.
APIゲートウェイのトラスト・ストアからのカスタムCAおよびCAバンドルの削除
APIゲートウェイのトラスト・ストアにカスタム認証局(CA)またはCAバンドルを追加すると、CAまたはCAバンドルが不要になる場合があります。
APIゲートウェイにデプロイされているmTLS対応APIがない場合は、APIゲートウェイのトラスト・ストアからカスタムCAおよびCAバンドルの一部またはすべてを削除できます。APIゲートウェイにデプロイされたmTLS対応APIが1つ以上ある場合、APIゲートウェイのトラスト・ストアには常に少なくとも1つのカスタムCAまたはCAバンドルが必要です。
コンソールの使用
コンソールを使用してAPIゲートウェイのトラスト・ストアからカスタムCAまたはCAバンドルを削除するには:
- コンソールでナビゲーション・メニューを開き、「開発者サービス」をクリックします「API管理」で、「ゲートウェイ」をクリックします
- 作業する権限があるコンパートメントを選択します。
- 「ゲートウェイ」ページで、カスタムCAまたはCAバンドルを削除するAPIゲートウェイの名前をクリックして、「ゲートウェイの詳細」ページを表示します。
-
「ゲートウェイの詳細」ページで、「リソース」リストから「認証局」を選択して、APIゲートウェイのトラスト・ストアにカスタムCAおよびCAバンドルを表示します。
-
削除するカスタムCAまたはCAバンドルの横にあるをクリックし、「削除」を選択します。
APIゲートウェイに1つ以上のmTLS対応APIがデプロイされている場合、APIゲートウェイのトラスト・ストアからすべてのカスタムCAおよびCAバンドルを削除することはできません。
-
APIゲートウェイのトラスト・ストアからカスタムCAまたはCAバンドルを削除することを確認します。
CLIの使用
CLIを使用してAPIゲートウェイのトラスト・ストアからカスタムCAまたはCAバンドルを削除するには:
- CLIを使用するためにクライアント環境を構成します(APIゲートウェイ開発用のCLIを使用するためのクライアント環境の構成)。
-
APIゲートウェイのトラスト・ストアからカスタムCAまたはCAバンドルを削除するには:
-
コマンド・プロンプトを開き、
oci API-gateway gateway update
を実行して、APIゲートウェイのトラスト・ストアからカスタムCAまたはCAバンドルを削除します:oci api-gateway gateway update --gateway-id <gateway-ocid> --ca-bundles file:///<filename>
<filename>
は、APIゲートウェイのトラスト・ストアに保持するカスタムCAおよびカスタムCAバンドルのみの詳細を含むファイルの名前です(デフォルトのCAバンドルに加えて)。ファイルに含まれていないCAまたはCAバンドルは、トラスト・ストアから削除されます。例:
oci api-gateway gateway update --gateway-id ocid1.apigateway.oc1..aaaaaaaab______hga --ca-bundles file:///bundles-to-keep.json
APIゲートウェイに1つ以上のmTLS対応APIがデプロイされている場合、APIゲートウェイのトラスト・ストアからすべてのカスタムCAおよびCAバンドルを削除することはできません。
コマンドへのレスポンスには、次が含まれます:
- ライフサイクルの状態(たとえば、削除済、失敗)。
- カスタムCAまたはCAバンドルを削除する作業リクエストのID(作業リクエストの詳細は、完了、取消または失敗の後の7日間利用可能です)。
カスタムCAまたはCAバンドルが削除される(または要求が失敗する)までコマンドが制御を返すのを待機する場合は、次のいずれかまたは両方のパラメータを含めます:
--wait-for-state DELETED
--wait-for-state FAILED
例:
oci api-gateway gateway update --gateway-id ocid1.apigateway.oc1..aaaaaaaab______hga --ca-bundles file:///bundles-to-keep.json --wait-for-state DELETED
-
(オプション)カスタムCAまたはCAバンドルを削除している作業リクエストのステータスを表示するには、次を入力します:
oci api-gateway work-request get --work-request-id <work-request-ocid>
-
(オプション)カスタムCAまたはCAバンドルを削除している作業リクエストのログを表示するには、次を入力します:
oci api-gateway work-request-log list --work-request-id <work-request-ocid>
-
(オプション)カスタムCAまたはCAバンドルを削除する作業リクエストが失敗し、エラー・ログを確認する場合は、次を入力します:
oci api-gateway work-request-error --work-request-id <work-request-ocid>
-
(オプション)カスタムCAまたはCAバンドルがAPIゲートウェイのトラスト・ストアから削除されたことを確認するには、次のコマンドを入力して、カスタムCAまたはCAバンドルが表示されなくなったことを確認します:
oci api-gateway gateway get --gateway-id <gateway-ocid>
-
CLIの使用の詳細は、コマンドライン・インタフェース(CLI)を参照してください。CLIコマンドで使用できるフラグおよびオプションの完全なリストについては、CLIのヘルプを参照してください。
APIの使用
APIの使用およびリクエストの署名の詳細は、REST APIのドキュメントおよびセキュリティ資格証明を参照してください。SDKの詳細は、SDKおよびCLIを参照してください。
UpdateGateway操作を使用して、APIゲートウェイのトラスト・ストアに保持するカスタムCAおよびカスタムCAバンドルのみを指定します(デフォルトのCAバンドルに加えて)。指定しないCAまたはCAバンドルは、トラスト・ストアから削除されます。APIゲートウェイに1つ以上のmTLS対応APIがデプロイされている場合、APIゲートウェイのトラスト・ストアからすべてのカスタムCAおよびCAバンドルを削除することはできません。