strongdm 11.0.0 → 11.3.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-6790f49b23edc18f0d68571208b85814159331cb.idx → pack-4fa5defa19f863e8ef55e481a77d5fddb5483605.idx} +0 -0
- data/.git/objects/pack/{pack-6790f49b23edc18f0d68571208b85814159331cb.pack → pack-4fa5defa19f863e8ef55e481a77d5fddb5483605.pack} +0 -0
- data/.git/packed-refs +4 -2
- data/.git/refs/heads/master +1 -1
- data/lib/constants.rb +2 -0
- data/lib/grpc/drivers_pb.rb +7 -0
- data/lib/grpc/options_pb.rb +1 -0
- data/lib/grpc/plumbing.rb +274 -0
- data/lib/grpc/policies_history_pb.rb +49 -0
- data/lib/grpc/policies_history_services_pb.rb +37 -0
- data/lib/grpc/policies_pb.rb +91 -0
- data/lib/grpc/policies_services_pb.rb +46 -0
- data/lib/models/porcelain.rb +223 -2
- data/lib/strongdm.rb +20 -1
- data/lib/svc.rb +265 -0
- data/lib/version +1 -1
- data/lib/version.rb +1 -1
- metadata +8 -4
data/lib/svc.rb
CHANGED
@@ -3562,6 +3562,271 @@ module SDM #:nodoc:
|
|
3562
3562
|
end
|
3563
3563
|
end
|
3564
3564
|
|
3565
|
+
# Policies are the collection of one or more statements that enforce fine-grained access
|
3566
|
+
# control for the users of an organization.
|
3567
|
+
#
|
3568
|
+
# See {Policy}.
|
3569
|
+
class Policies
|
3570
|
+
extend Gem::Deprecate
|
3571
|
+
|
3572
|
+
def initialize(channel, parent)
|
3573
|
+
begin
|
3574
|
+
@stub = V1::Policies::Stub.new(nil, nil, channel_override: channel)
|
3575
|
+
rescue => exception
|
3576
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
3577
|
+
end
|
3578
|
+
@parent = parent
|
3579
|
+
end
|
3580
|
+
|
3581
|
+
# Create creates a new Policy.
|
3582
|
+
def create(
|
3583
|
+
policy,
|
3584
|
+
deadline: nil
|
3585
|
+
)
|
3586
|
+
req = V1::PolicyCreateRequest.new()
|
3587
|
+
|
3588
|
+
req.policy = Plumbing::convert_policy_to_plumbing(policy)
|
3589
|
+
tries = 0
|
3590
|
+
plumbing_response = nil
|
3591
|
+
loop do
|
3592
|
+
begin
|
3593
|
+
plumbing_response = @stub.create(req, metadata: @parent.get_metadata("Policies.Create", req), deadline: deadline)
|
3594
|
+
rescue => exception
|
3595
|
+
if (@parent.shouldRetry(tries, exception))
|
3596
|
+
tries + +@parent.jitterSleep(tries)
|
3597
|
+
next
|
3598
|
+
end
|
3599
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
3600
|
+
end
|
3601
|
+
break
|
3602
|
+
end
|
3603
|
+
|
3604
|
+
resp = PolicyCreateResponse.new()
|
3605
|
+
resp.policy = Plumbing::convert_policy_to_porcelain(plumbing_response.policy)
|
3606
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
3607
|
+
resp
|
3608
|
+
end
|
3609
|
+
|
3610
|
+
# Delete removes a Policy by ID.
|
3611
|
+
def delete(
|
3612
|
+
id,
|
3613
|
+
deadline: nil
|
3614
|
+
)
|
3615
|
+
req = V1::PolicyDeleteRequest.new()
|
3616
|
+
|
3617
|
+
req.id = (id)
|
3618
|
+
tries = 0
|
3619
|
+
plumbing_response = nil
|
3620
|
+
loop do
|
3621
|
+
begin
|
3622
|
+
plumbing_response = @stub.delete(req, metadata: @parent.get_metadata("Policies.Delete", req), deadline: deadline)
|
3623
|
+
rescue => exception
|
3624
|
+
if (@parent.shouldRetry(tries, exception))
|
3625
|
+
tries + +@parent.jitterSleep(tries)
|
3626
|
+
next
|
3627
|
+
end
|
3628
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
3629
|
+
end
|
3630
|
+
break
|
3631
|
+
end
|
3632
|
+
|
3633
|
+
resp = PolicyDeleteResponse.new()
|
3634
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
3635
|
+
resp
|
3636
|
+
end
|
3637
|
+
|
3638
|
+
# Update replaces all the fields of a Policy by ID.
|
3639
|
+
def update(
|
3640
|
+
policy,
|
3641
|
+
deadline: nil
|
3642
|
+
)
|
3643
|
+
req = V1::PolicyUpdateRequest.new()
|
3644
|
+
|
3645
|
+
req.policy = Plumbing::convert_policy_to_plumbing(policy)
|
3646
|
+
tries = 0
|
3647
|
+
plumbing_response = nil
|
3648
|
+
loop do
|
3649
|
+
begin
|
3650
|
+
plumbing_response = @stub.update(req, metadata: @parent.get_metadata("Policies.Update", req), deadline: deadline)
|
3651
|
+
rescue => exception
|
3652
|
+
if (@parent.shouldRetry(tries, exception))
|
3653
|
+
tries + +@parent.jitterSleep(tries)
|
3654
|
+
next
|
3655
|
+
end
|
3656
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
3657
|
+
end
|
3658
|
+
break
|
3659
|
+
end
|
3660
|
+
|
3661
|
+
resp = PolicyUpdateResponse.new()
|
3662
|
+
resp.policy = Plumbing::convert_policy_to_porcelain(plumbing_response.policy)
|
3663
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
3664
|
+
resp
|
3665
|
+
end
|
3666
|
+
|
3667
|
+
# Get reads one Policy by ID.
|
3668
|
+
def get(
|
3669
|
+
id,
|
3670
|
+
deadline: nil
|
3671
|
+
)
|
3672
|
+
req = V1::PolicyGetRequest.new()
|
3673
|
+
if not @parent.snapshot_time.nil?
|
3674
|
+
req.meta = V1::GetRequestMetadata.new()
|
3675
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
3676
|
+
end
|
3677
|
+
|
3678
|
+
req.id = (id)
|
3679
|
+
tries = 0
|
3680
|
+
plumbing_response = nil
|
3681
|
+
loop do
|
3682
|
+
begin
|
3683
|
+
plumbing_response = @stub.get(req, metadata: @parent.get_metadata("Policies.Get", req), deadline: deadline)
|
3684
|
+
rescue => exception
|
3685
|
+
if (@parent.shouldRetry(tries, exception))
|
3686
|
+
tries + +@parent.jitterSleep(tries)
|
3687
|
+
next
|
3688
|
+
end
|
3689
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
3690
|
+
end
|
3691
|
+
break
|
3692
|
+
end
|
3693
|
+
|
3694
|
+
resp = PolicyGetResponse.new()
|
3695
|
+
resp.meta = Plumbing::convert_get_response_metadata_to_porcelain(plumbing_response.meta)
|
3696
|
+
resp.policy = Plumbing::convert_policy_to_porcelain(plumbing_response.policy)
|
3697
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
3698
|
+
resp
|
3699
|
+
end
|
3700
|
+
|
3701
|
+
# List gets a list of Policy matching a given set of criteria
|
3702
|
+
def list(
|
3703
|
+
filter,
|
3704
|
+
*args,
|
3705
|
+
deadline: nil
|
3706
|
+
)
|
3707
|
+
req = V1::PolicyListRequest.new()
|
3708
|
+
req.meta = V1::ListRequestMetadata.new()
|
3709
|
+
if @parent.page_limit > 0
|
3710
|
+
req.meta.limit = @parent.page_limit
|
3711
|
+
end
|
3712
|
+
if not @parent.snapshot_time.nil?
|
3713
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
3714
|
+
end
|
3715
|
+
|
3716
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
3717
|
+
resp = Enumerator::Generator.new { |g|
|
3718
|
+
tries = 0
|
3719
|
+
loop do
|
3720
|
+
begin
|
3721
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("Policies.List", req), deadline: deadline)
|
3722
|
+
rescue => exception
|
3723
|
+
if (@parent.shouldRetry(tries, exception))
|
3724
|
+
tries + +@parent.jitterSleep(tries)
|
3725
|
+
next
|
3726
|
+
end
|
3727
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
3728
|
+
end
|
3729
|
+
tries = 0
|
3730
|
+
plumbing_response.policies.each do |plumbing_item|
|
3731
|
+
g.yield Plumbing::convert_policy_to_porcelain(plumbing_item)
|
3732
|
+
end
|
3733
|
+
break if plumbing_response.meta.next_cursor == ""
|
3734
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
3735
|
+
end
|
3736
|
+
}
|
3737
|
+
resp
|
3738
|
+
end
|
3739
|
+
end
|
3740
|
+
|
3741
|
+
# SnapshotPolicies exposes the read only methods of the Policies
|
3742
|
+
# service for historical queries.
|
3743
|
+
class SnapshotPolicies
|
3744
|
+
extend Gem::Deprecate
|
3745
|
+
|
3746
|
+
def initialize(policies)
|
3747
|
+
@policies = policies
|
3748
|
+
end
|
3749
|
+
|
3750
|
+
# Get reads one Policy by ID.
|
3751
|
+
def get(
|
3752
|
+
id,
|
3753
|
+
deadline: nil
|
3754
|
+
)
|
3755
|
+
return @policies.get(
|
3756
|
+
id,
|
3757
|
+
deadline: deadline,
|
3758
|
+
)
|
3759
|
+
end
|
3760
|
+
|
3761
|
+
# List gets a list of Policy matching a given set of criteria
|
3762
|
+
def list(
|
3763
|
+
filter,
|
3764
|
+
*args,
|
3765
|
+
deadline: nil
|
3766
|
+
)
|
3767
|
+
return @policies.list(
|
3768
|
+
filter,
|
3769
|
+
*args,
|
3770
|
+
deadline: deadline,
|
3771
|
+
)
|
3772
|
+
end
|
3773
|
+
end
|
3774
|
+
|
3775
|
+
# PoliciesHistory records all changes to the state of a Policy.
|
3776
|
+
#
|
3777
|
+
# See {PolicyHistory}.
|
3778
|
+
class PoliciesHistory
|
3779
|
+
extend Gem::Deprecate
|
3780
|
+
|
3781
|
+
def initialize(channel, parent)
|
3782
|
+
begin
|
3783
|
+
@stub = V1::PoliciesHistory::Stub.new(nil, nil, channel_override: channel)
|
3784
|
+
rescue => exception
|
3785
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
3786
|
+
end
|
3787
|
+
@parent = parent
|
3788
|
+
end
|
3789
|
+
|
3790
|
+
# List gets a list of PolicyHistory records matching a given set of criteria.
|
3791
|
+
def list(
|
3792
|
+
filter,
|
3793
|
+
*args,
|
3794
|
+
deadline: nil
|
3795
|
+
)
|
3796
|
+
req = V1::PoliciesHistoryListRequest.new()
|
3797
|
+
req.meta = V1::ListRequestMetadata.new()
|
3798
|
+
if @parent.page_limit > 0
|
3799
|
+
req.meta.limit = @parent.page_limit
|
3800
|
+
end
|
3801
|
+
if not @parent.snapshot_time.nil?
|
3802
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
3803
|
+
end
|
3804
|
+
|
3805
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
3806
|
+
resp = Enumerator::Generator.new { |g|
|
3807
|
+
tries = 0
|
3808
|
+
loop do
|
3809
|
+
begin
|
3810
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("PoliciesHistory.List", req), deadline: deadline)
|
3811
|
+
rescue => exception
|
3812
|
+
if (@parent.shouldRetry(tries, exception))
|
3813
|
+
tries + +@parent.jitterSleep(tries)
|
3814
|
+
next
|
3815
|
+
end
|
3816
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
3817
|
+
end
|
3818
|
+
tries = 0
|
3819
|
+
plumbing_response.history.each do |plumbing_item|
|
3820
|
+
g.yield Plumbing::convert_policy_history_to_porcelain(plumbing_item)
|
3821
|
+
end
|
3822
|
+
break if plumbing_response.meta.next_cursor == ""
|
3823
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
3824
|
+
end
|
3825
|
+
}
|
3826
|
+
resp
|
3827
|
+
end
|
3828
|
+
end
|
3829
|
+
|
3565
3830
|
# A Query is a record of a single client request to a resource, such as a SQL query.
|
3566
3831
|
# Long-running SSH, RDP, or Kubernetes interactive sessions also count as queries.
|
3567
3832
|
# The Queries service is read-only.
|
data/lib/version
CHANGED
data/lib/version.rb
CHANGED
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: 11.
|
4
|
+
version: 11.3.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-
|
11
|
+
date: 2024-08-01 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-
|
85
|
-
- "./.git/objects/pack/pack-
|
84
|
+
- "./.git/objects/pack/pack-4fa5defa19f863e8ef55e481a77d5fddb5483605.idx"
|
85
|
+
- "./.git/objects/pack/pack-4fa5defa19f863e8ef55e481a77d5fddb5483605.pack"
|
86
86
|
- "./.git/packed-refs"
|
87
87
|
- "./.git/refs/heads/master"
|
88
88
|
- "./.git/refs/remotes/origin/HEAD"
|
@@ -157,6 +157,10 @@ files:
|
|
157
157
|
- "./lib/grpc/peering_groups_pb.rb"
|
158
158
|
- "./lib/grpc/peering_groups_services_pb.rb"
|
159
159
|
- "./lib/grpc/plumbing.rb"
|
160
|
+
- "./lib/grpc/policies_history_pb.rb"
|
161
|
+
- "./lib/grpc/policies_history_services_pb.rb"
|
162
|
+
- "./lib/grpc/policies_pb.rb"
|
163
|
+
- "./lib/grpc/policies_services_pb.rb"
|
160
164
|
- "./lib/grpc/queries_pb.rb"
|
161
165
|
- "./lib/grpc/queries_services_pb.rb"
|
162
166
|
- "./lib/grpc/remote_identities_history_pb.rb"
|