akeyless 3.1.1 → 3.1.2

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 (78) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -1
  3. data/docs/AssocTargetItem.md +2 -0
  4. data/docs/CreateCertificate.md +3 -1
  5. data/docs/CreateClassicKey.md +6 -2
  6. data/docs/CreateDBTarget.md +4 -0
  7. data/docs/CreateDFCKey.md +3 -1
  8. data/docs/CreateDynamicSecret.md +3 -1
  9. data/docs/CreateKey.md +3 -1
  10. data/docs/CreatePKICertIssuer.md +3 -1
  11. data/docs/CreateRotatedSecret.md +3 -1
  12. data/docs/CreateSSHCertIssuer.md +3 -1
  13. data/docs/CreateSecret.md +3 -1
  14. data/docs/CreateTokenizer.md +3 -1
  15. data/docs/DSProducerDetails.md +8 -0
  16. data/docs/DecryptGPG.md +34 -0
  17. data/docs/DecryptGPGOutput.md +18 -0
  18. data/docs/EncryptGPG.md +32 -0
  19. data/docs/EncryptGPGOutput.md +18 -0
  20. data/docs/GatewayCreateProducerSnowflake.md +4 -0
  21. data/docs/GatewayUpdateItem.md +3 -1
  22. data/docs/GatewayUpdateProducerSnowflake.md +4 -0
  23. data/docs/GenCustomerFragment.md +4 -2
  24. data/docs/SignGPG.md +32 -0
  25. data/docs/SignGPGOutput.md +18 -0
  26. data/docs/TargetTypeDetailsInput.md +4 -0
  27. data/docs/UpdateDBTarget.md +4 -0
  28. data/docs/UpdateItem.md +3 -1
  29. data/docs/UpdatePKICertIssuer.md +3 -1
  30. data/docs/UpdateRotatedSecret.md +3 -1
  31. data/docs/UpdateSSHCertIssuer.md +3 -1
  32. data/docs/UploadPKCS12.md +3 -1
  33. data/docs/UploadRSA.md +3 -1
  34. data/docs/V2Api.md +252 -0
  35. data/docs/VerifyGPG.md +32 -0
  36. data/lib/akeyless/api/v2_api.rb +256 -0
  37. data/lib/akeyless/models/assoc_target_item.rb +11 -1
  38. data/lib/akeyless/models/create_certificate.rb +12 -2
  39. data/lib/akeyless/models/create_classic_key.rb +23 -3
  40. data/lib/akeyless/models/create_db_target.rb +21 -1
  41. data/lib/akeyless/models/create_dfc_key.rb +12 -2
  42. data/lib/akeyless/models/create_dynamic_secret.rb +12 -4
  43. data/lib/akeyless/models/create_key.rb +12 -2
  44. data/lib/akeyless/models/create_pki_cert_issuer.rb +12 -2
  45. data/lib/akeyless/models/create_rotated_secret.rb +12 -2
  46. data/lib/akeyless/models/create_secret.rb +12 -2
  47. data/lib/akeyless/models/create_ssh_cert_issuer.rb +12 -2
  48. data/lib/akeyless/models/create_tokenizer.rb +12 -2
  49. data/lib/akeyless/models/decrypt_gpg.rb +310 -0
  50. data/lib/akeyless/models/decrypt_gpg_output.rb +219 -0
  51. data/lib/akeyless/models/ds_producer_details.rb +40 -1
  52. data/lib/akeyless/models/encrypt_gpg.rb +300 -0
  53. data/lib/akeyless/models/encrypt_gpg_output.rb +219 -0
  54. data/lib/akeyless/models/gateway_create_producer_snowflake.rb +22 -2
  55. data/lib/akeyless/models/gateway_update_item.rb +14 -2
  56. data/lib/akeyless/models/gateway_update_producer_snowflake.rb +22 -2
  57. data/lib/akeyless/models/gen_customer_fragment.rb +15 -5
  58. data/lib/akeyless/models/sign_gpg.rb +300 -0
  59. data/lib/akeyless/models/sign_gpg_output.rb +219 -0
  60. data/lib/akeyless/models/target_type_details_input.rb +20 -1
  61. data/lib/akeyless/models/update_db_target.rb +21 -1
  62. data/lib/akeyless/models/update_item.rb +14 -2
  63. data/lib/akeyless/models/update_pki_cert_issuer.rb +12 -2
  64. data/lib/akeyless/models/update_rotated_secret.rb +14 -2
  65. data/lib/akeyless/models/update_ssh_cert_issuer.rb +12 -2
  66. data/lib/akeyless/models/upload_pkcs12.rb +12 -2
  67. data/lib/akeyless/models/upload_rsa.rb +12 -2
  68. data/lib/akeyless/models/verify_gpg.rb +300 -0
  69. data/lib/akeyless/version.rb +1 -1
  70. data/lib/akeyless.rb +7 -0
  71. data/spec/models/decrypt_gpg_output_spec.rb +34 -0
  72. data/spec/models/decrypt_gpg_spec.rb +82 -0
  73. data/spec/models/encrypt_gpg_output_spec.rb +34 -0
  74. data/spec/models/encrypt_gpg_spec.rb +76 -0
  75. data/spec/models/sign_gpg_output_spec.rb +34 -0
  76. data/spec/models/sign_gpg_spec.rb +76 -0
  77. data/spec/models/verify_gpg_spec.rb +76 -0
  78. metadata +30 -2
