oso-cloud 1.5.0.pre → 1.5.0.pre.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 310422514ccb68c2540ae5a2ce16873be40e8d59a7c57861552d4589eb95ebb5
4
- data.tar.gz: 0f75e291effa87ff7b6887c00202fa56938822f837dcd1feeaa257d9a6c931a4
3
+ metadata.gz: 49263eac12bcf56f22f66f9bf6a456164dc69ec1f2406c78ce09541638782ec4
4
+ data.tar.gz: '0488d56163f5fa068152c25f391f668542a92ecc43e385f63ef92728d37ee2be'
5
5
  SHA512:
6
- metadata.gz: 766038bec33959a1b400e2a63a3b5de71acfa3b55a6d24d88ebcf20dcf73f94251f05a3279120a8506901f8234191159355696442c43052860cd0a49eafcf5c2
7
- data.tar.gz: 8932d721294ba88b589a64b75236af34ed7386bd7f5e18416f85a66358a3a84c737ed359e8a68d93c7d8491784b710d54ec5f4508dd67b8ee37ec30ab39568af
6
+ metadata.gz: 49c372d256f076a88ff06fb539ff894d6040250c2244f3c6e1affbaf9990515ab364af3961479c41180751d7c2c01ebbebbb9decae0dc602fa29ad06f87315f1
7
+ data.tar.gz: f657048f571981bf2b51ac7a41b0865526857d6ffc90e96db9a2a95f82dff5cf889bf264e1c8232c157367c996c6c9be66a3d050290eddbcbfcdb17dd97dfe6d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- oso-cloud (1.5.0.pre)
4
+ oso-cloud (1.5.0.pre.1)
5
5
  faraday (~> 2.5.2)
6
6
  faraday-net_http_persistent (~> 2.0)
7
7
  faraday-retry (~> 2.0.0)
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(OsoCloud::Core::AuthorizeQuery.new(
87
- actor_type: actor_typed_id.type,
88
- actor_id: actor_typed_id.id,
89
- action: action,
90
- resource_type: resource_typed_id.type,
91
- resource_id: resource_typed_id.id,
92
- context_facts: []
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(OsoCloud::Core::ListQuery.new(
109
- actor_type: actor_typed_id.type,
110
- actor_id: actor_typed_id.id,
111
- action: action,
112
- resource_type: resource_type,
113
- context_facts: []
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
@@ -1,3 +1,3 @@
1
1
  module OsoCloud
2
- VERSION = '1.5.0.pre'.freeze
2
+ VERSION = '1.5.0.pre.1'.freeze
3
3
  end
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-14 00:00:00.000000000 Z
11
+ date: 2024-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday