aserto 0.30.4 → 0.30.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/aserto/auth_client.rb +9 -3
- data/lib/aserto/config.rb +1 -1
- data/lib/aserto/errors.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: 786e21dcb6f94db6860b19aff5c7c8086bf02ffc0ca6d6a5914cc9502dc9af2c
|
4
|
+
data.tar.gz: d134a1bf4da055712fc873b78b1695db5cc89390fede9a5982aaa02388e4e84a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57f197d7d08efb0ffe37041804977de4be0c6a500ae7ef7c784f5d4e35686000ae2039ddde79d946651c01b0fcf2a1bbeae209fcd6255c0f982062b54d127326
|
7
|
+
data.tar.gz: 0131a6051e4a3e20c20de1514f5fba8ca14bb44ae257d611d5d97dad9663bb4bd36ca26f851df25c2669bbc2182116e48f7d0743c903687dd51915dc8168fde3
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.30.
|
1
|
+
0.30.6
|
data/lib/aserto/auth_client.rb
CHANGED
@@ -33,21 +33,27 @@ module Aserto
|
|
33
33
|
exec_is(request_is(config.decision))
|
34
34
|
end
|
35
35
|
|
36
|
-
def check(object_id
|
36
|
+
def check(object_id:, object_type:, relation:, options: {})
|
37
37
|
resource_context_fields = {
|
38
38
|
object_id: object_id,
|
39
39
|
object_type: object_type,
|
40
40
|
relation: relation
|
41
|
-
}
|
41
|
+
}
|
42
42
|
|
43
43
|
check_resource_context = Google::Protobuf::Struct
|
44
44
|
.from_hash(resource_context_fields.transform_keys!(&:to_s))
|
45
45
|
|
46
|
+
policy_path = if options[:policy_path]
|
47
|
+
options[:policy_path]
|
48
|
+
else
|
49
|
+
config.policy_root ? "#{config.policy_root}.check" : "rebac.check"
|
50
|
+
end
|
51
|
+
|
46
52
|
request = Aserto::Authorizer::V2::IsRequest.new(
|
47
53
|
{
|
48
54
|
policy_context: Aserto::Authorizer::V2::Api::PolicyContext.new(
|
49
55
|
{
|
50
|
-
path:
|
56
|
+
path: policy_path,
|
51
57
|
decisions: [config.decision]
|
52
58
|
}
|
53
59
|
),
|
data/lib/aserto/config.rb
CHANGED
data/lib/aserto/errors.rb
CHANGED
@@ -23,7 +23,7 @@ module Aserto
|
|
23
23
|
|
24
24
|
def inspect
|
25
25
|
details = %i[action conditions message].filter_map do |attribute|
|
26
|
-
value = instance_variable_get "@#{attribute}"
|
26
|
+
value = instance_variable_get :"@#{attribute}"
|
27
27
|
"#{attribute}: #{value.inspect}" if value.present?
|
28
28
|
end.join(", ")
|
29
29
|
"#<#{self.class.name} #{details}>"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aserto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.30.
|
4
|
+
version: 0.30.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aserto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aserto-authorizer
|