akeyless 2.15.32 → 2.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -1
  3. data/docs/Auth.md +5 -1
  4. data/docs/AuthMethodAccessInfo.md +2 -0
  5. data/docs/CertAccessRules.md +34 -0
  6. data/docs/CreateAuthMethodCert.md +48 -0
  7. data/docs/CreateAuthMethodCertOutput.md +18 -0
  8. data/docs/CreateAuthMethodLDAP.md +3 -1
  9. data/docs/CreateAuthMethodOIDC.md +4 -0
  10. data/docs/CreateClassicKey.md +5 -1
  11. data/docs/GatewayCreateProducerCustom.md +4 -0
  12. data/docs/GatewayCreateProducerOracleDb.md +8 -0
  13. data/docs/GatewayMessageQueueInfo.md +1 -3
  14. data/docs/GatewayUpdateProducerCustom.md +4 -0
  15. data/docs/GatewayUpdateProducerOracleDb.md +8 -0
  16. data/docs/KMIPClient.md +2 -0
  17. data/docs/KMIPServer.md +4 -0
  18. data/docs/KmipDeleteServer.md +20 -0
  19. data/docs/KmipDescribeServerOutput.md +4 -0
  20. data/docs/KmipMoveServer.md +22 -0
  21. data/docs/KmipMoveServerOutput.md +20 -0
  22. data/docs/ListAuthMethods.md +3 -1
  23. data/docs/ListRoles.md +2 -0
  24. data/docs/ListTargets.md +2 -0
  25. data/docs/OIDCAccessRules.md +4 -0
  26. data/docs/UpdateAuthMethodCert.md +50 -0
  27. data/docs/UpdateAuthMethodCertOutput.md +18 -0
  28. data/docs/UpdateAuthMethodLDAP.md +3 -1
  29. data/docs/UpdateAuthMethodOIDC.md +4 -0
  30. data/docs/UpdateOutput.md +2 -0
  31. data/docs/V2Api.md +256 -0
  32. data/lib/akeyless/api/v2_api.rb +248 -0
  33. data/lib/akeyless/api_client.rb +3 -1
  34. data/lib/akeyless/models/auth.rb +22 -2
  35. data/lib/akeyless/models/auth_method_access_info.rb +10 -1
  36. data/lib/akeyless/models/cert_access_rules.rb +316 -0
  37. data/lib/akeyless/models/create_auth_method_cert.rb +401 -0
  38. data/lib/akeyless/models/create_auth_method_cert_output.rb +219 -0
  39. data/lib/akeyless/models/create_auth_method_ldap.rb +14 -4
  40. data/lib/akeyless/models/create_auth_method_oidc.rb +23 -1
  41. data/lib/akeyless/models/create_classic_key.rb +26 -4
  42. data/lib/akeyless/models/gateway_create_producer_custom.rb +23 -1
  43. data/lib/akeyless/models/gateway_create_producer_oracle_db.rb +39 -1
  44. data/lib/akeyless/models/gateway_message_queue_info.rb +4 -13
  45. data/lib/akeyless/models/gateway_update_producer_custom.rb +23 -1
  46. data/lib/akeyless/models/gateway_update_producer_oracle_db.rb +39 -1
  47. data/lib/akeyless/models/kmip_client.rb +10 -1
  48. data/lib/akeyless/models/kmip_delete_server.rb +231 -0
  49. data/lib/akeyless/models/kmip_describe_server_output.rb +19 -1
  50. data/lib/akeyless/models/kmip_move_server.rb +240 -0
  51. data/lib/akeyless/models/kmip_move_server_output.rb +228 -0
  52. data/lib/akeyless/models/kmip_server.rb +19 -1
  53. data/lib/akeyless/models/list_auth_methods.rb +12 -2
  54. data/lib/akeyless/models/list_roles.rb +11 -1
  55. data/lib/akeyless/models/list_targets.rb +11 -1
  56. data/lib/akeyless/models/oidc_access_rules.rb +23 -1
  57. data/lib/akeyless/models/update_auth_method_cert.rb +411 -0
  58. data/lib/akeyless/models/update_auth_method_cert_output.rb +219 -0
  59. data/lib/akeyless/models/update_auth_method_ldap.rb +14 -4
  60. data/lib/akeyless/models/update_auth_method_oidc.rb +23 -1
  61. data/lib/akeyless/models/update_output.rb +10 -1
  62. data/lib/akeyless/version.rb +1 -1
  63. data/lib/akeyless.rb +8 -0
  64. data/spec/models/cert_access_rules_spec.rb +82 -0
  65. data/spec/models/create_auth_method_cert_output_spec.rb +34 -0
  66. data/spec/models/create_auth_method_cert_spec.rb +124 -0
  67. data/spec/models/kmip_delete_server_spec.rb +40 -0
  68. data/spec/models/kmip_move_server_output_spec.rb +40 -0
  69. data/spec/models/kmip_move_server_spec.rb +46 -0
  70. data/spec/models/update_auth_method_cert_output_spec.rb +34 -0
  71. data/spec/models/update_auth_method_cert_spec.rb +130 -0
  72. metadata +34 -2
