Class: OCI::Opensearch::Models::SecuritySamlConfig
- Inherits:
-
Object
- Object
- OCI::Opensearch::Models::SecuritySamlConfig
- Defined in:
- lib/oci/opensearch/models/security_saml_config.rb
Overview
SAML policy is optionally used for Opensearch cluster to config SAML authentication
Instance Attribute Summary collapse
-
#admin_backend_role ⇒ String
The backend role of admins who have all permissions like local master user.
-
#idp_entity_id ⇒ String
[Required] The unique name for a identity provider entity.
-
#idp_metadata_content ⇒ String
[Required] The content of identity provider metadata.
-
#is_enabled ⇒ BOOLEAN
[Required] A flag determine whether SAML is enabled.
-
#opendashboard_url ⇒ String
The endpoint of opendashboard.
-
#roles_key ⇒ String
The roles key is sued to get backend roles from SAML assertion.
-
#subject_key ⇒ String
The subject key is used to get username from SAML assertion.
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 = {}) ⇒ SecuritySamlConfig
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 = {}) ⇒ SecuritySamlConfig
Initializes the object
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/oci/opensearch/models/security_saml_config.rb', line 83 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.is_enabled = attributes[:'isEnabled'] unless attributes[:'isEnabled'].nil? self.is_enabled = false if is_enabled.nil? && !attributes.key?(:'isEnabled') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isEnabled and :is_enabled' if attributes.key?(:'isEnabled') && attributes.key?(:'is_enabled') self.is_enabled = attributes[:'is_enabled'] unless attributes[:'is_enabled'].nil? self.is_enabled = false if is_enabled.nil? && !attributes.key?(:'isEnabled') && !attributes.key?(:'is_enabled') # rubocop:disable Style/StringLiterals self. = attributes[:'idpMetadataContent'] if attributes[:'idpMetadataContent'] raise 'You cannot provide both :idpMetadataContent and :idp_metadata_content' if attributes.key?(:'idpMetadataContent') && attributes.key?(:'idp_metadata_content') self. = attributes[:'idp_metadata_content'] if attributes[:'idp_metadata_content'] self.idp_entity_id = attributes[:'idpEntityId'] if attributes[:'idpEntityId'] raise 'You cannot provide both :idpEntityId and :idp_entity_id' if attributes.key?(:'idpEntityId') && attributes.key?(:'idp_entity_id') self.idp_entity_id = attributes[:'idp_entity_id'] if attributes[:'idp_entity_id'] self.opendashboard_url = attributes[:'opendashboardUrl'] if attributes[:'opendashboardUrl'] self.opendashboard_url = "https://localhost:5601" if opendashboard_url.nil? && !attributes.key?(:'opendashboardUrl') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :opendashboardUrl and :opendashboard_url' if attributes.key?(:'opendashboardUrl') && attributes.key?(:'opendashboard_url') self.opendashboard_url = attributes[:'opendashboard_url'] if attributes[:'opendashboard_url'] self.opendashboard_url = "https://localhost:5601" if opendashboard_url.nil? && !attributes.key?(:'opendashboardUrl') && !attributes.key?(:'opendashboard_url') # rubocop:disable Style/StringLiterals self.admin_backend_role = attributes[:'adminBackendRole'] if attributes[:'adminBackendRole'] raise 'You cannot provide both :adminBackendRole and :admin_backend_role' if attributes.key?(:'adminBackendRole') && attributes.key?(:'admin_backend_role') self.admin_backend_role = attributes[:'admin_backend_role'] if attributes[:'admin_backend_role'] self.subject_key = attributes[:'subjectKey'] if attributes[:'subjectKey'] raise 'You cannot provide both :subjectKey and :subject_key' if attributes.key?(:'subjectKey') && attributes.key?(:'subject_key') self.subject_key = attributes[:'subject_key'] if attributes[:'subject_key'] self.roles_key = attributes[:'rolesKey'] if attributes[:'rolesKey'] raise 'You cannot provide both :rolesKey and :roles_key' if attributes.key?(:'rolesKey') && attributes.key?(:'roles_key') self.roles_key = attributes[:'roles_key'] if attributes[:'roles_key'] end |
Instance Attribute Details
#admin_backend_role ⇒ String
The backend role of admins who have all permissions like local master user
30 31 32 |
# File 'lib/oci/opensearch/models/security_saml_config.rb', line 30 def admin_backend_role @admin_backend_role end |
#idp_entity_id ⇒ String
[Required] The unique name for a identity provider entity
22 23 24 |
# File 'lib/oci/opensearch/models/security_saml_config.rb', line 22 def idp_entity_id @idp_entity_id end |
#idp_metadata_content ⇒ String
[Required] The content of identity provider metadata
18 19 20 |
# File 'lib/oci/opensearch/models/security_saml_config.rb', line 18 def @idp_metadata_content end |
#is_enabled ⇒ BOOLEAN
[Required] A flag determine whether SAML is enabled
14 15 16 |
# File 'lib/oci/opensearch/models/security_saml_config.rb', line 14 def is_enabled @is_enabled end |
#opendashboard_url ⇒ String
The endpoint of opendashboard
26 27 28 |
# File 'lib/oci/opensearch/models/security_saml_config.rb', line 26 def opendashboard_url @opendashboard_url end |
#roles_key ⇒ String
The roles key is sued to get backend roles from SAML assertion
38 39 40 |
# File 'lib/oci/opensearch/models/security_saml_config.rb', line 38 def roles_key @roles_key end |
#subject_key ⇒ String
The subject key is used to get username from SAML assertion. By default, it is NameID
34 35 36 |
# File 'lib/oci/opensearch/models/security_saml_config.rb', line 34 def subject_key @subject_key end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/oci/opensearch/models/security_saml_config.rb', line 41 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'is_enabled': :'isEnabled', 'idp_metadata_content': :'idpMetadataContent', 'idp_entity_id': :'idpEntityId', 'opendashboard_url': :'opendashboardUrl', 'admin_backend_role': :'adminBackendRole', 'subject_key': :'subjectKey', 'roles_key': :'rolesKey' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/oci/opensearch/models/security_saml_config.rb', line 56 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'is_enabled': :'BOOLEAN', 'idp_metadata_content': :'String', 'idp_entity_id': :'String', 'opendashboard_url': :'String', 'admin_backend_role': :'String', 'subject_key': :'String', 'roles_key': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/oci/opensearch/models/security_saml_config.rb', line 143 def ==(other) return true if equal?(other) self.class == other.class && is_enabled == other.is_enabled && == other. && idp_entity_id == other.idp_entity_id && opendashboard_url == other.opendashboard_url && admin_backend_role == other.admin_backend_role && subject_key == other.subject_key && roles_key == other.roles_key end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
# File 'lib/oci/opensearch/models/security_saml_config.rb', line 179 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
159 160 161 |
# File 'lib/oci/opensearch/models/security_saml_config.rb', line 159 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
168 169 170 |
# File 'lib/oci/opensearch/models/security_saml_config.rb', line 168 def hash [is_enabled, , idp_entity_id, opendashboard_url, admin_backend_role, subject_key, roles_key].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
212 213 214 215 216 217 218 219 220 221 |
# File 'lib/oci/opensearch/models/security_saml_config.rb', line 212 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
206 207 208 |
# File 'lib/oci/opensearch/models/security_saml_config.rb', line 206 def to_s to_hash.to_s end |