strongdm 3.9.0 → 3.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 86a8357bf019f835f2205d750fd911fecc1ab7df0a2f44f51e00f2e814a4593f
4
- data.tar.gz: 3f2bec142d40f6ebd1923043094a324ca55d0efc939f850aa46197cb142baa8d
3
+ metadata.gz: de4f6041460b4a456fa654f43f71a2bb3a764691dbb53868e4bda9d61e6e79c4
4
+ data.tar.gz: 190c22fd62e204f41799456e96ed6950fd98b3179f2f919c8d14f3094e943f26
5
5
  SHA512:
6
- metadata.gz: 152b41187b3b89f90a6d059fe009bb278b71fe6fad96502341bc8ecd42096c1706e6cd54d5b6c2f574bf1848e752340a23b967233676d81d261508ae832a5ebb
7
- data.tar.gz: 20820ef6a06f97aef35dda453dbd784171cfc764d5e2a6b00f741971e57da52486179509fe92845e86fb2910b844fe2b0f1d022531e833ef756f25c6c9442e18
6
+ metadata.gz: 5e44026eb55aa900f804308404bc6fb8b7a258ccb09235952b66465793447fde39a32da27116922bfb28eb27d4d5e0095ab2ec049228e066696a3c2678fb9632
7
+ data.tar.gz: 0aeda0ef14706a64930e628d38d0a984920ebdc79fd513725191e99b3c95987792788f867b53e69caf69f4b1abdb2561ce28ed96c3cab4e39260e41bfe4fee3c
data/.git/ORIG_HEAD CHANGED
@@ -1 +1 @@
1
- 07687e72efc8785eb9de64ef2d27056c6f9e3413
1
+ 996c2591e6d895f404e977133bda196e723e1dd9
data/.git/index CHANGED
Binary file
data/.git/logs/HEAD CHANGED
@@ -1,3 +1,3 @@
1
- 0000000000000000000000000000000000000000 07687e72efc8785eb9de64ef2d27056c6f9e3413 root <root@c8bf43e8bd19.(none)> 1679529693 +0000 clone: from github.com:strongdm/strongdm-sdk-ruby.git
2
- 07687e72efc8785eb9de64ef2d27056c6f9e3413 07687e72efc8785eb9de64ef2d27056c6f9e3413 root <root@c8bf43e8bd19.(none)> 1679529693 +0000 checkout: moving from master to master
3
- 07687e72efc8785eb9de64ef2d27056c6f9e3413 996c2591e6d895f404e977133bda196e723e1dd9 root <root@c8bf43e8bd19.(none)> 1679529693 +0000 merge origin/development: Fast-forward
1
+ 0000000000000000000000000000000000000000 996c2591e6d895f404e977133bda196e723e1dd9 root <root@bb8ed9c1b0e6.(none)> 1680038728 +0000 clone: from github.com:strongdm/strongdm-sdk-ruby.git
2
+ 996c2591e6d895f404e977133bda196e723e1dd9 996c2591e6d895f404e977133bda196e723e1dd9 root <root@bb8ed9c1b0e6.(none)> 1680038728 +0000 checkout: moving from master to master
3
+ 996c2591e6d895f404e977133bda196e723e1dd9 fb276eee8a0b2cc1415c25962410309b645373ed root <root@bb8ed9c1b0e6.(none)> 1680038728 +0000 merge origin/development: Fast-forward
@@ -1,2 +1,2 @@
1
- 0000000000000000000000000000000000000000 07687e72efc8785eb9de64ef2d27056c6f9e3413 root <root@c8bf43e8bd19.(none)> 1679529693 +0000 clone: from github.com:strongdm/strongdm-sdk-ruby.git
2
- 07687e72efc8785eb9de64ef2d27056c6f9e3413 996c2591e6d895f404e977133bda196e723e1dd9 root <root@c8bf43e8bd19.(none)> 1679529693 +0000 merge origin/development: Fast-forward
1
+ 0000000000000000000000000000000000000000 996c2591e6d895f404e977133bda196e723e1dd9 root <root@bb8ed9c1b0e6.(none)> 1680038728 +0000 clone: from github.com:strongdm/strongdm-sdk-ruby.git
2
+ 996c2591e6d895f404e977133bda196e723e1dd9 fb276eee8a0b2cc1415c25962410309b645373ed root <root@bb8ed9c1b0e6.(none)> 1680038728 +0000 merge origin/development: Fast-forward
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 07687e72efc8785eb9de64ef2d27056c6f9e3413 root <root@c8bf43e8bd19.(none)> 1679529693 +0000 clone: from github.com:strongdm/strongdm-sdk-ruby.git
1
+ 0000000000000000000000000000000000000000 996c2591e6d895f404e977133bda196e723e1dd9 root <root@bb8ed9c1b0e6.(none)> 1680038728 +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
- 996c2591e6d895f404e977133bda196e723e1dd9 refs/remotes/origin/development
3
- 07687e72efc8785eb9de64ef2d27056c6f9e3413 refs/remotes/origin/master
2
+ fb276eee8a0b2cc1415c25962410309b645373ed refs/remotes/origin/development
3
+ 996c2591e6d895f404e977133bda196e723e1dd9 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
@@ -58,3 +58,4 @@ ed61eaceb77e62a0c1a0bb8d36fc0bda7b242af4 refs/tags/v3.5.5
58
58
  ffd4706f2b64466550868d42ee2a5a4b88b3a372 refs/tags/v3.6.1