@@ -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 EncryptGPGOutput
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::EncryptGPGOutput` 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::EncryptGPGOutput`. 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
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Akeyless
17
- # gatewayCreateProducerSnowflakeCmd is a command that creates a Snowflake producer
17
+ # GatewayCreateProducerSnowflakeCmd is a command that creates a Snowflake producer
18
18
  class GatewayCreateProducerSnowflake
19
19
  # Account name
20
20
  attr_accessor :account
@@ -37,6 +37,12 @@ module Akeyless
37
37
  # Producer name
38
38
  attr_accessor :name
39
39
 
40
+ # RSA Private key (base64 encoded)
41
+ attr_accessor :private_key
42
+
43
+ # The Private key passphrase
44
+ attr_accessor :private_key_passphrase
45
+
40
46
  # User role
41
47
  attr_accessor :role
42
48
 
@@ -68,6 +74,8 @@ module Akeyless
68
74
  :'delete_protection' => :'delete_protection',
69
75
  :'json' => :'json',
70
76
  :'name' => :'name',
77
+ :'private_key' => :'private-key',
78
+ :'private_key_passphrase' => :'private-key-passphrase',
71
79
  :'role' => :'role',
72
80
  :'tags' => :'tags',
73
81
  :'target_name' => :'target-name',
@@ -93,6 +101,8 @@ module Akeyless
93
101
  :'delete_protection' => :'String',
94
102
  :'json' => :'Boolean',
95
103
  :'name' => :'String',
104
+ :'private_key' => :'String',
105
+ :'private_key_passphrase' => :'String',
96
106
  :'role' => :'String',
97
107
  :'tags' => :'Array<String>',
98
108
  :'target_name' => :'String',
@@ -152,6 +162,14 @@ module Akeyless
152
162
  self.name = attributes[:'name']
153
163
  end
154
164
 
165
+ if attributes.key?(:'private_key')
166
+ self.private_key = attributes[:'private_key']
167
+ end
168
+
169
+ if attributes.key?(:'private_key_passphrase')
170
+ self.private_key_passphrase = attributes[:'private_key_passphrase']
171
+ end
172
+
155
173
  if attributes.key?(:'role')
156
174
  self.role = attributes[:'role']
157
175
  end
@@ -215,6 +233,8 @@ module Akeyless
215
233
  delete_protection == o.delete_protection &&
216
234
  json == o.json &&
217
235
  name == o.name &&
236
+ private_key == o.private_key &&
237
+ private_key_passphrase == o.private_key_passphrase &&
218
238
  role == o.role &&
219
239
  tags == o.tags &&
220
240
  target_name == o.target_name &&
@@ -233,7 +253,7 @@ module Akeyless
233
253
  # Calculates hash code according to all attributes.
234
254
  # @return [Integer] Hash code
235
255
  def hash
236
- [account, account_password, account_username, db_name, delete_protection, json, name, role, tags, target_name, token, uid_token, user_ttl, warehouse].hash
256
+ [account, account_password, account_username, db_name, delete_protection, json, name, private_key, private_key_passphrase, role, tags, target_name, token, uid_token, user_ttl, warehouse].hash
237
257
  end
