TLS 暗号スイートを制限する

このページでは、安全性の低い特定の Transport Layer Security(TLS)暗号スイートを使用して行われたリクエストを拒否することで、 Google Cloud リソースへのアクセスを防止する方法について説明します。

概要

Google Cloud は、複数の TLS 暗号スイートをサポートしています。セキュリティ要件またはコンプライアンス要件を満たすため、安全性の低い TLS 暗号スイートを使用しているクライアントからのリクエストを拒否する場合があります。

この機能は、gcp.restrictTLSCipherSuites 組織のポリシーの制約によって提供されています。この制約は、リソース階層内の組織、フォルダ、プロジェクトに適用できます。

gcp.restrictTLSCipherSuites 制約は、許可リストまたは拒否リストとして使用できます。

  • 許可リスト: 特定の暗号スイートのセットを許可します。他のすべてのリクエストは拒否されます。
  • 拒否リスト: 特定の暗号スイートのセットを拒否します。他のすべてのユーザーは許可されます。

組織のポリシー階層の評価の動作により、TLS 暗号スイートの制限制約は指定されたリソースノードとそのすべての子に適用されます。たとえば、組織で特定の TLS 暗号スイートのみを許可すると、その組織の子孫であるすべてのフォルダとプロジェクト(子)にも適用されます。

始める前に

組織のポリシーの設定、変更、削除に必要な権限を取得するには、組織に対する組織のポリシー管理者 roles/orgpolicy.policyAdmin)の IAM ロールを付与するよう管理者に依頼してください。ロールの付与については、プロジェクト、フォルダ、組織へのアクセス権の管理をご覧ください。

必要な権限は、カスタムロールや他の事前定義ロールから取得することもできます。

組織ポリシーの設定

TLS 暗号スイートを制限する制約は、リスト型制約の一種です。TLS 暗号スイートの制限制約の allowed_values リストまたは denied_values リストに対して、暗号スイートの追加または削除を行えます。組織のポリシーが過度に制限的になるのを防ぎ、ポリシー管理を簡素化するには、値グループを使用します。値グループは、Google が厳選した推奨 TLS 暗号スイートです。

コンソール

  1. Google Cloud コンソールで [組織のポリシー] ページを開きます。

    [組織のポリシー] に移動

  2. ページの上部にあるプロジェクト選択ツールを選択します。

  3. プロジェクト選択ツールから、組織のポリシーを設定するリソースを選択します。

  4. [組織のポリシー] ページのリストから、[TLS 暗号スイートを制限する] 制約を選択します。

  5. このリソースの組織ポリシーを更新するには、[ポリシーを管理] をクリックします。

  6. [編集] ページで、[カスタマイズ] を選択します。

  7. [ポリシーの適用] で、適用オプションを選択します。

    • 組織のポリシーを結合してまとめて評価するには、[親と結合する] を選択します。継承とリソース階層の詳細については、階層評価についてをご覧ください。

    • 親リソースから継承されたポリシーをオーバーライドするには、[置換] を選択します。

  8. [ルールを追加] をクリックします。

  9. [ポリシーの値] で [カスタム] を選択します。

  10. [ポリシーの種類] で、[許可] を選択して許可された暗号スイートのリストを作成するか、[拒否] を選択して拒否された暗号スイートのリストを作成します。

  11. [カスタム値] で、in: 接頭辞と値グループ文字列を入力してから、Enter キーを押します。

    • たとえば、「in:NIST-800-52-recommended-ciphers」のようになります。[値を追加] をクリックすると、複数の値グループ文字列を入力できます。

    • is: 接頭辞を使用して、特定の暗号スイート文字列を入力することもできます。サポートされている値の一覧については、サポートされている暗号スイートをご覧ください。

  12. ポリシーを適用するには、[ポリシーを設定] をクリックします。

gcloud

TLS 暗号スイートを制限する制約を適用する組織のポリシーを作成するには、制約を参照するポリシー YAML ファイルを作成します。

constraint: constraints/gcp.restrictTLSCipherSuites
listPolicy:
  allowedValues:
  - in:CNSA-2.0-recommended-ciphers
  - is:TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA

制約を含む組織のポリシーを適用するには、次のコマンドを実行します。

gcloud resource-manager org-policies set-policy \
--RESOURCE_TYPE RESOURCE_ID \
POLICY_PATH

次のように置き換えます。

  • RESOURCE_TYPEorganizationfolder、または project に置き換えます。

  • RESOURCE_ID は、組織 ID、フォルダ ID、プロジェクト ID、またはプロジェクト番号に置き換えます。

  • POLICY_PATH は、組織のポリシーを含む YAML ファイルのパスに置き換えます。

