pe_rbac 0.1.0 → 0.1.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 +5 -0
- data/exe/pe_rbac +1 -1
- data/lib/pe_rbac/version.rb +1 -1
- data/lib/pe_rbac.rb +19 -2
- 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: 0f77d4b61e7a7c630244c5ffc50313bf9239100f
|
4
|
+
data.tar.gz: 45c6bbb55280efbd810320257712c662150383a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9aa9257686040018bb92e43a657a5c9c49e6cd10b7991cd84af4a6bd01f3b40ebbfc1c40b9f199c1763f4a341373f19adcedf8116fb5331f723ce0347f799491
|
7
|
+
data.tar.gz: d9260d27ccbe0925670f9359a8d74c30c9a307eabe156c39b57b831226fce6b958123454b91e642a0bd0207eec62eea2e73049234247cbc24b71279411769003
|
data/README.md
CHANGED
@@ -6,6 +6,11 @@ TODO: Delete this and the text above, and describe your gem
|
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
|
+
Gem dependencies need G++ amongst other things. Easiest way to proceed:
|
10
|
+
```
|
11
|
+
yum groupinstall 'Development Tools'
|
12
|
+
```
|
13
|
+
|
9
14
|
Add this line to your application's Gemfile:
|
10
15
|
|
11
16
|
```ruby
|
data/exe/pe_rbac
CHANGED
data/lib/pe_rbac/version.rb
CHANGED
data/lib/pe_rbac.rb
CHANGED
@@ -5,11 +5,28 @@ require 'json'
|
|
5
5
|
|
6
6
|
module PeRbac
|
7
7
|
ssldir = '/etc/puppetlabs/puppet/ssl'
|
8
|
+
fqdn = %x(facter fqdn).strip
|
9
|
+
pe_old_pk = "#{ssldir}/private_keys/pe-internal-orchestrator.pem"
|
10
|
+
pe_old_cert = "#{ssldir}/certs/pe-internal-orchestrator.pem"
|
11
|
+
pe_new_pk = "#{ssldir}/private_keys/#{fqdn}.pem"
|
12
|
+
pe_new_cert = "#{ssldir}/certs/#{fqdn}.pem"
|
13
|
+
|
14
|
+
# pe 2016.4.0 removes the pe-internal-orchestrator.pem file but old systems
|
15
|
+
# will still have the client cert (which won't work), so pick based on
|
16
|
+
# using pe-internal-orchestrator.pem if its available
|
17
|
+
if File.exist?(pe_old_pk)
|
18
|
+
pk = pe_old_pk
|
19
|
+
cert = pe_old_cert
|
20
|
+
else
|
21
|
+
pk = pe_new_pk
|
22
|
+
cert = pe_new_cert
|
23
|
+
end
|
24
|
+
|
8
25
|
CONF = {
|
9
26
|
host: Socket.gethostname,
|
10
27
|
port: 4433,
|
11
|
-
cert:
|
12
|
-
key:
|
28
|
+
cert: cert,
|
29
|
+
key: pk,
|
13
30
|
cacert: ssldir + '/certs/ca.pem'
|
14
31
|
}
|
15
32
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pe_rbac
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geoff Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|