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.
@@ -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
@@ -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
@@ -180,6 +185,9 @@ module SDM
180
185
  end
181
186
 
182
187
  class AKSServiceAccount
188
+ # If true, allows users to fallback to the existing authentication mode (Leased Credential or Identity Set)
189
+ # when a resource role is not provided.
190
+ attr_accessor :allow_resource_role_bypass
183
191
  # 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
192
  attr_accessor :bind_interface
185
193
  # If true, configures discovery of a cluster to be run from a node.
@@ -217,6 +225,7 @@ module SDM
217
225
  attr_accessor :token
218
226
 
219
227
  def initialize(
228
+ allow_resource_role_bypass: nil,
220
229
  bind_interface: nil,
221
230
  discovery_enabled: nil,
222
231
  discovery_username: nil,
@@ -235,6 +244,7 @@ module SDM
235
244
  tags: nil,
236
245
  token: nil
237
246
  )
247
+ @allow_resource_role_bypass = allow_resource_role_bypass == nil ? false : allow_resource_role_bypass
238
248
  @bind_interface = bind_interface == nil ? "" : bind_interface
239
249
  @discovery_enabled = discovery_enabled == nil ? false : discovery_enabled
240
250
  @discovery_username = discovery_username == nil ? "" : discovery_username
@@ -1717,6 +1727,9 @@ module SDM
1717
1727
  class AmazonEKS
1718
1728
  # The Access Key ID to use to authenticate.
1719
1729
  attr_accessor :access_key
1730
+ # If true, allows users to fallback to the existing authentication mode (Leased Credential or Identity Set)
1731
+ # when a resource role is not provided.
1732
+ attr_accessor :allow_resource_role_bypass
1720
1733
  # 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
1734
  attr_accessor :bind_interface
1722
1735
  # The CA to authenticate TLS connections with.
@@ -1763,6 +1776,7 @@ module SDM
1763
1776
 
1764
1777
  def initialize(
1765
1778
  access_key: nil,
1779
+ allow_resource_role_bypass: nil,
1766
1780
  bind_interface: nil,
1767
1781
  certificate_authority: nil,
1768
1782
  cluster_name: nil,
@@ -1786,6 +1800,7 @@ module SDM
1786
1800
  tags: nil
1787
1801
  )
1788
1802
  @access_key = access_key == nil ? "" : access_key
1803
+ @allow_resource_role_bypass = allow_resource_role_bypass == nil ? false : allow_resource_role_bypass
1789
1804
  @bind_interface = bind_interface == nil ? "" : bind_interface
1790
1805
  @certificate_authority = certificate_authority == nil ? "" : certificate_authority
1791
1806
  @cluster_name = cluster_name == nil ? "" : cluster_name
@@ -1819,6 +1834,9 @@ module SDM
1819
1834
  end
1820
1835
 
1821
1836
  class AmazonEKSInstanceProfile
1837
+ # If true, allows users to fallback to the existing authentication mode (Leased Credential or Identity Set)
1838
+ # when a resource role is not provided.
1839
+ attr_accessor :allow_resource_role_bypass
1822
1840
  # 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
1841
  attr_accessor :bind_interface
1824
1842
  # The CA to authenticate TLS connections with.
@@ -1862,6 +1880,7 @@ module SDM
1862
1880
  attr_accessor :tags
1863
1881
 
1864
1882
  def initialize(
1883
+ allow_resource_role_bypass: nil,
1865
1884
  bind_interface: nil,
1866
1885
  certificate_authority: nil,
1867
1886
  cluster_name: nil,
@@ -1883,6 +1902,7 @@ module SDM
1883
1902
  subdomain: nil,
1884
1903
  tags: nil
1885
1904
  )
1905
+ @allow_resource_role_bypass = allow_resource_role_bypass == nil ? false : allow_resource_role_bypass
1886
1906
  @bind_interface = bind_interface == nil ? "" : bind_interface
1887
1907
  @certificate_authority = certificate_authority == nil ? "" : certificate_authority
1888
1908
  @cluster_name = cluster_name == nil ? "" : cluster_name