新しい組織のポリシーの結果を含むレスポンスが返されます。

constraint: constraints/gcp.restrictTLSCipherSuites
etag: COS9qr0GELii6o0C
listPolicy:
  allowedValues:
  - in:CNSA-2.0-recommended-ciphers
  - is:TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
updateTime: '2025-02-11T00:50:44.565875Z'

値グループ

値グループは、優先または推奨される TLS 暗号スイートを簡単に定義できるようにするために Google によってキュレートされた暗号スイートのコレクションです。値グループには複数の暗号スイートが含まれており、時間の経過とともに Google によって拡張されます。新しい暗号スイートに対応するために、組織のポリシーを変更する必要はありません。

組織のポリシーで値グループを使用するには、エントリの先頭に文字列 in: を付加します。値接頭辞の使用方法については、制約の使用をご覧ください。 組織のポリシーを設定するための呼び出しで、値グループ名が検証されます。無効なグループ名を使用すると、ポリシー設定が失敗します。

次の表に、現時点で使用可能なグループのリストを示します。

グループ 詳細 直接メンバー
CNSA-2.0-recommended-ciphers Google Cloud でサポートされている CNSA 2.0 推奨暗号:
in:CNSA-2.0-recommended-ciphers
値:
  • TLS_AES_256_GCM_SHA384
  • TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
  • TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
NIST-800-52-recommended-ciphers Google Cloud でサポートされている NIST SP 800-52 の推奨暗号:
in:NIST-800-52-recommended-ciphers
値:
  • TLS_AES_128_GCM_SHA256
  • TLS_AES_256_GCM_SHA384
  • TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
  • TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
  • TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
  • TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
  • TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
  • TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
  • TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
  • TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384

サポートされている暗号スイート

これは、 Google Cloudでサポートされている暗号スイートのリストです。

TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
TLS_RSA_WITH_AES_128_GCM_SHA256
TLS_RSA_WITH_AES_128_CBC_SHA
TLS_RSA_WITH_3DES_EDE_CBC_SHA

TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
TLS_RSA_WITH_AES_256_GCM_SHA384
TLS_RSA_WITH_AES_256_CBC_SHA
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA

TLS_AES_128_GCM_SHA256
TLS_AES_256_GCM_SHA384
TLS_CHACHA20_POLY1305_SHA256

エラー メッセージ

TLS 暗号スイートの制限の制約をサポートするサービスは、制約に違反するリクエストを拒否します。

エラー メッセージの例

エラー メッセージの形式は、次の例のようになります。

Request is disallowed by organization's constraints/gcp.restrictTLSCipherSuites
constraint for 'projects/PROJECT_NUMBER'.
Access to service
'SERVICE_NAME.googleapis.com' attempted with a disallowed TLS Cipher Suite: 'TLS_Cipher_Suite_X`
To access this resource, please use an allowed TLS Cipher Suite.

この出力には次の値が含まれます。

  • PROJECT_NUMBER: 前のコマンドで参照されているリソースをホストするプロジェクトのプロジェクト番号。
  • SERVICE_NAME: TLS 暗号スイートの制限ポリシーによってブロックされたスコープ内のサービスの名前。
  • TLS_Cipher_Suite_X: リクエストで使用される TLS 暗号スイート。

Cloud Audit Logs の例

また、詳細なモニタリング、アラート、デバッグ用に監査ログエントリが生成されます。監査ログエントリは次のようになります。

{
  logName: "projects/my-project-number/logs/cloudaudit.googleapis.com%2Fpolicy"
  protoPayload: {
    @type: "type.googleapis.com/google.cloud.audit.AuditLog"
    status: {
      code: 7
      message: "Request is disallowed by organization's TLS Cipher Suite Restriction Org Policy for 'projects/my-project-number'. Attempting to use service 'bigquery.googleapis.com' with a disallowed TLS Cipher Suite: 'TLS_Cipher_Suite_X`."
    }
    serviceName: "bigquery.googleapis.com"
    methodName: "google.cloud.bigquery.v2.TableDataService.InsertAll"
    resourceName: "projects/my-project-number"
    authenticationInfo: {
      principalEmail: "user_or_service_account@example.com"
    }
  }
  requestMetadata: {
    callerIp: "123.123.123.123"
  }
  policyViolationInfo: {
    orgPolicyViolationInfo: {
      violationInfo: [
        {
          constraint: "constraints/gcp.restrictTlsCipherSuites"
          errorMessage: "TLS Cipher Suite Restriction Org Policy is violated"
          policyType: "LIST_CONSTRAINT"
        }
      ]
    }
  }
  resource: {
    type: "audited_resource"
    labels: {
      project_id: "my-project-number"
      method: "google.cloud.bigquery.v2.TableDataService.InsertAll"
      service: "bigquery.googleapis.com"
    }
  }
  severity: "ERROR"
  timestamp: "2023-10-27T19:27:24.633477924Z"
  receiveTimestamp: "2023-10-27T19:27:25.071941737Z"
  insertId "42"
}