238
258
 
239
259
  # Builds the object from hash
@@ -31,6 +31,9 @@ module Akeyless
31
31
  # Protection from accidental deletion of this item
32
32
  attr_accessor :delete_protection
33
33
 
34
+ # Description of the object
35
+ attr_accessor :description
36
+
34
37
  # Base64-encoded service account private key text
35
38
  attr_accessor :gcp_key
36
39
 
@@ -45,7 +48,7 @@ module Akeyless
45
48
  # Item name
46
49
  attr_accessor :name
47
50
 
48
- # New item metadata
51
+ # Deprecated - use description
49
52
  attr_accessor :new_metadata
50
53
 
51
54
  # New item name
@@ -88,6 +91,7 @@ module Akeyless
88
91
  :'auto_rotate' => :'auto-rotate',
89
92
  :'custom_payload' => :'custom-payload',
90
93
  :'delete_protection' => :'delete_protection',
94
+ :'description' => :'description',
91
95
  :'gcp_key' => :'gcp-key',
92
96
  :'json' => :'json',
93
97
  :'keep_prev_version' => :'keep-prev-version',
@@ -122,6 +126,7 @@ module Akeyless
122
126
  :'auto_rotate' => :'String',
123
127
  :'custom_payload' => :'String',
124
128
  :'delete_protection' => :'String',
129
+ :'description' => :'String',
125
130
  :'gcp_key' => :'String',
126
131
  :'json' => :'Boolean',
127
132
  :'keep_prev_version' => :'String',
@@ -189,6 +194,12 @@ module Akeyless
189
194
  self.delete_protection = attributes[:'delete_protection']
190
195
  end
191
196
 
197
+ if attributes.key?(:'description')
198
+ self.description = attributes[:'description']
199
+ else
200
+ self.description = 'default_metadata'
201
+ end
202
+
192
203
  if attributes.key?(:'gcp_key')
193
204
  self.gcp_key = attributes[:'gcp_key']
194
205
  end
@@ -298,6 +309,7 @@ module Akeyless
298
309
  auto_rotate == o.auto_rotate &&
299
310
  custom_payload == o.custom_payload &&
300
311
  delete_protection == o.delete_protection &&
312
+ description == o.description &&
301
313
  gcp_key == o.gcp_key &&
302
314
  json == o.json &&
303
315
  keep_prev_version == o.keep_prev_version &&
@@ -326,7 +338,7 @@ module Akeyless
326
338
  # Calculates hash code according to all attributes.
327
339
  # @return [Integer] Hash code
328
340
  def hash
329
- [add_tag, api_id, api_key, auto_rotate, custom_payload, delete_protection, gcp_key, json, keep_prev_version, key, name, new_metadata, new_name, new_version, rm_tag, rotated_password, rotated_username, rotation_hour, rotation_interval, rotator_creds_type, token, type, uid_token].hash
341
+ [add_tag, api_id, api_key, auto_rotate, custom_payload, delete_protection, description, gcp_key, json, keep_prev_version, key, name, new_metadata, new_name, new_version, rm_tag, rotated_password, rotated_username, rotation_hour, rotation_interval, rotator_creds_type, token, type, uid_token].hash
330
342
  end
331
343
 
332
344
  # Builds the object from hash
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Akeyless
17
- # gatewayUpdateProducerSnowflakeCmd is a command that updates a Snowflake producer
17
+ # GatewayUpdateProducerSnowflakeCmd is a command that updates a Snowflake producer
18
18
  class GatewayUpdateProducerSnowflake
19
19
  # Account name
20
20
  attr_accessor :account
@@ -40,6 +40,12 @@ module Akeyless
40
40
  # Producer name
41
41
  attr_accessor :new_name
42
42
 
43
+ # RSA Private key (base64 encoded)
44
+ attr_accessor :private_key
45
+
46
+ # The Private key passphrase
47
+ attr_accessor :private_key_passphrase
48
+
43
49
  # User role
44
50
  attr_accessor :role
45
51
 
@@ -72,6 +78,8 @@ module Akeyless
72
78
  :'json' => :'json',
73
79
  :'name' => :'name',
74
80
  :'new_name' => :'new-name',
