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 committed Mar 28, 2024
1 parent 738ca5a commit 4a5c71b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions manifests/plugin/container.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
String $location_prefix = '/pulpcore_registry',
String $registry_version_path = '/v2/',
) {

Check failure on line 12 in manifests/plugin/container.pp

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

there should be a single space or single newline after an opening brace (check: manifest_whitespace_opening_brace_after)
$api_default_request_headers = [
"unset ${remote_user_environ_header}"

Check warning on line 14 in manifests/plugin/container.pp

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

top-scope variable being used without an explicit namespace (check: variable_scope)

Check warning on line 14 in manifests/plugin/container.pp

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

missing trailing comma after last element (check: trailing_comma)
]

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

Check warning on line 18 in manifests/plugin/container.pp

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

top-scope variable being used without an explicit namespace (check: variable_scope)
}

$context = {
'directories' => [
{
Expand All @@ -19,10 +28,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 4a5c71b

Please sign in to comment.