talos 0.1.5 → 0.1.7
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/.travis.yml +1 -1
- data/README.md +5 -1
- data/lib/talos.rb +6 -1
- data/spec/fixtures/master +1 -1
- data/talos.gemspec +3 -3
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37518a52c1a810d98ff2e1a66e362b13ec057bc5
|
4
|
+
data.tar.gz: 176679ef4e2cc207f099452eb5f10f5cec0fdb35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97fb24dd46855711a92869784ce965ef0f139d7de5dba08068cb58824b54fe0fe104ddc0b3c3aac596a4dabb7622cfbf22af684bc1b242d7baa87df0c383ab9a
|
7
|
+
data.tar.gz: 57b72db876fd7ce56052f5c56a1d2553fd211dcb2e8788a8e34933df7ebf2a0f7ec37936fc9d54839468b2f85415cf0ef0522b6d0b3429ffbfc08f2b175d5703
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -4,7 +4,7 @@ Talos
|
|
4
4
|
[](http://badge.fury.io/rb/talos)
|
5
5
|
[](https://travis-ci.org/spotify/talos)
|
6
6
|
|
7
|
-
Talos is a rack application which
|
7
|
+
Talos is a rack application which serves Hiera yaml files over HTTP.
|
8
8
|
It authorizes clients based on the SSL certificates issued by the Puppet CA and returns only the files in the
|
9
9
|
[Hiera scope](https://docs.puppetlabs.com/hiera/3.0/command_line.html#json-and-yaml-scopes).
|
10
10
|
|
@@ -55,6 +55,7 @@ scopes:
|
|
55
55
|
environment: testing
|
56
56
|
|
57
57
|
unsafe_scopes: true
|
58
|
+
ssl: true
|
58
59
|
```
|
59
60
|
|
60
61
|
When receiving a request, Talos iterates over `scopes` list and matches
|
@@ -71,6 +72,9 @@ scope on collision.
|
|
71
72
|
If `unsafe_scopes` option is enabled, Talos will also add all the parameters
|
72
73
|
passed by the client to the Hiera scope.
|
73
74
|
|
75
|
+
The `ssl` option defaults to enabled. When disabled, the `fqdn` query parameter
|
76
|
+
is used to determine scopes rather than the client certificate.
|
77
|
+
|
74
78
|
Hiera
|
75
79
|
-----
|
76
80
|
You need to provide `/etc/talos/hiera.yaml` file to configure Hiera
|
data/lib/talos.rb
CHANGED
@@ -24,9 +24,11 @@ require 'archive/tar/minitar'
|
|
24
24
|
require 'pathname'
|
25
25
|
include Archive::Tar
|
26
26
|
|
27
|
+
|
27
28
|
class Talos < Sinatra::Base
|
28
29
|
def self.prepare_config(path)
|
29
30
|
set :talos, YAML.load_file(path)
|
31
|
+
settings.talos['ssl'] = true if settings.talos['ssl'].nil?
|
30
32
|
settings.talos['scopes'].each do |scope_config|
|
31
33
|
begin
|
32
34
|
scope_config['regexp'] = Regexp.new(scope_config['match'])
|
@@ -47,6 +49,7 @@ class Talos < Sinatra::Base
|
|
47
49
|
configure :production do
|
48
50
|
set :hiera, Hiera::Config::load(File.expand_path('/etc/talos/hiera.yaml'))
|
49
51
|
prepare_config('/etc/talos/talos.yaml')
|
52
|
+
warn("SECURITY WARNING: use of ssl is disabled, client requests cannot be authenticated") if !settings.talos['ssl']
|
50
53
|
warn("SECURITY WARNING: unsafe_scopes are enabled, SSL authentication bypass is possible") if settings.talos['unsafe_scopes']
|
51
54
|
end
|
52
55
|
|
@@ -97,11 +100,13 @@ class Talos < Sinatra::Base
|
|
97
100
|
end
|
98
101
|
|
99
102
|
get '/' do
|
100
|
-
|
103
|
+
fqdn_env = request.env['HTTP_SSL_CLIENT_S_DN_CN'] ? request.env['HTTP_SSL_CLIENT_S_DN_CN'] : request.env['SSL_CLIENT_S_DN_CN']
|
104
|
+
fqdn = (settings.development? || !settings.talos['ssl']) ? params[:fqdn] : fqdn_env
|
101
105
|
scope = get_scope(fqdn)
|
102
106
|
files_to_pack = files_in_scope(scope)
|
103
107
|
archive = compress_files(files_to_pack)
|
104
108
|
content_type 'application/x-gzip'
|
109
|
+
headers['content-encoding'] = 'gzip'
|
105
110
|
archive.string
|
106
111
|
end
|
107
112
|
|
data/spec/fixtures/master
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
master.3fa3fd97848a72ae539b75bccd6028cd1d4e92e3
|
data/talos.gemspec
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
|
-
s.version = '0.1.
|
2
|
+
s.version = '0.1.7'
|
3
3
|
s.name = 'talos'
|
4
4
|
s.authors = ['Alexey Lapitsky', 'Johan Haals']
|
5
5
|
s.email = 'alexey@spotify.com'
|
6
6
|
s.summary = %q{Hiera secrets distribution over HTTP}
|
7
7
|
s.description = %q{Distribute compressed hiera yaml files to authenticated puppet clients over HTTP}
|
8
8
|
s.homepage = 'https://github.com/spotify/talos'
|
9
|
-
s.license = 'Apache
|
9
|
+
s.license = 'Apache-2.0'
|
10
10
|
|
11
11
|
s.files = `git ls-files`.split($\)
|
12
12
|
s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
13
13
|
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
14
14
|
s.require_paths = ['lib']
|
15
15
|
|
16
|
-
s.add_dependency 'rack', '
|
16
|
+
s.add_dependency 'rack', '1.6.4'
|
17
17
|
s.add_dependency 'sinatra', '~> 1.4.7'
|
18
18
|
s.add_dependency 'hiera', '~> 3.2.0'
|
19
19
|
s.add_dependency 'archive-tar-minitar', '~> 0.5.2'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: talos
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexey Lapitsky
|
@@ -9,22 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2019-03-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - '='
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
20
|
+
version: 1.6.4
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - '='
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version:
|
27
|
+
version: 1.6.4
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: sinatra
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -139,7 +139,7 @@ files:
|
|
139
139
|
- talos.gemspec
|
140
140
|
homepage: https://github.com/spotify/talos
|
141
141
|
licenses:
|
142
|
-
- Apache
|
142
|
+
- Apache-2.0
|
143
143
|
metadata: {}
|
144
144
|
post_install_message:
|
145
145
|
rdoc_options: []
|
@@ -157,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
157
|
version: '0'
|
158
158
|
requirements: []
|
159
159
|
rubyforge_project:
|
160
|
-
rubygems_version: 2.
|
160
|
+
rubygems_version: 2.5.2.3
|
161
161
|
signing_key:
|
162
162
|
specification_version: 4
|
163
163
|
summary: Hiera secrets distribution over HTTP
|