59
59
  10a9195bd9e91e5d6047500b92d08df567d60f78 refs/tags/v3.7.0
60
60
  07687e72efc8785eb9de64ef2d27056c6f9e3413 refs/tags/v3.8.0
61
+ 996c2591e6d895f404e977133bda196e723e1dd9 refs/tags/v3.9.0
@@ -1 +1 @@
1
- 996c2591e6d895f404e977133bda196e723e1dd9
1
+ fb276eee8a0b2cc1415c25962410309b645373ed
data/lib/constants.rb CHANGED
@@ -246,6 +246,7 @@ module SDM
246
246
  WORKFLOW_NOTIFICATION_OPTION_REMOVED = "workflow notification type removed"
247
247
  WORKFLOW_NOTIFICATION_OPTIONS_UPDATED = "workflow notification settings updated"
248
248
  ORG_VNM_SUBNET_UPDATED = "organization VNM subnet updated"
249
+ ORG_VNM_RESOURCES_ALLOCATED = "organization resources allocated within VNM subnet"
249
250
  DEPRECATED_ORG_ACTIVATE_DEVICE_APPROVAL = "activate device approval"
250
251
  DEPRECATED_ORG_DEACTIVATE_DEVICE_APPROVAL = "deactivate device approval"
251
252
  EMULATION_MIGRATION_COMPLETED = "emulation migration completed"
@@ -0,0 +1,48 @@
1
+ # Copyright 2020 StrongDM Inc
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ #
15
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
16
+ # source: account_resources_history.proto
17
+
18
+ require "google/protobuf"
19
+
20
+ require "google/protobuf/timestamp_pb"
21
+ require "account_resources_pb"
22
+ require "options_pb"
23
+ require "spec_pb"
24
+ Google::Protobuf::DescriptorPool.generated_pool.build do
25
+ add_file("account_resources_history.proto", :syntax => :proto3) do
26
+ add_message "v1.AccountResourceHistoryListRequest" do
27
+ optional :meta, :message, 1, "v1.ListRequestMetadata"
28
+ optional :filter, :string, 2
29
+ end
30
+ add_message "v1.AccountResourceHistoryListResponse" do
31
+ optional :meta, :message, 1, "v1.ListResponseMetadata"
32
+ repeated :history, :message, 2, "v1.AccountResourceHistory"
33
+ optional :rate_limit, :message, 3, "v1.RateLimitMetadata"
34
+ end
35
+ add_message "v1.AccountResourceHistory" do
36
+ optional :activity_id, :string, 1
37
+ optional :timestamp, :message, 2, "google.protobuf.Timestamp"
38
+ optional :account_resource, :message, 3, "v1.AccountResource"
39
+ optional :deleted_at, :message, 4, "google.protobuf.Timestamp"
40
+ end
41
+ end
42
+ end
43
+
44
+ module V1
45
+ AccountResourceHistoryListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.AccountResourceHistoryListRequest").msgclass
46
+ AccountResourceHistoryListResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.AccountResourceHistoryListResponse").msgclass
47
+ AccountResourceHistory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.AccountResourceHistory").msgclass
48
+ end
@@ -0,0 +1,37 @@
1
+ # Copyright 2020 StrongDM Inc
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ #
15
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
16
+ # Source: account_resources_history.proto for package 'v1'
17
+
18
+ require "grpc"
19
+ require "account_resources_history_pb"
20
+
21
+ module V1
22
+ module AccountResourcesHistory
23
+ # AccountResourcesHistory records all changes to the state of a AccountResource.
24
+ class Service
25
+ include GRPC::GenericService
26
+
27
+ self.marshal_class_method = :encode
28
+ self.unmarshal_class_method = :decode
29
+ self.service_name = "v1.AccountResourcesHistory"
30
+
31
+ # List gets a list of AccountResourceHistory records matching a given set of criteria.
32
+ rpc :List, V1::AccountResourceHistoryListRequest, V1::AccountResourceHistoryListResponse
33
+ end
34
+
35
+ Stub = Service.rpc_stub_class
36
+ end
37
+ end
data/lib/grpc/plumbing.rb CHANGED
@@ -26,6 +26,7 @@ require_relative "./account_grants_pb"
26
26
  require_relative "./account_grants_history_pb"
27
27
  require_relative "./account_permissions_pb"
28
28
  require_relative "./account_resources_pb"
29
+ require_relative "./account_resources_history_pb"
29
30
  require_relative "./tags_pb"
30
31
  require_relative "./accounts_pb"
31
32
  require_relative "./accounts_history_pb"
@@ -1343,6 +1344,46 @@ module SDM
1343
1344
  end
1344
1345
  items
1345
1346
  end
1347
+ def self.convert_account_resource_history_to_porcelain(plumbing)
1348
+ if plumbing == nil
1349
+ return nil
1350
+ end
1351
+ porcelain = AccountResourceHistory.new()
1352
+ porcelain.account_resource = convert_account_resource_to_porcelain(plumbing.account_resource)
1353
+ porcelain.activity_id = (plumbing.activity_id)
1354
+ porcelain.deleted_at = convert_timestamp_to_porcelain(plumbing.deleted_at)
1355
+ porcelain.timestamp = convert_timestamp_to_porcelain(plumbing.timestamp)
1356
+ porcelain
1357
+ end
1358
+
1359
+ def self.convert_account_resource_history_to_plumbing(porcelain)
1360
+ if porcelain == nil
1361
+ return nil
1362
+ end
1363
+ plumbing = V1::AccountResourceHistory.new()
1364
+ plumbing.account_resource = convert_account_resource_to_plumbing(porcelain.account_resource)
1365
+ plumbing.activity_id = (porcelain.activity_id)
1366
+ plumbing.deleted_at = convert_timestamp_to_plumbing(porcelain.deleted_at)
1367
+ plumbing.timestamp = convert_timestamp_to_plumbing(porcelain.timestamp)
1368
+ plumbing
1369
+ end
1370
+ def self.convert_repeated_account_resource_history_to_plumbing(porcelains)
1371
+ items = Array.new
1372
+ porcelains.each do |porcelain|
1373
+ plumbing = convert_account_resource_history_to_plumbing(porcelain)
1374
+ items.append(plumbing)
1375
+ end
1376
+ items
1377
+ end
1378
+
1379
+ def self.convert_repeated_account_resource_history_to_porcelain(plumbings)
1380
+ items = Array.new
1381
+ plumbings.each do |plumbing|
1382
+ porcelain = convert_account_resource_history_to_porcelain(plumbing)
1383
+ items.append(porcelain)
1384
+ end
1385
+ items
1386
+ end
1346
1387
  def self.convert_account_update_response_to_porcelain(plumbing)
1347
1388
  if plumbing == nil
1348
1389
  return nil
@@ -1143,6 +1143,41 @@ module SDM
1143
1143
  end
