Skip to content

Commit

Permalink
Fixes #37308 - set REMOTE_USER properly for pulpcore registry
Browse files Browse the repository at this point in the history
  • Loading branch information
ianballou authored and ehelms committed Apr 11, 2024
1 parent 738ca5a commit 21aa39e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions manifests/plugin/container.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
String $location_prefix = '/pulpcore_registry',
String $registry_version_path = '/v2/',
) {
$api_default_request_headers = [
"unset ${pulpcore::apache::remote_user_environ_header}",
]

$api_additional_request_headers = $pulpcore::api_client_auth_cn_map.map |String $cn, String $pulp_user| {
"set ${pulpcore::apache::remote_user_environ_header} \"${pulp_user}\" \"expr=%{SSL_CLIENT_S_DN_CN} == '${cn}'\""
}

$context = {
'directories' => [
{
Expand All @@ -19,10 +27,7 @@
'url' => "${pulpcore::apache::api_base_url}${registry_version_path}",
},
],
'request_headers' => [
"unset ${pulpcore::apache::remote_user_environ_header}",
"set ${pulpcore::apache::remote_user_environ_header} \"%{SSL_CLIENT_S_DN_CN}s\" env=SSL_CLIENT_S_DN_CN",
],
'request_headers' => $api_default_request_headers + $api_additional_request_headers,
},
],
'proxy_pass' => [
Expand Down

0 comments on commit 21aa39e

Please sign in to comment.