strongdm 1.0.2 → 1.0.3
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/doc/LICENSE.html +6 -5
- data/doc/Object.html +16 -16
- data/doc/README_md.html +6 -5
- data/doc/SDM/AKS.html +27 -6
- data/doc/SDM/AKSBasicAuth.html +27 -6
- data/doc/SDM/AKSServiceAccount.html +27 -6
- data/doc/SDM/AccountAttachment.html +6 -3
- data/doc/SDM/AccountAttachmentCreateOptions.html +6 -3
- data/doc/SDM/AccountAttachmentCreateResponse.html +6 -3
- data/doc/SDM/AccountAttachmentDeleteResponse.html +6 -3
- data/doc/SDM/AccountAttachmentGetResponse.html +6 -3
- data/doc/SDM/AccountAttachments.html +24 -21
- data/doc/SDM/AccountCreateResponse.html +6 -3
- data/doc/SDM/AccountDeleteResponse.html +6 -3
- data/doc/SDM/AccountGetResponse.html +6 -3
- data/doc/SDM/AccountGrant.html +6 -3
- data/doc/SDM/AccountGrantCreateResponse.html +6 -3
- data/doc/SDM/AccountGrantDeleteResponse.html +6 -3
- data/doc/SDM/AccountGrantGetResponse.html +6 -3
- data/doc/SDM/AccountGrants.html +24 -21
- data/doc/SDM/AccountUpdateResponse.html +6 -3
- data/doc/SDM/Accounts.html +29 -26
- data/doc/SDM/AlreadyExistsError.html +6 -3
- data/doc/SDM/AmazonEKS.html +27 -6
- data/doc/SDM/AmazonES.html +27 -6
- data/doc/SDM/Athena.html +27 -6
- data/doc/SDM/AuroraMysql.html +27 -6
- data/doc/SDM/AuroraPostgres.html +27 -6
- data/doc/SDM/AuthenticationError.html +6 -3
- data/doc/SDM/BadRequestError.html +6 -3
- data/doc/SDM/BigQuery.html +27 -6
- data/doc/SDM/Cassandra.html +27 -6
- data/doc/SDM/Client.html +7 -4
- data/doc/SDM/Clustrix.html +27 -6
- data/doc/SDM/Cockroach.html +27 -6
- data/doc/SDM/CreateResponseMetadata.html +6 -3
- data/doc/SDM/DeadlineExceededError.html +6 -3
- data/doc/SDM/DeleteResponseMetadata.html +6 -3
- data/doc/SDM/Druid.html +27 -6
- data/doc/SDM/DynamoDB.html +27 -6
- data/doc/SDM/Elastic.html +27 -6
- data/doc/SDM/ElasticacheRedis.html +27 -6
- data/doc/SDM/Gateway.html +8 -5
- data/doc/SDM/GetResponseMetadata.html +6 -3
- data/doc/SDM/GoogleGKE.html +27 -6
- data/doc/SDM/Greenplum.html +27 -6
- data/doc/SDM/HTTPAuth.html +27 -6
- data/doc/SDM/HTTPBasicAuth.html +27 -6
- data/doc/SDM/HTTPNoAuth.html +27 -6
- data/doc/SDM/InternalError.html +6 -3
- data/doc/SDM/Kubernetes.html +27 -6
- data/doc/SDM/KubernetesBasicAuth.html +27 -6
- data/doc/SDM/KubernetesServiceAccount.html +27 -6
- data/doc/SDM/Maria.html +27 -6
- data/doc/SDM/Memcached.html +27 -6
- data/doc/SDM/Memsql.html +27 -6
- data/doc/SDM/MongoHost.html +27 -6
- data/doc/SDM/MongoLegacyHost.html +27 -6
- data/doc/SDM/MongoLegacyReplicaset.html +27 -6
- data/doc/SDM/MongoReplicaSet.html +27 -6
- data/doc/SDM/Mysql.html +27 -6
- data/doc/SDM/NodeCreateResponse.html +8 -5
- data/doc/SDM/NodeDeleteResponse.html +8 -5
- data/doc/SDM/NodeGetResponse.html +8 -5
- data/doc/SDM/NodeUpdateResponse.html +8 -5
- data/doc/SDM/Nodes.html +29 -26
- data/doc/SDM/NotFoundError.html +6 -3
- data/doc/SDM/Oracle.html +27 -6
- data/doc/SDM/PermissionError.html +6 -3
- data/doc/SDM/Plumbing.html +3701 -3523
- data/doc/SDM/Postgres.html +27 -6
- data/doc/SDM/Presto.html +27 -6
- data/doc/SDM/RDP.html +27 -6
- data/doc/SDM/RPCError.html +6 -3
- data/doc/SDM/RateLimitError.html +6 -3
- data/doc/SDM/RateLimitMetadata.html +6 -3
- data/doc/SDM/Redis.html +27 -6
- data/doc/SDM/Redshift.html +27 -6
- data/doc/SDM/Relay.html +8 -5
- data/doc/SDM/ResourceCreateResponse.html +8 -5
- data/doc/SDM/ResourceDeleteResponse.html +8 -5
- data/doc/SDM/ResourceGetResponse.html +8 -5
- data/doc/SDM/ResourceUpdateResponse.html +8 -5
- data/doc/SDM/Resources.html +28 -25
- data/doc/SDM/Role.html +8 -5
- data/doc/SDM/RoleAttachment.html +8 -5
- data/doc/SDM/RoleAttachmentCreateResponse.html +8 -5
- data/doc/SDM/RoleAttachmentDeleteResponse.html +8 -5
- data/doc/SDM/RoleAttachmentGetResponse.html +8 -5
- data/doc/SDM/RoleAttachments.html +23 -20
- data/doc/SDM/RoleCreateResponse.html +8 -5
- data/doc/SDM/RoleDeleteResponse.html +8 -5
- data/doc/SDM/RoleGetResponse.html +8 -5
- data/doc/SDM/RoleGrant.html +8 -5
- data/doc/SDM/RoleGrantCreateResponse.html +8 -5
- data/doc/SDM/RoleGrantDeleteResponse.html +8 -5
- data/doc/SDM/RoleGrantGetResponse.html +8 -5
- data/doc/SDM/RoleGrants.html +23 -20
- data/doc/SDM/RoleUpdateResponse.html +8 -5
- data/doc/SDM/Roles.html +28 -25
- data/doc/SDM/SQLServer.html +27 -6
- data/doc/SDM/SSH.html +27 -6
- data/doc/SDM/Service.html +6 -3
- data/doc/SDM/Snowflake.html +27 -6
- data/doc/SDM/Sybase.html +27 -6
- data/doc/SDM/SybaseIQ.html +27 -6
- data/doc/SDM/Teradata.html +27 -6
- data/doc/SDM/UpdateResponseMetadata.html +6 -3
- data/doc/SDM/User.html +6 -3
- data/doc/SDM.html +6 -3
- data/doc/V1/AccountAttachments/Service.html +6 -3
- data/doc/V1/AccountAttachments.html +6 -3
- data/doc/V1/AccountGrants/Service.html +7 -4
- data/doc/V1/AccountGrants.html +6 -3
- data/doc/V1/Accounts/Service.html +6 -3
- data/doc/V1/Accounts.html +6 -3
- data/doc/V1/Nodes/Service.html +6 -3
- data/doc/V1/Nodes.html +6 -3
- data/doc/V1/Resources/Service.html +6 -3
- data/doc/V1/Resources.html +6 -3
- data/doc/V1/RoleAttachments/Service.html +6 -3
- data/doc/V1/RoleAttachments.html +6 -3
- data/doc/V1/RoleGrants/Service.html +6 -3
- data/doc/V1/RoleGrants.html +6 -3
- data/doc/V1/Roles/Service.html +6 -3
- data/doc/V1/Roles.html +6 -3
- data/doc/V1/Tags.html +113 -0
- data/doc/V1.html +16 -3
- data/doc/created.rid +34 -35
- data/doc/css/rdoc.css +35 -6
- data/doc/examples/Gemfile.html +6 -5
- data/doc/examples/Gemfile_lock.html +6 -5
- data/doc/examples/README_md.html +6 -5
- data/doc/examples/okta-sync/Gemfile.html +6 -5
- data/doc/examples/okta-sync/Gemfile_lock.html +6 -5
- data/doc/index.html +8 -5
- data/doc/js/darkfish.js +22 -99
- data/doc/js/navigation.js +4 -40
- data/doc/js/navigation.js.gz +0 -0
- data/doc/js/search.js +32 -31
- data/doc/js/search_index.js +1 -1
- data/doc/js/search_index.js.gz +0 -0
- data/doc/js/searcher.js +6 -6
- data/doc/js/searcher.js.gz +0 -0
- data/doc/lib/version.html +6 -5
- data/doc/table_of_contents.html +927 -914
- data/examples/Gemfile +2 -2
- data/examples/listUsers.rb +4 -4
- data/examples/okta-sync/oktaSync.rb +17 -59
- data/examples/panicButton.rb +4 -46
- data/lib/errors/errors.rb +53 -55
- data/lib/grpc/account_attachments_pb.rb +9 -9
- data/lib/grpc/account_attachments_services_pb.rb +8 -7
- data/lib/grpc/account_grants_pb.rb +10 -10
- data/lib/grpc/account_grants_services_pb.rb +9 -8
- data/lib/grpc/accounts_pb.rb +9 -9
- data/lib/grpc/accounts_services_pb.rb +8 -7
- data/lib/grpc/drivers_pb.rb +52 -7
- data/lib/grpc/nodes_pb.rb +9 -9
- data/lib/grpc/nodes_services_pb.rb +8 -7
- data/lib/grpc/options_pb.rb +14 -5
- data/lib/grpc/plumbing.rb +4200 -4085
- data/lib/grpc/protoc-gen-swagger/options/annotations_pb.rb +4 -4
- data/lib/grpc/resources_pb.rb +9 -9
- data/lib/grpc/resources_services_pb.rb +8 -7
- data/lib/grpc/role_attachments_pb.rb +9 -9
- data/lib/grpc/role_attachments_services_pb.rb +8 -7
- data/lib/grpc/role_grants_pb.rb +9 -9
- data/lib/grpc/role_grants_services_pb.rb +8 -7
- data/lib/grpc/roles_pb.rb +9 -9
- data/lib/grpc/roles_services_pb.rb +8 -7
- data/lib/grpc/spec_pb.rb +8 -8
- data/lib/grpc/tags_pb.rb +36 -0
- data/lib/models/porcelain.rb +4941 -4415
- data/lib/strongdm.rb +95 -94
- data/lib/svc.rb +1224 -1202
- data/lib/version.rb +5 -5
- data/strongdm.gemspec +10 -10
- metadata +4 -2
data/examples/Gemfile
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
source
|
|
1
|
+
source 'https://rubygems.org'
|
|
2
2
|
|
|
3
|
-
gem
|
|
3
|
+
gem 'strongdm'
|
data/examples/listUsers.rb
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
# Copyright 2020 StrongDM Inc
|
|
2
|
-
#
|
|
2
|
+
#
|
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
# you may not use this file except in compliance with the License.
|
|
5
5
|
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
6
|
+
#
|
|
7
7
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
8
|
+
#
|
|
9
9
|
# Unless required by applicable law or agreed to in writing, software
|
|
10
10
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
11
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
|
-
#
|
|
14
|
+
#
|
|
15
15
|
require "strongdm"
|
|
16
16
|
|
|
17
17
|
client = SDM::Client.new(ENV["SDM_API_ACCESS_KEY"], ENV["SDM_API_SECRET_KEY"])
|
|
@@ -1,64 +1,21 @@
|
|
|
1
1
|
# Copyright 2020 StrongDM Inc
|
|
2
|
-
#
|
|
2
|
+
#
|
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
# you may not use this file except in compliance with the License.
|
|
5
5
|
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
6
|
+
#
|
|
7
7
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
8
|
+
#
|
|
9
9
|
# Unless required by applicable law or agreed to in writing, software
|
|
10
10
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
11
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
|
-
#
|
|
15
|
-
# Copyright 2020 StrongDM Inc
|
|
16
|
-
#
|
|
17
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
18
|
-
# you may not use this file except in compliance with the License.
|
|
19
|
-
# You may obtain a copy of the License at
|
|
20
|
-
#
|
|
21
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
22
|
-
#
|
|
23
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
24
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
25
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
26
|
-
# See the License for the specific language governing permissions and
|
|
27
|
-
# limitations under the License.
|
|
28
|
-
#
|
|
29
|
-
# Copyright 2020 StrongDM Inc
|
|
30
|
-
#
|
|
31
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
32
|
-
# you may not use this file except in compliance with the License.
|
|
33
|
-
# You may obtain a copy of the License at
|
|
34
|
-
#
|
|
35
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
36
|
-
#
|
|
37
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
38
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
39
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
40
|
-
# See the License for the specific language governing permissions and
|
|
41
|
-
# limitations under the License.
|
|
42
|
-
#
|
|
43
|
-
# Copyright 2020 StrongDM Inc
|
|
44
|
-
#
|
|
45
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
46
|
-
# you may not use this file except in compliance with the License.
|
|
47
|
-
# You may obtain a copy of the License at
|
|
48
|
-
#
|
|
49
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
50
|
-
#
|
|
51
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
52
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
53
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
54
|
-
# See the License for the specific language governing permissions and
|
|
55
|
-
# limitations under the License.
|
|
56
|
-
#
|
|
14
|
+
#
|
|
57
15
|
require "yaml"
|
|
58
16
|
require "strongdm"
|
|
59
17
|
require "oktakit"
|
|
60
18
|
require "optparse"
|
|
61
|
-
require "json"
|
|
62
19
|
|
|
63
20
|
SDM_API_ACCESS_KEY = ENV.fetch("SDM_API_ACCESS_KEY", "")
|
|
64
21
|
SDM_API_SECRET_KEY = ENV.fetch("SDM_API_SECRET_KEY", "")
|
|
@@ -136,7 +93,7 @@ def okta_sync
|
|
|
136
93
|
current = {}
|
|
137
94
|
grants.each { |g|
|
|
138
95
|
current[g.account_id] = [] if not current[g.account_id]
|
|
139
|
-
current[g.account_id].push(g)
|
|
96
|
+
current[g.account_id].push({ :resource_id => g.resource_id, :id => g.id })
|
|
140
97
|
}
|
|
141
98
|
|
|
142
99
|
desired = {}
|
|
@@ -161,21 +118,18 @@ def okta_sync
|
|
|
161
118
|
report[:bothUsersCount] = overlapping
|
|
162
119
|
report[:sdmResourcesCount] = report[:sdmResources].size
|
|
163
120
|
|
|
164
|
-
accounts_in_roles = client.account_attachments.list("").map { |aa| [aa.account_id, true] }.to_h
|
|
165
|
-
|
|
166
121
|
revocations = 0
|
|
167
122
|
current.each { |aid, curRes|
|
|
168
|
-
next if accounts_in_roles[aid]
|
|
169
123
|
desRes = desired[aid]
|
|
170
124
|
desRes = [] if not desired[aid]
|
|
171
125
|
curRes.each { |r|
|
|
172
|
-
if not(desRes.include? r
|
|
126
|
+
if not(desRes.include? r[:resource_id])
|
|
173
127
|
if plan
|
|
174
|
-
puts "Plan: revoke %s from user %s\n" % [r
|
|
128
|
+
puts "Plan: revoke %s from user %s\n" % [r[:resource_id], aid]
|
|
175
129
|
else
|
|
176
|
-
client.account_grants.delete(r
|
|
130
|
+
client.account_grants.delete(r[:id])
|
|
177
131
|
end
|
|
178
|
-
report[:revocations].push(r)
|
|
132
|
+
report[:revocations].push(r[:id])
|
|
179
133
|
revocations += 1
|
|
180
134
|
end
|
|
181
135
|
}
|
|
@@ -187,14 +141,14 @@ def okta_sync
|
|
|
187
141
|
curRes = current[aid]
|
|
188
142
|
curRes = [] if not current[aid]
|
|
189
143
|
desRes.each { |r|
|
|
190
|
-
if not(curRes.map { |c| c
|
|
144
|
+
if not(curRes.map { |c| c[:resource_id] }.include? r)
|
|
191
145
|
ag = SDM::AccountGrant.new()
|
|
192
146
|
ag.account_id = aid
|
|
193
147
|
ag.resource_id = r
|
|
194
148
|
if plan
|
|
195
149
|
puts "Plan: grant %s to user %s\n" % [r, aid]
|
|
196
150
|
else
|
|
197
|
-
|
|
151
|
+
client.account_grants.create(ag)
|
|
198
152
|
end
|
|
199
153
|
report[:grants].push(ag)
|
|
200
154
|
grants += 1
|
|
@@ -206,10 +160,14 @@ def okta_sync
|
|
|
206
160
|
report[:complete] = Time.now
|
|
207
161
|
|
|
208
162
|
if verbose
|
|
209
|
-
puts
|
|
163
|
+
puts report.to_json
|
|
210
164
|
else
|
|
211
165
|
puts "%d Okta users, %d strongDM users, %d overlapping users, %d grants, %d revocations" % [okta_users.size, accounts.size, overlapping, grants, revocations]
|
|
212
166
|
end
|
|
213
167
|
end
|
|
214
168
|
|
|
215
|
-
|
|
169
|
+
begin
|
|
170
|
+
okta_sync
|
|
171
|
+
rescue StandardError => ex
|
|
172
|
+
puts "cannot synchronize with okta: " + ex.to_s
|
|
173
|
+
end
|
data/examples/panicButton.rb
CHANGED
|
@@ -1,59 +1,17 @@
|
|
|
1
1
|
# Copyright 2020 StrongDM Inc
|
|
2
|
-
#
|
|
2
|
+
#
|
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
# you may not use this file except in compliance with the License.
|
|
5
5
|
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
6
|
+
#
|
|
7
7
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
8
|
+
#
|
|
9
9
|
# Unless required by applicable law or agreed to in writing, software
|
|
10
10
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
11
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
|
-
#
|
|
15
|
-
# Copyright 2020 StrongDM Inc
|
|
16
|
-
#
|
|
17
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
18
|
-
# you may not use this file except in compliance with the License.
|
|
19
|
-
# You may obtain a copy of the License at
|
|
20
|
-
#
|
|
21
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
22
|
-
#
|
|
23
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
24
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
25
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
26
|
-
# See the License for the specific language governing permissions and
|
|
27
|
-
# limitations under the License.
|
|
28
|
-
#
|
|
29
|
-
# Copyright 2020 StrongDM Inc
|
|
30
|
-
#
|
|
31
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
32
|
-
# you may not use this file except in compliance with the License.
|
|
33
|
-
# You may obtain a copy of the License at
|
|
34
|
-
#
|
|
35
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
36
|
-
#
|
|
37
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
38
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
39
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
40
|
-
# See the License for the specific language governing permissions and
|
|
41
|
-
# limitations under the License.
|
|
42
|
-
#
|
|
43
|
-
# Copyright 2020 StrongDM Inc
|
|
44
|
-
#
|
|
45
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
46
|
-
# you may not use this file except in compliance with the License.
|
|
47
|
-
# You may obtain a copy of the License at
|
|
48
|
-
#
|
|
49
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
50
|
-
#
|
|
51
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
52
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
53
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
54
|
-
# See the License for the specific language governing permissions and
|
|
55
|
-
# limitations under the License.
|
|
56
|
-
#
|
|
14
|
+
#
|
|
57
15
|
require "strongdm"
|
|
58
16
|
require "OpenSSL"
|
|
59
17
|
require "JSON"
|
data/lib/errors/errors.rb
CHANGED
|
@@ -1,87 +1,85 @@
|
|
|
1
1
|
# Copyright 2020 StrongDM Inc
|
|
2
|
-
#
|
|
2
|
+
#
|
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
# you may not use this file except in compliance with the License.
|
|
5
5
|
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
6
|
+
#
|
|
7
7
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
8
|
+
#
|
|
9
9
|
# Unless required by applicable law or agreed to in writing, software
|
|
10
10
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
11
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
|
-
#
|
|
14
|
+
#
|
|
15
15
|
# This file was generated by protogen. DO NOT EDIT.
|
|
16
16
|
|
|
17
17
|
module SDM
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
# RPCError is a generic RPC error
|
|
20
|
+
class RPCError < StandardError
|
|
21
|
+
attr_reader :code
|
|
22
|
+
def initialize(msg, code)
|
|
23
|
+
@code = code
|
|
24
|
+
super(msg)
|
|
25
|
+
end
|
|
26
26
|
end
|
|
27
|
-
end
|
|
28
27
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
# DeadlineExceededError indicates an RPC call timed out
|
|
29
|
+
class DeadlineExceededError < RPCError
|
|
30
|
+
def initialize(msg)
|
|
31
|
+
super(msg, 4)
|
|
32
|
+
end
|
|
33
33
|
end
|
|
34
|
-
end
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
# AlreadyExistsError is used when an entity already exists in the system
|
|
36
|
+
class AlreadyExistsError < RPCError
|
|
37
|
+
def initialize(msg)
|
|
38
|
+
super(msg, 6)
|
|
39
|
+
end
|
|
40
40
|
end
|
|
41
|
-
end
|
|
42
41
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
# NotFoundError is used when an entity does not exist in the system
|
|
43
|
+
class NotFoundError < RPCError
|
|
44
|
+
def initialize(msg)
|
|
45
|
+
super(msg, 5)
|
|
46
|
+
end
|
|
47
47
|
end
|
|
48
|
-
end
|
|
49
48
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
# BadRequestError identifies a bad request sent by the client
|
|
50
|
+
class BadRequestError < RPCError
|
|
51
|
+
def initialize(msg)
|
|
52
|
+
super(msg, 3)
|
|
53
|
+
end
|
|
54
54
|
end
|
|
55
|
-
end
|
|
56
55
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
# AuthenticationError is used to specify an authentication failure condition
|
|
57
|
+
class AuthenticationError < RPCError
|
|
58
|
+
def initialize(msg)
|
|
59
|
+
super(msg, 16)
|
|
60
|
+
end
|
|
61
61
|
end
|
|
62
|
-
end
|
|
63
62
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
# PermissionError is used to specify a permissions violation
|
|
64
|
+
class PermissionError < RPCError
|
|
65
|
+
def initialize(msg)
|
|
66
|
+
super(msg, 7)
|
|
67
|
+
end
|
|
68
68
|
end
|
|
69
|
-
end
|
|
70
69
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
# InternalError is used to specify an internal system error
|
|
71
|
+
class InternalError < RPCError
|
|
72
|
+
def initialize(msg)
|
|
73
|
+
super(msg, 13)
|
|
74
|
+
end
|
|
75
75
|
end
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
# RateLimitError is used for rate limit excess condition
|
|
79
|
-
class RateLimitError < RPCError
|
|
80
|
-
attr_reader :rate_limit
|
|
81
76
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
77
|
+
# RateLimitError is used for rate limit excess condition
|
|
78
|
+
class RateLimitError < RPCError
|
|
79
|
+
attr_reader :rate_limit
|
|
80
|
+
def initialize(msg, rate_limit)
|
|
81
|
+
@rate_limit = rate_limit
|
|
82
|
+
super(msg, 8)
|
|
83
|
+
end
|
|
85
84
|
end
|
|
86
|
-
end
|
|
87
85
|
end
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
# Copyright 2020 StrongDM Inc
|
|
2
|
-
#
|
|
2
|
+
#
|
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
# you may not use this file except in compliance with the License.
|
|
5
5
|
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
6
|
+
#
|
|
7
7
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
8
|
+
#
|
|
9
9
|
# Unless required by applicable law or agreed to in writing, software
|
|
10
10
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
11
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
|
-
#
|
|
14
|
+
#
|
|
15
15
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
16
16
|
# source: account_attachments.proto
|
|
17
17
|
|
|
18
|
-
require
|
|
18
|
+
require 'google/protobuf'
|
|
19
19
|
|
|
20
|
-
require
|
|
21
|
-
require
|
|
22
|
-
require
|
|
23
|
-
require
|
|
20
|
+
require 'google/api/annotations_pb'
|
|
21
|
+
require 'protoc-gen-swagger/options/annotations_pb'
|
|
22
|
+
require 'options_pb'
|
|
23
|
+
require 'spec_pb'
|
|
24
24
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
25
25
|
add_file("account_attachments.proto", :syntax => :proto3) do
|
|
26
26
|
add_message "v1.AccountAttachmentCreateRequest" do
|
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
# Copyright 2020 StrongDM Inc
|
|
2
|
-
#
|
|
2
|
+
#
|
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
# you may not use this file except in compliance with the License.
|
|
5
5
|
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
6
|
+
#
|
|
7
7
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
8
|
+
#
|
|
9
9
|
# Unless required by applicable law or agreed to in writing, software
|
|
10
10
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
11
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
|
-
#
|
|
14
|
+
#
|
|
15
15
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
16
16
|
# Source: account_attachments.proto for package 'v1'
|
|
17
17
|
|
|
18
|
-
require
|
|
19
|
-
require
|
|
18
|
+
require 'grpc'
|
|
19
|
+
require 'account_attachments_pb'
|
|
20
20
|
|
|
21
21
|
module V1
|
|
22
22
|
module AccountAttachments
|
|
23
23
|
# AccountAttachments assign an account to a role.
|
|
24
24
|
class Service
|
|
25
|
+
|
|
25
26
|
include GRPC::GenericService
|
|
26
27
|
|
|
27
28
|
self.marshal_class_method = :encode
|
|
28
29
|
self.unmarshal_class_method = :decode
|
|
29
|
-
self.service_name =
|
|
30
|
+
self.service_name = 'v1.AccountAttachments'
|
|
30
31
|
|
|
31
32
|
# Create registers a new AccountAttachment.
|
|
32
33
|
rpc :Create, AccountAttachmentCreateRequest, AccountAttachmentCreateResponse
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
# Copyright 2020 StrongDM Inc
|
|
2
|
-
#
|
|
2
|
+
#
|
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
# you may not use this file except in compliance with the License.
|
|
5
5
|
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
6
|
+
#
|
|
7
7
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
8
|
+
#
|
|
9
9
|
# Unless required by applicable law or agreed to in writing, software
|
|
10
10
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
11
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
|
-
#
|
|
14
|
+
#
|
|
15
15
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
16
16
|
# source: account_grants.proto
|
|
17
17
|
|
|
18
|
-
require
|
|
18
|
+
require 'google/protobuf'
|
|
19
19
|
|
|
20
|
-
require
|
|
21
|
-
require
|
|
22
|
-
require
|
|
23
|
-
require
|
|
24
|
-
require
|
|
20
|
+
require 'google/api/annotations_pb'
|
|
21
|
+
require 'protoc-gen-swagger/options/annotations_pb'
|
|
22
|
+
require 'google/protobuf/timestamp_pb'
|
|
23
|
+
require 'options_pb'
|
|
24
|
+
require 'spec_pb'
|
|
25
25
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
26
26
|
add_file("account_grants.proto", :syntax => :proto3) do
|
|
27
27
|
add_message "v1.AccountGrantCreateRequest" do
|
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
# Copyright 2020 StrongDM Inc
|
|
2
|
-
#
|
|
2
|
+
#
|
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
# you may not use this file except in compliance with the License.
|
|
5
5
|
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
6
|
+
#
|
|
7
7
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
8
|
+
#
|
|
9
9
|
# Unless required by applicable law or agreed to in writing, software
|
|
10
10
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
11
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
|
-
#
|
|
14
|
+
#
|
|
15
15
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
16
16
|
# Source: account_grants.proto for package 'v1'
|
|
17
17
|
|
|
18
|
-
require
|
|
19
|
-
require
|
|
18
|
+
require 'grpc'
|
|
19
|
+
require 'account_grants_pb'
|
|
20
20
|
|
|
21
21
|
module V1
|
|
22
22
|
module AccountGrants
|
|
23
|
-
# AccountGrants
|
|
23
|
+
# AccountGrants assign a resource directly to an account, giving the account the permission to connect to that resource.
|
|
24
24
|
class Service
|
|
25
|
+
|
|
25
26
|
include GRPC::GenericService
|
|
26
27
|
|
|
27
28
|
self.marshal_class_method = :encode
|
|
28
29
|
self.unmarshal_class_method = :decode
|
|
29
|
-
self.service_name =
|
|
30
|
+
self.service_name = 'v1.AccountGrants'
|
|
30
31
|
|
|
31
32
|
# Create registers a new AccountGrant.
|
|
32
33
|
rpc :Create, AccountGrantCreateRequest, AccountGrantCreateResponse
|
data/lib/grpc/accounts_pb.rb
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
# Copyright 2020 StrongDM Inc
|
|
2
|
-
#
|
|
2
|
+
#
|
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
# you may not use this file except in compliance with the License.
|
|
5
5
|
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
6
|
+
#
|
|
7
7
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
8
|
+
#
|
|
9
9
|
# Unless required by applicable law or agreed to in writing, software
|
|
10
10
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
11
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
|
-
#
|
|
14
|
+
#
|
|
15
15
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
16
16
|
# source: accounts.proto
|
|
17
17
|
|
|
18
|
-
require
|
|
18
|
+
require 'google/protobuf'
|
|
19
19
|
|
|
20
|
-
require
|
|
21
|
-
require
|
|
22
|
-
require
|
|
23
|
-
require
|
|
20
|
+
require 'google/api/annotations_pb'
|
|
21
|
+
require 'protoc-gen-swagger/options/annotations_pb'
|
|
22
|
+
require 'options_pb'
|
|
23
|
+
require 'spec_pb'
|
|
24
24
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
25
25
|
add_file("accounts.proto", :syntax => :proto3) do
|
|
26
26
|
add_message "v1.AccountCreateRequest" do
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
# Copyright 2020 StrongDM Inc
|
|
2
|
-
#
|
|
2
|
+
#
|
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
# you may not use this file except in compliance with the License.
|
|
5
5
|
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
6
|
+
#
|
|
7
7
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
8
|
+
#
|
|
9
9
|
# Unless required by applicable law or agreed to in writing, software
|
|
10
10
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
11
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
|
-
#
|
|
14
|
+
#
|
|
15
15
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
16
16
|
# Source: accounts.proto for package 'v1'
|
|
17
17
|
|
|
18
|
-
require
|
|
19
|
-
require
|
|
18
|
+
require 'grpc'
|
|
19
|
+
require 'accounts_pb'
|
|
20
20
|
|
|
21
21
|
module V1
|
|
22
22
|
module Accounts
|
|
@@ -25,11 +25,12 @@ module V1
|
|
|
25
25
|
# 1. **Regular users:** humans who are authenticated through username and password or SSO
|
|
26
26
|
# 2. **Service users:** machines that are authneticated using a service token
|
|
27
27
|
class Service
|
|
28
|
+
|
|
28
29
|
include GRPC::GenericService
|
|
29
30
|
|
|
30
31
|
self.marshal_class_method = :encode
|
|
31
32
|
self.unmarshal_class_method = :decode
|
|
32
|
-
self.service_name =
|
|
33
|
+
self.service_name = 'v1.Accounts'
|
|
33
34
|
|
|
34
35
|
# Create registers a new Account.
|
|
35
36
|
rpc :Create, AccountCreateRequest, AccountCreateResponse
|