soar_authentication_token 5.0.0 → 5.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/docker-compose-isolated.yml +1 -0
- data/docker-compose.yml +2 -1
- data/lib/soar_authentication_token/config_rotator.rb +7 -7
- data/lib/soar_authentication_token/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da82e78432f5421fea7acaf743e4f033cffc6d44
|
4
|
+
data.tar.gz: 81cc335a3532dfc97edee20526fdc3b6633819a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc388a37c4da3e085642ea7553f52958efad7a0bac7ebe39730e3567f11659a447e4b0ecce64704d6af15498193ce74912f5cf62b3344a73fc1ad35fad82f0b7
|
7
|
+
data.tar.gz: b1a211f06fece5480a47fdd8b6344f3411022e88d031f604987a5b40297f9bef81962d15276978ca0272f45f01657cad92fc03e01499e880b4394c23e0ba027f
|
data/README.md
CHANGED
@@ -106,7 +106,7 @@ For local token generation, configure as such:
|
|
106
106
|
generator = SoarAuthenticationToken::KeypairGenerator.new
|
107
107
|
private_key, public_key = generator.generate
|
108
108
|
@configuration_local = {
|
109
|
-
'provider' => 'SoarAuthenticationToken::
|
109
|
+
'provider' => 'SoarAuthenticationToken::JwtTokenGenerator',
|
110
110
|
'private_key' => private_key
|
111
111
|
}
|
112
112
|
```
|
data/docker-compose-isolated.yml
CHANGED
data/docker-compose.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
version: '2.0'
|
2
2
|
services:
|
3
3
|
soar-authentication-token:
|
4
|
-
command: /bin/bash -c 'bundle exec rspec -cfd ./spec/'
|
4
|
+
command: /bin/bash -c 'sleep 5; bundle exec rspec -cfd ./spec/'
|
5
5
|
user: $UID:$UID
|
6
6
|
build: .
|
7
7
|
image: soar-authentication-token
|
@@ -49,3 +49,4 @@ services:
|
|
49
49
|
- authentication-token-redis-store
|
50
50
|
authentication-token-redis-store:
|
51
51
|
image: redis
|
52
|
+
command: redis-server --requirepass redis_password
|
@@ -35,8 +35,8 @@ module SoarAuthenticationToken
|
|
35
35
|
def rotate_generator_config(config: ,new_private_key: ,new_key_description:)
|
36
36
|
validate_generator_config(config)
|
37
37
|
new_config = config.dup
|
38
|
-
new_config['private_key'] = new_private_key
|
39
|
-
new_config['key_description'] = new_key_description
|
38
|
+
new_config['auth_token_generator']['private_key'] = new_private_key
|
39
|
+
new_config['auth_token_generator']['key_description'] = new_key_description
|
40
40
|
new_config
|
41
41
|
end
|
42
42
|
|
@@ -44,7 +44,7 @@ module SoarAuthenticationToken
|
|
44
44
|
validate_validator_config(config)
|
45
45
|
new_config = config.dup
|
46
46
|
trim_public_keys(new_config)
|
47
|
-
new_config['keys'][new_key_description] = { 'public_key' => new_public_key }
|
47
|
+
new_config['auth_token_validator']['keys'][new_key_description] = { 'public_key' => new_public_key }
|
48
48
|
new_config
|
49
49
|
end
|
50
50
|
|
@@ -59,9 +59,9 @@ module SoarAuthenticationToken
|
|
59
59
|
|
60
60
|
def trim_public_keys(config)
|
61
61
|
traversed_keys = 0
|
62
|
-
config['keys'].sort.reverse_each do |key_name, key_data|
|
62
|
+
config['auth_token_validator']['keys'].sort.reverse_each do |key_name, key_data|
|
63
63
|
traversed_keys += 1
|
64
|
-
config['keys'].delete(key_name) if traversed_keys >= @maximum_number_of_public_keys
|
64
|
+
config['auth_token_validator']['keys'].delete(key_name) if traversed_keys >= @maximum_number_of_public_keys
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
@@ -84,11 +84,11 @@ module SoarAuthenticationToken
|
|
84
84
|
end
|
85
85
|
|
86
86
|
def validate_generator_config(config)
|
87
|
-
raise ArgumentError, 'private_key not in config' unless config['private_key']
|
87
|
+
raise ArgumentError, 'private_key not in config' unless config['auth_token_generator']['private_key']
|
88
88
|
end
|
89
89
|
|
90
90
|
def validate_validator_config(config)
|
91
|
-
raise ArgumentError, 'keys not in config' unless config['keys']
|
91
|
+
raise ArgumentError, 'keys not in config' unless config['auth_token_validator']['keys']
|
92
92
|
end
|
93
93
|
end
|
94
94
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soar_authentication_token
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Barney de Villiers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: soar_xt
|