Class: OCI::LoadBalancer::Models::SSLConfigurationDetails

Inherits:
Object
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ SSLConfigurationDetails

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 182

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.has_session_resumption = attributes[:'hasSessionResumption'] unless attributes[:'hasSessionResumption'].nil?
  self.has_session_resumption = true if has_session_resumption.nil? && !attributes.key?(:'hasSessionResumption') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :hasSessionResumption and :has_session_resumption' if attributes.key?(:'hasSessionResumption') && attributes.key?(:'has_session_resumption')

  self.has_session_resumption = attributes[:'has_session_resumption'] unless attributes[:'has_session_resumption'].nil?
  self.has_session_resumption = true if has_session_resumption.nil? && !attributes.key?(:'hasSessionResumption') && !attributes.key?(:'has_session_resumption') # rubocop:disable Style/StringLiterals

  self.trusted_certificate_authority_ids = attributes[:'trustedCertificateAuthorityIds'] if attributes[:'trustedCertificateAuthorityIds']

  raise 'You cannot provide both :trustedCertificateAuthorityIds and :trusted_certificate_authority_ids' if attributes.key?(:'trustedCertificateAuthorityIds') && attributes.key?(:'trusted_certificate_authority_ids')

  self.trusted_certificate_authority_ids = attributes[:'trusted_certificate_authority_ids'] if attributes[:'trusted_certificate_authority_ids']

  self.certificate_ids = attributes[:'certificateIds'] if attributes[:'certificateIds']

  raise 'You cannot provide both :certificateIds and :certificate_ids' if attributes.key?(:'certificateIds') && attributes.key?(:'certificate_ids')

  self.certificate_ids = attributes[:'certificate_ids'] if attributes[:'certificate_ids']

  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_idsArray<String>

Ids for OCI certificates service certificates. Currently only a single Id may be passed.

Example: [ocid1.certificate.oc1.us-ashburn-1.amaaaaaaav3bgsaa5o2q7rh5nfmkkukfkogasqhk6af2opufhjlqg7m6jqzq]

Returns:

  • (Array<String>)


55
56
57
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 55

def certificate_ids
  @certificate_ids
end

#certificate_nameString

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

Returns:

  • (String)


64
65
66
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 64

def certificate_name
  @certificate_name
end

#cipher_suite_nameString

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 GET operation returns oci-default-ssl-cipher-suite-v1 as 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 GET operation returns oci-customized-ssl-cipher-suite as the value of this field in the SSL configuration for existing listeners that predate this feature.

  • The GET operation returns oci-wider-compatible-ssl-cipher-suite-v1 as the value of this field in the SSL configuration for existing backend sets that predate this feature.

  • If the GET operation on a listener returns oci-customized-ssl-cipher-suite as 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-suite Oracle reserved cipher suite name is not accepted as valid input for this field.

example: example_cipher_suite

Returns:

  • (String)


122
123
124
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 122

def cipher_suite_name
  @cipher_suite_name
end

#has_session_resumptionBOOLEAN

Whether the load balancer listener should resume an encrypted session by reusing the cryptographic parameters of a previous TLS session, without having to perform a full handshake again. If "true", the service resumes the previous TLS encrypted session. If "false", the service starts a new TLS encrypted session. Enabling session resumption improves performance but provides a lower level of security. Disabling session resumption improves security but reduces performance.

Example: true

Returns:

  • (BOOLEAN)


41
42
43
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 41

def has_session_resumption
  @has_session_resumption
end

#protocolsArray<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

  • TLSv1.3

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 GET operation displays a list of SSL protocols currently used by those resources.

example: [\"TLSv1.1\", \"TLSv1.2\"]

Returns:

  • (Array<String>)


93
94
95
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 93

def protocols
  @protocols
end

#server_order_preferenceString

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.

Returns:

  • (String)


131
132
133
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 131

def server_order_preference
  @server_order_preference
end

#trusted_certificate_authority_idsArray<String>

Ids for OCI certificates service CA or CA bundles for the load balancer to trust.

Example: [ocid1.cabundle.oc1.us-ashburn-1.amaaaaaaav3bgsaagl4zzyqdop5i2vuwoqewdvauuw34llqa74otq2jdsfyq]

Returns:

  • (Array<String>)


48
49
50
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 48

def trusted_certificate_authority_ids
  @trusted_certificate_authority_ids
end

#verify_depthInteger

The maximum depth for peer certificate chain verification.

Example: 3

Returns:

  • (Integer)


24
25
26
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 24

def verify_depth
  @verify_depth
end

#verify_peer_certificateBOOLEAN

Whether the load balancer listener should verify peer certificates.

Example: true

Returns:

  • (BOOLEAN)


31
32
33
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 31

def verify_peer_certificate
  @verify_peer_certificate
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 134

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'verify_depth': :'verifyDepth',
    'verify_peer_certificate': :'verifyPeerCertificate',
    'has_session_resumption': :'hasSessionResumption',
    'trusted_certificate_authority_ids': :'trustedCertificateAuthorityIds',
    'certificate_ids': :'certificateIds',
    'certificate_name': :'certificateName',
    'protocols': :'protocols',
    'cipher_suite_name': :'cipherSuiteName',
    'server_order_preference': :'serverOrderPreference'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 151

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'verify_depth': :'Integer',
    'verify_peer_certificate': :'BOOLEAN',
    'has_session_resumption': :'BOOLEAN',
    'trusted_certificate_authority_ids': :'Array<String>',
    'certificate_ids': :'Array<String>',
    '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.

Parameters:

  • other (Object)

    the other object to be compared



262
263
264
265
266
267
268
269
270
271
272
273
274
275
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 262

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    verify_depth == other.verify_depth &&
    verify_peer_certificate == other.verify_peer_certificate &&
    has_session_resumption == other.has_session_resumption &&
    trusted_certificate_authority_ids == other.trusted_certificate_authority_ids &&
    certificate_ids == other.certificate_ids &&
    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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 300

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


280
281
282
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 280

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



289
290
291
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 289

def hash
  [verify_depth, verify_peer_certificate, has_session_resumption, trusted_certificate_authority_ids, certificate_ids, certificate_name, protocols, cipher_suite_name, server_order_preference].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



333
334
335
336
337
338
339
340
341
342
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 333

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



327
328
329
# File 'lib/oci/load_balancer/models/ssl_configuration_details.rb', line 327

def to_s
  to_hash.to_s
end