strongdm 7.1.0 → 8.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5c057417bc8df129e58f80222c92f1d47974637172f83b9049183a9dfa062952
4
- data.tar.gz: 380e652a133f54b2951e41f9ab9036ce7083e8bbae474c11366599ecdb1e6b60
3
+ metadata.gz: 1692786ff878322b92229abdcf3a833c53a3ac2fcc282c908b88746b39c50a10
4
+ data.tar.gz: 523e925b33b3b3246e53f3819820c50095305ad79c486e6b21cb09e5558c89e7
5
5
  SHA512:
6
- metadata.gz: c886b286f177d51cb64793394983de2694dfcc2cf0e76ef59021e59e76063ed3c632224c7d3f79f63283acafe8b2c05caec74d1ff7651f0ac10d11d93d9aa57b
7
- data.tar.gz: 67a3a57f5bbe4a3f78798ea81fa48d8137ff7d910591e97d4c90881bf6b58e7eb248d5bd649a0bbafe4e100b272cae876b54c897f4dfe034b460486e312b77d8
6
+ metadata.gz: 8d6a587a20eb66b2d917c2587f553f98325d1e270b8f321ce628eb3d22fb5b0437b655e5f3ed2b38e48971d3e6302775db7473e3d1397bc436e77cba926fe65e
7
+ data.tar.gz: 8cb03acd29cce7f386c47956607d3e3e2b7457cd30200fcfdcf4760bb3a0539bf4811d7ad42c4ea88c0b707405a069b4bdb86fd5ff418e0c506585f52d2d4f86
data/.git/ORIG_HEAD CHANGED
@@ -1 +1 @@
1
- c69cd1f08e014470bbe2e4dbc4ad494d4bf78d6c
1
+ f34575bc142eabf113dbbc5b40b3a16e0c026355
data/.git/index CHANGED
Binary file
data/.git/logs/HEAD CHANGED
@@ -1,3 +1,3 @@
1
- 0000000000000000000000000000000000000000 c69cd1f08e014470bbe2e4dbc4ad494d4bf78d6c sdmrelease <support@strongdm.com> 1710521783 +0000 clone: from github.com:strongdm/strongdm-sdk-ruby.git
2
- c69cd1f08e014470bbe2e4dbc4ad494d4bf78d6c c69cd1f08e014470bbe2e4dbc4ad494d4bf78d6c sdmrelease <support@strongdm.com> 1710521783 +0000 checkout: moving from master to master
3
- c69cd1f08e014470bbe2e4dbc4ad494d4bf78d6c f34575bc142eabf113dbbc5b40b3a16e0c026355 sdmrelease <support@strongdm.com> 1710521783 +0000 merge origin/development: Fast-forward
1
+ 0000000000000000000000000000000000000000 f34575bc142eabf113dbbc5b40b3a16e0c026355 sdmrelease <support@strongdm.com> 1712692017 +0000 clone: from github.com:strongdm/strongdm-sdk-ruby.git
2
+ f34575bc142eabf113dbbc5b40b3a16e0c026355 f34575bc142eabf113dbbc5b40b3a16e0c026355 sdmrelease <support@strongdm.com> 1712692017 +0000 checkout: moving from master to master
3
+ f34575bc142eabf113dbbc5b40b3a16e0c026355 7659a644ef149debee2515386136b7e2d5e917ea sdmrelease <support@strongdm.com> 1712692017 +0000 merge origin/development: Fast-forward
@@ -1,2 +1,2 @@
1
- 0000000000000000000000000000000000000000 c69cd1f08e014470bbe2e4dbc4ad494d4bf78d6c sdmrelease <support@strongdm.com> 1710521783 +0000 clone: from github.com:strongdm/strongdm-sdk-ruby.git
2
- c69cd1f08e014470bbe2e4dbc4ad494d4bf78d6c f34575bc142eabf113dbbc5b40b3a16e0c026355 sdmrelease <support@strongdm.com> 1710521783 +0000 merge origin/development: Fast-forward
1
+ 0000000000000000000000000000000000000000 f34575bc142eabf113dbbc5b40b3a16e0c026355 sdmrelease <support@strongdm.com> 1712692017 +0000 clone: from github.com:strongdm/strongdm-sdk-ruby.git
2
+ f34575bc142eabf113dbbc5b40b3a16e0c026355 7659a644ef149debee2515386136b7e2d5e917ea sdmrelease <support@strongdm.com> 1712692017 +0000 merge origin/development: Fast-forward
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 c69cd1f08e014470bbe2e4dbc4ad494d4bf78d6c sdmrelease <support@strongdm.com> 1710521783 +0000 clone: from github.com:strongdm/strongdm-sdk-ruby.git
1
+ 0000000000000000000000000000000000000000 f34575bc142eabf113dbbc5b40b3a16e0c026355 sdmrelease <support@strongdm.com> 1712692017 +0000 clone: from github.com:strongdm/strongdm-sdk-ruby.git
data/.git/packed-refs CHANGED
@@ -1,6 +1,6 @@
1
1
  # pack-refs with: peeled fully-peeled sorted
