Skip to content
This repository was archived by the owner on Mar 28, 2019. It is now read-only.

Commit 6b789ee

Browse files
committed
Merge pull request #224 from mvisonneau/caproxy
Added the possibility to create a proxy through the CA
2 parents 0f88d4d + fb9fdb3 commit 6b789ee

File tree

3 files changed

+34
-1
lines changed

3 files changed

+34
-1
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,19 @@ class { 'puppet::server':
9393
}
9494
```
9595

96+
#### Certificate authority proxy configuration
97+
98+
If you want to automatically relay the certificate requests to an other CA you can do the following :
99+
```puppet
100+
class { 'puppet::server':
101+
servertype => 'unicorn',
102+
ca => false,
103+
external_ca => 'https://my_puppet_ca_server:8140',
104+
}
105+
```
106+
107+
NB: This is only implemented for Nginx/Unicorn configuration so far.
108+
96109
#### Master with PuppetDB, PostgreSQL, and reports
97110
Running a puppet master without PuppetDB loses much of the utility of Puppet,
98111
so you probably want it. As a convenience, this module will install puppetdb

manifests/server.pp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@
158158
$servertype = 'unicorn',
159159
$storeconfigs = undef,
160160
$package = $puppet::params::master_package,
161-
$tagmail = {}
161+
$tagmail = {},
162+
$external_ca = undef,
162163
) inherits puppet::params {
163164

164165
validate_bool($ca)

manifests/server/unicorn.pp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,25 @@
5959
],
6060
}
6161

62+
if ! empty( $::puppet::server::external_ca )
63+
{
64+
nginx::resource::location { 'external_certificate_authority_proxy':
65+
ensure => present,
66+
location => '~ ^/.*/certificate.*',
67+
vhost => 'puppetmaster',
68+
proxy_set_header => [],
69+
location_custom_cfg => {
70+
proxy_pass => $::puppet::server::external_ca,
71+
proxy_redirect => 'off',
72+
proxy_connect_timeout => '90',
73+
proxy_read_timeout => '300',
74+
},
75+
# this priority sets concat order so that the location is created inside
76+
# the server block. This works around a possible bug in jfryman/nginx.
77+
priority => 701,
78+
}
79+
}
80+
6281
unicorn::app { 'puppetmaster':
6382
approot => $::puppet::params::puppet_confdir,
6483
config_file => "${::puppet::params::puppet_confdir}/unicorn.conf",

0 commit comments

Comments
 (0)