soar-authentication-identity_uuid_translator 2.0.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gemspec +2 -2
- data/lib/soar/authentication/identity_uuid_translator/test/orchestration_provider/customer.rb +5 -5
- data/lib/soar/authentication/identity_uuid_translator/test/orchestration_provider/customer_client_number.rb +3 -3
- data/lib/soar/authentication/identity_uuid_translator/test/orchestration_provider/customer_email.rb +3 -3
- data/lib/soar/authentication/identity_uuid_translator/test/orchestration_provider/staff.rb +8 -8
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42fd8d3d66dfa86a49ab5f50af5a0b77dd64d8c1
|
4
|
+
data.tar.gz: 31f134e18c8d55523cc5378345ac83240b9c2439
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec042766a4395566fc7d5b3a96e00d4c42460d757b882212cd8ff8bc4be232b2d800d1d242d17bc1034c0ce95ed2dbabb937b56bf3a843c383f2b4a0b8291ed1
|
7
|
+
data.tar.gz: 598cd5e28fa0fd7f84290a58d46a549d0aeb45d14dbf5fbb7588b39d3417aa8b3a5141801ec1e0c47e2c7bf0509ebc26ede1067021a134c66337f51e347693b7
|
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 = "3.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', '~>
|
13
|
+
spec.add_runtime_dependency 'soar-registry-identity', '~> 6.0'
|
14
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/lib/soar/authentication/identity_uuid_translator/test/orchestration_provider/customer.rb
CHANGED
@@ -9,8 +9,8 @@ module Soar
|
|
9
9
|
|
10
10
|
def given_existing_role_and_attributes
|
11
11
|
@roles_directory.put({
|
12
|
-
"identity_uuid" => Soar::Authentication::IdentityUuidTranslator::UuidGenerator.generate("#{Soar::Authentication::IdentityUuidTranslator::Provider::Customer::PREFIX}#{@identity[
|
13
|
-
"identity_source" => "#{Soar::Authentication::IdentityUuidTranslator::Provider::Customer::PREFIX}#{@identity[
|
12
|
+
"identity_uuid" => Soar::Authentication::IdentityUuidTranslator::UuidGenerator.generate("#{Soar::Authentication::IdentityUuidTranslator::Provider::Customer::PREFIX}#{@identity['ID']}"),
|
13
|
+
"identity_source" => "#{Soar::Authentication::IdentityUuidTranslator::Provider::Customer::PREFIX}#{@identity['ID']}",
|
14
14
|
"identity_role" => Soar::Authentication::IdentityUuidTranslator::Provider::Customer::ROLE,
|
15
15
|
"identity_role_attributes" => [Faker::Number.unique.number(10)].compact
|
16
16
|
})
|
@@ -22,7 +22,7 @@ module Soar
|
|
22
22
|
"identity_role" => Soar::Authentication::IdentityUuidTranslator::Provider::Customer::ROLE
|
23
23
|
}
|
24
24
|
identity = @roles_directory.fetch(primary_key)
|
25
|
-
return identity['identity_source'] == "#{Soar::Authentication::IdentityUuidTranslator::Provider::Customer::PREFIX}#{@identity[
|
25
|
+
return identity['identity_source'] == "#{Soar::Authentication::IdentityUuidTranslator::Provider::Customer::PREFIX}#{@identity['ID']}"
|
26
26
|
end
|
27
27
|
|
28
28
|
def role?
|
@@ -32,14 +32,14 @@ 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) && (identity['identity_role_attributes']['profiles'].include?(@identity[
|
35
|
+
(identity['identity_role'] == Soar::Authentication::IdentityUuidTranslator::Provider::Customer::ROLE) && (identity['identity_role_attributes']['profiles'].include?(@identity['Client_Number']))
|
36
36
|
rescue Soar::Registry::Directory::Error::NoEntriesFoundError => e
|
37
37
|
return false
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
41
|
def uuid?
|
42
|
-
@uuid == Soar::Authentication::IdentityUuidTranslator::UuidGenerator.generate("#{Soar::Authentication::IdentityUuidTranslator::Provider::Customer::PREFIX}#{@identity[
|
42
|
+
@uuid == Soar::Authentication::IdentityUuidTranslator::UuidGenerator.generate("#{Soar::Authentication::IdentityUuidTranslator::Provider::Customer::PREFIX}#{@identity['ID']}")
|
43
43
|
end
|
44
44
|
|
45
45
|
end
|
@@ -36,9 +36,9 @@ module Soar
|
|
36
36
|
|
37
37
|
def given_existing_identity
|
38
38
|
@identity = {
|
39
|
-
ID
|
40
|
-
Notifyemail_Invoice
|
41
|
-
Client_Number
|
39
|
+
'ID' => Faker::Number.number(4),
|
40
|
+
'Notifyemail_Invoice' => Faker::Internet.email,
|
41
|
+
'Client_Number' => @identifier
|
42
42
|
}
|
43
43
|
@directory.put(@identity)
|
44
44
|
end
|
data/lib/soar/authentication/identity_uuid_translator/test/orchestration_provider/customer_email.rb
CHANGED
@@ -36,9 +36,9 @@ module Soar
|
|
36
36
|
|
37
37
|
def given_existing_identity
|
38
38
|
@identity = {
|
39
|
-
ID
|
40
|
-
Notifyemail_Invoice
|
41
|
-
Client_Number
|
39
|
+
'ID' => Faker::Number.number(4),
|
40
|
+
'Notifyemail_Invoice' => @identifier,
|
41
|
+
'Client_Number' => "C#{Faker::Number.unique.number(10)}"
|
42
42
|
}
|
43
43
|
@directory.put(@identity)
|
44
44
|
end
|
@@ -14,15 +14,15 @@ module Soar
|
|
14
14
|
def given_existing_identity
|
15
15
|
begin
|
16
16
|
@identity = {
|
17
|
-
dn
|
18
|
-
attributes
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
17
|
+
'dn' => "cn=John Smith,#{@identity_directory_configuration['config']['base']}",
|
18
|
+
'attributes' => {
|
19
|
+
'cn' => "John Smith",
|
20
|
+
'mail' => @identifier,
|
21
|
+
'objectclass' => ["inetOrgPerson", "top"],
|
22
|
+
'sn' => "Smith"
|
23
|
+
}
|
23
24
|
}
|
24
|
-
|
25
|
-
@identity_directory.provider.delete(@identity[:dn])
|
25
|
+
@identity_directory.provider.delete(@identity['dn'])
|
26
26
|
@identity_directory.put(@identity)
|
27
27
|
rescue Soar::Registry::Directory::Error::DuplicateEntryError => e
|
28
28
|
true
|
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: 3.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-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: soar-registry-identity
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '6.0'
|
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: '
|
26
|
+
version: '6.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: object_selector
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|