2
- f34575bc142eabf113dbbc5b40b3a16e0c026355 refs/remotes/origin/development
3
- c69cd1f08e014470bbe2e4dbc4ad494d4bf78d6c refs/remotes/origin/master
2
+ 7659a644ef149debee2515386136b7e2d5e917ea refs/remotes/origin/development
3
+ f34575bc142eabf113dbbc5b40b3a16e0c026355 refs/remotes/origin/master
4
4
  2e4fe8087177ddea9b3991ca499f758384839c89 refs/tags/untagged-84fd83a4484c785cce63
5
5
  04f604866214fab4d5663b5171a3e596331577bd refs/tags/v0.9.4
6
6
  6f9a7b75b345c65fb554884907b7060680c807b7 refs/tags/v0.9.5
@@ -103,3 +103,4 @@ e37aa2b50ffd917949a8e1c7a1fa28d12071fa69 refs/tags/v6.7.0
103
103
  0429c9a2739f699ea33db7e6dd85e6be47e9190e refs/tags/v6.8.0
104
104
  d8a1092c15d3618de31ada43875014d96bd21e36 refs/tags/v6.9.0
105
105
  c69cd1f08e014470bbe2e4dbc4ad494d4bf78d6c refs/tags/v7.0.0
106
+ f34575bc142eabf113dbbc5b40b3a16e0c026355 refs/tags/v7.1.0
@@ -1 +1 @@
1
- f34575bc142eabf113dbbc5b40b3a16e0c026355
1
+ 7659a644ef149debee2515386136b7e2d5e917ea
@@ -17,6 +17,7 @@
17
17
 
18
18
  require "google/protobuf"
19
19
 
20
+ require "google/protobuf/duration_pb"
20
21
  require "google/protobuf/timestamp_pb"
21
22
  require "options_pb"
22
23
  require "spec_pb"
@@ -33,6 +34,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
33
34
  optional :account, :message, 2, "v1.Account"
34
35
  optional :token, :string, 3
35
36
  optional :rate_limit, :message, 4, "v1.RateLimitMetadata"
37
+ optional :access_key, :string, 5
38
+ optional :secret_key, :string, 6
36
39
  end
37
40
  add_message "v1.AccountGetRequest" do
38
41
  optional :meta, :message, 1, "v1.GetRequestMetadata"
@@ -103,6 +106,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
103
106
  optional :tags, :message, 4, "v1.Tags"
104
107
  optional :rekeyed, :message, 5, "google.protobuf.Timestamp"
105
108
  optional :deadline, :message, 6, "google.protobuf.Timestamp"
109
+ optional :account_type, :string, 7
110
+ repeated :permissions, :string, 8
111
+ optional :duration, :message, 9, "google.protobuf.Duration"
106
112
  end
107
113
  end
108
114
  end
@@ -23,6 +23,7 @@ module V1
23
23
  # Accounts are users that have access to strongDM. There are two types of accounts:
24
24
  # 1. **Users:** humans who are authenticated through username and password or SSO.
25
25
  # 2. **Service Accounts:** machines that are authenticated using a service token.
26
+ # 3. **Tokens** are access keys with permissions that can be used for authentication.
26
27
  class Service
27
28
  include ::GRPC::GenericService
28
29
 
data/lib/grpc/plumbing.rb CHANGED
@@ -1041,6 +1041,9 @@ module SDM
1041
1041
  if porcelain.instance_of? Service
1042
1042
  plumbing.service = convert_service_to_plumbing(porcelain)
1043
1043
  end
1044
+ if porcelain.instance_of? Token
1045
+ plumbing.token = convert_token_to_plumbing(porcelain)
1046
+ end
1044
1047
  if porcelain.instance_of? User
1045
1048
  plumbing.user = convert_user_to_plumbing(porcelain)
1046
1049
  end
