strongdm 4.6.1 → 4.8.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 +4 -4
- data/.git/ORIG_HEAD +1 -1
- data/.git/index +0 -0
- data/.git/logs/HEAD +3 -3
- data/.git/logs/refs/heads/master +2 -2
- data/.git/logs/refs/remotes/origin/HEAD +1 -1
- data/.git/objects/pack/{pack-b9ca351a44eccec0b526c388786b2cd01d119b6e.idx → pack-b1dfafcd7b8c6b715aaf6a4fee0c32ac367fdfef.idx} +0 -0
- data/.git/objects/pack/{pack-b9ca351a44eccec0b526c388786b2cd01d119b6e.pack → pack-b1dfafcd7b8c6b715aaf6a4fee0c32ac367fdfef.pack} +0 -0
- data/.git/packed-refs +4 -2
- data/.git/refs/heads/master +1 -1
- data/lib/grpc/plumbing.rb +796 -83
- data/lib/grpc/workflow_approvers_history_pb.rb +1 -1
- data/lib/grpc/workflow_approvers_pb.rb +77 -0
- data/lib/grpc/workflow_approvers_services_pb.rb +43 -0
- data/lib/grpc/workflow_assignments_history_pb.rb +1 -1
- data/lib/grpc/workflow_assignments_pb.rb +44 -0
- data/lib/grpc/workflow_assignments_services_pb.rb +38 -0
- data/lib/grpc/workflow_roles_history_pb.rb +1 -1
- data/lib/grpc/workflow_roles_pb.rb +77 -0
- data/lib/grpc/workflow_roles_services_pb.rb +44 -0
- data/lib/grpc/workflows_pb.rb +44 -15
- data/lib/grpc/workflows_services_pb.rb +9 -1
- data/lib/models/porcelain.rb +480 -44
- data/lib/strongdm.rb +49 -13
- data/lib/svc.rb +669 -137
- data/lib/version +1 -1
- data/lib/version.rb +1 -1
- metadata +10 -4
data/lib/strongdm.rb
CHANGED
@@ -29,11 +29,11 @@ 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/4.
|
32
|
+
USER_AGENT = "strongdm-sdk-ruby/4.8.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.
|
36
|
-
def initialize(api_access_key, api_secret_key, host: "api.strongdm.com:443", insecure: false, retry_rate_limit_errors: true)
|
36
|
+
def initialize(api_access_key, api_secret_key, host: "api.strongdm.com:443", insecure: false, retry_rate_limit_errors: true, page_limit: 50)
|
37
37
|
raise TypeError, "client access key must be a string" unless api_access_key.kind_of?(String)
|
38
38
|
raise TypeError, "client secret key must be a string" unless api_secret_key.kind_of?(String)
|
39
39
|
raise TypeError, "client host must be a string" unless host.kind_of?(String)
|
@@ -42,6 +42,7 @@ module SDM #:nodoc:
|
|
42
42
|
@max_retries = DEFAULT_MAX_RETRIES
|
43
43
|
@base_retry_delay = DEFAULT_BASE_RETRY_DELAY
|
44
44
|
@max_retry_delay = DEFAULT_MAX_RETRY_DELAY
|
45
|
+
@page_limit = page_limit
|
45
46
|
@expose_rate_limit_errors = (not retry_rate_limit_errors)
|
46
47
|
@snapshot_time = nil
|
47
48
|
begin
|
@@ -89,12 +90,14 @@ module SDM #:nodoc:
|
|
89
90
|
@roles_history = RolesHistory.new(@channel, self)
|
90
91
|
@secret_stores = SecretStores.new(@channel, self)
|
91
92
|
@secret_stores_history = SecretStoresHistory.new(@channel, self)
|
92
|
-
@
|
93
|
+
@workflow_approvers = WorkflowApprovers.new(@channel, self)
|
93
94
|
@workflow_approvers_history = WorkflowApproversHistory.new(@channel, self)
|
95
|
+
@workflow_assignments = WorkflowAssignments.new(@channel, self)
|
94
96
|
@workflow_assignments_history = WorkflowAssignmentsHistory.new(@channel, self)
|
97
|
+
@workflow_roles = WorkflowRoles.new(@channel, self)
|
95
98
|
@workflow_roles_history = WorkflowRolesHistory.new(@channel, self)
|
99
|
+
@workflows = Workflows.new(@channel, self)
|
96
100
|
@workflows_history = WorkflowsHistory.new(@channel, self)
|
97
|
-
@_test_options = Hash.new
|
98
101
|
end
|
99
102
|
|
100
103
|
# Closes this client and releases all resources held by it.
|
@@ -179,6 +182,7 @@ module SDM #:nodoc:
|
|
179
182
|
attr_reader :max_retries
|
180
183
|
attr_reader :base_retry_delay
|
181
184
|
attr_reader :max_retry_delay
|
185
|
+
attr_accessor :page_limit
|
182
186
|
|
183
187
|
# API authentication token (read-only).
|
184
188
|
attr_reader :api_access_key
|
@@ -340,30 +344,42 @@ module SDM #:nodoc:
|
|
340
344
|
#
|
341
345
|
# See {SecretStoresHistory}.
|
342
346
|
attr_reader :secret_stores_history
|
343
|
-
#
|
344
|
-
# the users that can request that access, and the mechanism for approving those requests which can either
|
345
|
-
# but automatic approval or a set of users authorized to approve the requests.
|
347
|
+
# WorkflowApprovers is an account with the ability to approve requests bound to a workflow.
|
346
348
|
#
|
347
|
-
# See {
|
348
|
-
attr_reader :
|
349
|
+
# See {WorkflowApprovers}.
|
350
|
+
attr_reader :workflow_approvers
|
349
351
|
# WorkflowApproversHistory provides records of all changes to the state of a WorkflowApprover.
|
350
352
|
#
|
351
353
|
# See {WorkflowApproversHistory}.
|
352
354
|
attr_reader :workflow_approvers_history
|
355
|
+
# WorkflowAssignments links a Resource to a Workflow. The assigned resources are those that a user can request
|
356
|
+
# access to via the workflow.
|
357
|
+
#
|
358
|
+
# See {WorkflowAssignments}.
|
359
|
+
attr_reader :workflow_assignments
|
353
360
|
# WorkflowAssignmentsHistory provides records of all changes to the state of a WorkflowAssignment.
|
354
361
|
#
|
355
362
|
# See {WorkflowAssignmentsHistory}.
|
356
363
|
attr_reader :workflow_assignments_history
|
364
|
+
# WorkflowRole links a role to a workflow. The linked roles indicate which roles a user must be a part of
|
365
|
+
# to request access to a resource via the workflow.
|
366
|
+
#
|
367
|
+
# See {WorkflowRoles}.
|
368
|
+
attr_reader :workflow_roles
|
357
369
|
# WorkflowRolesHistory provides records of all changes to the state of a WorkflowRole
|
358
370
|
#
|
359
371
|
# See {WorkflowRolesHistory}.
|
360
372
|
attr_reader :workflow_roles_history
|
373
|
+
# Workflows are the collection of rules that define the resources to which access can be requested,
|
374
|
+
# the users that can request that access, and the mechanism for approving those requests which can either
|
375
|
+
# be automatic approval or a set of users authorized to approve the requests.
|
376
|
+
#
|
377
|
+
# See {Workflows}.
|
378
|
+
attr_reader :workflows
|
361
379
|
# WorkflowsHistory provides records of all changes to the state of a Workflow.
|
362
380
|
#
|
363
381
|
# See {WorkflowsHistory}.
|
364
382
|
attr_reader :workflows_history
|
365
|
-
# @private
|
366
|
-
attr_reader :_test_options
|
367
383
|
|
368
384
|
protected
|
369
385
|
|
@@ -407,10 +423,13 @@ module SDM #:nodoc:
|
|
407
423
|
@roles_history = RolesHistory.new(@channel, self)
|
408
424
|
@secret_stores = SecretStores.new(@channel, self)
|
409
425
|
@secret_stores_history = SecretStoresHistory.new(@channel, self)
|
410
|
-
@
|
426
|
+
@workflow_approvers = WorkflowApprovers.new(@channel, self)
|
411
427
|
@workflow_approvers_history = WorkflowApproversHistory.new(@channel, self)
|
428
|
+
@workflow_assignments = WorkflowAssignments.new(@channel, self)
|
412
429
|
@workflow_assignments_history = WorkflowAssignmentsHistory.new(@channel, self)
|
430
|
+
@workflow_roles = WorkflowRoles.new(@channel, self)
|
413
431
|
@workflow_roles_history = WorkflowRolesHistory.new(@channel, self)
|
432
|
+
@workflows = Workflows.new(@channel, self)
|
414
433
|
@workflows_history = WorkflowsHistory.new(@channel, self)
|
415
434
|
end
|
416
435
|
end
|
@@ -435,6 +454,9 @@ module SDM #:nodoc:
|
|
435
454
|
@role_resources = SnapshotRoleResources.new(client.role_resources)
|
436
455
|
@roles = SnapshotRoles.new(client.roles)
|
437
456
|
@secret_stores = SnapshotSecretStores.new(client.secret_stores)
|
457
|
+
@workflow_approvers = SnapshotWorkflowApprovers.new(client.workflow_approvers)
|
458
|
+
@workflow_assignments = SnapshotWorkflowAssignments.new(client.workflow_assignments)
|
459
|
+
@workflow_roles = SnapshotWorkflowRoles.new(client.workflow_roles)
|
438
460
|
@workflows = SnapshotWorkflows.new(client.workflows)
|
439
461
|
end
|
440
462
|
|
@@ -517,9 +539,23 @@ module SDM #:nodoc:
|
|
517
539
|
#
|
518
540
|
# See {SnapshotSecretStores}.
|
519
541
|
attr_reader :secret_stores
|
542
|
+
# WorkflowApprovers is an account with the ability to approve requests bound to a workflow.
|
543
|
+
#
|
544
|
+
# See {SnapshotWorkflowApprovers}.
|
545
|
+
attr_reader :workflow_approvers
|
546
|
+
# WorkflowAssignments links a Resource to a Workflow. The assigned resources are those that a user can request
|
547
|
+
# access to via the workflow.
|
548
|
+
#
|
549
|
+
# See {SnapshotWorkflowAssignments}.
|
550
|
+
attr_reader :workflow_assignments
|
551
|
+
# WorkflowRole links a role to a workflow. The linked roles indicate which roles a user must be a part of
|
552
|
+
# to request access to a resource via the workflow.
|
553
|
+
#
|
554
|
+
# See {SnapshotWorkflowRoles}.
|
555
|
+
attr_reader :workflow_roles
|
520
556
|
# Workflows are the collection of rules that define the resources to which access can be requested,
|
521
557
|
# the users that can request that access, and the mechanism for approving those requests which can either
|
522
|
-
#
|
558
|
+
# be automatic approval or a set of users authorized to approve the requests.
|
523
559
|
#
|
524
560
|
# See {SnapshotWorkflows}.
|
525
561
|
attr_reader :workflows
|