ポリシーのテスト

TLS 暗号制限ポリシーの制約は、任意のスコープ内サービスでテストできます。次の curl コマンドの例は、Cloud Key Management Service キーリングの TLS 暗号スイートの制限を検証します。

curl --ciphers TLS_CIPHER_SUITE --tls_max 1.2 -H "Authorization: Bearer $(gcloud auth print-access-token)" \
  "https://cloudkms.googleapis.com/v1/projects/PROJECT_ID/locations/global/keyRings" --verbose

次の変数を置き換えます。

  • TLS_CIPHER_SUITE: OpenSSL 命名規則の TLS 暗号スイート名(TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA の OpenSSL 名である ECDHE-ECDSA-AES128-SHA など)。

  • PROJECT_ID: キーリングを含むプロジェクトの名前

次の curl リクエストの例は、PROJECT_IDmy-project-id に設定され、TLS_CIPHER_SUITEECDHE-ECDSA-AES128-SHA に設定されていることを示しています。

curl --ciphers ECDHE-ECDSA-AES128-SHA --tls-max 1.2 \
  GET -H "Authorization: Bearer $(gcloud auth print-access-token)" \
  "https://cloudkms.googleapis.com/v1/projects/my-project-id/locations/global/keyRings" --verbose

「my-project-id」の組織のポリシーが TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA を拒否するように構成されている場合、この例のコマンドでポリシー制限されたプロジェクトで、暗号を使用してリソースにアクセスしようとすると失敗します。失敗の理由を説明する次のようなエラー メッセージが返されます。

Request is disallowed by organization's constraints/gcp.restrictTLSCipherSuites
constraint for 'projects/my-project-id'.
Access to service cloudkms.googleapis.com attempted with a disallowed TLS Cipher
Suite: `TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA`.
To access this resource, please use an allowed TLS Cipher Suite.

ドライラン モードで組織のポリシーを作成する

ドライラン モードの組織のポリシーは、ポリシーの違反が監査ログに記録されながら違反アクションは拒否されないタイプの組織のポリシーです。TLS 暗号スイートの制限制約を使用して、ドライラン モードで組織のポリシーを作成して、それが組織にどう影響するかを、ライブのポリシーを適用する前にモニタリングできます。詳細については、ドライラン モードで組織のポリシーを作成するをご覧ください。

サポート対象のサービス

次のサービスは、TLS 暗号スイートの制限をサポートしています。この制約は、グローバル エンドポイント、ロケーション エンドポイント、リージョン エンドポイントなど、API エンドポイントのすべてのバリエーションに適用されます。詳細については、API エンドポイント タイプのページをご覧ください。