81
+ :'private_key' => :'private-key',
82
+ :'private_key_passphrase' => :'private-key-passphrase',
75
83
  :'role' => :'role',
76
84
  :'tags' => :'tags',
77
85
  :'target_name' => :'target-name',
@@ -98,6 +106,8 @@ module Akeyless
98
106
  :'json' => :'Boolean',
99
107
  :'name' => :'String',
100
108
  :'new_name' => :'String',
109
+ :'private_key' => :'String',
110
+ :'private_key_passphrase' => :'String',
101
111
  :'role' => :'String',
102
112
  :'tags' => :'Array<String>',
103
113
  :'target_name' => :'String',
@@ -161,6 +171,14 @@ module Akeyless
161
171
  self.new_name = attributes[:'new_name']
162
172
  end
163
173
 
174
+ if attributes.key?(:'private_key')
175
+ self.private_key = attributes[:'private_key']
176
+ end
177
+
178
+ if attributes.key?(:'private_key_passphrase')
179
+ self.private_key_passphrase = attributes[:'private_key_passphrase']
180
+ end
181
+
164
182
  if attributes.key?(:'role')
165
183
  self.role = attributes[:'role']
166
184
  end
@@ -225,6 +243,8 @@ module Akeyless
225
243
  json == o.json &&
226
244
  name == o.name &&
227
245
  new_name == o.new_name &&
246
+ private_key == o.private_key &&
247
+ private_key_passphrase == o.private_key_passphrase &&
228
248
  role == o.role &&
229
249
  tags == o.tags &&
230
250
  target_name == o.target_name &&
@@ -243,7 +263,7 @@ module Akeyless
243
263
  # Calculates hash code according to all attributes.
244
264
  # @return [Integer] Hash code
245
265
  def hash
246
- [account, account_password, account_username, db_name, delete_protection, json, name, new_name, role, tags, target_name, token, uid_token, user_ttl, warehouse].hash
266
+ [account, account_password, account_username, db_name, delete_protection, json, name, new_name, private_key, private_key_passphrase, role, tags, target_name, token, uid_token, user_ttl, warehouse].hash
247
267
  end
248
268
 
249
269
  # Builds the object from hash
@@ -15,17 +15,21 @@ require 'time'
15
15
 
16
16
  module Akeyless
17
17
  class GenCustomerFragment
18
- # The Customer Fragment Description
18
+ # Description of the object
19
19
  attr_accessor :description
20
20
 
21
21
  # Set output format to JSON
22
22
  attr_accessor :json
23
23
 
24
+ # Deprecated - use description
25
+ attr_accessor :metadata
26
+
24
27
  # Attribute mapping from ruby-style variable name to JSON key.
25
28
  def self.attribute_map
26
29
  {
27
30
  :'description' => :'description',
28
- :'json' => :'json'
31
+ :'json' => :'json',
32
+ :'metadata' => :'metadata'
29
33
  }
30
34
  end
31
35
 
@@ -38,7 +42,8 @@ module Akeyless
38
42
  def self.openapi_types
39
43
  {
40
44
  :'description' => :'String',
41
- :'json' => :'Boolean'
45
+ :'json' => :'Boolean',
46
+ :'metadata' => :'String'
42
47
  }
43
48
  end
44
49
 
@@ -70,6 +75,10 @@ module Akeyless
70
75
  if attributes.key?(:'json')
71
76
  self.json = attributes[:'json']
72
77
  end
78
+
79
+ if attributes.key?(:'metadata')
80
+ self.metadata = attributes[:'metadata']
81
+ end
73
82
  end
74
83
 
75
84
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -91,7 +100,8 @@ module Akeyless
91
100
  return true if self.equal?(o)
92
101
  self.class == o.class &&
93
102
  description == o.description &&
94
- json == o.json
103
+ json == o.json &&
104
+ metadata == o.metadata
95
105
  end
96
106
 
97
107
  # @see the `==` method
@@ -103,7 +113,7 @@ module Akeyless
103
113
  # Calculates hash code according to all attributes.
104
114
  # @return [Integer] Hash code
105
115
  def hash
106
- [description, json].hash
116
+ [description, json, metadata].hash
107
117
  end
108
118
 
109
119
  # Builds the object from hash