Google 云 Sql 私有 ip 仅带 ssl
Google Cloud Sql private ip with ssl only
我想从 GCP 中的 spring 引导应用程序连接到云 Sql,使用私有 IP 和仅用于 public ip 的 ssl。我不明白 "ssl only flag" 它仅用于 public 连接或 public/private?
它们是 security/connectivity 的两个不同维度。
Public IP 表示从 VPC 外部连接 (https://cloud.google.com/vpc). So it could be an external application (not in Cloud), or maybe an application running in GCP but on a different network (VPC). Private IP means the application and the database share the VPC, or are peered between two VPCs (https://cloud.google.com/vpc/docs/vpc-peering)。基本上,一个你停留在 Google 的互联网范围内,而另一个你可能正在接触 public 互联网。
SSL 是其中一层之上的另一层,您可以在其中指定允许用户连接的密钥。因此,选中 "ssl only connections" 框意味着您只想允许连接到具有与您注册的密钥匹配的私钥的数据库实例。
一般来说,我们的最佳做法是使用云 SQL 代理 (https://cloud.google.com/sql/docs/mysql/sql-proxy) 而不是设置您自己的 SSL 密钥。该代理还使用 SSL 密钥来确保安全连接,但它是按需执行的,而不是更安全的静态密钥。你真正想要使用自己的 SSL 密钥的唯一一次是,如果你有一个你想要信任和使用的特定证书颁发机构,那么你有你需要使用的特定密钥(或者你只是不信任 Google 和想要跟踪您自己的 SSL 密钥)。
我想从 GCP 中的 spring 引导应用程序连接到云 Sql,使用私有 IP 和仅用于 public ip 的 ssl。我不明白 "ssl only flag" 它仅用于 public 连接或 public/private?
它们是 security/connectivity 的两个不同维度。
Public IP 表示从 VPC 外部连接 (https://cloud.google.com/vpc). So it could be an external application (not in Cloud), or maybe an application running in GCP but on a different network (VPC). Private IP means the application and the database share the VPC, or are peered between two VPCs (https://cloud.google.com/vpc/docs/vpc-peering)。基本上,一个你停留在 Google 的互联网范围内,而另一个你可能正在接触 public 互联网。
SSL 是其中一层之上的另一层,您可以在其中指定允许用户连接的密钥。因此,选中 "ssl only connections" 框意味着您只想允许连接到具有与您注册的密钥匹配的私钥的数据库实例。
一般来说,我们的最佳做法是使用云 SQL 代理 (https://cloud.google.com/sql/docs/mysql/sql-proxy) 而不是设置您自己的 SSL 密钥。该代理还使用 SSL 密钥来确保安全连接,但它是按需执行的,而不是更安全的静态密钥。你真正想要使用自己的 SSL 密钥的唯一一次是,如果你有一个你想要信任和使用的特定证书颁发机构,那么你有你需要使用的特定密钥(或者你只是不信任 Google 和想要跟踪您自己的 SSL 密钥)。