プロダクト API エンドポイント
API Gateway apigateway.googleapis.com
API キー apikeys.googleapis.com
Access Context Manager accesscontextmanager.googleapis.com
Apigee apigee.googleapis.com
Apigee API Hub apihub.googleapis.com
Apigee API Management API apim.googleapis.com
Apigee Connect API apigeeconnect.googleapis.com
Apigee portal API apigeeportal.googleapis.com
Apigee Registry API apigeeregistry.googleapis.com
App Config Manager API appconfigmanager.googleapis.com
App Hub apphub.googleapis.com
App Design Center designcenter.googleapis.com
Application Integration integrations.googleapis.com
Artifact Analysis containeranalysis.googleapis.com
ondemandscanning.googleapis.com
Artifact Registry artifactregistry.googleapis.com
Assured Open Source Software assuredoss.googleapis.com
Assured Workloads assuredworkloads.googleapis.com
Audit Manager auditmanager.googleapis.com
Authorization Toolkit API authztoolkit.googleapis.com
バッチ batch.googleapis.com
Chrome Enterprise Premium beyondcorp.googleapis.com
BigLake biglake.googleapis.com
BigQuery bigquery.googleapis.com
BigQuery 接続 bigqueryconnection.googleapis.com
BigQuery Data Policy bigquerydatapolicy.googleapis.com
BigQuery Data Transfer bigquerydatatransfer.googleapis.com
BigQuery の移行 bigquerymigration.googleapis.com
BigQuery の予約 bigqueryreservation.googleapis.com
BigQuery Saved Query API bigquery-sq.googleapis.com
BigQuery ストレージ bigquerystorage.googleapis.com
Bigtable bigtable.googleapis.com
bigtableadmin.googleapis.com
Binary Authorization binaryauthorization.googleapis.com
ブロックチェーン分析 blockchain.googleapis.com
Blockchain Node Engine blockchainnodeengine.googleapis.com
ブロックチェーン バリデータ マネージャー blockchainvalidatormanager.googleapis.com
キャパシティ プランナー capacityplanner.googleapis.com
Certificate Authority Service privateca.googleapis.com
Certificate Manager certificatemanager.googleapis.com
Cloud Asset Inventory cloudasset.googleapis.com
Cloud Build cloudbuild.googleapis.com
Cloud CDN compute.googleapis.com
Cloud Commerce Producer API cloudcommerceproducer.googleapis.com
Cloud Composer composer.googleapis.com
Cloud Controls Partner API cloudcontrolspartner.googleapis.com
Cloud DNS dns.googleapis.com
Cloud Data Fusion datafusion.googleapis.com
Cloud Deployment Manager runtimeconfig.googleapis.com
deploymentmanager.googleapis.com
Cloud Domains domains.googleapis.com
Cloud Healthcare API healthcare.googleapis.com
Cloud Interconnect compute.googleapis.com
Cloud Intrusion Detection System ids.googleapis.com
Cloud Key Management Service cloudkms.googleapis.com
Cloud Life Sciences lifesciences.googleapis.com
Cloud Load Balancing compute.googleapis.com
Cloud Logging logging.googleapis.com
Cloud Monitoring monitoring.googleapis.com
Cloud NAT compute.googleapis.com
Cloud Natural Language API language.googleapis.com
Cloud Next Generation Firewall Essentials compute.googleapis.com
networksecurity.googleapis.com
Cloud Next Generation Firewall Standard compute.googleapis.com
networksecurity.googleapis.com
Cloud OS Login API oslogin.googleapis.com
Cloud Router compute.googleapis.com
Cloud Run run.googleapis.com
Cloud SQL sqladmin.googleapis.com
Cloud Service Mesh meshconfig.googleapis.com
networksecurity.googleapis.com
Cloud Support API cloudsupport.googleapis.com
Cloud Tool Results API toolresults.googleapis.com
Cloud VPN compute.googleapis.com
Cloud Workstations workstations.googleapis.com
Commerce Agreement Publishing API commerceagreementpublishing.googleapis.com
Commerce Business Enablement API commercebusinessenablement.googleapis.com
Commerce Price Management API commercepricemanagement.googleapis.com
Compute Engine compute.googleapis.com
Confidential Computing confidentialcomputing.googleapis.com
接続 gkeconnect.googleapis.com
Connect Gateway connectgateway.googleapis.com
Contact Center AI Platform API contactcenteraiplatform.googleapis.com
Container Threat Detection containerthreatdetection.googleapis.com
Content Warehouse API contentwarehouse.googleapis.com
Continuous Validation API continuousvalidation.googleapis.com
Data Labeling API datalabeling.googleapis.com
データ セキュリティ ポスチャー管理 API dspm.googleapis.com
データベース移行サービス datamigration.googleapis.com
Dataflow dataflow.googleapis.com
Dataplex Universal Catalog dataplex.googleapis.com
datalineage.googleapis.com
Dataproc on GDC dataprocgdc.googleapis.com
Google Distributed Cloud opsconfigmonitoring.googleapis.com
gdcvmmanager.googleapis.com
gdchardwaremanagement.googleapis.com
Distributed Cloud Edge Container API edgecontainer.googleapis.com
Distributed Cloud Edge Network API edgenetwork.googleapis.com
Enterprise Knowledge Graph enterpriseknowledgegraph.googleapis.com
エラーレポート clouderrorreporting.googleapis.com
重要な連絡先 essentialcontacts.googleapis.com
Eventarc eventarc.googleapis.com
Filestore file.googleapis.com
Financial Services API financialservices.googleapis.com
Firebase App Hosting firebaseapphosting.googleapis.com
Firebase Data Connect firebasedataconnect.googleapis.com
Firebase セキュリティ ルール firebaserules.googleapis.com
GKE Dataplane Management gkedataplanemanagement.googleapis.com
GKE Enterprise Edge API anthosedge.googleapis.com
Hub(フリート) gkehub.googleapis.com
GKE Multi-Cloud gkemulticloud.googleapis.com
GKE On-Prem API gkeonprem.googleapis.com
Gemini for Google Cloud API cloudaicompanion.googleapis.com
Google Cloud API cloud.googleapis.com
Google Cloud Armor compute.googleapis.com
Google Cloud Migration Center migrationcenter.googleapis.com
Google Cloud Observability stackdriver.googleapis.com
Google Kubernetes Engine container.googleapis.com
configdelivery.googleapis.com
Google Security Operations SIEM chronicle.googleapis.com
chronicleservicemanager.googleapis.com
Google Security Operations Partner API chroniclepartner.googleapis.com
Google Workspace アドオン gsuiteaddons.googleapis.com
Identity and Access Management iam.googleapis.com
Identity-Aware Proxy iap.googleapis.com
Immersive Stream stream.googleapis.com
Infrastructure Manager config.googleapis.com
インテグレーション コネクタ connectors.googleapis.com
KRM API Hosting krmapihosting.googleapis.com
Live Stream API livestream.googleapis.com
Looker Studio datastudio.googleapis.com
Apache Flink 向け BigQuery Engine managedflink.googleapis.com
Managed Kafka API managedkafka.googleapis.com
サービス管理 servicemanagement.googleapis.com
Media Asset Manager mediaasset.googleapis.com
Memorystore for Memcached memcache.googleapis.com
Memorystore for Redis redis.googleapis.com
Message Streams API messagestreams.googleapis.com
Microservices API microservices.googleapis.com
Model Armor modelarmor.googleapis.com
Network Connectivity Center networkconnectivity.googleapis.com
Network Intelligence Center networkmanagement.googleapis.com
Network Service Tiers compute.googleapis.com
Persistent Disk compute.googleapis.com
Oracle Database@Google Cloud oracledatabase.googleapis.com
Parallelstore parallelstore.googleapis.com
Policy Analyzer policyanalyzer.googleapis.com
Policy Troubleshooter policytroubleshooter.googleapis.com
段階的なロールアウト progressiverollout.googleapis.com
Pub/Sub pubsub.googleapis.com
Public Certificate Authority publicca.googleapis.com
Recommender recommender.googleapis.com
Remote Build Execution remotebuildexecution.googleapis.com
Retail API retail.googleapis.com
サイバー保険ハブ riskmanager.googleapis.com
SaaS Service Management API saasservicemgmt.googleapis.com
SecLM API seclm.googleapis.com
Secret Manager secretmanager.googleapis.com
Security Command Center securitycenter.googleapis.com
securitycentermanagement.googleapis.com
securityposture.googleapis.com
Cloud Data Loss Prevention dlp.googleapis.com
Service Account Credentials API iamcredentials.googleapis.com
Service Directory servicedirectory.googleapis.com
サービス ネットワーキング servicenetworking.googleapis.com
Spanner spanner.googleapis.com
Speaker ID speakerid.googleapis.com
Speech-to-Text speech.googleapis.com
Storage Insights storageinsights.googleapis.com
Storage Transfer Service storagebatchoperations.googleapis.com
Text-to-Speech texttospeech.googleapis.com
Timeseries Insights API timeseriesinsights.googleapis.com
Transcoder API transcoder.googleapis.com
Transfer Appliance transferappliance.googleapis.com
VM Manager osconfig.googleapis.com
Vertex AI API aiplatform.googleapis.com
Vertex AI Workbench notebooks.googleapis.com
Vertex AI in Firebase firebasevertexai.googleapis.com
Virtual Private Cloud(VPC) compute.googleapis.com
Video Search API cloudvideosearch.googleapis.com
Video Stitcher API videostitcher.googleapis.com
Web Risk webrisk.googleapis.com
Web Security Scanner websecurityscanner.googleapis.com
Workflows workflows.googleapis.com
Workload Certificate API workloadcertificate.googleapis.com

サポートされていないサービス

TLS 暗号スイートの制限に関する組織のポリシーの制約は、次のサービスには適用されません。

  • App Engine(*.appspot.com
  • Cloud Run functions(*.cloudfunctions.net)、
  • Cloud Run(*.run.app
  • Private Service Connect
  • カスタム ドメイン

これらのサービスの TLS 暗号スイートを制限するには、SSL セキュリティ ポリシーとともに Cloud Load Balancing を使用します。

Google Cloud 暗号スイートの設定

サポートされているサービスのエンドポイントでは、ChaCha20 よりも AES-128 が優先され、AES-128 よりも AES-256 が優先されます。AES-256 をサポートするクライアントは、構成を変更しなくても、正常にネゴシエートする必要があります。