akeyless 2.16.11 → 2.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -8
  3. data/docs/AccountGeneralSettings.md +20 -0
  4. data/docs/CreateArtifactoryTarget.md +1 -1
  5. data/docs/CreateAuthMethodK8S.md +2 -2
  6. data/docs/CreateAuthMethodLDAP.md +3 -1
  7. data/docs/CreateAuthMethodLDAPOutput.md +3 -1
  8. data/docs/CreateKeyOutput.md +5 -1
  9. data/docs/CreateLdapTarget.md +2 -0
  10. data/docs/CreatePKICertIssuer.md +5 -5
  11. data/docs/CreateSSHCertIssuer.md +1 -1
  12. data/docs/CreateSalesforceTarget.md +7 -3
  13. data/docs/CreateSecret.md +11 -19
  14. data/docs/DSProducerDetails.md +2 -0
  15. data/docs/DataProtectionSection.md +18 -0
  16. data/docs/Decrypt.md +3 -1
  17. data/docs/DecryptFile.md +6 -0
  18. data/docs/DecryptPKCS1.md +5 -1
  19. data/docs/DeleteItem.md +2 -2
  20. data/docs/DescribeItem.md +4 -0
  21. data/docs/DescribeSubClaims.md +20 -0
  22. data/docs/DescribeSubClaimsOutput.md +18 -0
  23. data/docs/Encrypt.md +3 -1
  24. data/docs/EncryptFile.md +4 -0
  25. data/docs/EncryptPKCS1.md +5 -1
  26. data/docs/GatewayCreateK8SAuthConfig.md +10 -4
  27. data/docs/GatewayCreateProducerDockerhub.md +1 -1
  28. data/docs/GatewayGetK8SAuthConfigOutput.md +7 -1
  29. data/docs/GatewayRevokeTmpUsers.md +4 -2
  30. data/docs/GatewayUpdateK8SAuthConfig.md +10 -4
  31. data/docs/GatewayUpdateLdapAuthConfig.md +2 -2
  32. data/docs/GatewayUpdateProducerDockerhub.md +1 -1
  33. data/docs/GetAccountSettingsCommandOutput.md +2 -0
  34. data/docs/GetSecretValue.md +2 -2
  35. data/docs/Item.md +2 -0
  36. data/docs/K8SAuth.md +7 -1
  37. data/docs/KubernetesAccessRules.md +2 -0
  38. data/docs/LDAPAccessRules.md +2 -0
  39. data/docs/ListItems.md +2 -2
  40. data/docs/LogForwardingConfigPart.md +2 -0
  41. data/docs/RuleAssigner.md +20 -0
  42. data/docs/SignPKCS1.md +5 -1
  43. data/docs/TargetTypeDetailsInput.md +5 -1
  44. data/docs/UpdateAccountSettings.md +13 -1
  45. data/docs/UpdateAuthMethodK8S.md +2 -2
  46. data/docs/UpdateAuthMethodLDAP.md +3 -1
  47. data/docs/UpdateAuthMethodLDAPOutput.md +18 -0
  48. data/docs/UpdateItem.md +2 -2
  49. data/docs/UpdateLdapTarget.md +2 -0
  50. data/docs/UpdateSalesforceTarget.md +7 -3
  51. data/docs/UpdateSecretVal.md +11 -9
  52. data/docs/V2Api.md +46 -109
  53. data/docs/VerifyPKCS1.md +4 -0
  54. data/lib/akeyless/api/v2_api.rb +43 -107
  55. data/lib/akeyless/models/account_general_settings.rb +229 -0
  56. data/lib/akeyless/models/create_artifactory_target.rb +1 -1
  57. data/lib/akeyless/models/create_auth_method_k8_s.rb +2 -2
  58. data/lib/akeyless/models/create_auth_method_ldap.rb +14 -2
  59. data/lib/akeyless/models/create_auth_method_ldap_output.rb +13 -4
  60. data/lib/akeyless/models/create_key_output.rb +22 -4
  61. data/lib/akeyless/models/create_ldap_target.rb +13 -1
  62. data/lib/akeyless/models/create_pki_cert_issuer.rb +5 -5
  63. data/lib/akeyless/models/create_salesforce_target.rb +29 -19
  64. data/lib/akeyless/models/create_secret.rb +50 -90
  65. data/lib/akeyless/models/create_ssh_cert_issuer.rb +1 -1
  66. data/lib/akeyless/models/data_protection_section.rb +220 -0
  67. data/lib/akeyless/models/decrypt.rb +16 -1
  68. data/lib/akeyless/models/decrypt_file.rb +36 -1
  69. data/lib/akeyless/models/decrypt_pkcs1.rb +22 -2
  70. data/lib/akeyless/models/delete_item.rb +11 -11
  71. data/lib/akeyless/models/describe_item.rb +21 -1
  72. data/lib/akeyless/models/describe_sub_claims.rb +231 -0
  73. data/lib/akeyless/models/describe_sub_claims_output.rb +221 -0
  74. data/lib/akeyless/models/ds_producer_details.rb +10 -1
  75. data/lib/akeyless/models/encrypt.rb +16 -1
  76. data/lib/akeyless/models/encrypt_file.rb +21 -1
  77. data/lib/akeyless/models/encrypt_pkcs1.rb +22 -2
  78. data/lib/akeyless/models/gateway_create_k8_s_auth_config.rb +38 -4
  79. data/lib/akeyless/models/gateway_create_producer_dockerhub.rb +1 -1
  80. data/lib/akeyless/models/gateway_get_k8_s_auth_config_output.rb +32 -2
  81. data/lib/akeyless/models/gateway_revoke_tmp_users.rb +14 -2
  82. data/lib/akeyless/models/gateway_update_k8_s_auth_config.rb +38 -4
  83. data/lib/akeyless/models/gateway_update_ldap_auth_config.rb +2 -2
  84. data/lib/akeyless/models/gateway_update_producer_dockerhub.rb +1 -1
  85. data/lib/akeyless/models/get_account_settings_command_output.rb +10 -1
  86. data/lib/akeyless/models/get_secret_value.rb +7 -7
  87. data/lib/akeyless/models/item.rb +10 -1
  88. data/lib/akeyless/models/k8_s_auth.rb +32 -2
  89. data/lib/akeyless/models/kubernetes_access_rules.rb +11 -1
  90. data/lib/akeyless/models/ldap_access_rules.rb +11 -1
  91. data/lib/akeyless/models/list_items.rb +11 -11
  92. data/lib/akeyless/models/log_forwarding_config_part.rb +10 -1
  93. data/lib/akeyless/models/rule_assigner.rb +228 -0
  94. data/lib/akeyless/models/sign_pkcs1.rb +21 -6
  95. data/lib/akeyless/models/target_type_details_input.rb +23 -1
  96. data/lib/akeyless/models/update_account_settings.rb +64 -4
  97. data/lib/akeyless/models/update_auth_method_k8_s.rb +2 -4
  98. data/lib/akeyless/models/update_auth_method_ldap.rb +12 -2
  99. data/lib/akeyless/models/update_auth_method_ldap_output.rb +219 -0
  100. data/lib/akeyless/models/update_item.rb +11 -11
  101. data/lib/akeyless/models/update_ldap_target.rb +11 -1
  102. data/lib/akeyless/models/update_salesforce_target.rb +29 -19
  103. data/lib/akeyless/models/update_secret_val.rb +52 -42
  104. data/lib/akeyless/models/verify_pkcs1.rb +21 -1
  105. data/lib/akeyless/version.rb +1 -1
  106. data/lib/akeyless.rb +6 -4
  107. data/spec/models/account_general_settings_spec.rb +34 -0
  108. data/spec/models/data_protection_section_spec.rb +34 -0
  109. data/spec/models/describe_sub_claims_output_spec.rb +34 -0
  110. data/spec/models/describe_sub_claims_spec.rb +40 -0
  111. data/spec/models/rule_assigner_spec.rb +40 -0
  112. data/spec/models/update_auth_method_ldap_output_spec.rb +34 -0
  113. metadata +525 -501