@@ -1054,6 +1057,9 @@ module SDM
1054
1057
  if plumbing.service != nil
1055
1058
  return convert_service_to_porcelain(plumbing.service)
1056
1059
  end
1060
+ if plumbing.token != nil
1061
+ return convert_token_to_porcelain(plumbing.token)
1062
+ end
1057
1063
  if plumbing.user != nil
1058
1064
  return convert_user_to_porcelain(plumbing.user)
1059
1065
  end
@@ -1271,9 +1277,11 @@ module SDM
1271
1277
  return nil
1272
1278
  end
1273
1279
  porcelain = AccountCreateResponse.new()
1280
+ porcelain.access_key = (plumbing.access_key)
1274
1281
  porcelain.account = convert_account_to_porcelain(plumbing.account)
1275
1282
  porcelain.meta = convert_create_response_metadata_to_porcelain(plumbing.meta)
1276
1283
  porcelain.rate_limit = convert_rate_limit_metadata_to_porcelain(plumbing.rate_limit)
1284
+ porcelain.secret_key = (plumbing.secret_key)
1277
1285
  porcelain.token = (plumbing.token)
1278
1286
  porcelain
1279
1287
  end
@@ -1283,9 +1291,11 @@ module SDM
1283
1291
  return nil
1284
1292
  end
1285
1293
  plumbing = V1::AccountCreateResponse.new()
1294
+ plumbing.access_key = (porcelain.access_key)
1286
1295
  plumbing.account = convert_account_to_plumbing(porcelain.account)
1287
1296
  plumbing.meta = convert_create_response_metadata_to_plumbing(porcelain.meta)
1288
1297
  plumbing.rate_limit = convert_rate_limit_metadata_to_plumbing(porcelain.rate_limit)
1298
+ plumbing.secret_key = (porcelain.secret_key)
1289
1299
  plumbing.token = (porcelain.token)
1290
1300
  plumbing
1291
1301
  end
@@ -11207,6 +11217,56 @@ module SDM
11207
11217
  end
11208
11218
  items
11209
11219
  end
11220
+ def self.convert_token_to_porcelain(plumbing)
11221
+ if plumbing == nil
11222
+ return nil
11223
+ end
11224
+ porcelain = Token.new()
11225
+ porcelain.account_type = (plumbing.account_type)
11226
+ porcelain.deadline = convert_timestamp_to_porcelain(plumbing.deadline)
11227
+ porcelain.duration = convert_duration_to_porcelain(plumbing.duration)
11228
+ porcelain.id = (plumbing.id)
11229
+ porcelain.name = (plumbing.name)
11230
+ porcelain.permissions = (plumbing.permissions)
11231
+ porcelain.rekeyed = convert_timestamp_to_porcelain(plumbing.rekeyed)
11232
+ porcelain.suspended = (plumbing.suspended)
11233
+ porcelain.tags = convert_tags_to_porcelain(plumbing.tags)
11234
+ porcelain
11235
+ end
11236
+
11237
+ def self.convert_token_to_plumbing(porcelain)
11238
+ if porcelain == nil
11239
+ return nil
11240
+ end
11241
+ plumbing = V1::Token.new()
11242
+ plumbing.account_type = (porcelain.account_type)
11243
+ plumbing.deadline = convert_timestamp_to_plumbing(porcelain.deadline)
11244
+ plumbing.duration = convert_duration_to_plumbing(porcelain.duration)
11245
+ plumbing.id = (porcelain.id)
11246
+ plumbing.name = (porcelain.name)
11247
+ plumbing.permissions += (porcelain.permissions)
11248
+ plumbing.rekeyed = convert_timestamp_to_plumbing(porcelain.rekeyed)
11249
+ plumbing.suspended = (porcelain.suspended)
11250
+ plumbing.tags = convert_tags_to_plumbing(porcelain.tags)
11251
+ plumbing
11252
+ end
11253
+ def self.convert_repeated_token_to_plumbing(porcelains)
11254
+ items = Array.new
11255
+ porcelains.each do |porcelain|
11256
+ plumbing = convert_token_to_plumbing(porcelain)
11257
+ items.append(plumbing)
11258
+ end
11259
+ items
11260
+ end
11261
+
11262
+ def self.convert_repeated_token_to_porcelain(plumbings)
11263
+ items = Array.new
11264
+ plumbings.each do |plumbing|
11265
+ porcelain = convert_token_to_porcelain(plumbing)
11266
+ items.append(porcelain)
11267
+ end
11268
+ items
11269
+ end
11210
11270
  def self.convert_trino_to_porcelain(plumbing)