1144
1144
  end
1145
1145
 
1146
+ # AccountResourceHistory records the state of a AccountResource at a given point in time,
1147
+ # where every change (create or delete) to a AccountResource produces an
1148
+ # AccountResourceHistory record.
1149
+ class AccountResourceHistory
1150
+ # The complete AccountResource state at this time.
1151
+ attr_accessor :account_resource
1152
+ # The unique identifier of the Activity that produced this change to the AccountResource.
1153
+ # May be empty for some system-initiated updates.
1154
+ attr_accessor :activity_id
1155
+ # If this AccountResource was deleted, the time it was deleted.
1156
+ attr_accessor :deleted_at
1157
+ # The time at which the AccountResource state was recorded.
1158
+ attr_accessor :timestamp
1159
+
1160
+ def initialize(
1161
+ account_resource: nil,
1162
+ activity_id: nil,
1163
+ deleted_at: nil,
1164
+ timestamp: nil
1165
+ )
1166
+ @account_resource = account_resource == nil ? nil : account_resource
1167
+ @activity_id = activity_id == nil ? "" : activity_id
1168
+ @deleted_at = deleted_at == nil ? nil : deleted_at
1169
+ @timestamp = timestamp == nil ? nil : timestamp
1170
+ end
1171
+
1172
+ def to_json(options = {})
1173
+ hash = {}
1174
+ self.instance_variables.each do |var|
1175
+ hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
1176
+ end
1177
+ hash.to_json
1178
+ end
1179
+ end
1180
+
1146
1181
  # AccountUpdateResponse returns the fields of a Account after it has been updated by
1147
1182
  # a AccountUpdateRequest.
1148
1183
  class AccountUpdateResponse
data/lib/strongdm.rb CHANGED
@@ -29,7 +29,7 @@ module SDM #:nodoc:
29
29
  DEFAULT_BASE_RETRY_DELAY = 0.0030 # 30 ms
30
30
  DEFAULT_MAX_RETRY_DELAY = 300 # 300 seconds
31
31
  API_VERSION = "2021-08-23"
32
- USER_AGENT = "strongdm-sdk-ruby/3.9.0"
32
+ USER_AGENT = "strongdm-sdk-ruby/3.10.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.
@@ -60,6 +60,7 @@ module SDM #:nodoc:
60
60
  @account_grants_history = AccountGrantsHistory.new(@channel, self)
61
61
  @account_permissions = AccountPermissions.new(@channel, self)
62
62
  @account_resources = AccountResources.new(@channel, self)
63
+ @account_resources_history = AccountResourcesHistory.new(@channel, self)
63
64
  @accounts = Accounts.new(@channel, self)
64
65
  @accounts_history = AccountsHistory.new(@channel, self)
65
66
  @activities = Activities.new(@channel, self)
@@ -197,6 +198,10 @@ module SDM #:nodoc:
197
198
  #
198
199
  # See {AccountResources}.
199
200
  attr_reader :account_resources
201
+ # AccountResourcesHistory records all changes to the state of a AccountResource.
202
+ #
203
+ # See {AccountResourcesHistory}.
204
+ attr_reader :account_resources_history
200
205
  # Accounts are users that have access to strongDM. There are two types of accounts:
201
206
  # 1. **Users:** humans who are authenticated through username and password or SSO.
202
207
  # 2. **Service Accounts:** machines that are authenticated using a service token.
@@ -311,6 +316,7 @@ module SDM #:nodoc:
311
316
  @account_grants_history = AccountGrantsHistory.new(@channel, self)
312
317
  @account_permissions = AccountPermissions.new(@channel, self)
313
318
  @account_resources = AccountResources.new(@channel, self)
319
+ @account_resources_history = AccountResourcesHistory.new(@channel, self)
314
320
  @accounts = Accounts.new(@channel, self)
315
321
  @accounts_history = AccountsHistory.new(@channel, self)
316
322
  @activities = Activities.new(@channel, self)
data/lib/svc.rb CHANGED
@@ -662,6 +662,62 @@ module SDM #:nodoc:
662
662
  end
663
663
  end
664
664
 
