akeyless 5.0.21 → 5.0.22

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 (87) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -1
  3. data/docs/AccountGeneralSettings.md +2 -0
  4. data/docs/ActiveDirectoryPayload.md +6 -0
  5. data/docs/Auth.md +2 -0
  6. data/docs/AuthMethodCreateCert.md +2 -0
  7. data/docs/AuthMethodUpdateCert.md +2 -0
  8. data/docs/AzureADAccessRules.md +2 -0
  9. data/docs/AzureTargetDetails.md +2 -0
  10. data/docs/CertAccessRules.md +2 -0
  11. data/docs/CertificateChainInfo.md +2 -0
  12. data/docs/Configure.md +2 -0
  13. data/docs/ConjurMigration.md +20 -0
  14. data/docs/ConjurPayload.md +24 -0
  15. data/docs/CreateAuthMethodCert.md +2 -0
  16. data/docs/CreateAzureTarget.md +2 -0
  17. data/docs/CreateUSC.md +10 -0
  18. data/docs/DSProducerDetails.md +2 -0
  19. data/docs/DefaultAuthMethodSettings.md +20 -0
  20. data/docs/GatewayCreateMigration.md +15 -1
  21. data/docs/GatewayUpdateMigration.md +14 -0
  22. data/docs/GetPKICertificateOutput.md +2 -0
  23. data/docs/GithubMetadata.md +28 -0
  24. data/docs/HTTPChallengeInfo.md +26 -0
  25. data/docs/IssuerOverviewInfo.md +22 -0
  26. data/docs/ItemGeneralInfo.md +2 -0
  27. data/docs/MigrationStatusReplyObj.md +2 -0
  28. data/docs/MigrationsConfigPart.md +2 -0
  29. data/docs/SecretInfo.md +2 -0
  30. data/docs/TargetCreateAzure.md +2 -0
  31. data/docs/TargetUpdateAzure.md +2 -0
  32. data/docs/UpdateAuthMethodCert.md +2 -0
  33. data/docs/UpdateAzureTarget.md +2 -0
  34. data/docs/V2Api.md +126 -0
  35. data/docs/ValidateCertificateChallenge.md +30 -0
  36. data/docs/ValidateCertificateChallengeOutput.md +24 -0
  37. data/docs/VaultAddress.md +20 -0
  38. data/docs/VaultAddressOutput.md +20 -0
  39. data/lib/akeyless/api/v2_api.rb +128 -0
  40. data/lib/akeyless/models/account_general_settings.rb +10 -1
  41. data/lib/akeyless/models/active_directory_payload.rb +30 -1
  42. data/lib/akeyless/models/auth.rb +13 -1
  43. data/lib/akeyless/models/auth_method_create_cert.rb +11 -1
  44. data/lib/akeyless/models/auth_method_update_cert.rb +11 -1
  45. data/lib/akeyless/models/azure_ad_access_rules.rb +11 -1
  46. data/lib/akeyless/models/azure_target_details.rb +10 -1
  47. data/lib/akeyless/models/cert_access_rules.rb +11 -1
  48. data/lib/akeyless/models/certificate_chain_info.rb +11 -1
  49. data/lib/akeyless/models/configure.rb +13 -1
  50. data/lib/akeyless/models/conjur_migration.rb +223 -0
  51. data/lib/akeyless/models/conjur_payload.rb +241 -0
  52. data/lib/akeyless/models/create_auth_method_cert.rb +11 -1
  53. data/lib/akeyless/models/create_azure_target.rb +13 -1
  54. data/lib/akeyless/models/create_usc.rb +54 -1
  55. data/lib/akeyless/models/default_auth_method_settings.rb +223 -0
  56. data/lib/akeyless/models/ds_producer_details.rb +10 -1
  57. data/lib/akeyless/models/gateway_create_migration.rb +74 -2
  58. data/lib/akeyless/models/gateway_update_migration.rb +73 -1
  59. data/lib/akeyless/models/get_pki_certificate_output.rb +10 -1
  60. data/lib/akeyless/models/github_metadata.rb +259 -0
  61. data/lib/akeyless/models/http_challenge_info.rb +251 -0
  62. data/lib/akeyless/models/issuer_overview_info.rb +232 -0
  63. data/lib/akeyless/models/item_general_info.rb +10 -1
  64. data/lib/akeyless/models/migration_status_reply_obj.rb +10 -1
  65. data/lib/akeyless/models/migrations_config_part.rb +12 -1
  66. data/lib/akeyless/models/secret_info.rb +10 -1
  67. data/lib/akeyless/models/target_create_azure.rb +13 -1
  68. data/lib/akeyless/models/target_update_azure.rb +13 -1
  69. data/lib/akeyless/models/update_auth_method_cert.rb +11 -1
  70. data/lib/akeyless/models/update_azure_target.rb +13 -1
  71. data/lib/akeyless/models/validate_certificate_challenge.rb +279 -0
  72. data/lib/akeyless/models/validate_certificate_challenge_output.rb +242 -0
  73. data/lib/akeyless/models/vault_address.rb +227 -0
  74. data/lib/akeyless/models/vault_address_output.rb +223 -0
  75. data/lib/akeyless/version.rb +1 -1
  76. data/lib/akeyless.rb +10 -0
  77. data/spec/models/conjur_migration_spec.rb +42 -0
  78. data/spec/models/conjur_payload_spec.rb +54 -0
  79. data/spec/models/default_auth_method_settings_spec.rb +42 -0
  80. data/spec/models/github_metadata_spec.rb +66 -0
  81. data/spec/models/http_challenge_info_spec.rb +60 -0
  82. data/spec/models/issuer_overview_info_spec.rb +48 -0
  83. data/spec/models/validate_certificate_challenge_output_spec.rb +54 -0
  84. data/spec/models/validate_certificate_challenge_spec.rb +72 -0
  85. data/spec/models/vault_address_output_spec.rb +42 -0
  86. data/spec/models/vault_address_spec.rb +42 -0
  87. metadata +41 -1
