comet_backup_ruby_sdk 2.10.0 → 2.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/Gemfile.lock +1 -1
- data/comet_backup_ruby_sdk.gemspec +1 -1
- data/lib/comet/comet_server.rb +118 -1
- data/lib/comet/definitions.rb +18 -4
- data/lib/comet/models/admin_user_permissions.rb +8 -0
- data/lib/comet/models/branding_options.rb +1 -1
- data/lib/comet/models/branding_properties.rb +1 -1
- data/lib/comet/models/destination_config.rb +9 -0
- data/lib/comet/models/destination_location.rb +9 -0
- data/lib/comet/models/external_authentication_source.rb +10 -0
- data/lib/comet/models/external_authentication_source_display.rb +82 -0
- data/lib/comet/models/external_authentication_source_response.rb +99 -0
- data/lib/comet/models/oidc_claim.rb +84 -0
- data/lib/comet/models/oidc_config.rb +203 -0
- data/lib/comet/models/private_branding_properties.rb +1 -1
- data/lib/comet/models/remote_server_address.rb +10 -0
- data/lib/comet/models/remote_storage_option.rb +10 -0
- data/lib/comet/models/replica_server.rb +10 -0
- data/lib/comet/models/restore_job_advanced_options.rb +3 -0
- data/lib/comet/models/server_meta_branding_properties.rb +17 -0
- data/lib/comet/models/user_policy.rb +6 -0
- data/lib/comet/models/web_dav_destination_location.rb +113 -0
- data/lib/comet/models/windows_code_sign_properties.rb +1 -1
- data/lib/comet_backup_ruby_sdk.rb +5 -0
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e58708772fc811caf320d5e37daead88298a9ef573d721055a3970bcf31d3bc
|
4
|
+
data.tar.gz: 70167999c8a0622c11845204871ef6c36679f73b506dc1b260fd0006a71a07ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c13573fc5191bcba1631a35a0a6b55ab1d8543cbe14c3260eda4991c5432c23a3613d7af77ecee2fe6e789c91b08d949cd61fe924f7521b9ac9778d14b62a07
|
7
|
+
data.tar.gz: 2a59d690d766d51a456d6cbf833287483c58630967f120433d1990afa7eeafb331e027ea7f0ae8b1e3ccd5572e7c3af5b0dd8d5d52a76e2c097c9d9900ca1814
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 2023-08-09 v2.12.0
|
4
|
+
|
5
|
+
- Based on Comet 23.6.9
|
6
|
+
- Added WebDAV `DestinationLocation`
|
7
|
+
|
8
|
+
## 2023-08-02 v2.11.0
|
9
|
+
|
10
|
+
- Based on Comet 23.6.9
|
11
|
+
- Support new API endpoints for managing external admin authentication sources
|
12
|
+
- Support Object Lock policy option
|
13
|
+
- Update docstrings for various types and fields
|
14
|
+
|
3
15
|
## 2023-07-11 v2.10.0
|
4
16
|
|
5
17
|
- Based on Comet 23.6.5
|
data/Gemfile.lock
CHANGED
@@ -12,7 +12,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
12
12
|
|
13
13
|
Gem::Specification.new do |spec|
|
14
14
|
spec.name = 'comet_backup_ruby_sdk'
|
15
|
-
spec.version = '2.
|
15
|
+
spec.version = '2.12.0'
|
16
16
|
spec.authors = ['Comet Licensing Ltd.']
|
17
17
|
spec.email = ['hello@cometbackup.com']
|
18
18
|
|
data/lib/comet/comet_server.rb
CHANGED
@@ -136,6 +136,28 @@ module Comet
|
|
136
136
|
ret
|
137
137
|
end
|
138
138
|
|
139
|
+
# AdminAccountSessionUpgrade
|
140
|
+
#
|
141
|
+
# Upgrade a session key which is pending an MFA upgrade to a full session key.
|
142
|
+
#
|
143
|
+
# You must supply administrator authentication credentials to use this API.
|
144
|
+
#
|
145
|
+
# @param [String] session_key The session key to upgrade
|
146
|
+
# @return [Comet::CometAPIResponseMessage]
|
147
|
+
def admin_account_session_upgrade(session_key)
|
148
|
+
submit_params = {}
|
149
|
+
raise TypeError, "'session_key' expected String, got #{session_key.class}" unless session_key.is_a? String
|
150
|
+
|
151
|
+
submit_params['SessionKey'] = session_key
|
152
|
+
|
153
|
+
body = perform_request('api/v1/admin/account/session-upgrade', submit_params)
|
154
|
+
json_body = JSON.parse body
|
155
|
+
check_status json_body
|
156
|
+
ret = Comet::CometAPIResponseMessage.new
|
157
|
+
ret.from_hash(json_body)
|
158
|
+
ret
|
159
|
+
end
|
160
|
+
|
139
161
|
# AdminAccountSetProperties
|
140
162
|
#
|
141
163
|
# Update settings for your own admin account.
|
@@ -2188,6 +2210,102 @@ module Comet
|
|
2188
2210
|
ret
|
2189
2211
|
end
|
2190
2212
|
|
2213
|
+
# AdminExternalAuthSourcesDelete
|
2214
|
+
#
|
2215
|
+
# Delete an external admin authentication source.
|
2216
|
+
#
|
2217
|
+
# You must supply administrator authentication credentials to use this API.
|
2218
|
+
#
|
2219
|
+
# @param [String] source_id (No description available)
|
2220
|
+
# @return [Comet::CometAPIResponseMessage]
|
2221
|
+
def admin_external_auth_sources_delete(source_id)
|
2222
|
+
submit_params = {}
|
2223
|
+
raise TypeError, "'source_id' expected String, got #{source_id.class}" unless source_id.is_a? String
|
2224
|
+
|
2225
|
+
submit_params['SourceID'] = source_id
|
2226
|
+
|
2227
|
+
body = perform_request('api/v1/admin/external-auth-sources/delete', submit_params)
|
2228
|
+
json_body = JSON.parse body
|
2229
|
+
check_status json_body
|
2230
|
+
ret = Comet::CometAPIResponseMessage.new
|
2231
|
+
ret.from_hash(json_body)
|
2232
|
+
ret
|
2233
|
+
end
|
2234
|
+
|
2235
|
+
# AdminExternalAuthSourcesGet
|
2236
|
+
#
|
2237
|
+
# Get a map of all external admin authentication sources.
|
2238
|
+
#
|
2239
|
+
# You must supply administrator authentication credentials to use this API.
|
2240
|
+
#
|
2241
|
+
# @return [Hash{String => Comet::ExternalAuthenticationSource}]
|
2242
|
+
def admin_external_auth_sources_get
|
2243
|
+
body = perform_request('api/v1/admin/external-auth-sources/get')
|
2244
|
+
json_body = JSON.parse body
|
2245
|
+
check_status json_body
|
2246
|
+
ret = {}
|
2247
|
+
if json_body.nil?
|
2248
|
+
ret = {}
|
2249
|
+
else
|
2250
|
+
json_body.each do |k, v|
|
2251
|
+
ret[k] = Comet::ExternalAuthenticationSource.new
|
2252
|
+
ret[k].from_hash(v)
|
2253
|
+
end
|
2254
|
+
end
|
2255
|
+
ret
|
2256
|
+
end
|
2257
|
+
|
2258
|
+
# AdminExternalAuthSourcesNew
|
2259
|
+
#
|
2260
|
+
# Create an external admin authentication source.
|
2261
|
+
#
|
2262
|
+
# You must supply administrator authentication credentials to use this API.
|
2263
|
+
#
|
2264
|
+
# @param [Comet::ExternalAuthenticationSource] source (No description available)
|
2265
|
+
# @param [String] source_id (Optional) (No description available)
|
2266
|
+
# @return [Comet::ExternalAuthenticationSourceResponse]
|
2267
|
+
def admin_external_auth_sources_new(source, source_id = nil)
|
2268
|
+
submit_params = {}
|
2269
|
+
raise TypeError, "'source' expected Comet::ExternalAuthenticationSource, got #{source.class}" unless source.is_a? Comet::ExternalAuthenticationSource
|
2270
|
+
|
2271
|
+
submit_params['Source'] = source.to_json
|
2272
|
+
unless source_id.nil?
|
2273
|
+
raise TypeError, "'source_id' expected String, got #{source_id.class}" unless source_id.is_a? String
|
2274
|
+
|
2275
|
+
submit_params['SourceID'] = source_id
|
2276
|
+
end
|
2277
|
+
|
2278
|
+
body = perform_request('api/v1/admin/external-auth-sources/new', submit_params)
|
2279
|
+
json_body = JSON.parse body
|
2280
|
+
check_status json_body
|
2281
|
+
ret = Comet::ExternalAuthenticationSourceResponse.new
|
2282
|
+
ret.from_hash(json_body)
|
2283
|
+
ret
|
2284
|
+
end
|
2285
|
+
|
2286
|
+
# AdminExternalAuthSourcesSet
|
2287
|
+
#
|
2288
|
+
# Updates the current tenant's external admin authentication sources. This will set all.
|
2289
|
+
# sources for the tenant; none will be preserved.
|
2290
|
+
#
|
2291
|
+
# You must supply administrator authentication credentials to use this API.
|
2292
|
+
#
|
2293
|
+
# @param [Hash{String => Comet::ExternalAuthenticationSource}] sources (No description available)
|
2294
|
+
# @return [Comet::CometAPIResponseMessage]
|
2295
|
+
def admin_external_auth_sources_set(sources)
|
2296
|
+
submit_params = {}
|
2297
|
+
raise TypeError, "'sources' expected Hash, got #{sources.class}" unless sources.is_a? Hash
|
2298
|
+
|
2299
|
+
submit_params['Sources'] = sources.to_json
|
2300
|
+
|
2301
|
+
body = perform_request('api/v1/admin/external-auth-sources/set', submit_params)
|
2302
|
+
json_body = JSON.parse body
|
2303
|
+
check_status json_body
|
2304
|
+
ret = Comet::CometAPIResponseMessage.new
|
2305
|
+
ret.from_hash(json_body)
|
2306
|
+
ret
|
2307
|
+
end
|
2308
|
+
|
2191
2309
|
# AdminGetJobLog
|
2192
2310
|
#
|
2193
2311
|
# Get the report log entries for a single job, in plaintext format.
|
@@ -3982,7 +4100,6 @@ module Comet
|
|
3982
4100
|
#
|
3983
4101
|
# You must supply administrator authentication credentials to use this API.
|
3984
4102
|
# Access to this API may be prevented on a per-administrator basis.
|
3985
|
-
# This API requires the Storage Role to be enabled.
|
3986
4103
|
# This API is only available for top-level administrator accounts, not for Tenant administrator accounts.
|
3987
4104
|
#
|
3988
4105
|
# @param [Comet::DestinationLocation] extra_data The destination location settings
|
data/lib/comet/definitions.rb
CHANGED
@@ -7,13 +7,13 @@
|
|
7
7
|
|
8
8
|
module Comet
|
9
9
|
|
10
|
-
APPLICATION_VERSION = '23.6.
|
10
|
+
APPLICATION_VERSION = '23.6.9'
|
11
11
|
|
12
12
|
APPLICATION_VERSION_MAJOR = 23
|
13
13
|
|
14
14
|
APPLICATION_VERSION_MINOR = 6
|
15
15
|
|
16
|
-
APPLICATION_VERSION_REVISION =
|
16
|
+
APPLICATION_VERSION_REVISION = 9
|
17
17
|
|
18
18
|
# AutoRetentionLevel: The system will automatically choose how often to run an automatic Retention Pass after each backup job.
|
19
19
|
BACKUPJOBAUTORETENTION_AUTOMATIC = 0
|
@@ -115,6 +115,8 @@ module Comet
|
|
115
115
|
# Storj
|
116
116
|
DESTINATIONTYPE_STORJ = 1009
|
117
117
|
|
118
|
+
DESTINATIONTYPE_WEBDAV = 1010
|
119
|
+
|
118
120
|
# When defining a schedule via policy, use this option to dynamically select the Storage Vault that was created most recently.
|
119
121
|
DESTINATIONTYPE_LATEST = 1100
|
120
122
|
|
@@ -390,6 +392,15 @@ module Comet
|
|
390
392
|
# When resetting a password with the API, set the PasswordFormat to this value. The Comet Server will re-hash the credential automatically.
|
391
393
|
PASSWORD_FORMAT_PLAINTEXT = 0
|
392
394
|
|
395
|
+
# OidcProvider
|
396
|
+
PROVIDER_GENERIC = 'oidc'
|
397
|
+
|
398
|
+
# OidcProvider
|
399
|
+
PROVIDER_AZUREADV2 = 'azure-ad-v2'
|
400
|
+
|
401
|
+
# OidcProvider
|
402
|
+
PROVIDER_GOOGLE = 'google'
|
403
|
+
|
393
404
|
# PSAType
|
394
405
|
PSA_TYPE_GENERIC = 0
|
395
406
|
|
@@ -404,6 +415,9 @@ module Comet
|
|
404
415
|
# RemoteServerType
|
405
416
|
REMOTESERVER_LDAP = 'ldap'
|
406
417
|
|
418
|
+
# RemoteServerType
|
419
|
+
REMOTESERVER_OIDC = 'oidc'
|
420
|
+
|
407
421
|
# RemoteServerType
|
408
422
|
REMOTESERVER_B2 = 'b2'
|
409
423
|
|
@@ -974,8 +988,8 @@ module Comet
|
|
974
988
|
# WebAuthnDeviceType
|
975
989
|
WEBAUTHN_DEVICE_TYPE__TPM_LINUX = 6
|
976
990
|
|
977
|
-
# WindowsCodesignMethod: When upgrading from a version of Comet Server prior to
|
978
|
-
# @deprecated This const has been deprecated since Comet version
|
991
|
+
# WindowsCodesignMethod: When upgrading from a version of Comet Server prior to 23.3.0, this option will be automatically converted to a more specific type.
|
992
|
+
# @deprecated This const has been deprecated since Comet version 23.3.0
|
979
993
|
WINDOWSCODESIGN_METHOD_AUTO = 0
|
980
994
|
|
981
995
|
# WindowsCodesignMethod: Do not perform Authenticode codesigning
|
@@ -33,6 +33,9 @@ module Comet
|
|
33
33
|
# @type [Boolean] allow_edit_webhooks
|
34
34
|
attr_accessor :allow_edit_webhooks
|
35
35
|
|
36
|
+
# @type [Boolean] allow_edit_external_auth_sources
|
37
|
+
attr_accessor :allow_edit_external_auth_sources
|
38
|
+
|
36
39
|
# @type [Boolean] deny_constellation_role
|
37
40
|
attr_accessor :deny_constellation_role
|
38
41
|
|
@@ -103,6 +106,8 @@ module Comet
|
|
103
106
|
@allow_edit_remote_storage = v
|
104
107
|
when 'AllowEditWebhooks'
|
105
108
|
@allow_edit_webhooks = v
|
109
|
+
when 'AllowEditExternalAuthSources'
|
110
|
+
@allow_edit_external_auth_sources = v
|
106
111
|
when 'DenyConstellationRole'
|
107
112
|
@deny_constellation_role = v
|
108
113
|
when 'DenyViewServerHistory'
|
@@ -158,6 +163,9 @@ module Comet
|
|
158
163
|
unless @allow_edit_webhooks.nil?
|
159
164
|
ret['AllowEditWebhooks'] = @allow_edit_webhooks
|
160
165
|
end
|
166
|
+
unless @allow_edit_external_auth_sources.nil?
|
167
|
+
ret['AllowEditExternalAuthSources'] = @allow_edit_external_auth_sources
|
168
|
+
end
|
161
169
|
unless @deny_constellation_role.nil?
|
162
170
|
ret['DenyConstellationRole'] = @deny_constellation_role
|
163
171
|
end
|
@@ -107,8 +107,8 @@ module Comet
|
|
107
107
|
# @type [String] windows_code_sign_pkcs11module
|
108
108
|
attr_accessor :windows_code_sign_pkcs11module
|
109
109
|
|
110
|
+
# This field was deprecated between 23.3.0 and 23.6.x, but is now used again.
|
110
111
|
# @type [String] windows_code_sign_pkcs11certfile
|
111
|
-
# @deprecated This member has been deprecated since Comet version 22.12.7
|
112
112
|
attr_accessor :windows_code_sign_pkcs11certfile
|
113
113
|
|
114
114
|
# @type [String] windows_code_sign_pkcs11key_id
|
@@ -84,8 +84,8 @@ module Comet
|
|
84
84
|
# @type [String] windows_code_sign_pkcs11module
|
85
85
|
attr_accessor :windows_code_sign_pkcs11module
|
86
86
|
|
87
|
+
# This field was deprecated between 23.3.0 and 23.6.x, but is now used again.
|
87
88
|
# @type [String] windows_code_sign_pkcs11certfile
|
88
|
-
# @deprecated This member has been deprecated since Comet version 22.12.7
|
89
89
|
attr_accessor :windows_code_sign_pkcs11certfile
|
90
90
|
|
91
91
|
# @type [String] windows_code_sign_pkcs11key_id
|
@@ -183,6 +183,10 @@ module Comet
|
|
183
183
|
# @type [Comet::B2DestinationLocation] b2
|
184
184
|
attr_accessor :b2
|
185
185
|
|
186
|
+
# This field is available in Comet 23.6.9 and later.
|
187
|
+
# @type [Comet::WebDavDestinationLocation] web_dav
|
188
|
+
attr_accessor :web_dav
|
189
|
+
|
186
190
|
# @type [Comet::StorjDestinationLocation] storj
|
187
191
|
attr_accessor :storj
|
188
192
|
|
@@ -286,6 +290,7 @@ module Comet
|
|
286
290
|
@localcopy_win_smbpassword_format = 0
|
287
291
|
@swift = Comet::SwiftDestinationLocation.new
|
288
292
|
@b2 = Comet::B2DestinationLocation.new
|
293
|
+
@web_dav = Comet::WebDavDestinationLocation.new
|
289
294
|
@storj = Comet::StorjDestinationLocation.new
|
290
295
|
@span_targets = []
|
291
296
|
@encryption_key_encryption_method = 0
|
@@ -509,6 +514,9 @@ module Comet
|
|
509
514
|
when 'B2'
|
510
515
|
@b2 = Comet::B2DestinationLocation.new
|
511
516
|
@b2.from_hash(v)
|
517
|
+
when 'WebDav'
|
518
|
+
@web_dav = Comet::WebDavDestinationLocation.new
|
519
|
+
@web_dav.from_hash(v)
|
512
520
|
when 'Storj'
|
513
521
|
@storj = Comet::StorjDestinationLocation.new
|
514
522
|
@storj.from_hash(v)
|
@@ -607,6 +615,7 @@ module Comet
|
|
607
615
|
ret['LocalcopyWinSMBPasswordFormat'] = @localcopy_win_smbpassword_format
|
608
616
|
ret['Swift'] = @swift
|
609
617
|
ret['B2'] = @b2
|
618
|
+
ret['WebDav'] = @web_dav
|
610
619
|
ret['Storj'] = @storj
|
611
620
|
ret['SpanTargets'] = @span_targets
|
612
621
|
ret['SpanUseStaticSlots'] = @span_use_static_slots
|
@@ -163,6 +163,10 @@ module Comet
|
|
163
163
|
# @type [Comet::B2DestinationLocation] b2
|
164
164
|
attr_accessor :b2
|
165
165
|
|
166
|
+
# This field is available in Comet 23.6.9 and later.
|
167
|
+
# @type [Comet::WebDavDestinationLocation] web_dav
|
168
|
+
attr_accessor :web_dav
|
169
|
+
|
166
170
|
# @type [Comet::StorjDestinationLocation] storj
|
167
171
|
attr_accessor :storj
|
168
172
|
|
@@ -227,6 +231,7 @@ module Comet
|
|
227
231
|
@localcopy_win_smbpassword_format = 0
|
228
232
|
@swift = Comet::SwiftDestinationLocation.new
|
229
233
|
@b2 = Comet::B2DestinationLocation.new
|
234
|
+
@web_dav = Comet::WebDavDestinationLocation.new
|
230
235
|
@storj = Comet::StorjDestinationLocation.new
|
231
236
|
@span_targets = []
|
232
237
|
@unknown_json_fields = {}
|
@@ -399,6 +404,9 @@ module Comet
|
|
399
404
|
when 'B2'
|
400
405
|
@b2 = Comet::B2DestinationLocation.new
|
401
406
|
@b2.from_hash(v)
|
407
|
+
when 'WebDav'
|
408
|
+
@web_dav = Comet::WebDavDestinationLocation.new
|
409
|
+
@web_dav.from_hash(v)
|
402
410
|
when 'Storj'
|
403
411
|
@storj = Comet::StorjDestinationLocation.new
|
404
412
|
@storj.from_hash(v)
|
@@ -465,6 +473,7 @@ module Comet
|
|
465
473
|
ret['LocalcopyWinSMBPasswordFormat'] = @localcopy_win_smbpassword_format
|
466
474
|
ret['Swift'] = @swift
|
467
475
|
ret['B2'] = @b2
|
476
|
+
ret['WebDav'] = @web_dav
|
468
477
|
ret['Storj'] = @storj
|
469
478
|
ret['SpanTargets'] = @span_targets
|
470
479
|
ret['SpanUseStaticSlots'] = @span_use_static_slots
|
@@ -30,6 +30,9 @@ module Comet
|
|
30
30
|
# @type [Comet::ExternalLDAPAuthenticationSourceSettings] ldap
|
31
31
|
attr_accessor :ldap
|
32
32
|
|
33
|
+
# @type [Comet::OidcConfig] oidc
|
34
|
+
attr_accessor :oidc
|
35
|
+
|
33
36
|
# @type [Comet::B2VirtualStorageRoleSettings] b2
|
34
37
|
attr_accessor :b2
|
35
38
|
|
@@ -66,6 +69,7 @@ module Comet
|
|
66
69
|
@username = ''
|
67
70
|
@password = ''
|
68
71
|
@ldap = Comet::ExternalLDAPAuthenticationSourceSettings.new
|
72
|
+
@oidc = Comet::OidcConfig.new
|
69
73
|
@b2 = Comet::B2VirtualStorageRoleSettings.new
|
70
74
|
@wasabi = Comet::WasabiVirtualStorageRoleSettings.new
|
71
75
|
@custom = Comet::CustomRemoteBucketSettings.new
|
@@ -112,6 +116,9 @@ module Comet
|
|
112
116
|
when 'LDAP'
|
113
117
|
@ldap = Comet::ExternalLDAPAuthenticationSourceSettings.new
|
114
118
|
@ldap.from_hash(v)
|
119
|
+
when 'OIDC'
|
120
|
+
@oidc = Comet::OidcConfig.new
|
121
|
+
@oidc.from_hash(v)
|
115
122
|
when 'B2'
|
116
123
|
@b2 = Comet::B2VirtualStorageRoleSettings.new
|
117
124
|
@b2.from_hash(v)
|
@@ -156,6 +163,9 @@ module Comet
|
|
156
163
|
unless @ldap.nil?
|
157
164
|
ret['LDAP'] = @ldap
|
158
165
|
end
|
166
|
+
unless @oidc.nil?
|
167
|
+
ret['OIDC'] = @oidc
|
168
|
+
end
|
159
169
|
unless @b2.nil?
|
160
170
|
ret['B2'] = @b2
|
161
171
|
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright (c) 2020-2023 Comet Licensing Ltd.
|
4
|
+
# Please see the LICENSE file for usage information.
|
5
|
+
#
|
6
|
+
# SPDX-License-Identifier: MIT
|
7
|
+
|
8
|
+
require 'json'
|
9
|
+
|
10
|
+
module Comet
|
11
|
+
|
12
|
+
# ExternalAuthenticationSourceDisplay is a typed class wrapper around the underlying Comet Server API data structure.
|
13
|
+
class ExternalAuthenticationSourceDisplay
|
14
|
+
|
15
|
+
# @type [String] display_name
|
16
|
+
attr_accessor :display_name
|
17
|
+
|
18
|
+
# @type [String] login_start_url
|
19
|
+
attr_accessor :login_start_url
|
20
|
+
|
21
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
22
|
+
attr_accessor :unknown_json_fields
|
23
|
+
|
24
|
+
def initialize
|
25
|
+
clear
|
26
|
+
end
|
27
|
+
|
28
|
+
def clear
|
29
|
+
@display_name = ''
|
30
|
+
@login_start_url = ''
|
31
|
+
@unknown_json_fields = {}
|
32
|
+
end
|
33
|
+
|
34
|
+
# @param [String] json_string The complete object in JSON format
|
35
|
+
def from_json(json_string)
|
36
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
37
|
+
|
38
|
+
from_hash(JSON.parse(json_string))
|
39
|
+
end
|
40
|
+
|
41
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
42
|
+
def from_hash(obj)
|
43
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
44
|
+
|
45
|
+
obj.each do |k, v|
|
46
|
+
case k
|
47
|
+
when 'DisplayName'
|
48
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
49
|
+
|
50
|
+
@display_name = v
|
51
|
+
when 'LoginStartURL'
|
52
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
53
|
+
|
54
|
+
@login_start_url = v
|
55
|
+
else
|
56
|
+
@unknown_json_fields[k] = v
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# @return [Hash] The complete object as a Ruby hash
|
62
|
+
def to_hash
|
63
|
+
ret = {}
|
64
|
+
ret['DisplayName'] = @display_name
|
65
|
+
ret['LoginStartURL'] = @login_start_url
|
66
|
+
@unknown_json_fields.each do |k, v|
|
67
|
+
ret[k] = v
|
68
|
+
end
|
69
|
+
ret
|
70
|
+
end
|
71
|
+
|
72
|
+
# @return [Hash] The complete object as a Ruby hash
|
73
|
+
def to_h
|
74
|
+
to_hash
|
75
|
+
end
|
76
|
+
|
77
|
+
# @return [String] The complete object as a JSON string
|
78
|
+
def to_json(options = {})
|
79
|
+
to_hash.to_json(options)
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
@@ -0,0 +1,99 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright (c) 2020-2023 Comet Licensing Ltd.
|
4
|
+
# Please see the LICENSE file for usage information.
|
5
|
+
#
|
6
|
+
# SPDX-License-Identifier: MIT
|
7
|
+
|
8
|
+
require 'json'
|
9
|
+
|
10
|
+
module Comet
|
11
|
+
|
12
|
+
# ExternalAuthenticationSourceResponse is a typed class wrapper around the underlying Comet Server API data structure.
|
13
|
+
class ExternalAuthenticationSourceResponse
|
14
|
+
|
15
|
+
# @type [Number] status
|
16
|
+
attr_accessor :status
|
17
|
+
|
18
|
+
# @type [String] message
|
19
|
+
attr_accessor :message
|
20
|
+
|
21
|
+
# @type [String] id
|
22
|
+
attr_accessor :id
|
23
|
+
|
24
|
+
# @type [Comet::ExternalAuthenticationSource] source
|
25
|
+
attr_accessor :source
|
26
|
+
|
27
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
28
|
+
attr_accessor :unknown_json_fields
|
29
|
+
|
30
|
+
def initialize
|
31
|
+
clear
|
32
|
+
end
|
33
|
+
|
34
|
+
def clear
|
35
|
+
@status = 0
|
36
|
+
@message = ''
|
37
|
+
@id = ''
|
38
|
+
@source = Comet::ExternalAuthenticationSource.new
|
39
|
+
@unknown_json_fields = {}
|
40
|
+
end
|
41
|
+
|
42
|
+
# @param [String] json_string The complete object in JSON format
|
43
|
+
def from_json(json_string)
|
44
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
45
|
+
|
46
|
+
from_hash(JSON.parse(json_string))
|
47
|
+
end
|
48
|
+
|
49
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
50
|
+
def from_hash(obj)
|
51
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
52
|
+
|
53
|
+
obj.each do |k, v|
|
54
|
+
case k
|
55
|
+
when 'Status'
|
56
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
57
|
+
|
58
|
+
@status = v
|
59
|
+
when 'Message'
|
60
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
61
|
+
|
62
|
+
@message = v
|
63
|
+
when 'ID'
|
64
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
65
|
+
|
66
|
+
@id = v
|
67
|
+
when 'Source'
|
68
|
+
@source = Comet::ExternalAuthenticationSource.new
|
69
|
+
@source.from_hash(v)
|
70
|
+
else
|
71
|
+
@unknown_json_fields[k] = v
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
# @return [Hash] The complete object as a Ruby hash
|
77
|
+
def to_hash
|
78
|
+
ret = {}
|
79
|
+
ret['Status'] = @status
|
80
|
+
ret['Message'] = @message
|
81
|
+
ret['ID'] = @id
|
82
|
+
ret['Source'] = @source
|
83
|
+
@unknown_json_fields.each do |k, v|
|
84
|
+
ret[k] = v
|
85
|
+
end
|
86
|
+
ret
|
87
|
+
end
|
88
|
+
|
89
|
+
# @return [Hash] The complete object as a Ruby hash
|
90
|
+
def to_h
|
91
|
+
to_hash
|
92
|
+
end
|
93
|
+
|
94
|
+
# @return [String] The complete object as a JSON string
|
95
|
+
def to_json(options = {})
|
96
|
+
to_hash.to_json(options)
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright (c) 2020-2023 Comet Licensing Ltd.
|
4
|
+
# Please see the LICENSE file for usage information.
|
5
|
+
#
|
6
|
+
# SPDX-License-Identifier: MIT
|
7
|
+
|
8
|
+
require 'json'
|
9
|
+
|
10
|
+
module Comet
|
11
|
+
|
12
|
+
# OidcClaim is a typed class wrapper around the underlying Comet Server API data structure.
|
13
|
+
class OidcClaim
|
14
|
+
|
15
|
+
# @type [String] name
|
16
|
+
attr_accessor :name
|
17
|
+
|
18
|
+
# @type [String] value
|
19
|
+
attr_accessor :value
|
20
|
+
|
21
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
22
|
+
attr_accessor :unknown_json_fields
|
23
|
+
|
24
|
+
def initialize
|
25
|
+
clear
|
26
|
+
end
|
27
|
+
|
28
|
+
def clear
|
29
|
+
@name = ''
|
30
|
+
@value = ''
|
31
|
+
@unknown_json_fields = {}
|
32
|
+
end
|
33
|
+
|
34
|
+
# @param [String] json_string The complete object in JSON format
|
35
|
+
def from_json(json_string)
|
36
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
37
|
+
|
38
|
+
from_hash(JSON.parse(json_string))
|
39
|
+
end
|
40
|
+
|
41
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
42
|
+
def from_hash(obj)
|
43
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
44
|
+
|
45
|
+
obj.each do |k, v|
|
46
|
+
case k
|
47
|
+
when 'Name'
|
48
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
49
|
+
|
50
|
+
@name = v
|
51
|
+
when 'Value'
|
52
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
53
|
+
|
54
|
+
@value = v
|
55
|
+
else
|
56
|
+
@unknown_json_fields[k] = v
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# @return [Hash] The complete object as a Ruby hash
|
62
|
+
def to_hash
|
63
|
+
ret = {}
|
64
|
+
ret['Name'] = @name
|
65
|
+
unless @value.nil?
|
66
|
+
ret['Value'] = @value
|
67
|
+
end
|
68
|
+
@unknown_json_fields.each do |k, v|
|
69
|
+
ret[k] = v
|
70
|
+
end
|
71
|
+
ret
|
72
|
+
end
|
73
|
+
|
74
|
+
# @return [Hash] The complete object as a Ruby hash
|
75
|
+
def to_h
|
76
|
+
to_hash
|
77
|
+
end
|
78
|
+
|
79
|
+
# @return [String] The complete object as a JSON string
|
80
|
+
def to_json(options = {})
|
81
|
+
to_hash.to_json(options)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -0,0 +1,203 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright (c) 2020-2023 Comet Licensing Ltd.
|
4
|
+
# Please see the LICENSE file for usage information.
|
5
|
+
#
|
6
|
+
# SPDX-License-Identifier: MIT
|
7
|
+
|
8
|
+
require 'json'
|
9
|
+
|
10
|
+
module Comet
|
11
|
+
|
12
|
+
# OidcConfig is a typed class wrapper around the underlying Comet Server API data structure.
|
13
|
+
class OidcConfig
|
14
|
+
|
15
|
+
# @type [String] display_name
|
16
|
+
attr_accessor :display_name
|
17
|
+
|
18
|
+
# @type [Array<String>] hosts
|
19
|
+
attr_accessor :hosts
|
20
|
+
|
21
|
+
# @type [String] organization_id
|
22
|
+
attr_accessor :organization_id
|
23
|
+
|
24
|
+
# @type [String] provider
|
25
|
+
attr_accessor :provider
|
26
|
+
|
27
|
+
# @type [String] client_id
|
28
|
+
attr_accessor :client_id
|
29
|
+
|
30
|
+
# @type [String] client_secret
|
31
|
+
attr_accessor :client_secret
|
32
|
+
|
33
|
+
# @type [Boolean] skip_mfa
|
34
|
+
attr_accessor :skip_mfa
|
35
|
+
|
36
|
+
# @type [Array<String>] scopes
|
37
|
+
attr_accessor :scopes
|
38
|
+
|
39
|
+
# @type [Array<Comet::OidcClaim>] required_claims
|
40
|
+
attr_accessor :required_claims
|
41
|
+
|
42
|
+
# @type [String] generic_op_discovery_document_url
|
43
|
+
attr_accessor :generic_op_discovery_document_url
|
44
|
+
|
45
|
+
# @type [String] azure_adv2op_tenant_id
|
46
|
+
attr_accessor :azure_adv2op_tenant_id
|
47
|
+
|
48
|
+
# @type [String] google_op_hosted_domain
|
49
|
+
attr_accessor :google_op_hosted_domain
|
50
|
+
|
51
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
52
|
+
attr_accessor :unknown_json_fields
|
53
|
+
|
54
|
+
def initialize
|
55
|
+
clear
|
56
|
+
end
|
57
|
+
|
58
|
+
def clear
|
59
|
+
@display_name = ''
|
60
|
+
@hosts = []
|
61
|
+
@organization_id = ''
|
62
|
+
@provider = ''
|
63
|
+
@client_id = ''
|
64
|
+
@client_secret = ''
|
65
|
+
@scopes = []
|
66
|
+
@required_claims = []
|
67
|
+
@generic_op_discovery_document_url = ''
|
68
|
+
@azure_adv2op_tenant_id = ''
|
69
|
+
@google_op_hosted_domain = ''
|
70
|
+
@unknown_json_fields = {}
|
71
|
+
end
|
72
|
+
|
73
|
+
# @param [String] json_string The complete object in JSON format
|
74
|
+
def from_json(json_string)
|
75
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
76
|
+
|
77
|
+
from_hash(JSON.parse(json_string))
|
78
|
+
end
|
79
|
+
|
80
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
81
|
+
def from_hash(obj)
|
82
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
83
|
+
|
84
|
+
obj.each do |k, v|
|
85
|
+
case k
|
86
|
+
when 'DisplayName'
|
87
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
88
|
+
|
89
|
+
@display_name = v
|
90
|
+
when 'Hosts'
|
91
|
+
if v.nil?
|
92
|
+
@hosts = []
|
93
|
+
else
|
94
|
+
@hosts = Array.new(v.length)
|
95
|
+
v.each_with_index do |v1, i1|
|
96
|
+
raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String
|
97
|
+
|
98
|
+
@hosts[i1] = v1
|
99
|
+
end
|
100
|
+
end
|
101
|
+
when 'OrganizationID'
|
102
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
103
|
+
|
104
|
+
@organization_id = v
|
105
|
+
when 'Provider'
|
106
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
107
|
+
|
108
|
+
@provider = v
|
109
|
+
when 'ClientID'
|
110
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
111
|
+
|
112
|
+
@client_id = v
|
113
|
+
when 'ClientSecret'
|
114
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
115
|
+
|
116
|
+
@client_secret = v
|
117
|
+
when 'SkipMFA'
|
118
|
+
@skip_mfa = v
|
119
|
+
when 'Scopes'
|
120
|
+
if v.nil?
|
121
|
+
@scopes = []
|
122
|
+
else
|
123
|
+
@scopes = Array.new(v.length)
|
124
|
+
v.each_with_index do |v1, i1|
|
125
|
+
raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String
|
126
|
+
|
127
|
+
@scopes[i1] = v1
|
128
|
+
end
|
129
|
+
end
|
130
|
+
when 'RequiredClaims'
|
131
|
+
if v.nil?
|
132
|
+
@required_claims = []
|
133
|
+
else
|
134
|
+
@required_claims = Array.new(v.length)
|
135
|
+
v.each_with_index do |v1, i1|
|
136
|
+
@required_claims[i1] = Comet::OidcClaim.new
|
137
|
+
@required_claims[i1].from_hash(v1)
|
138
|
+
end
|
139
|
+
end
|
140
|
+
when 'DiscoveryDocumentURL'
|
141
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
142
|
+
|
143
|
+
@generic_op_discovery_document_url = v
|
144
|
+
when 'AzureTenantID'
|
145
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
146
|
+
|
147
|
+
@azure_adv2op_tenant_id = v
|
148
|
+
when 'GoogleHostedDomain'
|
149
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
150
|
+
|
151
|
+
@google_op_hosted_domain = v
|
152
|
+
else
|
153
|
+
@unknown_json_fields[k] = v
|
154
|
+
end
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
# @return [Hash] The complete object as a Ruby hash
|
159
|
+
def to_hash
|
160
|
+
ret = {}
|
161
|
+
ret['DisplayName'] = @display_name
|
162
|
+
unless @hosts.nil?
|
163
|
+
ret['Hosts'] = @hosts
|
164
|
+
end
|
165
|
+
unless @organization_id.nil?
|
166
|
+
ret['OrganizationID'] = @organization_id
|
167
|
+
end
|
168
|
+
ret['Provider'] = @provider
|
169
|
+
ret['ClientID'] = @client_id
|
170
|
+
ret['ClientSecret'] = @client_secret
|
171
|
+
ret['SkipMFA'] = @skip_mfa
|
172
|
+
unless @scopes.nil?
|
173
|
+
ret['Scopes'] = @scopes
|
174
|
+
end
|
175
|
+
unless @required_claims.nil?
|
176
|
+
ret['RequiredClaims'] = @required_claims
|
177
|
+
end
|
178
|
+
unless @generic_op_discovery_document_url.nil?
|
179
|
+
ret['DiscoveryDocumentURL'] = @generic_op_discovery_document_url
|
180
|
+
end
|
181
|
+
unless @azure_adv2op_tenant_id.nil?
|
182
|
+
ret['AzureTenantID'] = @azure_adv2op_tenant_id
|
183
|
+
end
|
184
|
+
unless @google_op_hosted_domain.nil?
|
185
|
+
ret['GoogleHostedDomain'] = @google_op_hosted_domain
|
186
|
+
end
|
187
|
+
@unknown_json_fields.each do |k, v|
|
188
|
+
ret[k] = v
|
189
|
+
end
|
190
|
+
ret
|
191
|
+
end
|
192
|
+
|
193
|
+
# @return [Hash] The complete object as a Ruby hash
|
194
|
+
def to_h
|
195
|
+
to_hash
|
196
|
+
end
|
197
|
+
|
198
|
+
# @return [String] The complete object as a JSON string
|
199
|
+
def to_json(options = {})
|
200
|
+
to_hash.to_json(options)
|
201
|
+
end
|
202
|
+
end
|
203
|
+
end
|
@@ -60,8 +60,8 @@ module Comet
|
|
60
60
|
# @type [String] windows_code_sign_pkcs11module
|
61
61
|
attr_accessor :windows_code_sign_pkcs11module
|
62
62
|
|
63
|
+
# This field was deprecated between 23.3.0 and 23.6.x, but is now used again.
|
63
64
|
# @type [String] windows_code_sign_pkcs11certfile
|
64
|
-
# @deprecated This member has been deprecated since Comet version 22.12.7
|
65
65
|
attr_accessor :windows_code_sign_pkcs11certfile
|
66
66
|
|
67
67
|
# @type [String] windows_code_sign_pkcs11key_id
|
@@ -30,6 +30,9 @@ module Comet
|
|
30
30
|
# @type [Comet::ExternalLDAPAuthenticationSourceSettings] ldap
|
31
31
|
attr_accessor :ldap
|
32
32
|
|
33
|
+
# @type [Comet::OidcConfig] oidc
|
34
|
+
attr_accessor :oidc
|
35
|
+
|
33
36
|
# @type [Comet::B2VirtualStorageRoleSettings] b2
|
34
37
|
attr_accessor :b2
|
35
38
|
|
@@ -63,6 +66,7 @@ module Comet
|
|
63
66
|
@username = ''
|
64
67
|
@password = ''
|
65
68
|
@ldap = Comet::ExternalLDAPAuthenticationSourceSettings.new
|
69
|
+
@oidc = Comet::OidcConfig.new
|
66
70
|
@b2 = Comet::B2VirtualStorageRoleSettings.new
|
67
71
|
@wasabi = Comet::WasabiVirtualStorageRoleSettings.new
|
68
72
|
@custom = Comet::CustomRemoteBucketSettings.new
|
@@ -108,6 +112,9 @@ module Comet
|
|
108
112
|
when 'LDAP'
|
109
113
|
@ldap = Comet::ExternalLDAPAuthenticationSourceSettings.new
|
110
114
|
@ldap.from_hash(v)
|
115
|
+
when 'OIDC'
|
116
|
+
@oidc = Comet::OidcConfig.new
|
117
|
+
@oidc.from_hash(v)
|
111
118
|
when 'B2'
|
112
119
|
@b2 = Comet::B2VirtualStorageRoleSettings.new
|
113
120
|
@b2.from_hash(v)
|
@@ -149,6 +156,9 @@ module Comet
|
|
149
156
|
unless @ldap.nil?
|
150
157
|
ret['LDAP'] = @ldap
|
151
158
|
end
|
159
|
+
unless @oidc.nil?
|
160
|
+
ret['OIDC'] = @oidc
|
161
|
+
end
|
152
162
|
unless @b2.nil?
|
153
163
|
ret['B2'] = @b2
|
154
164
|
end
|
@@ -30,6 +30,9 @@ module Comet
|
|
30
30
|
# @type [Comet::ExternalLDAPAuthenticationSourceSettings] ldap
|
31
31
|
attr_accessor :ldap
|
32
32
|
|
33
|
+
# @type [Comet::OidcConfig] oidc
|
34
|
+
attr_accessor :oidc
|
35
|
+
|
33
36
|
# @type [Comet::B2VirtualStorageRoleSettings] b2
|
34
37
|
attr_accessor :b2
|
35
38
|
|
@@ -72,6 +75,7 @@ module Comet
|
|
72
75
|
@username = ''
|
73
76
|
@password = ''
|
74
77
|
@ldap = Comet::ExternalLDAPAuthenticationSourceSettings.new
|
78
|
+
@oidc = Comet::OidcConfig.new
|
75
79
|
@b2 = Comet::B2VirtualStorageRoleSettings.new
|
76
80
|
@wasabi = Comet::WasabiVirtualStorageRoleSettings.new
|
77
81
|
@custom = Comet::CustomRemoteBucketSettings.new
|
@@ -118,6 +122,9 @@ module Comet
|
|
118
122
|
when 'LDAP'
|
119
123
|
@ldap = Comet::ExternalLDAPAuthenticationSourceSettings.new
|
120
124
|
@ldap.from_hash(v)
|
125
|
+
when 'OIDC'
|
126
|
+
@oidc = Comet::OidcConfig.new
|
127
|
+
@oidc.from_hash(v)
|
121
128
|
when 'B2'
|
122
129
|
@b2 = Comet::B2VirtualStorageRoleSettings.new
|
123
130
|
@b2.from_hash(v)
|
@@ -167,6 +174,9 @@ module Comet
|
|
167
174
|
unless @ldap.nil?
|
168
175
|
ret['LDAP'] = @ldap
|
169
176
|
end
|
177
|
+
unless @oidc.nil?
|
178
|
+
ret['OIDC'] = @oidc
|
179
|
+
end
|
170
180
|
unless @b2.nil?
|
171
181
|
ret['B2'] = @b2
|
172
182
|
end
|
@@ -30,6 +30,9 @@ module Comet
|
|
30
30
|
# @type [Comet::ExternalLDAPAuthenticationSourceSettings] ldap
|
31
31
|
attr_accessor :ldap
|
32
32
|
|
33
|
+
# @type [Comet::OidcConfig] oidc
|
34
|
+
attr_accessor :oidc
|
35
|
+
|
33
36
|
# @type [Comet::B2VirtualStorageRoleSettings] b2
|
34
37
|
attr_accessor :b2
|
35
38
|
|
@@ -66,6 +69,7 @@ module Comet
|
|
66
69
|
@username = ''
|
67
70
|
@password = ''
|
68
71
|
@ldap = Comet::ExternalLDAPAuthenticationSourceSettings.new
|
72
|
+
@oidc = Comet::OidcConfig.new
|
69
73
|
@b2 = Comet::B2VirtualStorageRoleSettings.new
|
70
74
|
@wasabi = Comet::WasabiVirtualStorageRoleSettings.new
|
71
75
|
@custom = Comet::CustomRemoteBucketSettings.new
|
@@ -112,6 +116,9 @@ module Comet
|
|
112
116
|
when 'LDAP'
|
113
117
|
@ldap = Comet::ExternalLDAPAuthenticationSourceSettings.new
|
114
118
|
@ldap.from_hash(v)
|
119
|
+
when 'OIDC'
|
120
|
+
@oidc = Comet::OidcConfig.new
|
121
|
+
@oidc.from_hash(v)
|
115
122
|
when 'B2'
|
116
123
|
@b2 = Comet::B2VirtualStorageRoleSettings.new
|
117
124
|
@b2.from_hash(v)
|
@@ -157,6 +164,9 @@ module Comet
|
|
157
164
|
unless @ldap.nil?
|
158
165
|
ret['LDAP'] = @ldap
|
159
166
|
end
|
167
|
+
unless @oidc.nil?
|
168
|
+
ret['OIDC'] = @oidc
|
169
|
+
end
|
160
170
|
unless @b2.nil?
|
161
171
|
ret['B2'] = @b2
|
162
172
|
end
|
@@ -41,11 +41,14 @@ module Comet
|
|
41
41
|
# @type [Number] archive_format
|
42
42
|
attr_accessor :archive_format
|
43
43
|
|
44
|
+
# Default disabled. For RESTORETYPE_FILE and RESTORETYPE_WINDISK. Used to continue the restore job
|
45
|
+
# when unreadable data chunks are found.
|
44
46
|
# Corresponds to the "Allow partial file restores (zero-out unrecoverable data)" option
|
45
47
|
# This field is available in Comet 23.6.4 and later.
|
46
48
|
# @type [Boolean] skip_unreadable_chunks
|
47
49
|
attr_accessor :skip_unreadable_chunks
|
48
50
|
|
51
|
+
# Default disabled. Used to store the index files on disk instead of in memory.
|
49
52
|
# Corresponds to the "Prefer temporary files instead of RAM (slower)" option
|
50
53
|
# This field is available in Comet 23.6.4 and later.
|
51
54
|
# @type [Boolean] on_disk_indexes_key
|
@@ -51,6 +51,9 @@ module Comet
|
|
51
51
|
# @type [Number] expired_in_seconds
|
52
52
|
attr_accessor :expired_in_seconds
|
53
53
|
|
54
|
+
# @type [Array<Comet::ExternalAuthenticationSourceDisplay>] external_authentication_sources
|
55
|
+
attr_accessor :external_authentication_sources
|
56
|
+
|
54
57
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
55
58
|
attr_accessor :unknown_json_fields
|
56
59
|
|
@@ -66,6 +69,7 @@ module Comet
|
|
66
69
|
@accent_color = ''
|
67
70
|
@prune_logs_after_days = 0
|
68
71
|
@expired_in_seconds = 0
|
72
|
+
@external_authentication_sources = []
|
69
73
|
@unknown_json_fields = {}
|
70
74
|
end
|
71
75
|
|
@@ -118,6 +122,16 @@ module Comet
|
|
118
122
|
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
119
123
|
|
120
124
|
@expired_in_seconds = v
|
125
|
+
when 'ExternalAuthenticationSources'
|
126
|
+
if v.nil?
|
127
|
+
@external_authentication_sources = []
|
128
|
+
else
|
129
|
+
@external_authentication_sources = Array.new(v.length)
|
130
|
+
v.each_with_index do |v1, i1|
|
131
|
+
@external_authentication_sources[i1] = Comet::ExternalAuthenticationSourceDisplay.new
|
132
|
+
@external_authentication_sources[i1].from_hash(v1)
|
133
|
+
end
|
134
|
+
end
|
121
135
|
else
|
122
136
|
@unknown_json_fields[k] = v
|
123
137
|
end
|
@@ -138,6 +152,9 @@ module Comet
|
|
138
152
|
ret['AllowAuthenticatedDownloads'] = @allow_authenticated_downloads
|
139
153
|
ret['PruneLogsAfterDays'] = @prune_logs_after_days
|
140
154
|
ret['ExpiredInSeconds'] = @expired_in_seconds
|
155
|
+
unless @external_authentication_sources.nil?
|
156
|
+
ret['ExternalAuthenticationSources'] = @external_authentication_sources
|
157
|
+
end
|
141
158
|
@unknown_json_fields.each do |k, v|
|
142
159
|
ret[k] = v
|
143
160
|
end
|
@@ -99,6 +99,9 @@ module Comet
|
|
99
99
|
# @type [Boolean] prevent_protected_item_retention
|
100
100
|
attr_accessor :prevent_protected_item_retention
|
101
101
|
|
102
|
+
# @type [Boolean] allow_edit_object_lock_retention
|
103
|
+
attr_accessor :allow_edit_object_lock_retention
|
104
|
+
|
102
105
|
# @type [Hash{String => Comet::SourceConfig}] default_sources
|
103
106
|
attr_accessor :default_sources
|
104
107
|
|
@@ -230,6 +233,8 @@ module Comet
|
|
230
233
|
@enforce_storage_vault_retention = v
|
231
234
|
when 'PreventProtectedItemRetention'
|
232
235
|
@prevent_protected_item_retention = v
|
236
|
+
when 'AllowEditObjectLockRetention'
|
237
|
+
@allow_edit_object_lock_retention = v
|
233
238
|
when 'DefaultSources'
|
234
239
|
@default_sources = {}
|
235
240
|
if v.nil?
|
@@ -322,6 +327,7 @@ module Comet
|
|
322
327
|
ret['DefaultStorageVaultRetention'] = @default_storage_vault_retention
|
323
328
|
ret['EnforceStorageVaultRetention'] = @enforce_storage_vault_retention
|
324
329
|
ret['PreventProtectedItemRetention'] = @prevent_protected_item_retention
|
330
|
+
ret['AllowEditObjectLockRetention'] = @allow_edit_object_lock_retention
|
325
331
|
ret['DefaultSources'] = @default_sources
|
326
332
|
ret['DefaultSourcesBackupRules'] = @default_sources_backup_rules
|
327
333
|
ret['DefaultSourcesWithOSRestriction'] = @default_sources_with_osrestriction
|
@@ -0,0 +1,113 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright (c) 2020-2023 Comet Licensing Ltd.
|
4
|
+
# Please see the LICENSE file for usage information.
|
5
|
+
#
|
6
|
+
# SPDX-License-Identifier: MIT
|
7
|
+
|
8
|
+
require 'json'
|
9
|
+
|
10
|
+
module Comet
|
11
|
+
|
12
|
+
# WebDavDestinationLocation is a typed class wrapper around the underlying Comet Server API data structure.
|
13
|
+
# This type is available in Comet 23.6.9 and later.
|
14
|
+
class WebDavDestinationLocation
|
15
|
+
|
16
|
+
# The URL of the WebDAV server, including http/https and any custom port
|
17
|
+
# @type [String] dav_server
|
18
|
+
attr_accessor :dav_server
|
19
|
+
|
20
|
+
# The username for logging in to the WebDAV server
|
21
|
+
# @type [String] user_name
|
22
|
+
attr_accessor :user_name
|
23
|
+
|
24
|
+
# The password for logging in to the WebDAV server
|
25
|
+
# @type [String] access_key
|
26
|
+
attr_accessor :access_key
|
27
|
+
|
28
|
+
# The target directory path within the WebDAV server
|
29
|
+
# @type [String] path
|
30
|
+
attr_accessor :path
|
31
|
+
|
32
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
33
|
+
attr_accessor :unknown_json_fields
|
34
|
+
|
35
|
+
def initialize
|
36
|
+
clear
|
37
|
+
end
|
38
|
+
|
39
|
+
def clear
|
40
|
+
@dav_server = ''
|
41
|
+
@user_name = ''
|
42
|
+
@access_key = ''
|
43
|
+
@path = ''
|
44
|
+
@unknown_json_fields = {}
|
45
|
+
end
|
46
|
+
|
47
|
+
# @param [String] json_string The complete object in JSON format
|
48
|
+
def from_json(json_string)
|
49
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
50
|
+
|
51
|
+
from_hash(JSON.parse(json_string))
|
52
|
+
end
|
53
|
+
|
54
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
55
|
+
def from_hash(obj)
|
56
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
57
|
+
|
58
|
+
obj.each do |k, v|
|
59
|
+
case k
|
60
|
+
when 'DavServer'
|
61
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
62
|
+
|
63
|
+
@dav_server = v
|
64
|
+
when 'UserName'
|
65
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
66
|
+
|
67
|
+
@user_name = v
|
68
|
+
when 'AccessKey'
|
69
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
70
|
+
|
71
|
+
@access_key = v
|
72
|
+
when 'Path'
|
73
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
74
|
+
|
75
|
+
@path = v
|
76
|
+
else
|
77
|
+
@unknown_json_fields[k] = v
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
# @return [Hash] The complete object as a Ruby hash
|
83
|
+
def to_hash
|
84
|
+
ret = {}
|
85
|
+
unless @dav_server.nil?
|
86
|
+
ret['DavServer'] = @dav_server
|
87
|
+
end
|
88
|
+
unless @user_name.nil?
|
89
|
+
ret['UserName'] = @user_name
|
90
|
+
end
|
91
|
+
unless @access_key.nil?
|
92
|
+
ret['AccessKey'] = @access_key
|
93
|
+
end
|
94
|
+
unless @path.nil?
|
95
|
+
ret['Path'] = @path
|
96
|
+
end
|
97
|
+
@unknown_json_fields.each do |k, v|
|
98
|
+
ret[k] = v
|
99
|
+
end
|
100
|
+
ret
|
101
|
+
end
|
102
|
+
|
103
|
+
# @return [Hash] The complete object as a Ruby hash
|
104
|
+
def to_h
|
105
|
+
to_hash
|
106
|
+
end
|
107
|
+
|
108
|
+
# @return [String] The complete object as a JSON string
|
109
|
+
def to_json(options = {})
|
110
|
+
to_hash.to_json(options)
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
@@ -32,8 +32,8 @@ module Comet
|
|
32
32
|
# @type [String] windows_code_sign_pkcs11module
|
33
33
|
attr_accessor :windows_code_sign_pkcs11module
|
34
34
|
|
35
|
+
# This field was deprecated between 23.3.0 and 23.6.x, but is now used again.
|
35
36
|
# @type [String] windows_code_sign_pkcs11certfile
|
36
|
-
# @deprecated This member has been deprecated since Comet version 22.12.7
|
37
37
|
attr_accessor :windows_code_sign_pkcs11certfile
|
38
38
|
|
39
39
|
# @type [String] windows_code_sign_pkcs11key_id
|
@@ -70,6 +70,8 @@ require_relative 'comet/models/email_report_config'
|
|
70
70
|
require_relative 'comet/models/email_report_generated_preview'
|
71
71
|
require_relative 'comet/models/email_reporting_option'
|
72
72
|
require_relative 'comet/models/external_authentication_source'
|
73
|
+
require_relative 'comet/models/external_authentication_source_display'
|
74
|
+
require_relative 'comet/models/external_authentication_source_response'
|
73
75
|
require_relative 'comet/models/external_ldapauthentication_source_server'
|
74
76
|
require_relative 'comet/models/external_ldapauthentication_source_settings'
|
75
77
|
require_relative 'comet/models/extra_file_exclusion'
|
@@ -104,6 +106,8 @@ require_relative 'comet/models/office_365custom_setting'
|
|
104
106
|
require_relative 'comet/models/office_365custom_setting_v2'
|
105
107
|
require_relative 'comet/models/office_365mixed_virtual_account'
|
106
108
|
require_relative 'comet/models/office_365object_info'
|
109
|
+
require_relative 'comet/models/oidc_claim'
|
110
|
+
require_relative 'comet/models/oidc_config'
|
107
111
|
require_relative 'comet/models/organization'
|
108
112
|
require_relative 'comet/models/organization_login_urlresponse'
|
109
113
|
require_relative 'comet/models/organization_response'
|
@@ -201,6 +205,7 @@ require_relative 'comet/models/web_authn_relying_party_entity'
|
|
201
205
|
require_relative 'comet/models/web_authn_sign_request'
|
202
206
|
require_relative 'comet/models/web_authn_sign_response'
|
203
207
|
require_relative 'comet/models/web_authn_user_entity'
|
208
|
+
require_relative 'comet/models/web_dav_destination_location'
|
204
209
|
require_relative 'comet/models/web_interface_branding_properties'
|
205
210
|
require_relative 'comet/models/webhook_option'
|
206
211
|
require_relative 'comet/models/win_smbauth'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: comet_backup_ruby_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Comet Licensing Ltd.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -148,6 +148,8 @@ files:
|
|
148
148
|
- lib/comet/models/email_report_generated_preview.rb
|
149
149
|
- lib/comet/models/email_reporting_option.rb
|
150
150
|
- lib/comet/models/external_authentication_source.rb
|
151
|
+
- lib/comet/models/external_authentication_source_display.rb
|
152
|
+
- lib/comet/models/external_authentication_source_response.rb
|
151
153
|
- lib/comet/models/external_ldapauthentication_source_server.rb
|
152
154
|
- lib/comet/models/external_ldapauthentication_source_settings.rb
|
153
155
|
- lib/comet/models/extra_file_exclusion.rb
|
@@ -182,6 +184,8 @@ files:
|
|
182
184
|
- lib/comet/models/office_365custom_setting_v2.rb
|
183
185
|
- lib/comet/models/office_365mixed_virtual_account.rb
|
184
186
|
- lib/comet/models/office_365object_info.rb
|
187
|
+
- lib/comet/models/oidc_claim.rb
|
188
|
+
- lib/comet/models/oidc_config.rb
|
185
189
|
- lib/comet/models/organization.rb
|
186
190
|
- lib/comet/models/organization_login_urlresponse.rb
|
187
191
|
- lib/comet/models/organization_response.rb
|
@@ -279,6 +283,7 @@ files:
|
|
279
283
|
- lib/comet/models/web_authn_sign_request.rb
|
280
284
|
- lib/comet/models/web_authn_sign_response.rb
|
281
285
|
- lib/comet/models/web_authn_user_entity.rb
|
286
|
+
- lib/comet/models/web_dav_destination_location.rb
|
282
287
|
- lib/comet/models/web_interface_branding_properties.rb
|
283
288
|
- lib/comet/models/webhook_option.rb
|
284
289
|
- lib/comet/models/win_smbauth.rb
|