665
+ # AccountResourcesHistory records all changes to the state of a AccountResource.
666
+ #
667
+ # See {AccountResourceHistory}.
668
+ class AccountResourcesHistory
669
+ extend Gem::Deprecate
670
+
671
+ def initialize(channel, parent)
672
+ begin
673
+ @stub = V1::AccountResourcesHistory::Stub.new(nil, nil, channel_override: channel)
674
+ rescue => exception
675
+ raise Plumbing::convert_error_to_porcelain(exception)
676
+ end
677
+ @parent = parent
678
+ end
679
+
680
+ # List gets a list of AccountResourceHistory records matching a given set of criteria.
681
+ def list(
682
+ filter,
683
+ *args,
684
+ deadline: nil
685
+ )
686
+ req = V1::AccountResourceHistoryListRequest.new()
687
+ req.meta = V1::ListRequestMetadata.new()
688
+ page_size_option = @parent._test_options["PageSize"]
689
+ if page_size_option.is_a? Integer
690
+ req.meta.limit = page_size_option
691
+ end
692
+ if not @parent.snapshot_time.nil?
693
+ req.meta.snapshot_at = @parent.snapshot_time
694
+ end
695
+
696
+ req.filter = Plumbing::quote_filter_args(filter, *args)
697
+ resp = Enumerator::Generator.new { |g|
698
+ tries = 0
699
+ loop do
700
+ begin
701
+ plumbing_response = @stub.list(req, metadata: @parent.get_metadata("AccountResourcesHistory.List", req), deadline: deadline)
702
+ rescue => exception
703
+ if (@parent.shouldRetry(tries, exception))
704
+ tries + +@parent.jitterSleep(tries)
705
+ next
706
+ end
707
+ raise Plumbing::convert_error_to_porcelain(exception)
708
+ end
709
+ tries = 0
710
+ plumbing_response.history.each do |plumbing_item|
711
+ g.yield Plumbing::convert_account_resource_history_to_porcelain(plumbing_item)
712
+ end
713
+ break if plumbing_response.meta.next_cursor == ""
714
+ req.meta.cursor = plumbing_response.meta.next_cursor
715
+ end
716
+ }
717
+ resp
718
+ end
719
+ end
720
+
665
721
  # Accounts are users that have access to strongDM. There are two types of accounts:
666
722
  # 1. **Users:** humans who are authenticated through username and password or SSO.
667
723
  # 2. **Service Accounts:** machines that are authenticated using a service token.
data/lib/version CHANGED
@@ -13,5 +13,5 @@
13
13
  # limitations under the License.
14
14
  #
15
15
  module SDM
16
- VERSION = "3.9.0"
16
+ VERSION = "3.10.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 = "3.9.0"
16
+ VERSION = "3.10.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: 3.9.0
4
+ version: 3.10.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: 2023-03-23 00:00:00.000000000 Z
11
+ date: 2023-03-28 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-f2b15914b2f3a34011acabdc2fa8ca0c4058ef77.idx"
85
- - "./.git/objects/pack/pack-f2b15914b2f3a34011acabdc2fa8ca0c4058ef77.pack"
84
+ - "./.git/objects/pack/pack-08761cccef4a0569a780c538718e708686eef894.idx"
85
+ - "./.git/objects/pack/pack-08761cccef4a0569a780c538718e708686eef894.pack"
86
86
  - "./.git/packed-refs"
87
87
  - "./.git/refs/heads/master"
88
88
  - "./.git/refs/remotes/origin/HEAD"
@@ -102,6 +102,8 @@ files:
102
102
  - "./lib/grpc/account_grants_services_pb.rb"
103
103
  - "./lib/grpc/account_permissions_pb.rb"
104
104
  - "./lib/grpc/account_permissions_services_pb.rb"
105
+ - "./lib/grpc/account_resources_history_pb.rb"
106
+ - "./lib/grpc/account_resources_history_services_pb.rb"
105
107
  - "./lib/grpc/account_resources_pb.rb"
106
108
  - "./lib/grpc/account_resources_services_pb.rb"
107
109
  - "./lib/grpc/accounts_history_pb.rb"