@@ -4851,6 +4871,9 @@ module SDM
4851
4871
  end
4852
4872
 
4853
4873
  class GoogleGKE
4874
+ # If true, allows users to fallback to the existing authentication mode (Leased Credential or Identity Set)
4875
+ # when a resource role is not provided.
4876
+ attr_accessor :allow_resource_role_bypass
4854
4877
  # 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
4878
  attr_accessor :bind_interface
4856
4879
  # The CA to authenticate TLS connections with.
@@ -4888,6 +4911,7 @@ module SDM
4888
4911
  attr_accessor :tags
4889
4912
 
4890
4913
  def initialize(
4914
+ allow_resource_role_bypass: nil,
4891
4915
  bind_interface: nil,
4892
4916
  certificate_authority: nil,
4893
4917
  discovery_enabled: nil,
@@ -4906,6 +4930,7 @@ module SDM
4906
4930
  subdomain: nil,
4907
4931
  tags: nil
4908
4932
  )
4933
+ @allow_resource_role_bypass = allow_resource_role_bypass == nil ? false : allow_resource_role_bypass
4909
4934
  @bind_interface = bind_interface == nil ? "" : bind_interface
4910
4935
  @certificate_authority = certificate_authority == nil ? "" : certificate_authority
4911
4936
  @discovery_enabled = discovery_enabled == nil ? false : discovery_enabled
@@ -5774,6 +5799,9 @@ module SDM
5774
5799
  end
5775
5800
 
5776
5801
  class Kubernetes
5802
+ # If true, allows users to fallback to the existing authentication mode (Leased Credential or Identity Set)
5803
+ # when a resource role is not provided.
5804
+ attr_accessor :allow_resource_role_bypass
5777
5805
  # 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
5806
  attr_accessor :bind_interface
5779
5807
  # The CA to authenticate TLS connections with.
@@ -5815,6 +5843,7 @@ module SDM
5815
5843
  attr_accessor :tags
5816
5844
 
5817
5845
  def initialize(
5846
+ allow_resource_role_bypass: nil,
5818
5847
  bind_interface: nil,
5819
5848
  certificate_authority: nil,
5820
5849
  client_certificate: nil,
@@ -5835,6 +5864,7 @@ module SDM
5835
5864
  subdomain: nil,
5836
5865
  tags: nil
5837
5866
  )
5867
+ @allow_resource_role_bypass = allow_resource_role_bypass == nil ? false : allow_resource_role_bypass
5838
5868
  @bind_interface = bind_interface == nil ? "" : bind_interface
5839
5869
  @certificate_authority = certificate_authority == nil ? "" : certificate_authority
5840
5870
  @client_certificate = client_certificate == nil ? "" : client_certificate
@@ -5937,6 +5967,9 @@ module SDM
5937
5967
  end
5938
5968
 
5939
5969
  class KubernetesServiceAccount
5970
+ # If true, allows users to fallback to the existing authentication mode (Leased Credential or Identity Set)
5971
+ # when a resource role is not provided.
5972
+ attr_accessor :allow_resource_role_bypass
5940
5973
  # 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
5974
  attr_accessor :bind_interface
5942
5975
  # If true, configures discovery of a cluster to be run from a node.
@@ -5974,6 +6007,7 @@ module SDM
5974
6007
  attr_accessor :token
5975
6008
 
5976
6009
  def initialize(
6010
+ allow_resource_role_bypass: nil,
5977
6011
  bind_interface: nil,
5978
6012
  discovery_enabled: nil,
5979
6013
  discovery_username: nil,
@@ -5992,6 +6026,7 @@ module SDM
5992
6026
  tags: nil,
5993
6027
  token: nil
5994
6028
  )
6029
+ @allow_resource_role_bypass = allow_resource_role_bypass == nil ? false : allow_resource_role_bypass
5995
6030
  @bind_interface = bind_interface == nil ? "" : bind_interface
5996
6031
  @discovery_enabled = discovery_enabled == nil ? false : discovery_enabled
5997
6032
  @discovery_username = discovery_username == nil ? "" : discovery_username
