Reference documentation and code samples for the Network Security V1beta1 API class Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy.
ServerTlsPolicy is a resource that specifies how a server should authenticate
incoming requests. This resource itself does not affect configuration unless
it is attached to a target https proxy or endpoint config selector resource.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#allow_open
defallow_open()->::Boolean
Returns
(::Boolean) โ Determines if server allows plaintext connections. If set to true, server
allows plain text connections. By default, it is set to false. This setting
is not exclusive of other encryption modes. For example, if allow_open
and mtls_policy are set, server allows both plain text and mTLS
connections. See documentation of other encryption modes to confirm
compatibility.
Consider using it if you wish to upgrade in place your deployment to TLS
while having mixed TLS and non-TLS traffic reaching port :80.
#allow_open=
defallow_open=(value)->::Boolean
Parameter
value (::Boolean) โ Determines if server allows plaintext connections. If set to true, server
allows plain text connections. By default, it is set to false. This setting
is not exclusive of other encryption modes. For example, if allow_open
and mtls_policy are set, server allows both plain text and mTLS
connections. See documentation of other encryption modes to confirm
compatibility.
Consider using it if you wish to upgrade in place your deployment to TLS
while having mixed TLS and non-TLS traffic reaching port :80.
Returns
(::Boolean) โ Determines if server allows plaintext connections. If set to true, server
allows plain text connections. By default, it is set to false. This setting
is not exclusive of other encryption modes. For example, if allow_open
and mtls_policy are set, server allows both plain text and mTLS
connections. See documentation of other encryption modes to confirm
compatibility.
Consider using it if you wish to upgrade in place your deployment to TLS
while having mixed TLS and non-TLS traffic reaching port :80.
(::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy::MTLSPolicy) โ Defines a mechanism to provision peer validation certificates for peer to
peer authentication (Mutual TLS - mTLS). If not specified, client
certificate will not be requested. The connection is treated as TLS and not
mTLS. If allow_open and mtls_policy are set, server allows both plain
text and mTLS connections.
value (::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy::MTLSPolicy) โ Defines a mechanism to provision peer validation certificates for peer to
peer authentication (Mutual TLS - mTLS). If not specified, client
certificate will not be requested. The connection is treated as TLS and not
mTLS. If allow_open and mtls_policy are set, server allows both plain
text and mTLS connections.
Returns
(::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy::MTLSPolicy) โ Defines a mechanism to provision peer validation certificates for peer to
peer authentication (Mutual TLS - mTLS). If not specified, client
certificate will not be requested. The connection is treated as TLS and not
mTLS. If allow_open and mtls_policy are set, server allows both plain
text and mTLS connections.
#name
defname()->::String
Returns
(::String) โ Required. Name of the ServerTlsPolicy resource. It matches the pattern
projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}
#name=
defname=(value)->::String
Parameter
value (::String) โ Required. Name of the ServerTlsPolicy resource. It matches the pattern
projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}
Returns
(::String) โ Required. Name of the ServerTlsPolicy resource. It matches the pattern
projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}
(::Google::Cloud::NetworkSecurity::V1beta1::CertificateProvider) โ Defines a mechanism to provision server identity (public and private keys).
Cannot be combined with allow_open as a permissive mode that allows both
plain text and TLS is not supported.
value (::Google::Cloud::NetworkSecurity::V1beta1::CertificateProvider) โ Defines a mechanism to provision server identity (public and private keys).
Cannot be combined with allow_open as a permissive mode that allows both
plain text and TLS is not supported.
Returns
(::Google::Cloud::NetworkSecurity::V1beta1::CertificateProvider) โ Defines a mechanism to provision server identity (public and private keys).
Cannot be combined with allow_open as a permissive mode that allows both
plain text and TLS is not supported.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Network Security V1beta1 API - Class Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy (v0.11.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.11.0 (latest)](/ruby/docs/reference/google-cloud-network_security-v1beta1/latest/Google-Cloud-NetworkSecurity-V1beta1-ServerTlsPolicy)\n- [0.10.1](/ruby/docs/reference/google-cloud-network_security-v1beta1/0.10.1/Google-Cloud-NetworkSecurity-V1beta1-ServerTlsPolicy)\n- [0.9.0](/ruby/docs/reference/google-cloud-network_security-v1beta1/0.9.0/Google-Cloud-NetworkSecurity-V1beta1-ServerTlsPolicy)\n- [0.8.1](/ruby/docs/reference/google-cloud-network_security-v1beta1/0.8.1/Google-Cloud-NetworkSecurity-V1beta1-ServerTlsPolicy)\n- [0.7.2](/ruby/docs/reference/google-cloud-network_security-v1beta1/0.7.2/Google-Cloud-NetworkSecurity-V1beta1-ServerTlsPolicy)\n- [0.6.0](/ruby/docs/reference/google-cloud-network_security-v1beta1/0.6.0/Google-Cloud-NetworkSecurity-V1beta1-ServerTlsPolicy)\n- [0.5.1](/ruby/docs/reference/google-cloud-network_security-v1beta1/0.5.1/Google-Cloud-NetworkSecurity-V1beta1-ServerTlsPolicy)\n- [0.4.0](/ruby/docs/reference/google-cloud-network_security-v1beta1/0.4.0/Google-Cloud-NetworkSecurity-V1beta1-ServerTlsPolicy)\n- [0.3.0](/ruby/docs/reference/google-cloud-network_security-v1beta1/0.3.0/Google-Cloud-NetworkSecurity-V1beta1-ServerTlsPolicy)\n- [0.2.0](/ruby/docs/reference/google-cloud-network_security-v1beta1/0.2.0/Google-Cloud-NetworkSecurity-V1beta1-ServerTlsPolicy)\n- [0.1.2](/ruby/docs/reference/google-cloud-network_security-v1beta1/0.1.2/Google-Cloud-NetworkSecurity-V1beta1-ServerTlsPolicy) \nReference documentation and code samples for the Network Security V1beta1 API class Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy.\n\nServerTlsPolicy is a resource that specifies how a server should authenticate\nincoming requests. This resource itself does not affect configuration unless\nit is attached to a target https proxy or endpoint config selector resource. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #allow_open\n\n def allow_open() -\u003e ::Boolean\n\n**Returns**\n\n- (::Boolean) --- Determines if server allows plaintext connections. If set to true, server allows plain text connections. By default, it is set to false. This setting is not exclusive of other encryption modes. For example, if `allow_open` and `mtls_policy` are set, server allows both plain text and mTLS connections. See documentation of other encryption modes to confirm compatibility.\n\n\n Consider using it if you wish to upgrade in place your deployment to TLS\n while having mixed TLS and non-TLS traffic reaching port :80.\n\n### #allow_open=\n\n def allow_open=(value) -\u003e ::Boolean\n\n**Parameter**\n\n- **value** (::Boolean) --- Determines if server allows plaintext connections. If set to true, server allows plain text connections. By default, it is set to false. This setting is not exclusive of other encryption modes. For example, if `allow_open` and `mtls_policy` are set, server allows both plain text and mTLS connections. See documentation of other encryption modes to confirm compatibility.\n\n\n Consider using it if you wish to upgrade in place your deployment to TLS\nwhile having mixed TLS and non-TLS traffic reaching port :80. \n**Returns**\n\n- (::Boolean) --- Determines if server allows plaintext connections. If set to true, server allows plain text connections. By default, it is set to false. This setting is not exclusive of other encryption modes. For example, if `allow_open` and `mtls_policy` are set, server allows both plain text and mTLS connections. See documentation of other encryption modes to confirm compatibility.\n\n\n Consider using it if you wish to upgrade in place your deployment to TLS\n while having mixed TLS and non-TLS traffic reaching port :80.\n\n### #create_time\n\n def create_time() -\u003e ::Google::Protobuf::Timestamp\n\n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Output only. The timestamp when the resource was created.\n\n### #description\n\n def description() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Free-text description of the resource.\n\n### #description=\n\n def description=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Free-text description of the resource. \n**Returns**\n\n- (::String) --- Free-text description of the resource.\n\n### #labels\n\n def labels() -\u003e ::Google::Protobuf::Map{::String =\u003e ::String}\n\n**Returns**\n\n- (::Google::Protobuf::Map{::String =\\\u003e ::String}) --- Set of label tags associated with the resource.\n\n### #labels=\n\n def labels=(value) -\u003e ::Google::Protobuf::Map{::String =\u003e ::String}\n\n**Parameter**\n\n- **value** (::Google::Protobuf::Map{::String =\\\u003e ::String}) --- Set of label tags associated with the resource. \n**Returns**\n\n- (::Google::Protobuf::Map{::String =\\\u003e ::String}) --- Set of label tags associated with the resource.\n\n### #mtls_policy\n\n def mtls_policy() -\u003e ::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy::MTLSPolicy\n\n**Returns**\n\n- ([::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy::MTLSPolicy](./Google-Cloud-NetworkSecurity-V1beta1-ServerTlsPolicy-MTLSPolicy)) --- Defines a mechanism to provision peer validation certificates for peer to peer authentication (Mutual TLS - mTLS). If not specified, client certificate will not be requested. The connection is treated as TLS and not mTLS. If `allow_open` and `mtls_policy` are set, server allows both plain text and mTLS connections.\n\n### #mtls_policy=\n\n def mtls_policy=(value) -\u003e ::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy::MTLSPolicy\n\n**Parameter**\n\n- **value** ([::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy::MTLSPolicy](./Google-Cloud-NetworkSecurity-V1beta1-ServerTlsPolicy-MTLSPolicy)) --- Defines a mechanism to provision peer validation certificates for peer to peer authentication (Mutual TLS - mTLS). If not specified, client certificate will not be requested. The connection is treated as TLS and not mTLS. If `allow_open` and `mtls_policy` are set, server allows both plain text and mTLS connections. \n**Returns**\n\n- ([::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy::MTLSPolicy](./Google-Cloud-NetworkSecurity-V1beta1-ServerTlsPolicy-MTLSPolicy)) --- Defines a mechanism to provision peer validation certificates for peer to peer authentication (Mutual TLS - mTLS). If not specified, client certificate will not be requested. The connection is treated as TLS and not mTLS. If `allow_open` and `mtls_policy` are set, server allows both plain text and mTLS connections.\n\n### #name\n\n def name() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Required. Name of the ServerTlsPolicy resource. It matches the pattern `projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}`\n\n### #name=\n\n def name=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Required. Name of the ServerTlsPolicy resource. It matches the pattern `projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}` \n**Returns**\n\n- (::String) --- Required. Name of the ServerTlsPolicy resource. It matches the pattern `projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}`\n\n### #server_certificate\n\n def server_certificate() -\u003e ::Google::Cloud::NetworkSecurity::V1beta1::CertificateProvider\n\n**Returns**\n\n- ([::Google::Cloud::NetworkSecurity::V1beta1::CertificateProvider](./Google-Cloud-NetworkSecurity-V1beta1-CertificateProvider)) --- Defines a mechanism to provision server identity (public and private keys). Cannot be combined with `allow_open` as a permissive mode that allows both plain text and TLS is not supported.\n\n### #server_certificate=\n\n def server_certificate=(value) -\u003e ::Google::Cloud::NetworkSecurity::V1beta1::CertificateProvider\n\n**Parameter**\n\n- **value** ([::Google::Cloud::NetworkSecurity::V1beta1::CertificateProvider](./Google-Cloud-NetworkSecurity-V1beta1-CertificateProvider)) --- Defines a mechanism to provision server identity (public and private keys). Cannot be combined with `allow_open` as a permissive mode that allows both plain text and TLS is not supported. \n**Returns**\n\n- ([::Google::Cloud::NetworkSecurity::V1beta1::CertificateProvider](./Google-Cloud-NetworkSecurity-V1beta1-CertificateProvider)) --- Defines a mechanism to provision server identity (public and private keys). Cannot be combined with `allow_open` as a permissive mode that allows both plain text and TLS is not supported.\n\n### #update_time\n\n def update_time() -\u003e ::Google::Protobuf::Timestamp\n\n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Output only. The timestamp when the resource was updated."]]