11211
11271
  if plumbing == nil
11212
11272
  return nil
@@ -1081,25 +1081,33 @@ module SDM
1081
1081
 
1082
1082
  # AccountCreateResponse reports how the Accounts were created in the system.
1083
1083
  class AccountCreateResponse
1084
+ # ID part of the API key.
1085
+ attr_accessor :access_key
1084
1086
  # The created Account.
1085
1087
  attr_accessor :account
1086
1088
  # Reserved for future use.
1087
1089
  attr_accessor :meta
1088
1090
  # Rate limit information.
1089
1091
  attr_accessor :rate_limit
1092
+ # Secret part of the API key.
1093
+ attr_accessor :secret_key
1090
1094
  # The auth token generated for the Account. The Account will use this token to
1091
1095
  # authenticate with the strongDM API.
1092
1096
  attr_accessor :token
1093
1097
 
1094
1098
  def initialize(
1099
+ access_key: nil,
1095
1100
  account: nil,
1096
1101
  meta: nil,
1097
1102
  rate_limit: nil,
1103
+ secret_key: nil,
1098
1104
  token: nil
1099
1105
  )
1106
+ @access_key = access_key == nil ? "" : access_key
1100
1107
  @account = account == nil ? nil : account
1101
1108
  @meta = meta == nil ? nil : meta
1102
1109
  @rate_limit = rate_limit == nil ? nil : rate_limit
1110
+ @secret_key = secret_key == nil ? "" : secret_key
1103
1111
  @token = token == nil ? "" : token
1104
1112
  end
1105
1113
 
@@ -10409,6 +10417,59 @@ module SDM
10409
10417
  end
10410
10418
  end
10411
10419
 
10420
+ # A Token is an account providing tokenized access for automation or integration use.
10421
+ # Tokens include admin tokens, API keys, and SCIM tokens.
10422
+ class Token
10423
+ # Corresponds to the type of token, e.g. api or admin-token.
10424
+ attr_accessor :account_type
10425
+ # The timestamp when the Token will expire.
10426
+ attr_accessor :deadline
10427
+ # Duration from token creation to expiration.
10428
+ attr_accessor :duration
10429
+ # Unique identifier of the Token.
10430
+ attr_accessor :id
10431
+ # Unique human-readable name of the Token.
10432
+ attr_accessor :name
10433
+ # Permissions assigned to the token, e.g. role:create.
10434
+ attr_accessor :permissions
10435
+ # The timestamp when the Token was last rekeyed.
10436
+ attr_accessor :rekeyed
10437
+ # Reserved for future use. Always false for tokens.
10438
+ attr_accessor :suspended
10439
+ # Tags is a map of key, value pairs.
10440
+ attr_accessor :tags
10441
+
10442
+ def initialize(
10443
+ account_type: nil,
10444
+ deadline: nil,
10445
+ duration: nil,
10446
+ id: nil,
10447
+ name: nil,
10448
+ permissions: nil,
10449
+ rekeyed: nil,
10450
+ suspended: nil,
10451
+ tags: nil
10452
+ )
10453
+ @account_type = account_type == nil ? "" : account_type
10454
+ @deadline = deadline == nil ? nil : deadline
10455
+ @duration = duration == nil ? nil : duration
10456
+ @id = id == nil ? "" : id
10457
+ @name = name == nil ? "" : name
10458
+ @permissions = permissions == nil ? [] : permissions
10459
+ @rekeyed = rekeyed == nil ? nil : rekeyed
10460
+ @suspended = suspended == nil ? false : suspended
10461
+ @tags = tags == nil ? SDM::_porcelain_zero_value_tags() : tags
10462
+ end
10463
+
10464
+ def to_json(options = {})
10465
+ hash = {}
10466
+ self.instance_variables.each do |var|
10467
+ hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
10468
+ end
10469
+ hash.to_json
10470
+ end
10471
+ end
10472
+
10412
10473
  # Trino is currently unstable, and its API may change, or it may be removed, without a major version bump.
10413
10474
  class Trino
10414
10475
  # The bind interface is the IP address to which the port override of a resource is bound (for example, 127.0.0.1). It is automatically generated if not provided.
data/lib/strongdm.rb CHANGED
@@ -28,8 +28,8 @@ module SDM #:nodoc:
28
28
  DEFAULT_MAX_RETRIES = 3