@@ -0,0 +1,231 @@
1
+ =begin
2
+ #Akeyless API
3
+
4
+ #The purpose of this application is to provide access to Akeyless API.
5
+
6
+ The version of the OpenAPI document: 2.0
7
+ Contact: support@akeyless.io
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ # kmipDeleteServer is a command that the kmip server (allowed only if it has no clients nor associated items)
18
+ class KmipDeleteServer
19
+ # Authentication token (see `/auth` and `/configure`)
20
+ attr_accessor :token
21
+
22
+ # The universal identity token, Required only for universal_identity authentication
23
+ attr_accessor :uid_token
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'token' => :'token',
29
+ :'uid_token' => :'uid-token'
30
+ }
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'token' => :'String',
42
+ :'uid_token' => :'String'
43
+ }
44
+ end
45
+
46
+ # List of attributes with nullable: true
47
+ def self.openapi_nullable
48
+ Set.new([
49
+ ])
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param [Hash] attributes Model attributes in the form of hash
54
+ def initialize(attributes = {})
55
+ if (!attributes.is_a?(Hash))
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::KmipDeleteServer` initialize method"
57
+ end
58
+
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!self.class.attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::KmipDeleteServer`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'token')
68
+ self.token = attributes[:'token']
69
+ end
70
+
71
+ if attributes.key?(:'uid_token')
72
+ self.uid_token = attributes[:'uid_token']
73
+ end
74
+ end
75
+
76
+ # Show invalid properties with the reasons. Usually used together with valid?
77
+ # @return Array for valid properties with the reasons
78
+ def list_invalid_properties
79
+ invalid_properties = Array.new
80
+ invalid_properties
81
+ end
82
+
83
+ # Check to see if the all the properties in the model are valid
84
+ # @return true if the model is valid
85
+ def valid?
86
+ true
87
+ end
88
+
89
+ # Checks equality by comparing each attribute.
90
+ # @param [Object] Object to be compared
91
+ def ==(o)
92
+ return true if self.equal?(o)
93
+ self.class == o.class &&
94
+ token == o.token &&
95
+ uid_token == o.uid_token
96
+ end
97
+
98
+ # @see the `==` method
99
+ # @param [Object] Object to be compared
100
+ def eql?(o)
101
+ self == o
102
+ end
103
+
104
+ # Calculates hash code according to all attributes.
105
+ # @return [Integer] Hash code
106
+ def hash
107
+ [token, uid_token].hash
108
+ end
109
+
110
+ # Builds the object from hash
111
+ # @param [Hash] attributes Model attributes in the form of hash
112
+ # @return [Object] Returns the model itself
113
+ def self.build_from_hash(attributes)
114
+ new.build_from_hash(attributes)
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def build_from_hash(attributes)
121
+ return nil unless attributes.is_a?(Hash)
122
+ attributes = attributes.transform_keys(&:to_sym)
123
+ self.class.openapi_types.each_pair do |key, type|
124
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
125
+ self.send("#{key}=", nil)
126
+ elsif type =~ /\AArray<(.*)>/i
127
+ # check to ensure the input is an array given that the attribute
128
+ # is documented as an array but the input is not
129
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
130
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
131
+ end
132
+ elsif !attributes[self.class.attribute_map[key]].nil?
133
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
134
+ end
135
+ end
136
+
137
+ self
138
+ end
139
+
140
+ # Deserializes the data based on type
141
+ # @param string type Data type
142
+ # @param string value Value to be deserialized
143
+ # @return [Object] Deserialized data
144
+ def _deserialize(type, value)
145
+ case type.to_sym
146
+ when :Time
147
+ Time.parse(value)
148
+ when :Date
149
+ Date.parse(value)
150
+ when :String
151
+ value.to_s
152
+ when :Integer
153
+ value.to_i
154
+ when :Float
155
+ value.to_f
156
+ when :Boolean
157
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
158
+ true
159
+ else
160
+ false
161
+ end
162
+ when :Object
163
+ # generic object (usually a Hash), return directly
164
+ value
165
+ when /\AArray<(?<inner_type>.+)>\z/
166
+ inner_type = Regexp.last_match[:inner_type]
167
+ value.map { |v| _deserialize(inner_type, v) }
168
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
169
+ k_type = Regexp.last_match[:k_type]
170
+ v_type = Regexp.last_match[:v_type]
171
+ {}.tap do |hash|
172
+ value.each do |k, v|
173
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
174
+ end
175
+ end
176
+ else # model
177
+ # models (e.g. Pet) or oneOf
178
+ klass = Akeyless.const_get(type)
179
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
180
+ end
181
+ end
182
+
183
+ # Returns the string representation of the object
184
+ # @return [String] String presentation of the object
185
+ def to_s
186
+ to_hash.to_s
187
+ end
188
+
189
+ # to_body is an alias to to_hash (backward compatibility)
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_body
192
+ to_hash
193
+ end
194
+
195
+ # Returns the object in the form of hash
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_hash
198
+ hash = {}
199
+ self.class.attribute_map.each_pair do |attr, param|
200
+ value = self.send(attr)
201
+ if value.nil?
202
+ is_nullable = self.class.openapi_nullable.include?(attr)
203
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
204
+ end
205
+
206
+ hash[param] = _to_hash(value)
207
+ end
208
+ hash
209
+ end
210
+
211
+ # Outputs non-array value in the form of hash
212
+ # For object, use to_hash. Otherwise, just return the value
213
+ # @param [Object] value Any valid value
214
+ # @return [Hash] Returns the value in the form of hash
215
+ def _to_hash(value)
216
+ if value.is_a?(Array)
217
+ value.compact.map { |v| _to_hash(v) }
218
+ elsif value.is_a?(Hash)
219
+ {}.tap do |hash|
220
+ value.each { |k, v| hash[k] = _to_hash(v) }
221
+ end
222
+ elsif value.respond_to? :to_hash
223
+ value.to_hash
224
+ else
225
+ value
226
+ end
227
+ end
228
+
229
+ end
230
+
231
+ end
@@ -19,6 +19,10 @@ module Akeyless
19
19
 