@@ -3731,27 +3731,27 @@ module Akeyless
3731
3731
  return data, status_code, headers
3732
3732
  end
3733
3733
 
3734
- # @param body [Detokenize]
3734
+ # @param body [DescribeSubClaims]
3735
3735
  # @param [Hash] opts the optional parameters
3736
- # @return [DetokenizeOutput]
3737
- def detokenize(body, opts = {})
3738
- data, _status_code, _headers = detokenize_with_http_info(body, opts)
3736
+ # @return [DescribeSubClaimsOutput]
3737
+ def describe_sub_claims(body, opts = {})
3738
+ data, _status_code, _headers = describe_sub_claims_with_http_info(body, opts)
3739
3739
  data
3740
3740
  end
3741
3741
 
3742
- # @param body [Detokenize]
3742
+ # @param body [DescribeSubClaims]
3743
3743
  # @param [Hash] opts the optional parameters
3744
- # @return [Array<(DetokenizeOutput, Integer, Hash)>] DetokenizeOutput data, response status code and response headers
3745
- def detokenize_with_http_info(body, opts = {})
3744
+ # @return [Array<(DescribeSubClaimsOutput, Integer, Hash)>] DescribeSubClaimsOutput data, response status code and response headers
3745
+ def describe_sub_claims_with_http_info(body, opts = {})
3746
3746
  if @api_client.config.debugging
