akeyless 3.1.0 → 3.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +24 -1
- data/docs/AssocTargetItem.md +2 -0
- data/docs/CreateCertificate.md +40 -0
- data/docs/CreateCertificateOutput.md +18 -0
- data/docs/CreateClassicKey.md +6 -2
- data/docs/CreateDBTarget.md +4 -0
- data/docs/CreateDFCKey.md +3 -1
- data/docs/CreateDynamicSecret.md +3 -1
- data/docs/CreateKey.md +3 -1
- data/docs/CreatePKICertIssuer.md +3 -1
- data/docs/CreateRotatedSecret.md +3 -1
- data/docs/CreateSSHCertIssuer.md +3 -1
- data/docs/CreateSecret.md +3 -1
- data/docs/CreateTokenizer.md +3 -1
- data/docs/DSProducerDetails.md +8 -0
- data/docs/DecryptGPG.md +34 -0
- data/docs/DecryptGPGOutput.md +18 -0
- data/docs/EncryptGPG.md +32 -0
- data/docs/EncryptGPGOutput.md +18 -0
- data/docs/GatewayCreateProducerSnowflake.md +4 -0
- data/docs/GatewayUpdateItem.md +3 -1
- data/docs/GatewayUpdateProducerSnowflake.md +4 -0
- data/docs/GatewayUpdateTlsCert.md +26 -0
- data/docs/GatewayUpdateTlsCertOutput.md +18 -0
- data/docs/GenCustomerFragment.md +4 -2
- data/docs/GetCertificateValue.md +26 -0
- data/docs/GetCertificateValueOutput.md +20 -0
- data/docs/ListSRABastions.md +2 -0
- data/docs/RotateKey.md +2 -0
- data/docs/SignGPG.md +32 -0
- data/docs/SignGPGOutput.md +18 -0
- data/docs/TargetTypeDetailsInput.md +4 -0
- data/docs/UpdateCertificateOutput.md +18 -0
- data/docs/UpdateCertificateValue.md +32 -0
- data/docs/UpdateDBTarget.md +4 -0
- data/docs/UpdateItem.md +3 -1
- data/docs/UpdatePKICertIssuer.md +3 -1
- data/docs/UpdateRotatedSecret.md +3 -1
- data/docs/UpdateSSHCertIssuer.md +3 -1
- data/docs/UploadPKCS12.md +3 -1
- data/docs/UploadRSA.md +3 -1
- data/docs/V2Api.md +504 -0
- data/docs/VerifyGPG.md +32 -0
- data/lib/akeyless/api/v2_api.rb +512 -0
- data/lib/akeyless/models/assoc_target_item.rb +11 -1
- data/lib/akeyless/models/create_certificate.rb +339 -0
- data/lib/akeyless/models/create_certificate_output.rb +219 -0
- data/lib/akeyless/models/create_classic_key.rb +23 -3
- data/lib/akeyless/models/create_db_target.rb +21 -1
- data/lib/akeyless/models/create_dfc_key.rb +12 -2
- data/lib/akeyless/models/create_dynamic_secret.rb +12 -4
- data/lib/akeyless/models/create_key.rb +12 -2
- data/lib/akeyless/models/create_pki_cert_issuer.rb +12 -2
- data/lib/akeyless/models/create_rotated_secret.rb +12 -2
- data/lib/akeyless/models/create_secret.rb +12 -2
- data/lib/akeyless/models/create_ssh_cert_issuer.rb +12 -2
- data/lib/akeyless/models/create_tokenizer.rb +12 -2
- data/lib/akeyless/models/decrypt_gpg.rb +310 -0
- data/lib/akeyless/models/decrypt_gpg_output.rb +219 -0
- data/lib/akeyless/models/ds_producer_details.rb +40 -1
- data/lib/akeyless/models/encrypt_gpg.rb +300 -0
- data/lib/akeyless/models/encrypt_gpg_output.rb +219 -0
- data/lib/akeyless/models/gateway_create_producer_snowflake.rb +22 -2
- data/lib/akeyless/models/gateway_update_item.rb +14 -2
- data/lib/akeyless/models/gateway_update_producer_snowflake.rb +22 -2
- data/lib/akeyless/models/gateway_update_tls_cert.rb +261 -0
- data/lib/akeyless/models/gateway_update_tls_cert_output.rb +219 -0
- data/lib/akeyless/models/gen_customer_fragment.rb +15 -5
- data/lib/akeyless/models/get_certificate_value.rb +265 -0
- data/lib/akeyless/models/get_certificate_value_output.rb +228 -0
- data/lib/akeyless/models/list_sra_bastions.rb +10 -1
- data/lib/akeyless/models/rotate_key.rb +11 -1
- data/lib/akeyless/models/sign_gpg.rb +300 -0
- data/lib/akeyless/models/sign_gpg_output.rb +219 -0
- data/lib/akeyless/models/target_type_details_input.rb +20 -1
- data/lib/akeyless/models/update_certificate_output.rb +219 -0
- data/lib/akeyless/models/update_certificate_value.rb +297 -0
- data/lib/akeyless/models/update_db_target.rb +21 -1
- data/lib/akeyless/models/update_item.rb +14 -2
- data/lib/akeyless/models/update_pki_cert_issuer.rb +12 -2
- data/lib/akeyless/models/update_rotated_secret.rb +14 -2
- data/lib/akeyless/models/update_ssh_cert_issuer.rb +12 -2
- data/lib/akeyless/models/upload_pkcs12.rb +12 -2
- data/lib/akeyless/models/upload_rsa.rb +12 -2
- data/lib/akeyless/models/verify_gpg.rb +300 -0
- data/lib/akeyless/version.rb +1 -1
- data/lib/akeyless.rb +15 -0
- data/spec/models/create_certificate_output_spec.rb +34 -0
- data/spec/models/create_certificate_spec.rb +94 -0
- data/spec/models/decrypt_gpg_output_spec.rb +34 -0
- data/spec/models/decrypt_gpg_spec.rb +82 -0
- data/spec/models/encrypt_gpg_output_spec.rb +34 -0
- data/spec/models/encrypt_gpg_spec.rb +76 -0
- data/spec/models/gateway_update_tls_cert_output_spec.rb +34 -0
- data/spec/models/gateway_update_tls_cert_spec.rb +58 -0
- data/spec/models/get_certificate_value_output_spec.rb +40 -0
- data/spec/models/get_certificate_value_spec.rb +58 -0
- data/spec/models/sign_gpg_output_spec.rb +34 -0
- data/spec/models/sign_gpg_spec.rb +76 -0
- data/spec/models/update_certificate_output_spec.rb +34 -0
- data/spec/models/update_certificate_value_spec.rb +76 -0
- data/spec/models/verify_gpg_spec.rb +76 -0
- metadata +600 -540
@@ -0,0 +1,310 @@
|
|
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.3.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Akeyless
|
17
|
+
class DecryptGPG
|
18
|
+
# Ciphertext to be decrypted in base64 encoded format
|
19
|
+
attr_accessor :ciphertext
|
20
|
+
|
21
|
+
# The display id of the key to use in the decryption process
|
22
|
+
attr_accessor :display_id
|
23
|
+
|
24
|
+
# The item id of the key to use in the decryption process
|
25
|
+
attr_accessor :item_id
|
26
|
+
|
27
|
+
# Set output format to JSON
|
28
|
+
attr_accessor :json
|
29
|
+
|
30
|
+
# The name of the key to use in the decryption process
|
31
|
+
attr_accessor :key_name
|
32
|
+
|
33
|
+
# If specified, the output will be formatted accordingly. options: [base64]
|
34
|
+
attr_accessor :output_format
|
35
|
+
|
36
|
+
# Passphrase that was used to generate the key
|
37
|
+
attr_accessor :passphrase
|
38
|
+
|
39
|
+
# Authentication token (see `/auth` and `/configure`)
|
40
|
+
attr_accessor :token
|
41
|
+
|
42
|
+
# The universal identity token, Required only for universal_identity authentication
|
43
|
+
attr_accessor :uid_token
|
44
|
+
|
45
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
46
|
+
def self.attribute_map
|
47
|
+
{
|
48
|
+
:'ciphertext' => :'ciphertext',
|
49
|
+
:'display_id' => :'display-id',
|
50
|
+
:'item_id' => :'item-id',
|
51
|
+
:'json' => :'json',
|
52
|
+
:'key_name' => :'key-name',
|
53
|
+
:'output_format' => :'output-format',
|
54
|
+
:'passphrase' => :'passphrase',
|
55
|
+
:'token' => :'token',
|
56
|
+
:'uid_token' => :'uid-token'
|
57
|
+
}
|
58
|
+
end
|
59
|
+
|
60
|
+
# Returns all the JSON keys this model knows about
|
61
|
+
def self.acceptable_attributes
|
62
|
+
attribute_map.values
|
63
|
+
end
|
64
|
+
|
65
|
+
# Attribute type mapping.
|
66
|
+
def self.openapi_types
|
67
|
+
{
|
68
|
+
:'ciphertext' => :'String',
|
69
|
+
:'display_id' => :'String',
|
70
|
+
:'item_id' => :'Integer',
|
71
|
+
:'json' => :'Boolean',
|
72
|
+
:'key_name' => :'String',
|
73
|
+
:'output_format' => :'String',
|
74
|
+
:'passphrase' => :'String',
|
75
|
+
:'token' => :'String',
|
76
|
+
:'uid_token' => :'String'
|
77
|
+
}
|
78
|
+
end
|
79
|
+
|
80
|
+
# List of attributes with nullable: true
|
81
|
+
def self.openapi_nullable
|
82
|
+
Set.new([
|
83
|
+
])
|
84
|
+
end
|
85
|
+
|
86
|
+
# Initializes the object
|
87
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
88
|
+
def initialize(attributes = {})
|
89
|
+
if (!attributes.is_a?(Hash))
|
90
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::DecryptGPG` initialize method"
|
91
|
+
end
|
92
|
+
|
93
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
94
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
95
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
96
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::DecryptGPG`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
97
|
+
end
|
98
|
+
h[k.to_sym] = v
|
99
|
+
}
|
100
|
+
|
101
|
+
if attributes.key?(:'ciphertext')
|
102
|
+
self.ciphertext = attributes[:'ciphertext']
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes.key?(:'display_id')
|
106
|
+
self.display_id = attributes[:'display_id']
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.key?(:'item_id')
|
110
|
+
self.item_id = attributes[:'item_id']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'json')
|
114
|
+
self.json = attributes[:'json']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.key?(:'key_name')
|
118
|
+
self.key_name = attributes[:'key_name']
|
119
|
+
end
|
120
|
+
|
121
|
+
if attributes.key?(:'output_format')
|
122
|
+
self.output_format = attributes[:'output_format']
|
123
|
+
end
|
124
|
+
|
125
|
+
if attributes.key?(:'passphrase')
|
126
|
+
self.passphrase = attributes[:'passphrase']
|
127
|
+
end
|
128
|
+
|
129
|
+
if attributes.key?(:'token')
|
130
|
+
self.token = attributes[:'token']
|
131
|
+
end
|
132
|
+
|
133
|
+
if attributes.key?(:'uid_token')
|
134
|
+
self.uid_token = attributes[:'uid_token']
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
139
|
+
# @return Array for valid properties with the reasons
|
140
|
+
def list_invalid_properties
|
141
|
+
invalid_properties = Array.new
|
142
|
+
if @ciphertext.nil?
|
143
|
+
invalid_properties.push('invalid value for "ciphertext", ciphertext cannot be nil.')
|
144
|
+
end
|
145
|
+
|
146
|
+
if @key_name.nil?
|
147
|
+
invalid_properties.push('invalid value for "key_name", key_name cannot be nil.')
|
148
|
+
end
|
149
|
+
|
150
|
+
invalid_properties
|
151
|
+
end
|
152
|
+
|
153
|
+
# Check to see if the all the properties in the model are valid
|
154
|
+
# @return true if the model is valid
|
155
|
+
def valid?
|
156
|
+
return false if @ciphertext.nil?
|
157
|
+
return false if @key_name.nil?
|
158
|
+
true
|
159
|
+
end
|
160
|
+
|
161
|
+
# Checks equality by comparing each attribute.
|
162
|
+
# @param [Object] Object to be compared
|
163
|
+
def ==(o)
|
164
|
+
return true if self.equal?(o)
|
165
|
+
self.class == o.class &&
|
166
|
+
ciphertext == o.ciphertext &&
|
167
|
+
display_id == o.display_id &&
|
168
|
+
item_id == o.item_id &&
|
169
|
+
json == o.json &&
|
170
|
+
key_name == o.key_name &&
|
171
|
+
output_format == o.output_format &&
|
172
|
+
passphrase == o.passphrase &&
|
173
|
+
token == o.token &&
|
174
|
+
uid_token == o.uid_token
|
175
|
+
end
|
176
|
+
|
177
|
+
# @see the `==` method
|
178
|
+
# @param [Object] Object to be compared
|
179
|
+
def eql?(o)
|
180
|
+
self == o
|
181
|
+
end
|
182
|
+
|
183
|
+
# Calculates hash code according to all attributes.
|
184
|
+
# @return [Integer] Hash code
|
185
|
+
def hash
|
186
|
+
[ciphertext, display_id, item_id, json, key_name, output_format, passphrase, token, uid_token].hash
|
187
|
+
end
|
188
|
+
|
189
|
+
# Builds the object from hash
|
190
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
191
|
+
# @return [Object] Returns the model itself
|
192
|
+
def self.build_from_hash(attributes)
|
193
|
+
new.build_from_hash(attributes)
|
194
|
+
end
|
195
|
+
|
196
|
+
# Builds the object from hash
|
197
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
198
|
+
# @return [Object] Returns the model itself
|
199
|
+
def build_from_hash(attributes)
|
200
|
+
return nil unless attributes.is_a?(Hash)
|
201
|
+
attributes = attributes.transform_keys(&:to_sym)
|
202
|
+
self.class.openapi_types.each_pair do |key, type|
|
203
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
204
|
+
self.send("#{key}=", nil)
|
205
|
+
elsif type =~ /\AArray<(.*)>/i
|
206
|
+
# check to ensure the input is an array given that the attribute
|
207
|
+
# is documented as an array but the input is not
|
208
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
209
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
210
|
+
end
|
211
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
212
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
self
|
217
|
+
end
|
218
|
+
|
219
|
+
# Deserializes the data based on type
|
220
|
+
# @param string type Data type
|
221
|
+
# @param string value Value to be deserialized
|
222
|
+
# @return [Object] Deserialized data
|
223
|
+
def _deserialize(type, value)
|
224
|
+
case type.to_sym
|
225
|
+
when :Time
|
226
|
+
Time.parse(value)
|
227
|
+
when :Date
|
228
|
+
Date.parse(value)
|
229
|
+
when :String
|
230
|
+
value.to_s
|
231
|
+
when :Integer
|
232
|
+
value.to_i
|
233
|
+
when :Float
|
234
|
+
value.to_f
|
235
|
+
when :Boolean
|
236
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
237
|
+
true
|
238
|
+
else
|
239
|
+
false
|
240
|
+
end
|
241
|
+
when :Object
|
242
|
+
# generic object (usually a Hash), return directly
|
243
|
+
value
|
244
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
245
|
+
inner_type = Regexp.last_match[:inner_type]
|
246
|
+
value.map { |v| _deserialize(inner_type, v) }
|
247
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
248
|
+
k_type = Regexp.last_match[:k_type]
|
249
|
+
v_type = Regexp.last_match[:v_type]
|
250
|
+
{}.tap do |hash|
|
251
|
+
value.each do |k, v|
|
252
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
253
|
+
end
|
254
|
+
end
|
255
|
+
else # model
|
256
|
+
# models (e.g. Pet) or oneOf
|
257
|
+
klass = Akeyless.const_get(type)
|
258
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
259
|
+
end
|
260
|
+
end
|
261
|
+
|
262
|
+
# Returns the string representation of the object
|
263
|
+
# @return [String] String presentation of the object
|
264
|
+
def to_s
|
265
|
+
to_hash.to_s
|
266
|
+
end
|
267
|
+
|
268
|
+
# to_body is an alias to to_hash (backward compatibility)
|
269
|
+
# @return [Hash] Returns the object in the form of hash
|
270
|
+
def to_body
|
271
|
+
to_hash
|
272
|
+
end
|
273
|
+
|
274
|
+
# Returns the object in the form of hash
|
275
|
+
# @return [Hash] Returns the object in the form of hash
|
276
|
+
def to_hash
|
277
|
+
hash = {}
|
278
|
+
self.class.attribute_map.each_pair do |attr, param|
|
279
|
+
value = self.send(attr)
|
280
|
+
if value.nil?
|
281
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
282
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
283
|
+
end
|
284
|
+
|
285
|
+
hash[param] = _to_hash(value)
|
286
|
+
end
|
287
|
+
hash
|
288
|
+
end
|
289
|
+
|
290
|
+
# Outputs non-array value in the form of hash
|
291
|
+
# For object, use to_hash. Otherwise, just return the value
|
292
|
+
# @param [Object] value Any valid value
|
293
|
+
# @return [Hash] Returns the value in the form of hash
|
294
|
+
def _to_hash(value)
|
295
|
+
if value.is_a?(Array)
|
296
|
+
value.compact.map { |v| _to_hash(v) }
|
297
|
+
elsif value.is_a?(Hash)
|
298
|
+
{}.tap do |hash|
|
299
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
300
|
+
end
|
301
|
+
elsif value.respond_to? :to_hash
|
302
|
+
value.to_hash
|
303
|
+
else
|
304
|
+
value
|
305
|
+
end
|
306
|
+
end
|
307
|
+
|
308
|
+
end
|
309
|
+
|
310
|
+
end
|
@@ -0,0 +1,219 @@
|
|
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.3.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Akeyless
|
17
|
+
class DecryptGPGOutput
|
18
|
+
attr_accessor :result
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'result' => :'result'
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# Returns all the JSON keys this model knows about
|
28
|
+
def self.acceptable_attributes
|
29
|
+
attribute_map.values
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.openapi_types
|
34
|
+
{
|
35
|
+
:'result' => :'String'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# List of attributes with nullable: true
|
40
|
+
def self.openapi_nullable
|
41
|
+
Set.new([
|
42
|
+
])
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
+
def initialize(attributes = {})
|
48
|
+
if (!attributes.is_a?(Hash))
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::DecryptGPGOutput` initialize method"
|
50
|
+
end
|
51
|
+
|
52
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
53
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::DecryptGPGOutput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
|
+
end
|
57
|
+
h[k.to_sym] = v
|
58
|
+
}
|
59
|
+
|
60
|
+
if attributes.key?(:'result')
|
61
|
+
self.result = attributes[:'result']
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
66
|
+
# @return Array for valid properties with the reasons
|
67
|
+
def list_invalid_properties
|
68
|
+
invalid_properties = Array.new
|
69
|
+
invalid_properties
|
70
|
+
end
|
71
|
+
|
72
|
+
# Check to see if the all the properties in the model are valid
|
73
|
+
# @return true if the model is valid
|
74
|
+
def valid?
|
75
|
+
true
|
76
|
+
end
|
77
|
+
|
78
|
+
# Checks equality by comparing each attribute.
|
79
|
+
# @param [Object] Object to be compared
|
80
|
+
def ==(o)
|
81
|
+
return true if self.equal?(o)
|
82
|
+
self.class == o.class &&
|
83
|
+
result == o.result
|
84
|
+
end
|
85
|
+
|
86
|
+
# @see the `==` method
|
87
|
+
# @param [Object] Object to be compared
|
88
|
+
def eql?(o)
|
89
|
+
self == o
|
90
|
+
end
|
91
|
+
|
92
|
+
# Calculates hash code according to all attributes.
|
93
|
+
# @return [Integer] Hash code
|
94
|
+
def hash
|
95
|
+
[result].hash
|
96
|
+
end
|
97
|
+
|
98
|
+
# Builds the object from hash
|
99
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
100
|
+
# @return [Object] Returns the model itself
|
101
|
+
def self.build_from_hash(attributes)
|
102
|
+
new.build_from_hash(attributes)
|
103
|
+
end
|
104
|
+
|
105
|
+
# Builds the object from hash
|
106
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
107
|
+
# @return [Object] Returns the model itself
|
108
|
+
def build_from_hash(attributes)
|
109
|
+
return nil unless attributes.is_a?(Hash)
|
110
|
+
attributes = attributes.transform_keys(&:to_sym)
|
111
|
+
self.class.openapi_types.each_pair do |key, type|
|
112
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
113
|
+
self.send("#{key}=", nil)
|
114
|
+
elsif type =~ /\AArray<(.*)>/i
|
115
|
+
# check to ensure the input is an array given that the attribute
|
116
|
+
# is documented as an array but the input is not
|
117
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
118
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
119
|
+
end
|
120
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
121
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
self
|
126
|
+
end
|
127
|
+
|
128
|
+
# Deserializes the data based on type
|
129
|
+
# @param string type Data type
|
130
|
+
# @param string value Value to be deserialized
|
131
|
+
# @return [Object] Deserialized data
|
132
|
+
def _deserialize(type, value)
|
133
|
+
case type.to_sym
|
134
|
+
when :Time
|
135
|
+
Time.parse(value)
|
136
|
+
when :Date
|
137
|
+
Date.parse(value)
|
138
|
+
when :String
|
139
|
+
value.to_s
|
140
|
+
when :Integer
|
141
|
+
value.to_i
|
142
|
+
when :Float
|
143
|
+
value.to_f
|
144
|
+
when :Boolean
|
145
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
146
|
+
true
|
147
|
+
else
|
148
|
+
false
|
149
|
+
end
|
150
|
+
when :Object
|
151
|
+
# generic object (usually a Hash), return directly
|
152
|
+
value
|
153
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
154
|
+
inner_type = Regexp.last_match[:inner_type]
|
155
|
+
value.map { |v| _deserialize(inner_type, v) }
|
156
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
157
|
+
k_type = Regexp.last_match[:k_type]
|
158
|
+
v_type = Regexp.last_match[:v_type]
|
159
|
+
{}.tap do |hash|
|
160
|
+
value.each do |k, v|
|
161
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
else # model
|
165
|
+
# models (e.g. Pet) or oneOf
|
166
|
+
klass = Akeyless.const_get(type)
|
167
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
# Returns the string representation of the object
|
172
|
+
# @return [String] String presentation of the object
|
173
|
+
def to_s
|
174
|
+
to_hash.to_s
|
175
|
+
end
|
176
|
+
|
177
|
+
# to_body is an alias to to_hash (backward compatibility)
|
178
|
+
# @return [Hash] Returns the object in the form of hash
|
179
|
+
def to_body
|
180
|
+
to_hash
|
181
|
+
end
|
182
|
+
|
183
|
+
# Returns the object in the form of hash
|
184
|
+
# @return [Hash] Returns the object in the form of hash
|
185
|
+
def to_hash
|
186
|
+
hash = {}
|
187
|
+
self.class.attribute_map.each_pair do |attr, param|
|
188
|
+
value = self.send(attr)
|
189
|
+
if value.nil?
|
190
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
191
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
192
|
+
end
|
193
|
+
|
194
|
+
hash[param] = _to_hash(value)
|
195
|
+
end
|
196
|
+
hash
|
197
|
+
end
|
198
|
+
|
199
|
+
# Outputs non-array value in the form of hash
|
200
|
+
# For object, use to_hash. Otherwise, just return the value
|
201
|
+
# @param [Object] value Any valid value
|
202
|
+
# @return [Hash] Returns the value in the form of hash
|
203
|
+
def _to_hash(value)
|
204
|
+
if value.is_a?(Array)
|
205
|
+
value.compact.map { |v| _to_hash(v) }
|
206
|
+
elsif value.is_a?(Hash)
|
207
|
+
{}.tap do |hash|
|
208
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
209
|
+
end
|
210
|
+
elsif value.respond_to? :to_hash
|
211
|
+
value.to_hash
|
212
|
+
else
|
213
|
+
value
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
end
|
218
|
+
|
219
|
+
end
|
@@ -111,6 +111,11 @@ module Akeyless
|
|
111
111
|
|
112
112
|
attr_accessor :db_port
|
113
113
|
|
114
|
+
# (Optional) Private Key in PEM format
|
115
|
+
attr_accessor :db_private_key
|
116
|
+
|
117
|
+
attr_accessor :db_private_key_passphrase
|
118
|
+
|
114
119
|
attr_accessor :db_pwd
|
115
120
|
|
116
121
|
# (Optional) DBServerCertificates defines the set of root certificate authorities that clients use when verifying server certificates. If DBServerCertificates is empty, TLS uses the host's root CA set.
|
@@ -214,12 +219,18 @@ module Akeyless
|
|
214
219
|
|
215
220
|
attr_accessor :item_targets_assoc
|
216
221
|
|
222
|
+
# comma-separated list of allowed namespaces. Can hold just * which signifies that any namespace is allowed
|
223
|
+
attr_accessor :k8s_allowed_namespaces
|
224
|
+
|
217
225
|
attr_accessor :k8s_bearer_token
|
218
226
|
|
219
227
|
attr_accessor :k8s_cluster_ca_certificate
|
220
228
|
|
221
229
|
attr_accessor :k8s_cluster_endpoint
|
222
230
|
|
231
|
+
# when native k8s is in dynamic mode, user can define allowed namespaces, K8sServiceAccount doesn't exist from the start and will only be created at time of getting dynamic secret value By default dynamic mode is false and producer behaves like it did before
|
232
|
+
attr_accessor :k8s_dynamic_mode
|
233
|
+
|
223
234
|
attr_accessor :k8s_namespace
|
224
235
|
|
225
236
|
attr_accessor :k8s_service_account
|
@@ -433,6 +444,8 @@ module Akeyless
|
|
433
444
|
:'db_max_open_conns' => :'db_max_open_conns',
|
434
445
|
:'db_name' => :'db_name',
|
435
446
|
:'db_port' => :'db_port',
|
447
|
+
:'db_private_key' => :'db_private_key',
|
448
|
+
:'db_private_key_passphrase' => :'db_private_key_passphrase',
|
436
449
|
:'db_pwd' => :'db_pwd',
|
437
450
|
:'db_server_certificates' => :'db_server_certificates',
|
438
451
|
:'db_server_name' => :'db_server_name',
|
@@ -483,9 +496,11 @@ module Akeyless
|
|
483
496
|
:'implementation_type' => :'implementation_type',
|
484
497
|
:'is_fixed_user' => :'is_fixed_user',
|
485
498
|
:'item_targets_assoc' => :'item_targets_assoc',
|
499
|
+
:'k8s_allowed_namespaces' => :'k8s_allowed_namespaces',
|
486
500
|
:'k8s_bearer_token' => :'k8s_bearer_token',
|
487
501
|
:'k8s_cluster_ca_certificate' => :'k8s_cluster_ca_certificate',
|
488
502
|
:'k8s_cluster_endpoint' => :'k8s_cluster_endpoint',
|
503
|
+
:'k8s_dynamic_mode' => :'k8s_dynamic_mode',
|
489
504
|
:'k8s_namespace' => :'k8s_namespace',
|
490
505
|
:'k8s_service_account' => :'k8s_service_account',
|
491
506
|
:'last_admin_rotation' => :'last_admin_rotation',
|
@@ -622,6 +637,8 @@ module Akeyless
|
|
622
637
|
:'db_max_open_conns' => :'String',
|
623
638
|
:'db_name' => :'String',
|
624
639
|
:'db_port' => :'String',
|
640
|
+
:'db_private_key' => :'String',
|
641
|
+
:'db_private_key_passphrase' => :'String',
|
625
642
|
:'db_pwd' => :'String',
|
626
643
|
:'db_server_certificates' => :'String',
|
627
644
|
:'db_server_name' => :'String',
|
@@ -672,9 +689,11 @@ module Akeyless
|
|
672
689
|
:'implementation_type' => :'String',
|
673
690
|
:'is_fixed_user' => :'String',
|
674
691
|
:'item_targets_assoc' => :'Array<ItemTargetAssociation>',
|
692
|
+
:'k8s_allowed_namespaces' => :'String',
|
675
693
|
:'k8s_bearer_token' => :'String',
|
676
694
|
:'k8s_cluster_ca_certificate' => :'String',
|
677
695
|
:'k8s_cluster_endpoint' => :'String',
|
696
|
+
:'k8s_dynamic_mode' => :'Boolean',
|
678
697
|
:'k8s_namespace' => :'String',
|
679
698
|
:'k8s_service_account' => :'String',
|
680
699
|
:'last_admin_rotation' => :'Integer',
|
@@ -968,6 +987,14 @@ module Akeyless
|
|
968
987
|
self.db_port = attributes[:'db_port']
|
969
988
|
end
|
970
989
|
|
990
|
+
if attributes.key?(:'db_private_key')
|
991
|
+
self.db_private_key = attributes[:'db_private_key']
|
992
|
+
end
|
993
|
+
|
994
|
+
if attributes.key?(:'db_private_key_passphrase')
|
995
|
+
self.db_private_key_passphrase = attributes[:'db_private_key_passphrase']
|
996
|
+
end
|
997
|
+
|
971
998
|
if attributes.key?(:'db_pwd')
|
972
999
|
self.db_pwd = attributes[:'db_pwd']
|
973
1000
|
end
|
@@ -1178,6 +1205,10 @@ module Akeyless
|
|
1178
1205
|
end
|
1179
1206
|
end
|
1180
1207
|
|
1208
|
+
if attributes.key?(:'k8s_allowed_namespaces')
|
1209
|
+
self.k8s_allowed_namespaces = attributes[:'k8s_allowed_namespaces']
|
1210
|
+
end
|
1211
|
+
|
1181
1212
|
if attributes.key?(:'k8s_bearer_token')
|
1182
1213
|
self.k8s_bearer_token = attributes[:'k8s_bearer_token']
|
1183
1214
|
end
|
@@ -1190,6 +1221,10 @@ module Akeyless
|
|
1190
1221
|
self.k8s_cluster_endpoint = attributes[:'k8s_cluster_endpoint']
|
1191
1222
|
end
|
1192
1223
|
|
1224
|
+
if attributes.key?(:'k8s_dynamic_mode')
|
1225
|
+
self.k8s_dynamic_mode = attributes[:'k8s_dynamic_mode']
|
1226
|
+
end
|
1227
|
+
|
1193
1228
|
if attributes.key?(:'k8s_namespace')
|
1194
1229
|
self.k8s_namespace = attributes[:'k8s_namespace']
|
1195
1230
|
end
|
@@ -1571,6 +1606,8 @@ module Akeyless
|
|
1571
1606
|
db_max_open_conns == o.db_max_open_conns &&
|
1572
1607
|
db_name == o.db_name &&
|
1573
1608
|
db_port == o.db_port &&
|
1609
|
+
db_private_key == o.db_private_key &&
|
1610
|
+
db_private_key_passphrase == o.db_private_key_passphrase &&
|
1574
1611
|
db_pwd == o.db_pwd &&
|
1575
1612
|
db_server_certificates == o.db_server_certificates &&
|
1576
1613
|
db_server_name == o.db_server_name &&
|
@@ -1621,9 +1658,11 @@ module Akeyless
|
|
1621
1658
|
implementation_type == o.implementation_type &&
|
1622
1659
|
is_fixed_user == o.is_fixed_user &&
|
1623
1660
|
item_targets_assoc == o.item_targets_assoc &&
|
1661
|
+
k8s_allowed_namespaces == o.k8s_allowed_namespaces &&
|
1624
1662
|
k8s_bearer_token == o.k8s_bearer_token &&
|
1625
1663
|
k8s_cluster_ca_certificate == o.k8s_cluster_ca_certificate &&
|
1626
1664
|
k8s_cluster_endpoint == o.k8s_cluster_endpoint &&
|
1665
|
+
k8s_dynamic_mode == o.k8s_dynamic_mode &&
|
1627
1666
|
k8s_namespace == o.k8s_namespace &&
|
1628
1667
|
k8s_service_account == o.k8s_service_account &&
|
1629
1668
|
last_admin_rotation == o.last_admin_rotation &&
|
@@ -1712,7 +1751,7 @@ module Akeyless
|
|
1712
1751
|
# Calculates hash code according to all attributes.
|
1713
1752
|
# @return [Integer] Hash code
|
1714
1753
|
def hash
|
1715
|
-
[active, admin_name, admin_pwd, admin_rotation_interval_days, artifactory_admin_apikey, artifactory_admin_username, artifactory_base_url, artifactory_token_audience, artifactory_token_scope, aws_access_key_id, aws_access_mode, aws_region, aws_role_arns, aws_secret_access_key, aws_session_token, aws_user_console_access, aws_user_groups, aws_user_policies, aws_user_programmatic_access, azure_app_object_id, azure_client_id, azure_client_secret, azure_fixed_user_name_sub_claim_key, azure_fixed_user_only, azure_resource_group_name, azure_resource_name, azure_subscription_id, azure_tenant_id, azure_user_groups_obj_id, azure_user_portal_access, azure_user_programmatic_access, azure_user_roles_template_id, cassandra_creation_statements, chef_organizations, chef_server_access_mode, chef_server_host_name, chef_server_key, chef_server_port, chef_server_url, chef_server_username, chef_skip_ssl, create_sync_url, db_host_name, db_isolation_level, db_max_idle_conns, db_max_open_conns, db_name, db_port, db_pwd, db_server_certificates, db_server_name, db_user_name, delete_protection, dynamic_secret_id, dynamic_secret_key, dynamic_secret_name, dynamic_secret_type, eks_access_key_id, eks_assume_role, eks_cluster_ca_certificate, eks_cluster_endpoint, eks_cluster_name, eks_region, eks_secret_access_key, enable_admin_rotation, externally_provided_user, failure_message, fixed_user_only, gcp_key_algo, gcp_role_bindings, gcp_service_account_email, gcp_service_account_key, gcp_service_account_type, gcp_tmp_service_account_name, gcp_token_lifetime, gcp_token_scope, gcp_token_type, github_app_id, github_app_private_key, github_base_url, github_installation_id, github_installation_token_permissions, github_installation_token_repositories, github_installation_token_repositories_ids, github_repository_path, gke_cluster_ca_certificate, gke_cluster_endpoint, gke_cluster_name, gke_service_account_key, gke_service_account_name, groups, hanadb_creation_statements, hanadb_revocation_statements, host_name, host_port, implementation_type, is_fixed_user, item_targets_assoc, k8s_bearer_token, k8s_cluster_ca_certificate, k8s_cluster_endpoint, k8s_namespace, k8s_service_account, last_admin_rotation, ldap_audience, ldap_bind_dn, ldap_bind_password, ldap_certificate, ldap_token_expiration, ldap_url, ldap_user_attr, ldap_user_dn, metadata, mongodb_atlas_api_private_key, mongodb_atlas_api_public_key, mongodb_atlas_project_id, mongodb_custom_data, mongodb_db_name, mongodb_default_auth_db, mongodb_host_port, mongodb_is_atlas, mongodb_password, mongodb_roles, mongodb_uri_connection, mongodb_uri_options, mongodb_username, mssql_creation_statements, mssql_revocation_statements, mysql_creation_statements, oracle_creation_statements, password, password_length, password_policy, payload, postgres_creation_statements, postgres_revocation_statements, rabbitmq_server_password, rabbitmq_server_uri, rabbitmq_server_user, rabbitmq_user_conf_permission, rabbitmq_user_read_permission, rabbitmq_user_tags, rabbitmq_user_vhost, rabbitmq_user_write_permission, redshift_creation_statements, revoke_sync_url, rotate_sync_url, scopes, secure_remote_access_details, session_extension_warn_interval_min, sf_account, sf_user_role, sf_warehouse_name, should_stop, ssl_connection_certificate, ssl_connection_mode, tags, timeout_seconds, use_gw_cloud_identity, user_name, user_principal_name, user_ttl, username_length, username_policy, venafi_allow_subdomains, venafi_allowed_domains, venafi_api_key, venafi_auto_generated_folder, venafi_base_url, venafi_root_first_in_chain, venafi_sign_using_akeyless_pki, venafi_signer_key_name, venafi_store_private_key, venafi_tpp_password, venafi_tpp_username, venafi_use_tpp, venafi_zone, warn_before_user_expiration_min].hash
|
1754
|
+
[active, admin_name, admin_pwd, admin_rotation_interval_days, artifactory_admin_apikey, artifactory_admin_username, artifactory_base_url, artifactory_token_audience, artifactory_token_scope, aws_access_key_id, aws_access_mode, aws_region, aws_role_arns, aws_secret_access_key, aws_session_token, aws_user_console_access, aws_user_groups, aws_user_policies, aws_user_programmatic_access, azure_app_object_id, azure_client_id, azure_client_secret, azure_fixed_user_name_sub_claim_key, azure_fixed_user_only, azure_resource_group_name, azure_resource_name, azure_subscription_id, azure_tenant_id, azure_user_groups_obj_id, azure_user_portal_access, azure_user_programmatic_access, azure_user_roles_template_id, cassandra_creation_statements, chef_organizations, chef_server_access_mode, chef_server_host_name, chef_server_key, chef_server_port, chef_server_url, chef_server_username, chef_skip_ssl, create_sync_url, db_host_name, db_isolation_level, db_max_idle_conns, db_max_open_conns, db_name, db_port, db_private_key, db_private_key_passphrase, db_pwd, db_server_certificates, db_server_name, db_user_name, delete_protection, dynamic_secret_id, dynamic_secret_key, dynamic_secret_name, dynamic_secret_type, eks_access_key_id, eks_assume_role, eks_cluster_ca_certificate, eks_cluster_endpoint, eks_cluster_name, eks_region, eks_secret_access_key, enable_admin_rotation, externally_provided_user, failure_message, fixed_user_only, gcp_key_algo, gcp_role_bindings, gcp_service_account_email, gcp_service_account_key, gcp_service_account_type, gcp_tmp_service_account_name, gcp_token_lifetime, gcp_token_scope, gcp_token_type, github_app_id, github_app_private_key, github_base_url, github_installation_id, github_installation_token_permissions, github_installation_token_repositories, github_installation_token_repositories_ids, github_repository_path, gke_cluster_ca_certificate, gke_cluster_endpoint, gke_cluster_name, gke_service_account_key, gke_service_account_name, groups, hanadb_creation_statements, hanadb_revocation_statements, host_name, host_port, implementation_type, is_fixed_user, item_targets_assoc, k8s_allowed_namespaces, k8s_bearer_token, k8s_cluster_ca_certificate, k8s_cluster_endpoint, k8s_dynamic_mode, k8s_namespace, k8s_service_account, last_admin_rotation, ldap_audience, ldap_bind_dn, ldap_bind_password, ldap_certificate, ldap_token_expiration, ldap_url, ldap_user_attr, ldap_user_dn, metadata, mongodb_atlas_api_private_key, mongodb_atlas_api_public_key, mongodb_atlas_project_id, mongodb_custom_data, mongodb_db_name, mongodb_default_auth_db, mongodb_host_port, mongodb_is_atlas, mongodb_password, mongodb_roles, mongodb_uri_connection, mongodb_uri_options, mongodb_username, mssql_creation_statements, mssql_revocation_statements, mysql_creation_statements, oracle_creation_statements, password, password_length, password_policy, payload, postgres_creation_statements, postgres_revocation_statements, rabbitmq_server_password, rabbitmq_server_uri, rabbitmq_server_user, rabbitmq_user_conf_permission, rabbitmq_user_read_permission, rabbitmq_user_tags, rabbitmq_user_vhost, rabbitmq_user_write_permission, redshift_creation_statements, revoke_sync_url, rotate_sync_url, scopes, secure_remote_access_details, session_extension_warn_interval_min, sf_account, sf_user_role, sf_warehouse_name, should_stop, ssl_connection_certificate, ssl_connection_mode, tags, timeout_seconds, use_gw_cloud_identity, user_name, user_principal_name, user_ttl, username_length, username_policy, venafi_allow_subdomains, venafi_allowed_domains, venafi_api_key, venafi_auto_generated_folder, venafi_base_url, venafi_root_first_in_chain, venafi_sign_using_akeyless_pki, venafi_signer_key_name, venafi_store_private_key, venafi_tpp_password, venafi_tpp_username, venafi_use_tpp, venafi_zone, warn_before_user_expiration_min].hash
|
1716
1755
|
end
|
1717
1756
|
|
1718
1757
|
# Builds the object from hash
|