Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions manifests/config/apache.pp
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,10 @@
}

$vhost_http_request_headers = [
'set X_FORWARDED_PROTO "http"',
'set SSL_CLIENT_S_DN ""',
'set SSL_CLIENT_CERT ""',
'set SSL_CLIENT_VERIFY ""',
'set X-FORWARDED-PROTO "http"',
'set SSL-CLIENT-S-DN ""',
'set SSL-CLIENT-CERT ""',
'set SSL-CLIENT-VERIFY ""',
] +
$request_headers_to_unset.map |$header| {
"unset ${header}"
Expand All @@ -212,10 +212,10 @@
}

$vhost_https_request_headers = [
'set X_FORWARDED_PROTO "https"',
'set SSL_CLIENT_S_DN "%{SSL_CLIENT_S_DN}s"',
'set SSL_CLIENT_CERT "%{SSL_CLIENT_CERT}s"',
'set SSL_CLIENT_VERIFY "%{SSL_CLIENT_VERIFY}s"',
'set X-FORWARDED-PROTO "https"',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it will make it work!

My-Cool-Header gets translated to HTTP_MY_COOL_HEADER by gunicorn. It's just in the past it also allowed My_Cool_Header to become HTTP_MY_COOL_HEADER (you remember, huh?) and this used to work for us, and now it doesn't anymore.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, puppet-pulpcore should really not depend on puppet-foreman setting things up -- it can be deployed standalone after all :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, but I don't see us setting it in puppet-pulpcore nor puppet-foreman_proxy_content so on content proxies it's actually broken as well. Just in a different way.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see you came to the same conclusion.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'set SSL-CLIENT-S-DN "%{SSL_CLIENT_S_DN}s"',
'set SSL-CLIENT-CERT "%{SSL_CLIENT_CERT}s"',
'set SSL-CLIENT-VERIFY "%{SSL_CLIENT_VERIFY}s"',
] +
$request_headers_to_unset.map |$header| {
"unset ${header}"
Expand Down
32 changes: 16 additions & 16 deletions spec/classes/foreman_config_apache_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@
.with_proxy_preserve_host(true)
.with_proxy_add_headers(true)
.with_request_headers([
'set X_FORWARDED_PROTO "http"',
'set SSL_CLIENT_S_DN ""',
'set SSL_CLIENT_CERT ""',
'set SSL_CLIENT_VERIFY ""',
'set X-FORWARDED-PROTO "http"',
'set SSL-CLIENT-S-DN ""',
'set SSL-CLIENT-CERT ""',
'set SSL-CLIENT-VERIFY ""',
'unset REMOTE-USER',
'unset REMOTE_USER',
'unset REMOTE-USER-EMAIL',
Expand Down Expand Up @@ -127,10 +127,10 @@ class { 'apache':

it { should contain_apache__vhost('foreman')
.with_request_headers([
'set X_FORWARDED_PROTO "http"',
'set SSL_CLIENT_S_DN ""',
'set SSL_CLIENT_CERT ""',
'set SSL_CLIENT_VERIFY ""',
'set X-FORWARDED-PROTO "http"',
'set SSL-CLIENT-S-DN ""',
'set SSL-CLIENT-CERT ""',
'set SSL-CLIENT-VERIFY ""',
'unset OIDC_FOO',
])
}
Expand Down Expand Up @@ -197,10 +197,10 @@ class { 'apache':
.with_proxy_preserve_host(true)
.with_proxy_add_headers(true)
.with_request_headers([
'set X_FORWARDED_PROTO "https"',
'set SSL_CLIENT_S_DN "%{SSL_CLIENT_S_DN}s"',
'set SSL_CLIENT_CERT "%{SSL_CLIENT_CERT}s"',
'set SSL_CLIENT_VERIFY "%{SSL_CLIENT_VERIFY}s"',
'set X-FORWARDED-PROTO "https"',
'set SSL-CLIENT-S-DN "%{SSL_CLIENT_S_DN}s"',
'set SSL-CLIENT-CERT "%{SSL_CLIENT_CERT}s"',
'set SSL-CLIENT-VERIFY "%{SSL_CLIENT_VERIFY}s"',
'unset REMOTE-USER',
'unset REMOTE_USER',
'unset REMOTE-USER-EMAIL',
Expand Down Expand Up @@ -289,10 +289,10 @@ class { 'apache':

it { should contain_apache__vhost('foreman-ssl')
.with_request_headers([
'set X_FORWARDED_PROTO "https"',
'set SSL_CLIENT_S_DN "%{SSL_CLIENT_S_DN}s"',
'set SSL_CLIENT_CERT "%{SSL_CLIENT_CERT}s"',
'set SSL_CLIENT_VERIFY "%{SSL_CLIENT_VERIFY}s"',
'set X-FORWARDED-PROTO "https"',
'set SSL-CLIENT-S-DN "%{SSL_CLIENT_S_DN}s"',
'set SSL-CLIENT-CERT "%{SSL_CLIENT_CERT}s"',
'set SSL-CLIENT-VERIFY "%{SSL_CLIENT_VERIFY}s"',
'unset OIDC_FOO',
])
}
Expand Down
Loading