soar_authorization 0.1.4 → 0.1.5

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
  SHA1:
3
- metadata.gz: e236305e861b7e6dc65fd24d2f0ab120e09f365b
4
- data.tar.gz: d953c9d855b614487f1b0f01df268e6de6216f04
3
+ metadata.gz: 578262a1f651f6cfc53469acb8f91537b04a6ae6
4
+ data.tar.gz: a3794c305cf9c771a7dcdaf2480bbbe652003118
5
5
  SHA512:
6
- metadata.gz: 9197178c6c7492fbd50307c6a2c5a72b8a396b35e617135d2baf63964e5c6bebd10fef5cdbfc46a103eaabf11cc19ad0bb7eee95e796dc66fa88499088715281
7
- data.tar.gz: 69f8076d07ac6726025b0fea3153f0e3bc5dfe37f24aa3a19da79b3b10bcae1d8b5388ad2c4bb85f9684647d6d3e5a7840a571f7511e7139204b0e5bc362d2d3
6
+ metadata.gz: ee1c2c8b9e70585d816970d10553b0b4073b2c59cfe2342cd56f8cbe12aae9b3a512e9bb90147413b512aff01a386e77871c8c00ac41f4ec997d0ba3ba426162
7
+ data.tar.gz: a886173cd79cedacf7dcf23b729b9be264f33f6ab0c58928bc38d4e1ca3d8fe51597c306898959e3a3431e1d784e15278be7abeaa2e7db47ae4b2e5bc61c90df
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ soar_authorization
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ ruby-2.3.0
data/Gemfile CHANGED
@@ -2,3 +2,8 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in soar_authorization.gemspec
4
4
  gemspec
5
+
6
+ group :test do
7
+ gem 'rake', '~> 11.3'
8
+ gem 'rspec', '~> 3.5'
9
+ end
@@ -1,4 +1,5 @@
1
1
  require "soar_authorization/version"
2
+ require 'soar_authentication'
2
3
 
3
4
  module SoarAuthorization
4
5
  class Authorize
@@ -31,7 +32,14 @@ module SoarAuthorization
31
32
  def authorized?(env, access_manager, service_identifier, path, request)
32
33
  return true if ENV['RACK_ENV'] == 'development'
33
34
  begin
34
- result = access_manager.authorized?(service_identifier, request.path, request)
35
+ result = access_manager.authorized?({
36
+ service_identifier: service_identifier,
37
+ resource_identifier: path,
38
+ request: {
39
+ authentication_identifier: SoarAuthentication::Authentication.new(request).identifier,
40
+ params: request.params
41
+ }
42
+ })
35
43
  result['data']['notifications'].each do |notification|
36
44
  env['auditing'].info(notification, request['flow_identifier']) if env['auditing']
37
45
  end
@@ -1,3 +1,3 @@
1
1
  module SoarAuthorization
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -27,10 +27,7 @@ Gem::Specification.new do |spec|
27
27
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
28
  spec.require_paths = ["lib"]
29
29
 
30
- spec.add_dependency "rack", '>= 1.6.4', '< 3.0.0'
31
- spec.add_dependency "soar_am", "~> 0.1.2"
30
+ spec.add_dependency 'soar_authentication', '~> 0.1.3'
31
+ spec.add_dependency 'soar-policy-access_manager', '~> 1.0.0'
32
32
 
33
- spec.add_development_dependency "bundler", "~> 1.12"
34
- spec.add_development_dependency "rake", "~> 10.0"
35
- spec.add_development_dependency "rspec", "~> 3.0"
36
33
  end
metadata CHANGED
@@ -1,91 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soar_authorization
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernst Van Graan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-22 00:00:00.000000000 Z
11
+ date: 2016-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rack
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: 1.6.4
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: 3.0.0
23
- type: :runtime
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: 1.6.4
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: 3.0.0
33
- - !ruby/object:Gem::Dependency
34
- name: soar_am
14
+ name: soar_authentication
35
15
  requirement: !ruby/object:Gem::Requirement
36
16
  requirements:
37
17
  - - "~>"
38
18
  - !ruby/object:Gem::Version
39
- version: 0.1.2
19
+ version: 0.1.3
40
20
  type: :runtime
41
21
  prerelease: false
42
22
  version_requirements: !ruby/object:Gem::Requirement
43
23
  requirements:
44
24
  - - "~>"
45
25
  - !ruby/object:Gem::Version
46
- version: 0.1.2
47
- - !ruby/object:Gem::Dependency
48
- name: bundler
49
- requirement: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - "~>"
52
- - !ruby/object:Gem::Version
53
- version: '1.12'
54
- type: :development
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - "~>"
59
- - !ruby/object:Gem::Version
60
- version: '1.12'
61
- - !ruby/object:Gem::Dependency
62
- name: rake
63
- requirement: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: '10.0'
68
- type: :development
69
- prerelease: false
70
- version_requirements: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: '10.0'
26
+ version: 0.1.3
75
27
  - !ruby/object:Gem::Dependency
76
- name: rspec
28
+ name: soar-policy-access_manager
77
29
  requirement: !ruby/object:Gem::Requirement
78
30
  requirements:
79
31
  - - "~>"
80
32
  - !ruby/object:Gem::Version
81
- version: '3.0'
82
- type: :development
33
+ version: 1.0.0
34
+ type: :runtime
83
35
  prerelease: false
84
36
  version_requirements: !ruby/object:Gem::Requirement
85
37
  requirements:
86
38
  - - "~>"
87
39
  - !ruby/object:Gem::Version
88
- version: '3.0'
40
+ version: 1.0.0
89
41
  description: Matches resource requests with access managers and asks them to authorize
90
42
  email:
91
43
  - ernst.van.graan@hetzner.co.za
@@ -95,6 +47,8 @@ extra_rdoc_files: []
95
47
  files:
96
48
  - ".gitignore"
97
49
  - ".rspec"
50
+ - ".ruby-gemset"
51
+ - ".ruby-version"
98
52
  - ".travis.yml"
99
53
  - Gemfile
100
54
  - LICENSE.txt