29
29
  DEFAULT_BASE_RETRY_DELAY = 0.0030 # 30 ms
30
30
  DEFAULT_MAX_RETRY_DELAY = 300 # 300 seconds
31
- API_VERSION = "2024-03-14"
32
- USER_AGENT = "strongdm-sdk-ruby/7.1.0"
31
+ API_VERSION = "2024-03-28"
32
+ USER_AGENT = "strongdm-sdk-ruby/8.0.0"
33
33
  private_constant :DEFAULT_MAX_RETRIES, :DEFAULT_BASE_RETRY_DELAY, :DEFAULT_MAX_RETRY_DELAY, :API_VERSION, :USER_AGENT
34
34
 
35
35
  # Creates a new strongDM API client.
@@ -240,6 +240,7 @@ module SDM #:nodoc:
240
240
  # Accounts are users that have access to strongDM. There are two types of accounts:
241
241
  # 1. **Users:** humans who are authenticated through username and password or SSO.
242
242
  # 2. **Service Accounts:** machines that are authenticated using a service token.
243
+ # 3. **Tokens** are access keys with permissions that can be used for authentication.
243
244
  #
244
245
  # See {Accounts}.
245
246
  attr_reader :accounts
@@ -527,6 +528,7 @@ module SDM #:nodoc:
527
528
  # Accounts are users that have access to strongDM. There are two types of accounts:
528
529
  # 1. **Users:** humans who are authenticated through username and password or SSO.
529
530
  # 2. **Service Accounts:** machines that are authenticated using a service token.
531
+ # 3. **Tokens** are access keys with permissions that can be used for authentication.
530
532
  #
531
533
  # See {SnapshotAccounts}.
532
534
  attr_reader :accounts
data/lib/svc.rb CHANGED
@@ -902,9 +902,11 @@ module SDM #:nodoc:
902
902
  # Accounts are users that have access to strongDM. There are two types of accounts:
903
903
  # 1. **Users:** humans who are authenticated through username and password or SSO.
904
904
  # 2. **Service Accounts:** machines that are authenticated using a service token.
905
+ # 3. **Tokens** are access keys with permissions that can be used for authentication.
905
906
  #
906
907
  # See:
907
908
  # {Service}
909
+ # {Token}
908
910
  # {User}
909
911
  class Accounts
910
912
  extend Gem::Deprecate
@@ -942,9 +944,11 @@ module SDM #:nodoc:
942
944
  end
943
945
 
944
946
  resp = AccountCreateResponse.new()
947
+ resp.access_key = (plumbing_response.access_key)
945
948
  resp.account = Plumbing::convert_account_to_porcelain(plumbing_response.account)
946
949
  resp.meta = Plumbing::convert_create_response_metadata_to_porcelain(plumbing_response.meta)
947
950
  resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
951
+ resp.secret_key = (plumbing_response.secret_key)
948
952
  resp.token = (plumbing_response.token)
949
953
  resp
950
954
  end
data/lib/version CHANGED
@@ -13,5 +13,5 @@
13
13
  # limitations under the License.
14
14
  #
15
15
  module SDM
16
- VERSION = "7.1.0"
16
+ VERSION = "8.0.0"
17
17
  end
data/lib/version.rb CHANGED
@@ -13,5 +13,5 @@
13
13
  # limitations under the License.
14
14
  #
15
15
  module SDM
16
- VERSION = "7.1.0"
16
+ VERSION = "8.0.0"
17
17
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strongdm
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.1.0
4
+ version: 8.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - strongDM Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-15 00:00:00.000000000 Z
11
+ date: 2024-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grpc
@@ -81,8 +81,8 @@ files:
81
81
  - "./.git/logs/HEAD"
82
82
  - "./.git/logs/refs/heads/master"
83
83
  - "./.git/logs/refs/remotes/origin/HEAD"
84
- - "./.git/objects/pack/pack-9cd0615b40bc7f8b12560a1af725da3a06bcb1d9.idx"
85
- - "./.git/objects/pack/pack-9cd0615b40bc7f8b12560a1af725da3a06bcb1d9.pack"
84
+ - "./.git/objects/pack/pack-69c9823403bcd0961320d5e472ca7682c217e13f.idx"
85
+ - "./.git/objects/pack/pack-69c9823403bcd0961320d5e472ca7682c217e13f.pack"
86
86
  - "./.git/packed-refs"
87
87
  - "./.git/refs/heads/master"
88
88
  - "./.git/refs/remotes/origin/HEAD"