20
20
  attr_accessor :ca_cert
21
21
 
22
+ attr_accessor :certificate_issue_date
23
+
24
+ attr_accessor :certificate_ttl_in_seconds
25
+
22
26
  attr_accessor :hostname
23
27
 
24
28
  attr_accessor :root
@@ -28,6 +32,8 @@ module Akeyless
28
32
  {
29
33
  :'active' => :'active',
30
34
  :'ca_cert' => :'ca_cert',
35
+ :'certificate_issue_date' => :'certificate_issue_date',
36
+ :'certificate_ttl_in_seconds' => :'certificate_ttl_in_seconds',
31
37
  :'hostname' => :'hostname',
32
38
  :'root' => :'root'
33
39
  }
@@ -43,6 +49,8 @@ module Akeyless
43
49
  {
44
50
  :'active' => :'Boolean',
45
51
  :'ca_cert' => :'Array<Integer>',
52
+ :'certificate_issue_date' => :'Time',
53
+ :'certificate_ttl_in_seconds' => :'Integer',
46
54
  :'hostname' => :'String',
47
55
  :'root' => :'String'
48
56
  }
@@ -79,6 +87,14 @@ module Akeyless
79
87
  end
80
88
  end
81
89
 
90
+ if attributes.key?(:'certificate_issue_date')
91
+ self.certificate_issue_date = attributes[:'certificate_issue_date']
92
+ end
93
+
94
+ if attributes.key?(:'certificate_ttl_in_seconds')
95
+ self.certificate_ttl_in_seconds = attributes[:'certificate_ttl_in_seconds']
96
+ end
97
+
82
98
  if attributes.key?(:'hostname')