@@ -6566,7 +6601,6 @@ module SDM
6566
6601
  end
6567
6602
  end
6568
6603
 
6569
- # MongoHost is currently unstable, and its API may change, or it may be removed, without a major version bump.
6570
6604
  class MongoHost
6571
6605
  # The authentication database to use.
6572
6606
  attr_accessor :auth_database
@@ -6642,6 +6676,7 @@ module SDM
6642
6676
  end
6643
6677
  end
6644
6678
 
6679
+ # MongoLegacyHost is currently unstable, and its API may change, or it may be removed, without a major version bump.
6645
6680
  class MongoLegacyHost
6646
6681
  # The authentication database to use.
6647
6682
  attr_accessor :auth_database
@@ -6717,6 +6752,7 @@ module SDM
6717
6752
  end
6718
6753
  end
6719
6754
 
6755
+ # MongoLegacyReplicaset is currently unstable, and its API may change, or it may be removed, without a major version bump.
6720
6756
  class MongoLegacyReplicaset
6721
6757
  # The authentication database to use.
6722
6758
  attr_accessor :auth_database
@@ -6800,7 +6836,6 @@ module SDM
6800
6836
  end
6801
6837
  end
6802
6838
 
6803
- # MongoReplicaSet is currently unstable, and its API may change, or it may be removed, without a major version bump.
6804
6839
  class MongoReplicaSet
6805
6840
  # The authentication database to use.
6806
6841
  attr_accessor :auth_database
@@ -8010,6 +8045,192 @@ module SDM
8010
8045
  end
8011
8046
  end
8012
8047
 
