Class: OCI::LoadBalancer::Models::SSLConfigurationDetails
- Inherits:
-
Object
- Object
- OCI::LoadBalancer::Models::SSLConfigurationDetails
- Defined in:
- lib/oci/load_balancer/models/ssl_configuration_details.rb
Overview
The load balancer’s SSL handling configuration details.
Warning: Oracle recommends that you avoid using any confidential information when you supply string values using the API.
Constant Summary collapse
- SERVER_ORDER_PREFERENCE_ENUM =
[ SERVER_ORDER_PREFERENCE_ENABLED = 'ENABLED'.freeze, SERVER_ORDER_PREFERENCE_DISABLED = 'DISABLED'.freeze ].freeze
Instance Attribute Summary collapse
-
#certificate_name ⇒ String
A friendly name for the certificate bundle.
-
#cipher_suite_name ⇒ String
The name of the cipher suite to use for HTTPS or SSL connections.
-
#protocols ⇒ Array<String>
A list of SSL protocols the load balancer must support for HTTPS or SSL connections.
-
#server_order_preference ⇒ String
When this attribute is set to ENABLED, the system gives preference to the server ciphers over the client ciphers.
-
#verify_depth ⇒ Integer
The maximum depth for peer certificate chain verification.
-
#verify_peer_certificate ⇒ BOOLEAN
Whether the load balancer listener should verify peer certificates.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ SSLConfigurationDetails
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ SSLConfigurationDetails
Initializes the object
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 147 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.verify_depth = attributes[:'verifyDepth'] if attributes[:'verifyDepth'] raise 'You cannot provide both :verifyDepth and :verify_depth' if attributes.key?(:'verifyDepth') && attributes.key?(:'verify_depth') self.verify_depth = attributes[:'verify_depth'] if attributes[:'verify_depth'] self.verify_peer_certificate = attributes[:'verifyPeerCertificate'] unless attributes[:'verifyPeerCertificate'].nil? self.verify_peer_certificate = false if verify_peer_certificate.nil? && !attributes.key?(:'verifyPeerCertificate') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :verifyPeerCertificate and :verify_peer_certificate' if attributes.key?(:'verifyPeerCertificate') && attributes.key?(:'verify_peer_certificate') self.verify_peer_certificate = attributes[:'verify_peer_certificate'] unless attributes[:'verify_peer_certificate'].nil? self.verify_peer_certificate = false if verify_peer_certificate.nil? && !attributes.key?(:'verifyPeerCertificate') && !attributes.key?(:'verify_peer_certificate') # rubocop:disable Style/StringLiterals self.certificate_name = attributes[:'certificateName'] if attributes[:'certificateName'] raise 'You cannot provide both :certificateName and :certificate_name' if attributes.key?(:'certificateName') && attributes.key?(:'certificate_name') self.certificate_name = attributes[:'certificate_name'] if attributes[:'certificate_name'] self.protocols = attributes[:'protocols'] if attributes[:'protocols'] self.cipher_suite_name = attributes[:'cipherSuiteName'] if attributes[:'cipherSuiteName'] self.cipher_suite_name = "oci-default-ssl-cipher-suite-v1" if cipher_suite_name.nil? && !attributes.key?(:'cipherSuiteName') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :cipherSuiteName and :cipher_suite_name' if attributes.key?(:'cipherSuiteName') && attributes.key?(:'cipher_suite_name') self.cipher_suite_name = attributes[:'cipher_suite_name'] if attributes[:'cipher_suite_name'] self.cipher_suite_name = "oci-default-ssl-cipher-suite-v1" if cipher_suite_name.nil? && !attributes.key?(:'cipherSuiteName') && !attributes.key?(:'cipher_suite_name') # rubocop:disable Style/StringLiterals self.server_order_preference = attributes[:'serverOrderPreference'] if attributes[:'serverOrderPreference'] self.server_order_preference = "ENABLED" if server_order_preference.nil? && !attributes.key?(:'serverOrderPreference') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :serverOrderPreference and :server_order_preference' if attributes.key?(:'serverOrderPreference') && attributes.key?(:'server_order_preference') self.server_order_preference = attributes[:'server_order_preference'] if attributes[:'server_order_preference'] self.server_order_preference = "ENABLED" if server_order_preference.nil? && !attributes.key?(:'serverOrderPreference') && !attributes.key?(:'server_order_preference') # rubocop:disable Style/StringLiterals end |
Instance Attribute Details
#certificate_name ⇒ String
A friendly name for the certificate bundle. It must be unique and it cannot be changed. Valid certificate bundle names include only alphanumeric characters, dashes, and underscores. Certificate bundle names cannot contain spaces. Avoid entering confidential information.
Example: example_certificate_bundle
39 40 41 |
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 39 def certificate_name @certificate_name end |
#cipher_suite_name ⇒ String
The name of the cipher suite to use for HTTPS or SSL connections.
If this field is not specified, the default is oci-default-ssl-cipher-suite-v1.
Notes:
-
You must ensure compatibility between the specified SSL protocols and the ciphers configured in the cipher suite. Clients cannot perform an SSL handshake if there is an incompatible configuration.
-
You must ensure compatibility between the ciphers configured in the cipher suite and the configured certificates. For example, RSA-based ciphers require RSA certificates and ECDSA-based ciphers require ECDSA certificates.
-
If the cipher configuration is not modified after load balancer creation, the
GEToperation returnsoci-default-ssl-cipher-suite-v1as the value of this field in the SSL configuration for existing listeners that predate this feature. -
If the cipher configuration was modified using Oracle operations after load balancer creation, the
GEToperation returnsoci-customized-ssl-cipher-suiteas the value of this field in the SSL configuration for existing listeners that predate this feature. -
The
GEToperation returnsoci-wider-compatible-ssl-cipher-suite-v1as the value of this field in the SSL configuration for existing backend sets that predate this feature. -
If the
GEToperation on a listener returnsoci-customized-ssl-cipher-suiteas the value of this field, you must specify an appropriate predefined or custom cipher suite name when updating the resource. -
The
oci-customized-ssl-cipher-suiteOracle reserved cipher suite name is not accepted as valid input for this field.
example: example_cipher_suite
96 97 98 |
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 96 def cipher_suite_name @cipher_suite_name end |
#protocols ⇒ Array<String>
A list of SSL protocols the load balancer must support for HTTPS or SSL connections.
The load balancer uses SSL protocols to establish a secure connection between a client and a server. A secure connection ensures that all data passed between the client and the server is private.
The Load Balancing service supports the following protocols:
-
TLSv1
-
TLSv1.1
-
TLSv1.2
If this field is not specified, TLSv1.2 is the default.
Warning: All SSL listeners created on a given port must use the same set of SSL protocols.
Notes:
-
The handshake to establish an SSL connection fails if the client supports none of the specified protocols.
-
You must ensure compatibility between the specified SSL protocols and the ciphers configured in the cipher suite.
-
For all existing load balancer listeners and backend sets that predate this feature, the
GEToperation displays a list of SSL protocols currently used by those resources.
example: ‘["TLSv1.1", "TLSv1.2"]`
67 68 69 |
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 67 def protocols @protocols end |
#server_order_preference ⇒ String
When this attribute is set to ENABLED, the system gives preference to the server ciphers over the client ciphers.
Note: This configuration is applicable only when the load balancer is acting as an SSL/HTTPS server. This
field is ignored when the `SSLConfiguration` object is associated with a backend set.
105 106 107 |
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 105 def server_order_preference @server_order_preference end |
#verify_depth ⇒ Integer
The maximum depth for peer certificate chain verification.
Example: 3
23 24 25 |
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 23 def verify_depth @verify_depth end |
#verify_peer_certificate ⇒ BOOLEAN
Whether the load balancer listener should verify peer certificates.
Example: true
30 31 32 |
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 30 def verify_peer_certificate @verify_peer_certificate end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 108 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'verify_depth': :'verifyDepth', 'verify_peer_certificate': :'verifyPeerCertificate', 'certificate_name': :'certificateName', 'protocols': :'protocols', 'cipher_suite_name': :'cipherSuiteName', 'server_order_preference': :'serverOrderPreference' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 122 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'verify_depth': :'Integer', 'verify_peer_certificate': :'BOOLEAN', 'certificate_name': :'String', 'protocols': :'Array<String>', 'cipher_suite_name': :'String', 'server_order_preference': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
207 208 209 210 211 212 213 214 215 216 217 |
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 207 def ==(other) return true if equal?(other) self.class == other.class && verify_depth == other.verify_depth && verify_peer_certificate == other.verify_peer_certificate && certificate_name == other.certificate_name && protocols == other.protocols && cipher_suite_name == other.cipher_suite_name && server_order_preference == other.server_order_preference end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 242 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
222 223 224 |
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 222 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
231 232 233 |
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 231 def hash [verify_depth, verify_peer_certificate, certificate_name, protocols, cipher_suite_name, server_order_preference].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
275 276 277 278 279 280 281 282 283 284 |
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 275 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
269 270 271 |
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 269 def to_s to_hash.to_s end |