3747
- @api_client.config.logger.debug 'Calling API: V2Api.detokenize ...'
3747
+ @api_client.config.logger.debug 'Calling API: V2Api.describe_sub_claims ...'
3748
3748
  end
3749
3749
  # verify the required parameter 'body' is set
3750
3750
  if @api_client.config.client_side_validation && body.nil?
3751
- fail ArgumentError, "Missing the required parameter 'body' when calling V2Api.detokenize"
3751
+ fail ArgumentError, "Missing the required parameter 'body' when calling V2Api.describe_sub_claims"
3752
3752
  end
3753
3753
  # resource path
3754
- local_var_path = '/detokenize'
3754
+ local_var_path = '/describe-sub-claims'
3755
3755
 
3756
3756
  # query parameters
3757
3757
  query_params = opts[:query_params] || {}
@@ -3773,13 +3773,13 @@ module Akeyless
3773
3773
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
3774
3774
 
3775
3775
  # return_type
3776
- return_type = opts[:debug_return_type] || 'DetokenizeOutput'
3776
+ return_type = opts[:debug_return_type] || 'DescribeSubClaimsOutput'
3777
3777
 
3778
3778
  # auth_names
3779
3779
  auth_names = opts[:debug_auth_names] || []
3780
3780
 
3781
3781
  new_options = opts.merge(
3782
- :operation => :"V2Api.detokenize",
3782
+ :operation => :"V2Api.describe_sub_claims",
3783
3783
  :header_params => header_params,
3784
3784
  :query_params => query_params,
3785
3785
  :form_params => form_params,
@@ -3790,32 +3790,32 @@ module Akeyless
3790
3790
 
3791
3791
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3792
3792
  if @api_client.config.debugging
3793
- @api_client.config.logger.debug "API called: V2Api#detokenize\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3793
+ @api_client.config.logger.debug "API called: V2Api#describe_sub_claims\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3794
3794
  end
3795
3795
  return data, status_code, headers
3796
3796
  end
3797
3797
 
3798
- # @param body [Encrypt]
3798
+ # @param body [Detokenize]
3799
3799
  # @param [Hash] opts the optional parameters
3800
- # @return [EncryptOutput]
3801
- def encrypt(body, opts = {})
3802
- data, _status_code, _headers = encrypt_with_http_info(body, opts)
3800
+ # @return [DetokenizeOutput]
3801
+ def detokenize(body, opts = {})
3802
+ data, _status_code, _headers = detokenize_with_http_info(body, opts)
3803
3803
  data
3804
3804
  end
3805
3805
 
3806
- # @param body [Encrypt]
3806
+ # @param body [Detokenize]
3807
3807
  # @param [Hash] opts the optional parameters
3808
- # @return [Array<(EncryptOutput, Integer, Hash)>] EncryptOutput data, response status code and response headers
3809
- def encrypt_with_http_info(body, opts = {})
3808
+ # @return [Array<(DetokenizeOutput, Integer, Hash)>] DetokenizeOutput data, response status code and response headers
3809
+ def detokenize_with_http_info(body, opts = {})
3810
3810
  if @api_client.config.debugging
3811
- @api_client.config.logger.debug 'Calling API: V2Api.encrypt ...'
3811
+ @api_client.config.logger.debug 'Calling API: V2Api.detokenize ...'
3812
3812
  end
3813
3813
  # verify the required parameter 'body' is set
3814
3814
  if @api_client.config.client_side_validation && body.nil?
3815
- fail ArgumentError, "Missing the required parameter 'body' when calling V2Api.encrypt"
3815
+ fail ArgumentError, "Missing the required parameter 'body' when calling V2Api.detokenize"
3816
3816
  end
3817
3817
  # resource path
3818
- local_var_path = '/encrypt'
3818
+ local_var_path = '/detokenize'
3819
3819
 
3820
3820
  # query parameters
3821
3821
  query_params = opts[:query_params] || {}
@@ -3837,13 +3837,13 @@ module Akeyless
3837
3837
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
3838
3838
 
3839
3839
  # return_type
3840
- return_type = opts[:debug_return_type] || 'EncryptOutput'
3840
+ return_type = opts[:debug_return_type] || 'DetokenizeOutput'
3841
3841
 
3842
3842
  # auth_names
3843
3843
  auth_names = opts[:debug_auth_names] || []
3844
3844
 
3845
3845
  new_options = opts.merge(
3846
- :operation => :"V2Api.encrypt",
3846
+ :operation => :"V2Api.detokenize",
3847
3847
  :header_params => header_params,
3848
3848
  :query_params => query_params,
3849
3849
  :form_params => form_params,
@@ -3854,32 +3854,32 @@ module Akeyless
3854
3854
 
3855
3855
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3856
3856
  if @api_client.config.debugging
3857
- @api_client.config.logger.debug "API called: V2Api#encrypt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3857
+ @api_client.config.logger.debug "API called: V2Api#detokenize\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3858
3858
  end
3859
3859
  return data, status_code, headers
3860
3860
  end
3861
3861
 
3862
- # @param body [EncryptPKCS1]
3862
+ # @param body [Encrypt]
3863
3863
  # @param [Hash] opts the optional parameters
3864
- # @return [EncryptPKCS1Output]
3865
- def encrypt_pkcs1(body, opts = {})
3866
- data, _status_code, _headers = encrypt_pkcs1_with_http_info(body, opts)
3864
+ # @return [EncryptOutput]
3865
+ def encrypt(body, opts = {})
3866
+ data, _status_code, _headers = encrypt_with_http_info(body, opts)
3867
3867
  data
3868
3868
  end
3869
3869
 
3870
- # @param body [EncryptPKCS1]
3870
+ # @param body [Encrypt]
3871
3871
  # @param [Hash] opts the optional parameters
3872
- # @return [Array<(EncryptPKCS1Output, Integer, Hash)>] EncryptPKCS1Output data, response status code and response headers
3873
- def encrypt_pkcs1_with_http_info(body, opts = {})
3872
+ # @return [Array<(EncryptOutput, Integer, Hash)>] EncryptOutput data, response status code and response headers
3873
+ def encrypt_with_http_info(body, opts = {})
3874
3874
  if @api_client.config.debugging
3875
- @api_client.config.logger.debug 'Calling API: V2Api.encrypt_pkcs1 ...'
3875
+ @api_client.config.logger.debug 'Calling API: V2Api.encrypt ...'
3876
3876
  end
3877
3877
  # verify the required parameter 'body' is set
3878
3878
  if @api_client.config.client_side_validation && body.nil?
3879
- fail ArgumentError, "Missing the required parameter 'body' when calling V2Api.encrypt_pkcs1"
3879
+ fail ArgumentError, "Missing the required parameter 'body' when calling V2Api.encrypt"
3880
3880
  end
3881
3881
  # resource path
3882
- local_var_path = '/encrypt-pkcs1'
3882
+ local_var_path = '/encrypt'
3883
3883
 
3884
3884
  # query parameters
3885
3885
  query_params = opts[:query_params] || {}
@@ -3901,13 +3901,13 @@ module Akeyless
3901
3901
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
3902
3902
 
3903
3903
  # return_type
3904
- return_type = opts[:debug_return_type] || 'EncryptPKCS1Output'
3904
+ return_type = opts[:debug_return_type] || 'EncryptOutput'
3905
3905
 
3906
3906
  # auth_names
3907
3907
  auth_names = opts[:debug_auth_names] || []
3908
3908
 
3909
3909
  new_options = opts.merge(
3910
- :operation => :"V2Api.encrypt_pkcs1",
3910
+ :operation => :"V2Api.encrypt",
3911
3911
  :header_params => header_params,
3912
3912
  :query_params => query_params,
3913
3913
  :form_params => form_params,
@@ -3918,7 +3918,7 @@ module Akeyless
3918
3918
 
3919
3919
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3920
3920
  if @api_client.config.debugging
3921
- @api_client.config.logger.debug "API called: V2Api#encrypt_pkcs1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3921
+ @api_client.config.logger.debug "API called: V2Api#encrypt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3922
3922
  end
3923
3923
  return data, status_code, headers
3924
3924
  end
@@ -5155,7 +5155,7 @@ module Akeyless
5155
5155
  fail ArgumentError, "Missing the required parameter 'body' when calling V2Api.gateway_create_producer_native_k8_s"
5156
5156
  end
5157
5157
  # resource path
5158
- local_var_path = '/gateway-create-producer-k8s-native'
5158
+ local_var_path = '/gateway-create-producer-k8s'
5159
5159
 
5160
5160
  # query parameters
5161
5161
  query_params = opts[:query_params] || {}
@@ -12287,7 +12287,7 @@ module Akeyless
12287
12287
 
12288
12288
  # @param body [UpdateAuthMethodLDAP]
12289
12289
  # @param [Hash] opts the optional parameters
12290
- # @return [Object]
12290
+ # @return [UpdateAuthMethodLDAPOutput]
12291
12291
  def update_auth_method_ldap(body, opts = {})
12292
12292
  data, _status_code, _headers = update_auth_method_ldap_with_http_info(body, opts)
12293
12293
  data
@@ -12295,7 +12295,7 @@ module Akeyless
12295
12295
 
12296
12296
  # @param body [UpdateAuthMethodLDAP]
12297
12297
  # @param [Hash] opts the optional parameters
12298
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
12298
+ # @return [Array<(UpdateAuthMethodLDAPOutput, Integer, Hash)>] UpdateAuthMethodLDAPOutput data, response status code and response headers
12299
12299
  def update_auth_method_ldap_with_http_info(body, opts = {})
12300
12300
  if @api_client.config.debugging
12301
12301
  @api_client.config.logger.debug 'Calling API: V2Api.update_auth_method_ldap ...'
@@ -12327,7 +12327,7 @@ module Akeyless
12327
12327
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
12328
12328
 
12329
12329
  # return_type
12330
- return_type = opts[:debug_return_type] || 'Object'
12330
+ return_type = opts[:debug_return_type] || 'UpdateAuthMethodLDAPOutput'
12331
12331
 
12332
12332
  # auth_names
12333
12333
  auth_names = opts[:debug_auth_names] || []
@@ -14386,70 +14386,6 @@ module Akeyless
14386
14386
  return data, status_code, headers
14387
14387
  end
14388
14388
 
14389
- # @param body [UpdateTokenizer]
14390
- # @param [Hash] opts the optional parameters
14391
- # @return [UpdateTokenizerOutput]
14392
- def update_tokenizer(body, opts = {})
14393
- data, _status_code, _headers = update_tokenizer_with_http_info(body, opts)
14394
- data
14395
- end
14396
-
14397
- # @param body [UpdateTokenizer]
14398
- # @param [Hash] opts the optional parameters
14399
- # @return [Array<(UpdateTokenizerOutput, Integer, Hash)>] UpdateTokenizerOutput data, response status code and response headers
14400
- def update_tokenizer_with_http_info(body, opts = {})
14401
- if @api_client.config.debugging
14402
- @api_client.config.logger.debug 'Calling API: V2Api.update_tokenizer ...'
14403
- end
14404
- # verify the required parameter 'body' is set
14405
- if @api_client.config.client_side_validation && body.nil?
14406
- fail ArgumentError, "Missing the required parameter 'body' when calling V2Api.update_tokenizer"
14407
- end
14408
- # resource path
14409
- local_var_path = '/update-tokenizer'
14410
-
14411
- # query parameters
14412
- query_params = opts[:query_params] || {}
14413
-
14414
- # header parameters
14415
- header_params = opts[:header_params] || {}
14416
- # HTTP header 'Accept' (if needed)
14417
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
14418
- # HTTP header 'Content-Type'
14419
- content_type = @api_client.select_header_content_type(['application/json'])
14420
- if !content_type.nil?
14421
- header_params['Content-Type'] = content_type
14422
- end
14423
-
14424
- # form parameters
14425
- form_params = opts[:form_params] || {}
14426
-
14427
- # http body (model)
14428
- post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
14429
-
14430
- # return_type
14431
- return_type = opts[:debug_return_type] || 'UpdateTokenizerOutput'
14432
-
14433
- # auth_names
14434
- auth_names = opts[:debug_auth_names] || []
14435
-
14436
- new_options = opts.merge(
14437
- :operation => :"V2Api.update_tokenizer",
14438
- :header_params => header_params,
14439
- :query_params => query_params,
14440
- :form_params => form_params,
14441
- :body => post_body,
14442
- :auth_names => auth_names,
14443
- :return_type => return_type
14444
- )
14445
-
14446
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
14447
- if @api_client.config.debugging
14448
- @api_client.config.logger.debug "API called: V2Api#update_tokenizer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
14449
- end
14450
- return data, status_code, headers
14451
- end
14452
-
14453
14389
  # @param body [UpdateWebTarget]
14454
14390
  # @param [Hash] opts the optional parameters
14455
14391
  # @return [UpdateWebTargetOutput]
@@ -0,0 +1,229 @@
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.1.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Akeyless
17
+ # AccountGeneralSettings describes general settings for an account
18
+ class AccountGeneralSettings
19
+ attr_accessor :data_protection_section
20
+
21
+ attr_accessor :password_policy
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'data_protection_section' => :'data_protection_section',
27
+ :'password_policy' => :'password_policy'
28
+ }
29
+ end
30
+
31
+ # Returns all the JSON keys this model knows about
32
+ def self.acceptable_attributes
33
+ attribute_map.values
34
+ end
35
+
36
+ # Attribute type mapping.
37
+ def self.openapi_types
38
+ {
39
+ :'data_protection_section' => :'DataProtectionSection',
40
+ :'password_policy' => :'PasswordPolicyInfo'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Akeyless::AccountGeneralSettings` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ attributes = attributes.each_with_object({}) { |(k, v), h|
59
+ if (!self.class.attribute_map.key?(k.to_sym))
60
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Akeyless::AccountGeneralSettings`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
+ end
62
+ h[k.to_sym] = v
63
+ }
64
+
65
+ if attributes.key?(:'data_protection_section')
66
+ self.data_protection_section = attributes[:'data_protection_section']
67
+ end
68
+
69
+ if attributes.key?(:'password_policy')
70
+ self.password_policy = attributes[:'password_policy']
71
+ end
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properties with the reasons
76
+ def list_invalid_properties
77
+ invalid_properties = Array.new
78
+ invalid_properties
79
+ end
80
+
81
+ # Check to see if the all the properties in the model are valid
82
+ # @return true if the model is valid
83
+ def valid?
84
+ true
85
+ end
86
+
87
+ # Checks equality by comparing each attribute.
88
+ # @param [Object] Object to be compared
89
+ def ==(o)
90
+ return true if self.equal?(o)
91
+ self.class == o.class &&
92
+ data_protection_section == o.data_protection_section &&
93
+ password_policy == o.password_policy
94
+ end
95
+
96
+ # @see the `==` method
97
+ # @param [Object] Object to be compared
98
+ def eql?(o)
99
+ self == o
100
+ end
101
+
102
+ # Calculates hash code according to all attributes.
103
+ # @return [Integer] Hash code
104
+ def hash
105
+ [data_protection_section, password_policy].hash
106
+ end
107
+
108
+ # Builds the object from hash
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ # @return [Object] Returns the model itself
111
+ def self.build_from_hash(attributes)
112
+ new.build_from_hash(attributes)
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def build_from_hash(attributes)
119
+ return nil unless attributes.is_a?(Hash)
120
+ attributes = attributes.transform_keys(&:to_sym)
121
+ self.class.openapi_types.each_pair do |key, type|
122
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
123
+ self.send("#{key}=", nil)
124
+ elsif type =~ /\AArray<(.*)>/i
125
+ # check to ensure the input is an array given that the attribute
126
+ # is documented as an array but the input is not
127
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
128
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
129
+ end
130
+ elsif !attributes[self.class.attribute_map[key]].nil?
131
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
132
+ end
133
+ end
134
+
135
+ self
136
+ end
137
+
138
+ # Deserializes the data based on type
139
+ # @param string type Data type
140
+ # @param string value Value to be deserialized
141
+ # @return [Object] Deserialized data
142
+ def _deserialize(type, value)
143
+ case type.to_sym
144
+ when :Time
145
+ Time.parse(value)
146
+ when :Date
147
+ Date.parse(value)
148
+ when :String
149
+ value.to_s
150
+ when :Integer
151
+ value.to_i
152
+ when :Float
153
+ value.to_f
154
+ when :Boolean
155
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
156
+ true
157
+ else
158
+ false
159
+ end
160
+ when :Object
161
+ # generic object (usually a Hash), return directly
162
+ value
163
+ when /\AArray<(?<inner_type>.+)>\z/
164
+ inner_type = Regexp.last_match[:inner_type]
165
+ value.map { |v| _deserialize(inner_type, v) }
166
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
167
+ k_type = Regexp.last_match[:k_type]
168
+ v_type = Regexp.last_match[:v_type]
169
+ {}.tap do |hash|
170
+ value.each do |k, v|
171
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
172
+ end
173
+ end
174
+ else # model
175
+ # models (e.g. Pet) or oneOf
176
+ klass = Akeyless.const_get(type)
177
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
178
+ end
179
+ end
180
+
181
+ # Returns the string representation of the object
182
+ # @return [String] String presentation of the object
183
+ def to_s
184
+ to_hash.to_s
185
+ end
186
+
187
+ # to_body is an alias to to_hash (backward compatibility)
188
+ # @return [Hash] Returns the object in the form of hash
189
+ def to_body
190
+ to_hash
191
+ end
192
+
193
+ # Returns the object in the form of hash
194
+ # @return [Hash] Returns the object in the form of hash
195
+ def to_hash
196
+ hash = {}
197
+ self.class.attribute_map.each_pair do |attr, param|
198
+ value = self.send(attr)
199
+ if value.nil?
200
+ is_nullable = self.class.openapi_nullable.include?(attr)
201
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
202
+ end
203
+
204
+ hash[param] = _to_hash(value)
205
+ end
206
+ hash
207
+ end
208
+
209
+ # Outputs non-array value in the form of hash
210
+ # For object, use to_hash. Otherwise, just return the value
211
+ # @param [Object] value Any valid value
212
+ # @return [Hash] Returns the value in the form of hash
213
+ def _to_hash(value)
214
+ if value.is_a?(Array)
215
+ value.compact.map { |v| _to_hash(v) }
216
+ elsif value.is_a?(Hash)
217
+ {}.tap do |hash|
218
+ value.each { |k, v| hash[k] = _to_hash(v) }
219
+ end
220
+ elsif value.respond_to? :to_hash
221
+ value.to_hash
222
+ else
223
+ value
224
+ end
225
+ end
226
+
227
+ end
228
+
229
+ end
@@ -27,7 +27,7 @@ module Akeyless
27
27
  # Comment about the target
28
28
  attr_accessor :comment
29
29
 
30
- # The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
30
+ # The name of a key used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
31
31
  attr_accessor :key
32
32
 
33
33
  # Target name
@@ -37,7 +37,7 @@ module Akeyless
37
37
  # if true: enforce role-association must include sub claims
38
38
  attr_accessor :force_sub_claims
39
39
 
40
- # If this flag is set to true, there is no need to manually provide a public key for the Kubernetes Auth Method, and instead, a key pair, will be generated as part of the command and the private part of the key will be returned (the private key is required for the K8S Auth Config in the Akeyless Gateway)
40
+ # Automatically generate key-pair for K8S configuration. If set to false, a public key needs to be provided
41
41
  attr_accessor :gen_key
42
42
 
43
43
  # A CIDR whitelist with the GW IPs that the access is restricted to
@@ -49,7 +49,7 @@ module Akeyless
49
49
  # Auth Method name
50
50
  attr_accessor :name
51
51
 
52
- # Base64-encoded public key text for K8S authentication method is required [RSA2048]
52
+ # Base64-encoded or PEM formatted public key data for K8S authentication method is required [RSA2048]
53
53
  attr_accessor :public_key
54
54
 
55
55
  # Authentication token (see `/auth` and `/configure`)
@@ -25,6 +25,9 @@ module Akeyless
25
25
  # if true: enforce role-association must include sub claims
26
26
  attr_accessor :force_sub_claims
27
27
 
28
+ # Automatically generate key-pair for LDAP configuration. If set to false, a public key needs to be provided
29
+ attr_accessor :gen_key
30
+
28
31
  # A CIDR whitelist with the GW IPs that the access is restricted to
29
32
  attr_accessor :gw_bound_ips
30
33
 
@@ -34,7 +37,7 @@ module Akeyless
34
37
  # Auth Method name
35
38
  attr_accessor :name
36
39
 
37
- # A public key generated for LDAP authentication method on Akeyless in base64 format [RSA2048]
40
+ # A public key generated for LDAP authentication method on Akeyless in base64 or PEM format [RSA2048]
38
41
  attr_accessor :public_key_data
39
42
 
40
43
  # Authentication token (see `/auth` and `/configure`)
@@ -52,6 +55,7 @@ module Akeyless
52
55
  :'access_expires' => :'access-expires',
53
56
  :'bound_ips' => :'bound-ips',
54
57
  :'force_sub_claims' => :'force-sub-claims',
58
+ :'gen_key' => :'gen-key',
55
59
  :'gw_bound_ips' => :'gw-bound-ips',
56
60
  :'jwt_ttl' => :'jwt-ttl',
57
61
  :'name' => :'name',
@@ -73,6 +77,7 @@ module Akeyless
73
77
  :'access_expires' => :'Integer',
74
78
  :'bound_ips' => :'Array<String>',
75
79
  :'force_sub_claims' => :'Boolean',
80
+ :'gen_key' => :'String',
76
81
  :'gw_bound_ips' => :'Array<String>',
77
82
  :'jwt_ttl' => :'Integer',
78
83
  :'name' => :'String',
@@ -120,6 +125,12 @@ module Akeyless
120
125
  self.force_sub_claims = attributes[:'force_sub_claims']
121
126
  end
122
127
 
128
+ if attributes.key?(:'gen_key')
129
+ self.gen_key = attributes[:'gen_key']
130
+ else
131
+ self.gen_key = 'true'
132
+ end
133
+
123
134
  if attributes.key?(:'gw_bound_ips')
124
135
  if (value = attributes[:'gw_bound_ips']).is_a?(Array)
125
136
  self.gw_bound_ips = value
@@ -177,6 +188,7 @@ module Akeyless
177
188
  access_expires == o.access_expires &&
178
189
  bound_ips == o.bound_ips &&
179
190
  force_sub_claims == o.force_sub_claims &&
191
+ gen_key == o.gen_key &&
180
192
  gw_bound_ips == o.gw_bound_ips &&
181
193
  jwt_ttl == o.jwt_ttl &&
182
194
  name == o.name &&
@@ -195,7 +207,7 @@ module Akeyless
195
207
  # Calculates hash code according to all attributes.
196
208
  # @return [Integer] Hash code
197
209
  def hash
198
- [access_expires, bound_ips, force_sub_claims, gw_bound_ips, jwt_ttl, name, public_key_data, token, uid_token, unique_identifier].hash
210
+ [access_expires, bound_ips, force_sub_claims, gen_key, gw_bound_ips, jwt_ttl, name, public_key_data, token, uid_token, unique_identifier].hash
199
211
  end
200
212
 
201
213
  # Builds the object from hash
@@ -17,10 +17,13 @@ module Akeyless
17
17
  class CreateAuthMethodLDAPOutput
18
18
  attr_accessor :access_id
19
19
 
20
+ attr_accessor :prv_key
21
+
20
22
  # Attribute mapping from ruby-style variable name to JSON key.
21
23
  def self.attribute_map
22
24
  {
23
- :'access_id' => :'access_id'
25
+ :'access_id' => :'access_id',
26
+ :'prv_key' => :'prv_key'
24
27
  }
25
28
  end
26
29
 
@@ -32,7 +35,8 @@ module Akeyless
32
35
  # Attribute type mapping.
33
36
  def self.openapi_types
34
37
  {
35
- :'access_id' => :'String'
38
+ :'access_id' => :'String',
39
+ :'prv_key' => :'String'
36
40
  }
37
41
  end
38
42
 
@@ -60,6 +64,10 @@ module Akeyless
60
64
  if attributes.key?(:'access_id')
61
65
  self.access_id = attributes[:'access_id']
62
66
  end
67
+
68
+ if attributes.key?(:'prv_key')
69
+ self.prv_key = attributes[:'prv_key']
70
+ end
63
71
  end
64
72
 
65
73
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -80,7 +88,8 @@ module Akeyless
80
88
  def ==(o)
81
89
  return true if self.equal?(o)
82
90
  self.class == o.class &&
83
- access_id == o.access_id
91
+ access_id == o.access_id &&
92
+ prv_key == o.prv_key
84
93
  end
85
94
 
86
95
  # @see the `==` method
@@ -92,7 +101,7 @@ module Akeyless
92
101
  # Calculates hash code according to all attributes.
93
102
  # @return [Integer] Hash code
94
103
  def hash
95
- [access_id].hash
104
+ [access_id, prv_key].hash
96
105
  end
97
106
 
98
107
  # Builds the object from hash