8048
+ # Policy is a collection of one or more statements that enforce fine-grained access control
8049
+ # for the users of an organization.
8050
+ class Policy
8051
+ # Optional description of the Policy.
8052
+ attr_accessor :description
8053
+ # Unique identifier of the Policy.
8054
+ attr_accessor :id
8055
+ # Unique human-readable name of the Policy.
8056
+ attr_accessor :name
8057
+ # The content of the Policy, in Cedar policy language.
8058
+ attr_accessor :policy
8059
+
8060
+ def initialize(
8061
+ description: nil,
8062
+ id: nil,
8063
+ name: nil,
8064
+ policy: nil
8065
+ )
8066
+ @description = description == nil ? "" : description
8067
+ @id = id == nil ? "" : id
8068
+ @name = name == nil ? "" : name
8069
+ @policy = policy == nil ? "" : policy
8070
+ end
8071
+
8072
+ def to_json(options = {})
8073
+ hash = {}
8074
+ self.instance_variables.each do |var|
8075
+ hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
8076
+ end
8077
+ hash.to_json
8078
+ end
8079
+ end
8080
+
8081
+ # PolicyCreateResponse reports how the Policy was created in the system.
8082
+ class PolicyCreateResponse
8083
+ # The created Policy.
8084
+ attr_accessor :policy
8085
+ # Rate limit information.
8086
+ attr_accessor :rate_limit
8087
+
8088
+ def initialize(
8089
+ policy: nil,
8090
+ rate_limit: nil
8091
+ )
8092
+ @policy = policy == nil ? nil : policy
8093
+ @rate_limit = rate_limit == nil ? nil : rate_limit
8094
+ end
8095
+
8096
+ def to_json(options = {})
8097
+ hash = {}
8098
+ self.instance_variables.each do |var|
8099
+ hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
8100
+ end
8101
+ hash.to_json
8102
+ end
8103
+ end
8104
+
8105
+ # PolicyDeleteResponse returns information about a Policy that was deleted.
8106
+ class PolicyDeleteResponse
8107
+ # Rate limit information.
8108
+ attr_accessor :rate_limit
8109
+
8110
+ def initialize(
8111
+ rate_limit: nil
8112
+ )
8113
+ @rate_limit = rate_limit == nil ? nil : rate_limit
8114
+ end
8115
+
8116
+ def to_json(options = {})
8117
+ hash = {}
8118
+ self.instance_variables.each do |var|
8119
+ hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
8120
+ end
8121
+ hash.to_json
8122
+ end
8123
+ end
8124
+
8125
+ # PolicyGetResponse returns a requested Policy.
8126
+ class PolicyGetResponse
8127
+ # Reserved for future use.
8128
+ attr_accessor :meta
8129
+ # The requested Policy.
8130
+ attr_accessor :policy
8131
+ # Rate limit information.
8132
+ attr_accessor :rate_limit
8133
+
8134
+ def initialize(
8135
+ meta: nil,
8136
+ policy: nil,
8137
+ rate_limit: nil
8138
+ )
8139
+ @meta = meta == nil ? nil : meta
8140
+ @policy = policy == nil ? nil : policy
8141
+ @rate_limit = rate_limit == nil ? nil : rate_limit
8142
+ end
8143
+
8144
+ def to_json(options = {})
8145
+ hash = {}
8146
+ self.instance_variables.each do |var|
8147
+ hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
8148
+ end
8149
+ hash.to_json
8150
+ end
8151
+ end
8152
+
8153
+ # PolicyHistory records the state of a Policy at a given point in time,
8154
+ # where every change (create, update and delete) to a Policy produces a
8155
+ # PolicyHistory record.
8156
+ class PolicyHistory
8157
+ # The unique identifier of the Activity that produced this change to the Policy.
8158
+ # May be empty for some system-initiated updates.
8159
+ attr_accessor :activity_id
8160
+ # If this Policy was deleted, the time it was deleted.
8161
+ attr_accessor :deleted_at
8162
+ # The complete Policy state at this time.
8163
+ attr_accessor :policy
8164
+ # The time at which the Policy state was recorded.
8165
+ attr_accessor :timestamp
8166
+
8167
+ def initialize(
8168
+ activity_id: nil,
8169
+ deleted_at: nil,
8170
+ policy: nil,
8171
+ timestamp: nil
8172
+ )
8173
+ @activity_id = activity_id == nil ? "" : activity_id
8174
+ @deleted_at = deleted_at == nil ? nil : deleted_at
8175
+ @policy = policy == nil ? nil : policy
8176
+ @timestamp = timestamp == nil ? nil : timestamp
8177
+ end
8178
+
8179
+ def to_json(options = {})
8180
+ hash = {}
8181
+ self.instance_variables.each do |var|
8182
+ hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
8183
+ end
8184
+ hash.to_json
8185
+ end
8186
+ end
8187
+
8188
+ # PolicyListResponse returns a list of Policy records that meet
8189
+ # the criteria of a PolicyListRequest.
8190
+ class PolicyListResponse
8191
+ # Rate limit information.
8192
+ attr_accessor :rate_limit
8193
+
8194
+ def initialize(
8195
+ rate_limit: nil
8196
+ )
8197
+ @rate_limit = rate_limit == nil ? nil : rate_limit
8198
+ end
8199
+
8200
+ def to_json(options = {})
8201
+ hash = {}
8202
+ self.instance_variables.each do |var|
8203
+ hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
8204
+ end
8205
+ hash.to_json
8206
+ end
8207
+ end
8208
+
8209
+ # PolicyUpdateResponse returns the fields of a Policy after it has been updated by
8210
+ # a PolicyUpdateRequest.
8211
+ class PolicyUpdateResponse
8212
+ # The updated Policy.
8213
+ attr_accessor :policy
8214
+ # Rate limit information.
8215
+ attr_accessor :rate_limit
8216
+
8217
+ def initialize(
8218
+ policy: nil,
8219
+ rate_limit: nil
8220
+ )
8221
+ @policy = policy == nil ? nil : policy
8222
+ @rate_limit = rate_limit == nil ? nil : rate_limit
8223
+ end
8224
+
8225
+ def to_json(options = {})
8226
+ hash = {}
8227
+ self.instance_variables.each do |var|
8228
+ hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
8229
+ end
8230
+ hash.to_json
8231
+ end
8232
+ end
8233
+
8013
8234
  class Postgres
8014
8235
  # 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
8236
  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.0.0"
32
+ USER_AGENT = "strongdm-sdk-ruby/11.3.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}.