@@ -0,0 +1,279 @@
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: 3.0
7
+ Contact: support@akeyless.io
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ # ValidateCertificateChallenge validates HTTP-01 challenge and finalizes certificate issuance (Phase 2)
18
+ class ValidateCertificateChallenge
19
+ attr_accessor :result
20
+
21
+ # Certificate display ID from Phase 1
22
+ attr_accessor :cert_display_id
23
+
24
+ # Set output format to JSON
25
+ attr_accessor :json
26
+
27
+ # Certificate name (alternative to cert-display-id)
28
+ attr_accessor :name
29
+
30
+ # Validation timeout in seconds
31
+ attr_accessor :timeout
32
+
33
+ # Authentication token (see `/auth` and `/configure`)
34
+ attr_accessor :token
35
+
36
+ # The universal identity token, Required only for universal_identity authentication
37
+ attr_accessor :uid_token
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ def self.attribute_map
41
+ {
42
+ :'result' => :'Result',
43
+ :'cert_display_id' => :'cert-display-id',
44
+ :'json' => :'json',
45
+ :'name' => :'name',
46
+ :'timeout' => :'timeout',
47
+ :'token' => :'token',
48
+ :'uid_token' => :'uid-token'
49
+ }
50
+ end
51
+
52
+ # Returns all the JSON keys this model knows about
53
+ def self.acceptable_attributes
54
+ attribute_map.values
55
+ end
56
+
57
+ # Attribute type mapping.
58
+ def self.openapi_types
59
+ {
60
+ :'result' => :'ValidateCertificateChallengeOutput',
61
+ :'cert_display_id' => :'String',
62
+ :'json' => :'Boolean',
63
+ :'name' => :'String',
64
+ :'timeout' => :'Integer',
65
+ :'token' => :'String',
66
+ :'uid_token' => :'String'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.openapi_nullable
72
+ Set.new([
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::ValidateCertificateChallenge` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ attributes = attributes.each_with_object({}) { |(k, v), h|
85
+ if (!self.class.attribute_map.key?(k.to_sym))
86
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::ValidateCertificateChallenge`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
87
+ end
88
+ h[k.to_sym] = v
89
+ }
90
+
91
+ if attributes.key?(:'result')
92
+ self.result = attributes[:'result']
93
+ end
94
+
95
+ if attributes.key?(:'cert_display_id')
96
+ self.cert_display_id = attributes[:'cert_display_id']
97
+ end
98
+
99
+ if attributes.key?(:'json')
100
+ self.json = attributes[:'json']
101
+ else
102
+ self.json = false
103
+ end
104
+
105
+ if attributes.key?(:'name')
106
+ self.name = attributes[:'name']
107
+ end
108
+
109
+ if attributes.key?(:'timeout')
110
+ self.timeout = attributes[:'timeout']
111
+ else
112
+ self.timeout = 120
113
+ end
114
+
115
+ if attributes.key?(:'token')
116
+ self.token = attributes[:'token']
117
+ end
118
+
119
+ if attributes.key?(:'uid_token')
120
+ self.uid_token = attributes[:'uid_token']
121
+ end
122
+ end
123
+
124
+ # Show invalid properties with the reasons. Usually used together with valid?
125
+ # @return Array for valid properties with the reasons
126
+ def list_invalid_properties
127
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
128
+ invalid_properties = Array.new
129
+ invalid_properties
130
+ end
131
+
132
+ # Check to see if the all the properties in the model are valid
133
+ # @return true if the model is valid
134
+ def valid?
135
+ warn '[DEPRECATED] the `valid?` method is obsolete'
136
+ true
137
+ end
138
+
139
+ # Checks equality by comparing each attribute.
140
+ # @param [Object] Object to be compared
141
+ def ==(o)
142
+ return true if self.equal?(o)
143
+ self.class == o.class &&
144
+ result == o.result &&
145
+ cert_display_id == o.cert_display_id &&
146
+ json == o.json &&
147
+ name == o.name &&
148
+ timeout == o.timeout &&
149
+ token == o.token &&
150
+ uid_token == o.uid_token
151
+ end
152
+
153
+ # @see the `==` method
154
+ # @param [Object] Object to be compared
155
+ def eql?(o)
156
+ self == o
157
+ end
158
+
159
+ # Calculates hash code according to all attributes.
160
+ # @return [Integer] Hash code
161
+ def hash
162
+ [result, cert_display_id, json, name, timeout, token, uid_token].hash
163
+ end
164
+
165
+ # Builds the object from hash
166
+ # @param [Hash] attributes Model attributes in the form of hash
167
+ # @return [Object] Returns the model itself
168
+ def self.build_from_hash(attributes)
169
+ return nil unless attributes.is_a?(Hash)
170
+ attributes = attributes.transform_keys(&:to_sym)
171
+ transformed_hash = {}
172
+ openapi_types.each_pair do |key, type|
173
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
174
+ transformed_hash["#{key}"] = nil
175
+ elsif type =~ /\AArray<(.*)>/i
176
+ # check to ensure the input is an array given that the attribute
177
+ # is documented as an array but the input is not
178
+ if attributes[attribute_map[key]].is_a?(Array)
179
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
180
+ end
181
+ elsif !attributes[attribute_map[key]].nil?
182
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
183
+ end
184
+ end
185
+ new(transformed_hash)
186
+ end
187
+
188
+ # Deserializes the data based on type
189
+ # @param string type Data type
190
+ # @param string value Value to be deserialized
191
+ # @return [Object] Deserialized data
192
+ def self._deserialize(type, value)
193
+ case type.to_sym
194
+ when :Time
195
+ Time.parse(value)
196
+ when :Date
197
+ Date.parse(value)
198
+ when :String
199
+ value.to_s
200
+ when :Integer
201
+ value.to_i
202
+ when :Float
203
+ value.to_f
204
+ when :Boolean
205
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
206
+ true
207
+ else
208
+ false
209
+ end
210
+ when :Object
211
+ # generic object (usually a Hash), return directly
212
+ value
213
+ when /\AArray<(?<inner_type>.+)>\z/
214
+ inner_type = Regexp.last_match[:inner_type]
215
+ value.map { |v| _deserialize(inner_type, v) }
216
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
217
+ k_type = Regexp.last_match[:k_type]
218
+ v_type = Regexp.last_match[:v_type]
219
+ {}.tap do |hash|
220
+ value.each do |k, v|
221
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
222
+ end
223
+ end
224
+ else # model
225
+ # models (e.g. Pet) or oneOf
226
+ klass = Akeyless.const_get(type)
227
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
228
+ end
229
+ end
230
+
231
+ # Returns the string representation of the object
232
+ # @return [String] String presentation of the object
233
+ def to_s
234
+ to_hash.to_s
235
+ end
236
+
237
+ # to_body is an alias to to_hash (backward compatibility)
238
+ # @return [Hash] Returns the object in the form of hash
239
+ def to_body
240
+ to_hash
241
+ end
242
+
243
+ # Returns the object in the form of hash
244
+ # @return [Hash] Returns the object in the form of hash
245
+ def to_hash
246
+ hash = {}
247
+ self.class.attribute_map.each_pair do |attr, param|
248
+ value = self.send(attr)
249
+ if value.nil?
250
+ is_nullable = self.class.openapi_nullable.include?(attr)
251
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
252
+ end
253
+
254
+ hash[param] = _to_hash(value)
255
+ end
256
+ hash
257
+ end
258
+
259
+ # Outputs non-array value in the form of hash
260
+ # For object, use to_hash. Otherwise, just return the value
261
+ # @param [Object] value Any valid value
262
+ # @return [Hash] Returns the value in the form of hash
263
+ def _to_hash(value)
264
+ if value.is_a?(Array)
265
+ value.compact.map { |v| _to_hash(v) }
266
+ elsif value.is_a?(Hash)
267
+ {}.tap do |hash|
268
+ value.each { |k, v| hash[k] = _to_hash(v) }
269
+ end
270
+ elsif value.respond_to? :to_hash
271
+ value.to_hash
272
+ else
273
+ value
274
+ end
275
+ end
276
+
277
+ end
278
+
279
+ end
@@ -0,0 +1,242 @@
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: 3.0
7
+ Contact: support@akeyless.io
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ # ValidateCertificateChallengeOutput defines output for HTTP-01 challenge validation
18
+ class ValidateCertificateChallengeOutput
19
+ attr_accessor :cert
20
+
21
+ attr_accessor :cert_display_id
22
+
23
+ attr_accessor :cert_item_id
24
+
25
+ attr_accessor :status
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'cert' => :'cert',
31
+ :'cert_display_id' => :'cert_display_id',
32
+ :'cert_item_id' => :'cert_item_id',
33
+ :'status' => :'status'
34
+ }
35
+ end
36
+
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ attribute_map.values
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'cert' => :'String',
46
+ :'cert_display_id' => :'String',
47
+ :'cert_item_id' => :'Integer',
48
+ :'status' => :'String'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::ValidateCertificateChallengeOutput` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ attributes = attributes.each_with_object({}) { |(k, v), h|
67
+ if (!self.class.attribute_map.key?(k.to_sym))
68
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::ValidateCertificateChallengeOutput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
69
+ end
70
+ h[k.to_sym] = v
71
+ }
72
+
73
+ if attributes.key?(:'cert')
74
+ self.cert = attributes[:'cert']
75
+ end
76
+
77
+ if attributes.key?(:'cert_display_id')
78
+ self.cert_display_id = attributes[:'cert_display_id']
79
+ end
80
+
81
+ if attributes.key?(:'cert_item_id')
82
+ self.cert_item_id = attributes[:'cert_item_id']
83
+ end
84
+
85
+ if attributes.key?(:'status')
86
+ self.status = attributes[:'status']
87
+ end
88
+ end
89
+
90
+ # Show invalid properties with the reasons. Usually used together with valid?
91
+ # @return Array for valid properties with the reasons
92
+ def list_invalid_properties
93
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
94
+ invalid_properties = Array.new
95
+ invalid_properties
96
+ end
97
+
98
+ # Check to see if the all the properties in the model are valid
99
+ # @return true if the model is valid
100
+ def valid?
101
+ warn '[DEPRECATED] the `valid?` method is obsolete'
102
+ true
103
+ end
104
+
105
+ # Checks equality by comparing each attribute.
106
+ # @param [Object] Object to be compared
107
+ def ==(o)
108
+ return true if self.equal?(o)
109
+ self.class == o.class &&
110
+ cert == o.cert &&
111
+ cert_display_id == o.cert_display_id &&
112
+ cert_item_id == o.cert_item_id &&
113
+ status == o.status
114
+ end
115
+
116
+ # @see the `==` method
117
+ # @param [Object] Object to be compared
118
+ def eql?(o)
119
+ self == o
120
+ end
121
+
122
+ # Calculates hash code according to all attributes.
123
+ # @return [Integer] Hash code
124
+ def hash
125
+ [cert, cert_display_id, cert_item_id, status].hash
126
+ end
127
+
128
+ # Builds the object from hash
129
+ # @param [Hash] attributes Model attributes in the form of hash
130
+ # @return [Object] Returns the model itself
131
+ def self.build_from_hash(attributes)
132
+ return nil unless attributes.is_a?(Hash)
133
+ attributes = attributes.transform_keys(&:to_sym)
134
+ transformed_hash = {}
135
+ openapi_types.each_pair do |key, type|
136
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
137
+ transformed_hash["#{key}"] = nil
138
+ elsif type =~ /\AArray<(.*)>/i
139
+ # check to ensure the input is an array given that the attribute
140
+ # is documented as an array but the input is not
141
+ if attributes[attribute_map[key]].is_a?(Array)
142
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
143
+ end
144
+ elsif !attributes[attribute_map[key]].nil?
145
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
146
+ end
147
+ end
148
+ new(transformed_hash)
149
+ end
150
+
151
+ # Deserializes the data based on type
152
+ # @param string type Data type
153
+ # @param string value Value to be deserialized
154
+ # @return [Object] Deserialized data
155
+ def self._deserialize(type, value)
156
+ case type.to_sym
157
+ when :Time
158
+ Time.parse(value)
159
+ when :Date
160
+ Date.parse(value)
161
+ when :String
162
+ value.to_s
163
+ when :Integer
164
+ value.to_i
165
+ when :Float
166
+ value.to_f
167
+ when :Boolean
168
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
169
+ true
170
+ else
171
+ false
172
+ end
173
+ when :Object
174
+ # generic object (usually a Hash), return directly
175
+ value
176
+ when /\AArray<(?<inner_type>.+)>\z/
177
+ inner_type = Regexp.last_match[:inner_type]
178
+ value.map { |v| _deserialize(inner_type, v) }
179
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
180
+ k_type = Regexp.last_match[:k_type]
181
+ v_type = Regexp.last_match[:v_type]
182
+ {}.tap do |hash|
183
+ value.each do |k, v|
184
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
185
+ end
186
+ end
187
+ else # model
188
+ # models (e.g. Pet) or oneOf
189
+ klass = Akeyless.const_get(type)
190
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
191
+ end
192
+ end
193
+
194
+ # Returns the string representation of the object
195
+ # @return [String] String presentation of the object
196
+ def to_s
197
+ to_hash.to_s
198
+ end
199
+
200
+ # to_body is an alias to to_hash (backward compatibility)
201
+ # @return [Hash] Returns the object in the form of hash
202
+ def to_body
203
+ to_hash
204
+ end
205
+
206
+ # Returns the object in the form of hash
207
+ # @return [Hash] Returns the object in the form of hash
208
+ def to_hash
209
+ hash = {}
210
+ self.class.attribute_map.each_pair do |attr, param|
211
+ value = self.send(attr)
212
+ if value.nil?
213
+ is_nullable = self.class.openapi_nullable.include?(attr)
214
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
215
+ end
216
+
217
+ hash[param] = _to_hash(value)
218
+ end
219
+ hash
220
+ end
221
+
222
+ # Outputs non-array value in the form of hash
223
+ # For object, use to_hash. Otherwise, just return the value
224
+ # @param [Object] value Any valid value
225
+ # @return [Hash] Returns the value in the form of hash
226
+ def _to_hash(value)
227
+ if value.is_a?(Array)
228
+ value.compact.map { |v| _to_hash(v) }
229
+ elsif value.is_a?(Hash)
230
+ {}.tap do |hash|
231
+ value.each { |k, v| hash[k] = _to_hash(v) }
232
+ end
233
+ elsif value.respond_to? :to_hash
234
+ value.to_hash
235
+ else
236
+ value
237
+ end
238
+ end
239
+
240
+ end
241
+
242
+ end