oso-cloud 1.5.0.pre → 1.5.0.pre.1
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/Gemfile.lock +1 -1
- data/lib/oso/api.rb +5 -4
- data/lib/oso/oso.rb +22 -16
- data/lib/oso/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49263eac12bcf56f22f66f9bf6a456164dc69ec1f2406c78ce09541638782ec4
|
4
|
+
data.tar.gz: '0488d56163f5fa068152c25f391f668542a92ecc43e385f63ef92728d37ee2be'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49c372d256f076a88ff06fb539ff894d6040250c2244f3c6e1affbaf9990515ab364af3961479c41180751d7c2c01ebbebbb9decae0dc602fa29ad06f87315f1
|
7
|
+
data.tar.gz: f657048f571981bf2b51ac7a41b0865526857d6ffc90e96db9a2a95f82dff5cf889bf264e1c8232c157367c996c6c9be66a3d050290eddbcbfcdb17dd97dfe6d
|
data/Gemfile.lock
CHANGED
data/lib/oso/api.rb
CHANGED
@@ -214,10 +214,11 @@ module OsoCloud
|
|
214
214
|
|
215
215
|
# @!visibility private
|
216
216
|
class LocalListQuery
|
217
|
-
attr_reader :query, :data_bindings
|
217
|
+
attr_reader :query, :column, :data_bindings
|
218
218
|
|
219
|
-
def initialize(query:, data_bindings:)
|
219
|
+
def initialize(query:, column:, data_bindings:)
|
220
220
|
@query = query
|
221
|
+
@column = column
|
221
222
|
@data_bindings = data_bindings
|
222
223
|
end
|
223
224
|
end
|
@@ -393,9 +394,9 @@ module OsoCloud
|
|
393
394
|
LocalQueryResult.new(**result)
|
394
395
|
end
|
395
396
|
|
396
|
-
def post_list_query(query)
|
397
|
+
def post_list_query(query:, column:)
|
397
398
|
url = '/list_query'
|
398
|
-
data = LocalListQuery.new(query: query, data_bindings: @data_bindings)
|
399
|
+
data = LocalListQuery.new(query: query, column: column, data_bindings: @data_bindings)
|
399
400
|
result = POST(url, nil, data, false)
|
400
401
|
LocalQueryResult.new(**result)
|
401
402
|
end
|
data/lib/oso/oso.rb
CHANGED
@@ -79,18 +79,21 @@ module OsoCloud
|
|
79
79
|
# @param actor [OsoCloud::Value]
|
80
80
|
# @param action [String]
|
81
81
|
# @param resource [OsoCloud::Value]
|
82
|
+
# @param column [String]
|
82
83
|
# @return [Array<String>]
|
83
84
|
def authorize_local(actor, action, resource)
|
84
85
|
actor_typed_id = actor.to_api_value
|
85
86
|
resource_typed_id = resource.to_api_value
|
86
|
-
result = @api.post_authorize_query(
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
87
|
+
result = @api.post_authorize_query(
|
88
|
+
OsoCloud::Core::AuthorizeQuery.new(
|
89
|
+
actor_type: actor_typed_id.type,
|
90
|
+
actor_id: actor_typed_id.id,
|
91
|
+
action: action,
|
92
|
+
resource_type: resource_typed_id.type,
|
93
|
+
resource_id: resource_typed_id.id,
|
94
|
+
context_facts: []
|
95
|
+
)
|
96
|
+
)
|
94
97
|
result.sql
|
95
98
|
end
|
96
99
|
|
@@ -103,15 +106,18 @@ module OsoCloud
|
|
103
106
|
# @param action [String]
|
104
107
|
# @param resource_type [String]
|
105
108
|
# @return [Array<String>]
|
106
|
-
def list_local(actor, action, resource_type)
|
109
|
+
def list_local(actor, action, resource_type, column)
|
107
110
|
actor_typed_id = actor.to_api_value
|
108
|
-
result = @api.post_list_query(
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
111
|
+
result = @api.post_list_query(
|
112
|
+
query: OsoCloud::Core::ListQuery.new(
|
113
|
+
actor_type: actor_typed_id.type,
|
114
|
+
actor_id: actor_typed_id.id,
|
115
|
+
action: action,
|
116
|
+
resource_type: resource_type,
|
117
|
+
context_facts: []
|
118
|
+
),
|
119
|
+
column: column
|
120
|
+
)
|
115
121
|
result.sql
|
116
122
|
end
|
117
123
|
|
data/lib/oso/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oso-cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.0.pre
|
4
|
+
version: 1.5.0.pre.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oso Security, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02-
|
11
|
+
date: 2024-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|