Class: OCI::LoadBalancer::Models::SSLConfiguration
- Inherits:
-
Object
- Object
- OCI::LoadBalancer::Models::SSLConfiguration
- Defined in:
- lib/oci/load_balancer/models/ssl_configuration.rb
Overview
A listener’s SSL handling configuration.
To use SSL, a listener must be associated with a Certificate.
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, SERVER_ORDER_PREFERENCE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.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
[Required] The maximum depth for peer certificate chain verification.
-
#verify_peer_certificate ⇒ BOOLEAN
[Required] 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 = {}) ⇒ SSLConfiguration
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 = {}) ⇒ SSLConfiguration
Initializes the object
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 191 192 193 194 |
# File 'lib/oci/load_balancer/models/ssl_configuration.rb', line 151 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.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 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.protocols = attributes[:'protocols'] if attributes[:'protocols'] 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
43 44 45 |
# File 'lib/oci/load_balancer/models/ssl_configuration.rb', line 43 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
81 82 83 |
# File 'lib/oci/load_balancer/models/ssl_configuration.rb', line 81 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"]`
109 110 111 |
# File 'lib/oci/load_balancer/models/ssl_configuration.rb', line 109 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.
52 53 54 |
# File 'lib/oci/load_balancer/models/ssl_configuration.rb', line 52 def server_order_preference @server_order_preference end |
#verify_depth ⇒ Integer
[Required] The maximum depth for peer certificate chain verification.
Example: 3
27 28 29 |
# File 'lib/oci/load_balancer/models/ssl_configuration.rb', line 27 def verify_depth @verify_depth end |
#verify_peer_certificate ⇒ BOOLEAN
[Required] Whether the load balancer listener should verify peer certificates.
Example: true
34 35 36 |
# File 'lib/oci/load_balancer/models/ssl_configuration.rb', line 34 def verify_peer_certificate @verify_peer_certificate end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/oci/load_balancer/models/ssl_configuration.rb', line 112 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'verify_depth': :'verifyDepth', 'verify_peer_certificate': :'verifyPeerCertificate', 'certificate_name': :'certificateName', 'server_order_preference': :'serverOrderPreference', 'cipher_suite_name': :'cipherSuiteName', 'protocols': :'protocols' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/oci/load_balancer/models/ssl_configuration.rb', line 126 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'verify_depth': :'Integer', 'verify_peer_certificate': :'BOOLEAN', 'certificate_name': :'String', 'server_order_preference': :'String', 'cipher_suite_name': :'String', 'protocols': :'Array<String>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
216 217 218 219 220 221 222 223 224 225 226 |
# File 'lib/oci/load_balancer/models/ssl_configuration.rb', line 216 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 && server_order_preference == other.server_order_preference && cipher_suite_name == other.cipher_suite_name && protocols == other.protocols end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
# File 'lib/oci/load_balancer/models/ssl_configuration.rb', line 251 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
231 232 233 |
# File 'lib/oci/load_balancer/models/ssl_configuration.rb', line 231 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
240 241 242 |
# File 'lib/oci/load_balancer/models/ssl_configuration.rb', line 240 def hash [verify_depth, verify_peer_certificate, certificate_name, server_order_preference, cipher_suite_name, protocols].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
284 285 286 287 288 289 290 291 292 293 |
# File 'lib/oci/load_balancer/models/ssl_configuration.rb', line 284 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
278 279 280 |
# File 'lib/oci/load_balancer/models/ssl_configuration.rb', line 278 def to_s to_hash.to_s end |