strongdm 11.1.0 → 11.4.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-57a29e2eeaf9b2b29ab736009db030419fd4f522.idx → pack-8070d15eb9eff64a015a392f4b638f3b46afbfb8.idx} +0 -0
- data/.git/objects/pack/{pack-57a29e2eeaf9b2b29ab736009db030419fd4f522.pack → pack-8070d15eb9eff64a015a392f4b638f3b46afbfb8.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 -0
- 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
@@ -0,0 +1,91 @@
|
|
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: policies.proto
|
17
|
+
|
18
|
+
require "google/protobuf"
|
19
|
+
|
20
|
+
require "options_pb"
|
21
|
+
require "spec_pb"
|
22
|
+
|
23
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
24
|
+
add_file("policies.proto", :syntax => :proto3) do
|
25
|
+
add_message "v1.PolicyCreateRequest" do
|
26
|
+
optional :meta, :message, 1, "v1.CreateRequestMetadata"
|
27
|
+
optional :policy, :message, 2, "v1.Policy"
|
28
|
+
end
|
29
|
+
add_message "v1.PolicyCreateResponse" do
|
30
|
+
optional :meta, :message, 1, "v1.CreateResponseMetadata"
|
31
|
+
optional :policy, :message, 2, "v1.Policy"
|
32
|
+
optional :rate_limit, :message, 3, "v1.RateLimitMetadata"
|
33
|
+
end
|
34
|
+
add_message "v1.PolicyUpdateRequest" do
|
35
|
+
optional :meta, :message, 1, "v1.UpdateRequestMetadata"
|
36
|
+
optional :id, :string, 2
|
37
|
+
optional :policy, :message, 3, "v1.Policy"
|
38
|
+
end
|
39
|
+
add_message "v1.PolicyUpdateResponse" do
|
40
|
+
optional :meta, :message, 1, "v1.UpdateResponseMetadata"
|
41
|
+
optional :policy, :message, 2, "v1.Policy"
|
42
|
+
optional :rate_limit, :message, 3, "v1.RateLimitMetadata"
|
43
|
+
end
|
44
|
+
add_message "v1.PolicyDeleteRequest" do
|
45
|
+
optional :meta, :message, 1, "v1.DeleteRequestMetadata"
|
46
|
+
optional :id, :string, 2
|
47
|
+
end
|
48
|
+
add_message "v1.PolicyDeleteResponse" do
|
49
|
+
optional :meta, :message, 1, "v1.DeleteResponseMetadata"
|
50
|
+
optional :rate_limit, :message, 2, "v1.RateLimitMetadata"
|
51
|
+
end
|
52
|
+
add_message "v1.PolicyGetRequest" do
|
53
|
+
optional :meta, :message, 1, "v1.GetRequestMetadata"
|
54
|
+
optional :id, :string, 2
|
55
|
+
end
|
56
|
+
add_message "v1.PolicyGetResponse" do
|
57
|
+
optional :meta, :message, 1, "v1.GetResponseMetadata"
|
58
|
+
optional :policy, :message, 2, "v1.Policy"
|
59
|
+
optional :rate_limit, :message, 3, "v1.RateLimitMetadata"
|
60
|
+
end
|
61
|
+
add_message "v1.PolicyListRequest" do
|
62
|
+
optional :meta, :message, 1, "v1.ListRequestMetadata"
|
63
|
+
optional :filter, :string, 2
|
64
|
+
end
|
65
|
+
add_message "v1.PolicyListResponse" do
|
66
|
+
optional :meta, :message, 1, "v1.ListResponseMetadata"
|
67
|
+
repeated :policies, :message, 2, "v1.Policy"
|
68
|
+
optional :rate_limit, :message, 3, "v1.RateLimitMetadata"
|
69
|
+
end
|
70
|
+
add_message "v1.Policy" do
|
71
|
+
optional :id, :string, 1
|
72
|
+
optional :name, :string, 2
|
73
|
+
optional :description, :string, 3
|
74
|
+
optional :policy, :string, 4
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
module V1
|
80
|
+
PolicyCreateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.PolicyCreateRequest").msgclass
|
81
|
+
PolicyCreateResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.PolicyCreateResponse").msgclass
|
82
|
+
PolicyUpdateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.PolicyUpdateRequest").msgclass
|
83
|
+
PolicyUpdateResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.PolicyUpdateResponse").msgclass
|
84
|
+
PolicyDeleteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.PolicyDeleteRequest").msgclass
|
85
|
+
PolicyDeleteResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.PolicyDeleteResponse").msgclass
|
86
|
+
PolicyGetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.PolicyGetRequest").msgclass
|
87
|
+
PolicyGetResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.PolicyGetResponse").msgclass
|
88
|
+
PolicyListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.PolicyListRequest").msgclass
|
89
|
+
PolicyListResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.PolicyListResponse").msgclass
|
90
|
+
Policy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.Policy").msgclass
|
91
|
+
end
|
@@ -0,0 +1,46 @@
|
|
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: policies.proto for package 'v1'
|
17
|
+
|
18
|
+
require "grpc"
|
19
|
+
require "policies_pb"
|
20
|
+
|
21
|
+
module V1
|
22
|
+
module Policies
|
23
|
+
# Policies are the collection of one or more statements that enforce fine-grained access
|
24
|
+
# control for the users of an organization.
|
25
|
+
class Service
|
26
|
+
include ::GRPC::GenericService
|
27
|
+
|
28
|
+
self.marshal_class_method = :encode
|
29
|
+
self.unmarshal_class_method = :decode
|
30
|
+
self.service_name = "v1.Policies"
|
31
|
+
|
32
|
+
# Create creates a new Policy.
|
33
|
+
rpc :Create, ::V1::PolicyCreateRequest, ::V1::PolicyCreateResponse
|
34
|
+
# Delete removes a Policy by ID.
|
35
|
+
rpc :Delete, ::V1::PolicyDeleteRequest, ::V1::PolicyDeleteResponse
|
36
|
+
# Update replaces all the fields of a Policy by ID.
|
37
|
+
rpc :Update, ::V1::PolicyUpdateRequest, ::V1::PolicyUpdateResponse
|
38
|
+
# Get reads one Policy by ID.
|
39
|
+
rpc :Get, ::V1::PolicyGetRequest, ::V1::PolicyGetResponse
|
40
|
+
# List gets a list of Policy matching a given set of criteria
|
41
|
+
rpc :List, ::V1::PolicyListRequest, ::V1::PolicyListResponse
|
42
|
+
end
|
43
|
+
|
44
|
+
Stub = Service.rpc_stub_class
|
45
|
+
end
|
46
|
+
end
|
data/lib/models/porcelain.rb
CHANGED
@@ -17,6 +17,9 @@
|
|
17
17
|
|
18
18
|
module SDM
|
19
19
|
class AKS
|
20
|
+
# If true, allows users to fallback to the existing authentication mode (Leased Credential or Identity Set)
|
21
|
+
# when a resource role is not provided.
|
22
|
+
attr_accessor :allow_resource_role_bypass
|
20
23
|
# 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.
|
21
24
|
attr_accessor :bind_interface
|
22
25
|
# The CA to authenticate TLS connections with.
|
@@ -58,6 +61,7 @@ module SDM
|
|
58
61
|
attr_accessor :tags
|
59
62
|
|
60
63
|
def initialize(
|
64
|
+
allow_resource_role_bypass: nil,
|
61
65
|
bind_interface: nil,
|
62
66
|
certificate_authority: nil,
|
63
67
|
client_certificate: nil,
|
@@ -78,6 +82,7 @@ module SDM
|
|
78
82
|
subdomain: nil,
|
79
83
|
tags: nil
|
80
84
|
)
|
85
|
+
@allow_resource_role_bypass = allow_resource_role_bypass == nil ? false : allow_resource_role_bypass
|
81
86
|
@bind_interface = bind_interface == nil ? "" : bind_interface
|
82
87
|
@certificate_authority = certificate_authority == nil ? "" : certificate_authority
|
83
88
|
@client_certificate = client_certificate == nil ? "" : client_certificate
|
@@ -108,6 +113,7 @@ module SDM
|
|
108
113
|
end
|
109
114
|
end
|
110
115
|
|
116
|
+
# AKSBasicAuth is currently unstable, and its API may change, or it may be removed, without a major version bump.
|
111
117
|
class AKSBasicAuth
|
112
118
|
# 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.
|
113
119
|
attr_accessor :bind_interface
|
@@ -180,6 +186,9 @@ module SDM
|
|
180
186
|
end
|
181
187
|
|
182
188
|
class AKSServiceAccount
|
189
|
+
# If true, allows users to fallback to the existing authentication mode (Leased Credential or Identity Set)
|
190
|
+
# when a resource role is not provided.
|
191
|
+
attr_accessor :allow_resource_role_bypass
|
183
192
|
# 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.
|
184
193
|
attr_accessor :bind_interface
|
185
194
|
# If true, configures discovery of a cluster to be run from a node.
|
@@ -217,6 +226,7 @@ module SDM
|
|
217
226
|
attr_accessor :token
|
218
227
|
|
219
228
|
def initialize(
|
229
|
+
allow_resource_role_bypass: nil,
|
220
230
|
bind_interface: nil,
|
221
231
|
discovery_enabled: nil,
|
222
232
|
discovery_username: nil,
|
@@ -235,6 +245,7 @@ module SDM
|
|
235
245
|
tags: nil,
|
236
246
|
token: nil
|
237
247
|
)
|
248
|
+
@allow_resource_role_bypass = allow_resource_role_bypass == nil ? false : allow_resource_role_bypass
|
238
249
|
@bind_interface = bind_interface == nil ? "" : bind_interface
|
239
250
|
@discovery_enabled = discovery_enabled == nil ? false : discovery_enabled
|
240
251
|
@discovery_username = discovery_username == nil ? "" : discovery_username
|
@@ -1717,6 +1728,9 @@ module SDM
|
|
1717
1728
|
class AmazonEKS
|
1718
1729
|
# The Access Key ID to use to authenticate.
|
1719
1730
|
attr_accessor :access_key
|
1731
|
+
# If true, allows users to fallback to the existing authentication mode (Leased Credential or Identity Set)
|
1732
|
+
# when a resource role is not provided.
|
1733
|
+
attr_accessor :allow_resource_role_bypass
|
1720
1734
|
# 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.
|
1721
1735
|
attr_accessor :bind_interface
|
1722
1736
|
# The CA to authenticate TLS connections with.
|
@@ -1763,6 +1777,7 @@ module SDM
|
|
1763
1777
|
|
1764
1778
|
def initialize(
|
1765
1779
|
access_key: nil,
|
1780
|
+
allow_resource_role_bypass: nil,
|
1766
1781
|
bind_interface: nil,
|
1767
1782
|
certificate_authority: nil,
|
1768
1783
|
cluster_name: nil,
|
@@ -1786,6 +1801,7 @@ module SDM
|
|
1786
1801
|
tags: nil
|
1787
1802
|
)
|
1788
1803
|
@access_key = access_key == nil ? "" : access_key
|
1804
|
+
@allow_resource_role_bypass = allow_resource_role_bypass == nil ? false : allow_resource_role_bypass
|
1789
1805
|
@bind_interface = bind_interface == nil ? "" : bind_interface
|
1790
1806
|
@certificate_authority = certificate_authority == nil ? "" : certificate_authority
|
1791
1807
|
@cluster_name = cluster_name == nil ? "" : cluster_name
|
@@ -1819,6 +1835,9 @@ module SDM
|
|
1819
1835
|
end
|
1820
1836
|
|
1821
1837
|
class AmazonEKSInstanceProfile
|
1838
|
+
# If true, allows users to fallback to the existing authentication mode (Leased Credential or Identity Set)
|
1839
|
+
# when a resource role is not provided.
|
1840
|
+
attr_accessor :allow_resource_role_bypass
|
1822
1841
|
# 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.
|
1823
1842
|
attr_accessor :bind_interface
|
1824
1843
|
# The CA to authenticate TLS connections with.
|
@@ -1862,6 +1881,7 @@ module SDM
|
|
1862
1881
|
attr_accessor :tags
|
1863
1882
|
|
1864
1883
|
def initialize(
|
1884
|
+
allow_resource_role_bypass: nil,
|
1865
1885
|
bind_interface: nil,
|
1866
1886
|
certificate_authority: nil,
|
1867
1887
|
cluster_name: nil,
|
@@ -1883,6 +1903,7 @@ module SDM
|
|
1883
1903
|
subdomain: nil,
|
1884
1904
|
tags: nil
|
1885
1905
|
)
|
1906
|
+
@allow_resource_role_bypass = allow_resource_role_bypass == nil ? false : allow_resource_role_bypass
|
1886
1907
|
@bind_interface = bind_interface == nil ? "" : bind_interface
|
1887
1908
|
@certificate_authority = certificate_authority == nil ? "" : certificate_authority
|
1888
1909
|
@cluster_name = cluster_name == nil ? "" : cluster_name
|
@@ -4851,6 +4872,9 @@ module SDM
|
|
4851
4872
|
end
|
4852
4873
|
|
4853
4874
|
class GoogleGKE
|
4875
|
+
# If true, allows users to fallback to the existing authentication mode (Leased Credential or Identity Set)
|
4876
|
+
# when a resource role is not provided.
|
4877
|
+
attr_accessor :allow_resource_role_bypass
|
4854
4878
|
# 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.
|
4855
4879
|
attr_accessor :bind_interface
|
4856
4880
|
# The CA to authenticate TLS connections with.
|
@@ -4888,6 +4912,7 @@ module SDM
|
|
4888
4912
|
attr_accessor :tags
|
4889
4913
|
|
4890
4914
|
def initialize(
|
4915
|
+
allow_resource_role_bypass: nil,
|
4891
4916
|
bind_interface: nil,
|
4892
4917
|
certificate_authority: nil,
|
4893
4918
|
discovery_enabled: nil,
|
@@ -4906,6 +4931,7 @@ module SDM
|
|
4906
4931
|
subdomain: nil,
|
4907
4932
|
tags: nil
|
4908
4933
|
)
|
4934
|
+
@allow_resource_role_bypass = allow_resource_role_bypass == nil ? false : allow_resource_role_bypass
|
4909
4935
|
@bind_interface = bind_interface == nil ? "" : bind_interface
|
4910
4936
|
@certificate_authority = certificate_authority == nil ? "" : certificate_authority
|
4911
4937
|
@discovery_enabled = discovery_enabled == nil ? false : discovery_enabled
|
@@ -5774,6 +5800,9 @@ module SDM
|
|
5774
5800
|
end
|
5775
5801
|
|
5776
5802
|
class Kubernetes
|
5803
|
+
# If true, allows users to fallback to the existing authentication mode (Leased Credential or Identity Set)
|
5804
|
+
# when a resource role is not provided.
|
5805
|
+
attr_accessor :allow_resource_role_bypass
|
5777
5806
|
# 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.
|
5778
5807
|
attr_accessor :bind_interface
|
5779
5808
|
# The CA to authenticate TLS connections with.
|
@@ -5815,6 +5844,7 @@ module SDM
|
|
5815
5844
|
attr_accessor :tags
|
5816
5845
|
|
5817
5846
|
def initialize(
|
5847
|
+
allow_resource_role_bypass: nil,
|
5818
5848
|
bind_interface: nil,
|
5819
5849
|
certificate_authority: nil,
|
5820
5850
|
client_certificate: nil,
|
@@ -5835,6 +5865,7 @@ module SDM
|
|
5835
5865
|
subdomain: nil,
|
5836
5866
|
tags: nil
|
5837
5867
|
)
|
5868
|
+
@allow_resource_role_bypass = allow_resource_role_bypass == nil ? false : allow_resource_role_bypass
|
5838
5869
|
@bind_interface = bind_interface == nil ? "" : bind_interface
|
5839
5870
|
@certificate_authority = certificate_authority == nil ? "" : certificate_authority
|
5840
5871
|
@client_certificate = client_certificate == nil ? "" : client_certificate
|
@@ -5865,6 +5896,7 @@ module SDM
|
|
5865
5896
|
end
|
5866
5897
|
end
|
5867
5898
|
|
5899
|
+
# KubernetesBasicAuth is currently unstable, and its API may change, or it may be removed, without a major version bump.
|
5868
5900
|
class KubernetesBasicAuth
|
5869
5901
|
# 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.
|
5870
5902
|
attr_accessor :bind_interface
|
@@ -5937,6 +5969,9 @@ module SDM
|
|
5937
5969
|
end
|
5938
5970
|
|
5939
5971
|
class KubernetesServiceAccount
|
5972
|
+
# If true, allows users to fallback to the existing authentication mode (Leased Credential or Identity Set)
|
5973
|
+
# when a resource role is not provided.
|
5974
|
+
attr_accessor :allow_resource_role_bypass
|
5940
5975
|
# 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.
|
5941
5976
|
attr_accessor :bind_interface
|
5942
5977
|
# If true, configures discovery of a cluster to be run from a node.
|
@@ -5974,6 +6009,7 @@ module SDM
|
|
5974
6009
|
attr_accessor :token
|
5975
6010
|
|
5976
6011
|
def initialize(
|
6012
|
+
allow_resource_role_bypass: nil,
|
5977
6013
|
bind_interface: nil,
|
5978
6014
|
discovery_enabled: nil,
|
5979
6015
|
discovery_username: nil,
|
@@ -5992,6 +6028,7 @@ module SDM
|
|
5992
6028
|
tags: nil,
|
5993
6029
|
token: nil
|
5994
6030
|
)
|
6031
|
+
@allow_resource_role_bypass = allow_resource_role_bypass == nil ? false : allow_resource_role_bypass
|
5995
6032
|
@bind_interface = bind_interface == nil ? "" : bind_interface
|
5996
6033
|
@discovery_enabled = discovery_enabled == nil ? false : discovery_enabled
|
5997
6034
|
@discovery_username = discovery_username == nil ? "" : discovery_username
|
@@ -8010,6 +8047,192 @@ module SDM
|
|
8010
8047
|
end
|
8011
8048
|
end
|
8012
8049
|
|
8050
|
+
# Policy is a collection of one or more statements that enforce fine-grained access control
|
8051
|
+
# for the users of an organization.
|
8052
|
+
class Policy
|
8053
|
+
# Optional description of the Policy.
|
8054
|
+
attr_accessor :description
|
8055
|
+
# Unique identifier of the Policy.
|
8056
|
+
attr_accessor :id
|
8057
|
+
# Unique human-readable name of the Policy.
|
8058
|
+
attr_accessor :name
|
8059
|
+
# The content of the Policy, in Cedar policy language.
|
8060
|
+
attr_accessor :policy
|
8061
|
+
|
8062
|
+
def initialize(
|
8063
|
+
description: nil,
|
8064
|
+
id: nil,
|
8065
|
+
name: nil,
|
8066
|
+
policy: nil
|
8067
|
+
)
|
8068
|
+
@description = description == nil ? "" : description
|
8069
|
+
@id = id == nil ? "" : id
|
8070
|
+
@name = name == nil ? "" : name
|
8071
|
+
@policy = policy == nil ? "" : policy
|
8072
|
+
end
|
8073
|
+
|
8074
|
+
def to_json(options = {})
|
8075
|
+
hash = {}
|
8076
|
+
self.instance_variables.each do |var|
|
8077
|
+
hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
|
8078
|
+
end
|
8079
|
+
hash.to_json
|
8080
|
+
end
|
8081
|
+
end
|
8082
|
+
|
8083
|
+
# PolicyCreateResponse reports how the Policy was created in the system.
|
8084
|
+
class PolicyCreateResponse
|
8085
|
+
# The created Policy.
|
8086
|
+
attr_accessor :policy
|
8087
|
+
# Rate limit information.
|
8088
|
+
attr_accessor :rate_limit
|
8089
|
+
|
8090
|
+
def initialize(
|
8091
|
+
policy: nil,
|
8092
|
+
rate_limit: nil
|
8093
|
+
)
|
8094
|
+
@policy = policy == nil ? nil : policy
|
8095
|
+
@rate_limit = rate_limit == nil ? nil : rate_limit
|
8096
|
+
end
|
8097
|
+
|
8098
|
+
def to_json(options = {})
|
8099
|
+
hash = {}
|
8100
|
+
self.instance_variables.each do |var|
|
8101
|
+
hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
|
8102
|
+
end
|
8103
|
+
hash.to_json
|
8104
|
+
end
|
8105
|
+
end
|
8106
|
+
|
8107
|
+
# PolicyDeleteResponse returns information about a Policy that was deleted.
|
8108
|
+
class PolicyDeleteResponse
|
8109
|
+
# Rate limit information.
|
8110
|
+
attr_accessor :rate_limit
|
8111
|
+
|
8112
|
+
def initialize(
|
8113
|
+
rate_limit: nil
|
8114
|
+
)
|
8115
|
+
@rate_limit = rate_limit == nil ? nil : rate_limit
|
8116
|
+
end
|
8117
|
+
|
8118
|
+
def to_json(options = {})
|
8119
|
+
hash = {}
|
8120
|
+
self.instance_variables.each do |var|
|
8121
|
+
hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
|
8122
|
+
end
|
8123
|
+
hash.to_json
|
8124
|
+
end
|
8125
|
+
end
|
8126
|
+
|
8127
|
+
# PolicyGetResponse returns a requested Policy.
|
8128
|
+
class PolicyGetResponse
|
8129
|
+
# Reserved for future use.
|
8130
|
+
attr_accessor :meta
|
8131
|
+
# The requested Policy.
|
8132
|
+
attr_accessor :policy
|
8133
|
+
# Rate limit information.
|
8134
|
+
attr_accessor :rate_limit
|
8135
|
+
|
8136
|
+
def initialize(
|
8137
|
+
meta: nil,
|
8138
|
+
policy: nil,
|
8139
|
+
rate_limit: nil
|
8140
|
+
)
|
8141
|
+
@meta = meta == nil ? nil : meta
|
8142
|
+
@policy = policy == nil ? nil : policy
|
8143
|
+
@rate_limit = rate_limit == nil ? nil : rate_limit
|
8144
|
+
end
|
8145
|
+
|
8146
|
+
def to_json(options = {})
|
8147
|
+
hash = {}
|
8148
|
+
self.instance_variables.each do |var|
|
8149
|
+
hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
|
8150
|
+
end
|
8151
|
+
hash.to_json
|
8152
|
+
end
|
8153
|
+
end
|
8154
|
+
|
8155
|
+
# PolicyHistory records the state of a Policy at a given point in time,
|
8156
|
+
# where every change (create, update and delete) to a Policy produces a
|
8157
|
+
# PolicyHistory record.
|
8158
|
+
class PolicyHistory
|
8159
|
+
# The unique identifier of the Activity that produced this change to the Policy.
|
8160
|
+
# May be empty for some system-initiated updates.
|
8161
|
+
attr_accessor :activity_id
|
8162
|
+
# If this Policy was deleted, the time it was deleted.
|
8163
|
+
attr_accessor :deleted_at
|
8164
|
+
# The complete Policy state at this time.
|
8165
|
+
attr_accessor :policy
|
8166
|
+
# The time at which the Policy state was recorded.
|
8167
|
+
attr_accessor :timestamp
|
8168
|
+
|
8169
|
+
def initialize(
|
8170
|
+
activity_id: nil,
|
8171
|
+
deleted_at: nil,
|
8172
|
+
policy: nil,
|
8173
|
+
timestamp: nil
|
8174
|
+
)
|
8175
|
+
@activity_id = activity_id == nil ? "" : activity_id
|
8176
|
+
@deleted_at = deleted_at == nil ? nil : deleted_at
|
8177
|
+
@policy = policy == nil ? nil : policy
|
8178
|
+
@timestamp = timestamp == nil ? nil : timestamp
|
8179
|
+
end
|
8180
|
+
|
8181
|
+
def to_json(options = {})
|
8182
|
+
hash = {}
|
8183
|
+
self.instance_variables.each do |var|
|
8184
|
+
hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
|
8185
|
+
end
|
8186
|
+
hash.to_json
|
8187
|
+
end
|
8188
|
+
end
|
8189
|
+
|
8190
|
+
# PolicyListResponse returns a list of Policy records that meet
|
8191
|
+
# the criteria of a PolicyListRequest.
|
8192
|
+
class PolicyListResponse
|
8193
|
+
# Rate limit information.
|
8194
|
+
attr_accessor :rate_limit
|
8195
|
+
|
8196
|
+
def initialize(
|
8197
|
+
rate_limit: nil
|
8198
|
+
)
|
8199
|
+
@rate_limit = rate_limit == nil ? nil : rate_limit
|
8200
|
+
end
|
8201
|
+
|
8202
|
+
def to_json(options = {})
|
8203
|
+
hash = {}
|
8204
|
+
self.instance_variables.each do |var|
|
8205
|
+
hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
|
8206
|
+
end
|
8207
|
+
hash.to_json
|
8208
|
+
end
|
8209
|
+
end
|
8210
|
+
|
8211
|
+
# PolicyUpdateResponse returns the fields of a Policy after it has been updated by
|
8212
|
+
# a PolicyUpdateRequest.
|
8213
|
+
class PolicyUpdateResponse
|
8214
|
+
# The updated Policy.
|
8215
|
+
attr_accessor :policy
|
8216
|
+
# Rate limit information.
|
8217
|
+
attr_accessor :rate_limit
|
8218
|
+
|
8219
|
+
def initialize(
|
8220
|
+
policy: nil,
|
8221
|
+
rate_limit: nil
|
8222
|
+
)
|
8223
|
+
@policy = policy == nil ? nil : policy
|
8224
|
+
@rate_limit = rate_limit == nil ? nil : rate_limit
|
8225
|
+
end
|
8226
|
+
|
8227
|
+
def to_json(options = {})
|
8228
|
+
hash = {}
|
8229
|
+
self.instance_variables.each do |var|
|
8230
|
+
hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
|
8231
|
+
end
|
8232
|
+
hash.to_json
|
8233
|
+
end
|
8234
|
+
end
|
8235
|
+
|
8013
8236
|
class Postgres
|
8014
8237
|
# 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.
|
8015
8238
|
attr_accessor :bind_interface
|
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 = "2024-03-28"
|
32
|
-
USER_AGENT = "strongdm-sdk-ruby/11.
|
32
|
+
USER_AGENT = "strongdm-sdk-ruby/11.4.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.
|
@@ -86,6 +86,8 @@ module SDM #:nodoc:
|
|
86
86
|
@peering_group_peers = PeeringGroupPeers.new(@channel, self)
|
87
87
|
@peering_group_resources = PeeringGroupResources.new(@channel, self)
|
88
88
|
@peering_groups = PeeringGroups.new(@channel, self)
|
89
|
+
@policies = Policies.new(@channel, self)
|
90
|
+
@policies_history = PoliciesHistory.new(@channel, self)
|
89
91
|
@queries = Queries.new(@channel, self)
|
90
92
|
@remote_identities = RemoteIdentities.new(@channel, self)
|
91
93
|
@remote_identities_history = RemoteIdentitiesHistory.new(@channel, self)
|
@@ -335,6 +337,15 @@ module SDM #:nodoc:
|
|
335
337
|
#
|
336
338
|
# See {PeeringGroups}.
|
337
339
|
attr_reader :peering_groups
|
340
|
+
# Policies are the collection of one or more statements that enforce fine-grained access
|
341
|
+
# control for the users of an organization.
|
342
|
+
#
|
343
|
+
# See {Policies}.
|
344
|
+
attr_reader :policies
|
345
|
+
# PoliciesHistory records all changes to the state of a Policy.
|
346
|
+
#
|
347
|
+
# See {PoliciesHistory}.
|
348
|
+
attr_reader :policies_history
|
338
349
|
# A Query is a record of a single client request to a resource, such as a SQL query.
|
339
350
|
# Long-running SSH, RDP, or Kubernetes interactive sessions also count as queries.
|
340
351
|
# The Queries service is read-only.
|
@@ -478,6 +489,8 @@ module SDM #:nodoc:
|
|
478
489
|
@peering_group_peers = PeeringGroupPeers.new(@channel, self)
|
479
490
|
@peering_group_resources = PeeringGroupResources.new(@channel, self)
|
480
491
|
@peering_groups = PeeringGroups.new(@channel, self)
|
492
|
+
@policies = Policies.new(@channel, self)
|
493
|
+
@policies_history = PoliciesHistory.new(@channel, self)
|
481
494
|
@queries = Queries.new(@channel, self)
|
482
495
|
@remote_identities = RemoteIdentities.new(@channel, self)
|
483
496
|
@remote_identities_history = RemoteIdentitiesHistory.new(@channel, self)
|
@@ -519,6 +532,7 @@ module SDM #:nodoc:
|
|
519
532
|
@identity_aliases = SnapshotIdentityAliases.new(client.identity_aliases)
|
520
533
|
@identity_sets = SnapshotIdentitySets.new(client.identity_sets)
|
521
534
|
@nodes = SnapshotNodes.new(client.nodes)
|
535
|
+
@policies = SnapshotPolicies.new(client.policies)
|
522
536
|
@remote_identities = SnapshotRemoteIdentities.new(client.remote_identities)
|
523
537
|
@remote_identity_groups = SnapshotRemoteIdentityGroups.new(client.remote_identity_groups)
|
524
538
|
@resources = SnapshotResources.new(client.resources)
|
@@ -589,6 +603,11 @@ module SDM #:nodoc:
|
|
589
603
|
#
|
590
604
|
# See {SnapshotNodes}.
|
591
605
|
attr_reader :nodes
|
606
|
+
# Policies are the collection of one or more statements that enforce fine-grained access
|
607
|
+
# control for the users of an organization.
|
608
|
+
#
|
609
|
+
# See {SnapshotPolicies}.
|
610
|
+
attr_reader :policies
|
592
611
|
# RemoteIdentities assign a resource directly to an account, giving the account the permission to connect to that resource.
|
593
612
|
#
|
594
613
|
# See {SnapshotRemoteIdentities}.
|