aserto 0.31.0 → 0.31.2

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: 5ab86a73b764ff52a37e91ec3b99c83f7e1bab0067400b69eb0826780a928f9f
4
- data.tar.gz: f4d486cd8f7a4ac1f12df87cfa4c9dad019a72a8f14460715a4c3e4e9b322f88
3
+ metadata.gz: 0f9e62eb9cea9a7f1299a70fb9bc34d00d585227864c1b32eebb63afe657cbde
4
+ data.tar.gz: d04b726138c23d22a84edb51c608f9ba2f462d01c3603bb35c05d681ca2be4ba
5
5
  SHA512:
6
- metadata.gz: 90042a66380156b1c7d3685342cfb19c7b33785cf52f4acd5672fc78f3b51a389036ad462166df79ecf2aebe46581832bf45e1a992c05842dfa13dc336c72bab
7
- data.tar.gz: c4be8af2639c9efb0aa75a0e1da04cd0df0d1572c7ecac01e06caeeb7afa0d50109b3b32bdc6c3f684391a2cb158a54d19ea43c8b3f0b2cd35b866120abaf0be
6
+ metadata.gz: 0df41a3bd30beed06afc30973604ed08fc6782b63718fd22c004f0bfbc6825b491d8377a5b8a3e4409ac560d8048da5c6640439800bae58888da36f4be0726db
7
+ data.tar.gz: cec2b2faa35ec51e0761d1902457adc3cadb7f527ebb254c5297d21f42a611edc85df90451ab9a11315e0b5ed719505443c327a3c94523d0e3bfa7dcd45b67bd
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.31.0
1
+ 0.31.2
@@ -17,14 +17,13 @@ module Aserto
17
17
  # @param [String] data_type one of [:unknown, :objects, :relations, :all]
18
18
  #
19
19
  def export(data_type: :unknown)
20
- data = []
21
20
  operation = exporter.export(
22
21
  Aserto::Directory::Exporter::V3::ExportRequest.new(options: DATA_TYPE[data_type]),
23
22
  return_op: true
24
23
  )
25
24
 
26
25
  response = operation.execute
27
- response.each { |r| data.push(r) }
26
+ data = response.map { |r| r }
28
27
  operation.wait
29
28
 
30
29
  data
@@ -33,6 +33,14 @@ module Aserto
33
33
  # )
34
34
  def import(data)
35
35
  data.map! do |value|
36
+ if value.dig(:object, :properties)
37
+ require "google/protobuf/well_known_types"
38
+
39
+ value[:object][:properties] = Google::Protobuf::Struct.from_hash(
40
+ value[:object][:properties].transform_keys(&:to_s)
41
+ )
42
+ end
43
+
36
44
  Aserto::Directory::Importer::V3::ImportRequest.new(value)
37
45
  end
38
46
  operation = importer.import(data, return_op: true)
@@ -30,6 +30,12 @@ module Aserto
30
30
  end
31
31
 
32
32
  # rubocop:enable Naming/AccessorMethodName
33
+
34
+ # Deletes the manifest and all the data
35
+ # @return [Aserto::Directory::Model::V3::DeleteManifestResponse]
36
+ def delete_manifest
37
+ @model.delete_manifest(Model::V3::DeleteManifestRequest.new)
38
+ end
33
39
  end
34
40
  end
35
41
  end
@@ -62,6 +62,7 @@ module Aserto
62
62
  # @param [String] relation
63
63
  # @param [String] subject_type
64
64
  # @param [String] subject_id
65
+ # @param [String] subject_relation
65
66
  #
66
67
  # @return [Aserto::Directory::Writer::V3::SetRelationResponse]
67
68
  #
@@ -70,10 +71,10 @@ module Aserto
70
71
  # object_type: "user",
71
72
  # object_id: "rick@the-citadel.com",
72
73
  # relation: "member",
73
- # object_type: "group",
74
- # object_id: "evil_genius"
74
+ # subject_type: "group",
75
+ # subject_id: "evil_genius"
75
76
  # )
76
- def set_relation(object_type:, object_id:, relation:, subject_type:, subject_id:)
77
+ def set_relation(object_type:, object_id:, relation:, subject_type:, subject_id:, subject_relation: "")
77
78
  writer.set_relation(
78
79
  Aserto::Directory::Writer::V3::SetRelationRequest.new(
79
80
  relation: {
@@ -81,7 +82,8 @@ module Aserto
81
82
  object_id: object_id,
82
83
  relation: relation,
83
84
  subject_type: subject_type,
84
- subject_id: subject_id
85
+ subject_id: subject_id,
86
+ subject_relation: subject_relation
85
87
  }
86
88
  )
87
89
  )
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.31.0
4
+ version: 0.31.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aserto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-20 00:00:00.000000000 Z
11
+ date: 2024-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aserto-authorizer
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.20.1
19
+ version: 0.20.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.20.1
26
+ version: 0.20.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: aserto-directory
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.31.0
33
+ version: 0.31.3
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 0.31.0
40
+ version: 0.31.3
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: jwt
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0'
131
131
  requirements: []
132
- rubygems_version: 3.3.26
132
+ rubygems_version: 3.3.27
133
133
  signing_key:
134
134
  specification_version: 4
135
135
  summary: Aserto Middleware