soar-authentication-identity_uuid_translator 1.0.4 → 2.0.0
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/.gemspec +3 -3
- data/Gemfile +0 -1
- data/lib/soar/authentication/identity_uuid_translator/test/orchestration_provider/base.rb +4 -5
- data/lib/soar/authentication/identity_uuid_translator/test/orchestration_provider/customer.rb +1 -2
- data/lib/soar/authentication/identity_uuid_translator/test/orchestration_provider/customer_client_number.rb +1 -1
- data/lib/soar/authentication/identity_uuid_translator/test/orchestration_provider/customer_email.rb +1 -2
- data/lib/soar/authentication/identity_uuid_translator/test/orchestration_provider/staff.rb +1 -1
- metadata +6 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a29b29bc17bf8cd91f45651374f92983feb9ecf9
|
4
|
+
data.tar.gz: 38cd2f73e28e093e3ce66ed23c4d54506fb0b498
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16f88064bb51ab5e050165d5ff4dde7593a9c210f83bc22d53d4208a8a162b5787ee34f72634f012be261a081073fe333026e1b8a5a4387bb64ebb3db751aecd
|
7
|
+
data.tar.gz: fb47813a11ba89fa57639f81afbe3b12fd8cebed4c31e160d31f62021ca8df7c54cb11d4aabb0d8445ff41aa8752ad460ab069037e7b6b1492e91f0dd8087d85
|
data/.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "soar-authentication-identity_uuid_translator"
|
3
|
-
spec.version = "
|
3
|
+
spec.version = "2.0.0"
|
4
4
|
spec.authors = ["Charles Mulder"]
|
5
5
|
spec.email = ["charles.mulder@hetzner.co.za"]
|
6
6
|
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
11
11
|
spec.require_paths = ["lib"]
|
12
12
|
|
13
|
-
spec.add_runtime_dependency 'soar-registry-identity', '~>
|
14
|
-
spec.add_runtime_dependency 'object_selector', '~> 1.0', '>= 1.0.
|
13
|
+
spec.add_runtime_dependency 'soar-registry-identity', '~> 5.0'
|
14
|
+
spec.add_runtime_dependency 'object_selector', '~> 1.0', '>= 1.0.2'
|
15
15
|
spec.add_runtime_dependency 'uuidtools', '~> 2.1', '>= 2.1.5'
|
16
16
|
end
|
data/Gemfile
CHANGED
@@ -4,7 +4,6 @@ require 'soar/authentication/identity_uuid_translator/role_generator'
|
|
4
4
|
require 'soar/registry/directory'
|
5
5
|
require 'object_selector'
|
6
6
|
require 'faker'
|
7
|
-
require 'hashie'
|
8
7
|
|
9
8
|
module Soar
|
10
9
|
module Authentication
|
@@ -13,8 +12,8 @@ module Soar
|
|
13
12
|
module OrchestrationProvider
|
14
13
|
class Base
|
15
14
|
|
16
|
-
SLEEP_SECONDS =
|
17
|
-
CONNECTION_RETRIES =
|
15
|
+
SLEEP_SECONDS = 10
|
16
|
+
CONNECTION_RETRIES = 6
|
18
17
|
|
19
18
|
def initialize
|
20
19
|
@connection_retries = CONNECTION_RETRIES
|
@@ -24,10 +23,10 @@ module Soar
|
|
24
23
|
begin
|
25
24
|
roles_directory_configuration = YAML.load_file("config/#{ENV['ROLES_DIRECTORY_CONFIG_FILE']}")
|
26
25
|
@roles_directory = Soar::Registry::Directory.new(
|
27
|
-
Soar::Registry::Directory::Provider::DynamoDb.new(
|
26
|
+
Soar::Registry::Directory::Provider::DynamoDb.new(roles_directory_configuration['config'].map { |k, v| [k.to_sym, v]}.to_h )
|
28
27
|
)
|
29
28
|
@roles_directory.provider.recreate_table({
|
30
|
-
name: roles_directory_configuration['config']['table'][
|
29
|
+
name: roles_directory_configuration['config']['table']['name'],
|
31
30
|
structure: JSON.parse(File.read("lib/soar/authentication/identity_uuid_translator/test/fixtures/roles_table.json"))
|
32
31
|
})
|
33
32
|
rescue Soar::Registry::Directory::Error::NetworkingError => e
|
data/lib/soar/authentication/identity_uuid_translator/test/orchestration_provider/customer.rb
CHANGED
@@ -32,8 +32,7 @@ module Soar
|
|
32
32
|
"identity_role" => Soar::Authentication::IdentityUuidTranslator::Provider::Customer::ROLE
|
33
33
|
}
|
34
34
|
identity = @roles_directory.fetch(primary_key)
|
35
|
-
identity['identity_role'] == Soar::Authentication::IdentityUuidTranslator::Provider::Customer::ROLE
|
36
|
-
return identity['identity_role_attributes']['profiles'].include?(@identity[:Client_Number])
|
35
|
+
(identity['identity_role'] == Soar::Authentication::IdentityUuidTranslator::Provider::Customer::ROLE) && (identity['identity_role_attributes']['profiles'].include?(@identity[:Client_Number]))
|
37
36
|
rescue Soar::Registry::Directory::Error::NoEntriesFoundError => e
|
38
37
|
return false
|
39
38
|
end
|
@@ -13,7 +13,7 @@ module Soar
|
|
13
13
|
|
14
14
|
directory_configuration = YAML.load_file("config/#{ENV['IDENTITY_DIRECTORY_CONFIG_FILE']}")
|
15
15
|
|
16
|
-
provider = Soar::Registry::Directory::Provider::Mysql.new(
|
16
|
+
provider = Soar::Registry::Directory::Provider::Mysql.new(directory_configuration['config'].map { |k, v| [k.to_sym, v]}.to_h)
|
17
17
|
provider.client.query("DROP TABLE IF EXISTS `Client`")
|
18
18
|
provider.client.query("CREATE TABLE Client ( ID int(11) NOT NULL AUTO_INCREMENT, Client_Number varchar(15) NOT NULL DEFAULT '', First_Name varchar(70) DEFAULT NULL, Surname varchar(70) DEFAULT NULL, Notifyemail_Invoice text, PRIMARY KEY (ID), KEY Notifyemail_Invoice (Notifyemail_Invoice(20)), KEY Client_Number (Client_Number))")
|
19
19
|
|
data/lib/soar/authentication/identity_uuid_translator/test/orchestration_provider/customer_email.rb
CHANGED
@@ -12,8 +12,7 @@ module Soar
|
|
12
12
|
begin
|
13
13
|
directory_configuration = YAML.load_file("config/#{ENV['IDENTITY_DIRECTORY_CONFIG_FILE']}")
|
14
14
|
|
15
|
-
provider = Soar::Registry::Directory::Provider::Mysql.new(
|
16
|
-
|
15
|
+
provider = Soar::Registry::Directory::Provider::Mysql.new(directory_configuration['config'].map { |k, v| [k.to_sym, v] }.to_h)
|
17
16
|
provider.client.query("DROP TABLE IF EXISTS `Client`")
|
18
17
|
provider.client.query("CREATE TABLE Client ( ID int(11) NOT NULL AUTO_INCREMENT, Client_Number varchar(15) NOT NULL DEFAULT '', First_Name varchar(70) DEFAULT NULL, Surname varchar(70) DEFAULT NULL, Notifyemail_Invoice text, PRIMARY KEY (ID), KEY Notifyemail_Invoice (Notifyemail_Invoice(20)), KEY Client_Number (Client_Number))")
|
19
18
|
|
@@ -54,7 +54,7 @@ module Soar
|
|
54
54
|
@identity_directory_configuration = YAML.load_file("config/#{ENV['IDENTITY_DIRECTORY_CONFIG_FILE']}")
|
55
55
|
|
56
56
|
@identity_directory = Soar::Registry::Directory.new(
|
57
|
-
Soar::Registry::Directory::Provider::Ldap.new(
|
57
|
+
Soar::Registry::Directory::Provider::Ldap.new(@identity_directory_configuration['config'].map { |k, v| [k.to_sym, v]}.to_h)
|
58
58
|
)
|
59
59
|
|
60
60
|
@identity_registry = Soar::Registry::Identity.new(
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soar-authentication-identity_uuid_translator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charles Mulder
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: soar-registry-identity
|
@@ -16,20 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
20
|
-
- - ">="
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 4.0.2
|
19
|
+
version: '5.0'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
24
|
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
30
|
-
- - ">="
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 4.0.2
|
26
|
+
version: '5.0'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: object_selector
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,7 +33,7 @@ dependencies:
|
|
39
33
|
version: '1.0'
|
40
34
|
- - ">="
|
41
35
|
- !ruby/object:Gem::Version
|
42
|
-
version: 1.0.
|
36
|
+
version: 1.0.2
|
43
37
|
type: :runtime
|
44
38
|
prerelease: false
|
45
39
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,7 +43,7 @@ dependencies:
|
|
49
43
|
version: '1.0'
|
50
44
|
- - ">="
|
51
45
|
- !ruby/object:Gem::Version
|
52
|
-
version: 1.0.
|
46
|
+
version: 1.0.2
|
53
47
|
- !ruby/object:Gem::Dependency
|
54
48
|
name: uuidtools
|
55
49
|
requirement: !ruby/object:Gem::Requirement
|