83
99
  self.hostname = attributes[:'hostname']
84
100
  end
@@ -108,6 +124,8 @@ module Akeyless
108
124
  self.class == o.class &&
109
125
  active == o.active &&
110
126
  ca_cert == o.ca_cert &&
127
+ certificate_issue_date == o.certificate_issue_date &&
128
+ certificate_ttl_in_seconds == o.certificate_ttl_in_seconds &&
111
129
  hostname == o.hostname &&
112
130
  root == o.root
113
131
  end
@@ -121,7 +139,7 @@ module Akeyless
121
139
  # Calculates hash code according to all attributes.
122
140
  # @return [Integer] Hash code
123
141
  def hash
124
- [active, ca_cert, hostname, root].hash
142
+ [active, ca_cert, certificate_issue_date, certificate_ttl_in_seconds, hostname, root].hash
125
143
  end
126
144
 
127
145
  # Builds the object from hash
@@ -0,0 +1,240 @@
1
+ =begin
2
+ #Akeyless API
3
+
4
+ #The purpose of this application is to provide access to Akeyless API.
5
+
6
+ The version of the OpenAPI document: 2.0
7
+ Contact: support@akeyless.io
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ # kmipMoveServer is a command that Moves the root location of the kmip server and all associated items to a new root location
18
+ class KmipMoveServer
19
+ attr_accessor :new_root
20
+
21
+ # Authentication token (see `/auth` and `/configure`)
22
+ attr_accessor :token
23
+
24
+ # The universal identity token, Required only for universal_identity authentication
25
+ attr_accessor :uid_token
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'new_root' => :'new-root',
31
+ :'token' => :'token',
32
+ :'uid_token' => :'uid-token'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'new_root' => :'String',
45
+ :'token' => :'String',
46
+ :'uid_token' => :'String'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::KmipMoveServer` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!self.class.attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::KmipMoveServer`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'new_root')
72
+ self.new_root = attributes[:'new_root']
73
+ end
74
+
75
+ if attributes.key?(:'token')
76
+ self.token = attributes[:'token']
77
+ end
78
+
79
+ if attributes.key?(:'uid_token')
80
+ self.uid_token = attributes[:'uid_token']
81
+ end
82
+ end
83
+
84
+ # Show invalid properties with the reasons. Usually used together with valid?
85
+ # @return Array for valid properties with the reasons
86
+ def list_invalid_properties
87
+ invalid_properties = Array.new
88
+ invalid_properties
89
+ end
90
+
91
+ # Check to see if the all the properties in the model are valid
92
+ # @return true if the model is valid
93
+ def valid?
94
+ true
95
+ end
96
+
97
+ # Checks equality by comparing each attribute.
98
+ # @param [Object] Object to be compared
99
+ def ==(o)
100
+ return true if self.equal?(o)
101
+ self.class == o.class &&
102
+ new_root == o.new_root &&
103
+ token == o.token &&
104
+ uid_token == o.uid_token
105
+ end
106
+
107
+ # @see the `==` method
108
+ # @param [Object] Object to be compared
109
+ def eql?(o)
110
+ self == o
111
+ end
112
+
113
+ # Calculates hash code according to all attributes.
114
+ # @return [Integer] Hash code
115
+ def hash
116
+ [new_root, token, uid_token].hash
117
+ end
118
+
119
+ # Builds the object from hash
120
+ # @param [Hash] attributes Model attributes in the form of hash
121
+ # @return [Object] Returns the model itself
122
+ def self.build_from_hash(attributes)
123
+ new.build_from_hash(attributes)
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def build_from_hash(attributes)
130
+ return nil unless attributes.is_a?(Hash)
131
+ attributes = attributes.transform_keys(&:to_sym)
132
+ self.class.openapi_types.each_pair do |key, type|
133
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
134
+ self.send("#{key}=", nil)
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
139
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
140
+ end
141
+ elsif !attributes[self.class.attribute_map[key]].nil?
142
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
143
+ end
144
+ end
145
+
146
+ self
147
+ end
148
+
149
+ # Deserializes the data based on type
150
+ # @param string type Data type
151
+ # @param string value Value to be deserialized
152
+ # @return [Object] Deserialized data
153
+ def _deserialize(type, value)
154
+ case type.to_sym
155
+ when :Time
156
+ Time.parse(value)
157
+ when :Date
158
+ Date.parse(value)
159
+ when :String
160
+ value.to_s
161
+ when :Integer
162
+ value.to_i
163
+ when :Float
164
+ value.to_f
165
+ when :Boolean
166
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
167
+ true
168
+ else
169
+ false
170
+ end
171
+ when :Object
172
+ # generic object (usually a Hash), return directly
173
+ value
174
+ when /\AArray<(?<inner_type>.+)>\z/
175
+ inner_type = Regexp.last_match[:inner_type]
176
+ value.map { |v| _deserialize(inner_type, v) }
177
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
178
+ k_type = Regexp.last_match[:k_type]
179
+ v_type = Regexp.last_match[:v_type]
180
+ {}.tap do |hash|
181
+ value.each do |k, v|
182
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
183
+ end
184
+ end
185
+ else # model
186
+ # models (e.g. Pet) or oneOf
187
+ klass = Akeyless.const_get(type)
188
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
189
+ end
190
+ end
191
+
192
+ # Returns the string representation of the object
193
+ # @return [String] String presentation of the object
194
+ def to_s
195
+ to_hash.to_s
196
+ end
197
+
198
+ # to_body is an alias to to_hash (backward compatibility)
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_body
201
+ to_hash
202
+ end
203
+
204
+ # Returns the object in the form of hash
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_hash
207
+ hash = {}
208
+ self.class.attribute_map.each_pair do |attr, param|
209
+ value = self.send(attr)
210
+ if value.nil?
211
+ is_nullable = self.class.openapi_nullable.include?(attr)
212
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
213
+ end
214
+
215
+ hash[param] = _to_hash(value)
216
+ end
217
+ hash
218
+ end
219
+
220
+ # Outputs non-array value in the form of hash
221
+ # For object, use to_hash. Otherwise, just return the value
222
+ # @param [Object] value Any valid value
223
+ # @return [Hash] Returns the value in the form of hash
224
+ def _to_hash(value)
225
+ if value.is_a?(Array)
226
+ value.compact.map { |v| _to_hash(v) }
227
+ elsif value.is_a?(Hash)
228
+ {}.tap do |hash|
229
+ value.each { |k, v| hash[k] = _to_hash(v) }
230
+ end
231
+ elsif value.respond_to? :to_hash
232
+ value.to_hash
233
+ else
234
+ value
235
+ end
236
+ end
237
+
238
+ end
239
+
240
+ end