Project

General

Profile

Actions

Bug #6205

closed

Custom SSL client cert for smart proxy based auth doesn't split CN correctly

Added by Anonymous almost 10 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Users, Roles and Permissions
Target version:
Difficulty:
easy
Triaged:
Fixed in Releases:
Found in Releases:

Description

https://bugzilla.redhat.com/show_bug.cgi?id=1108740

in app/controllers/concerns/foreman/controller/smart_proxy_auth.rb

dn is evaluating with this format on RHEL 6:
/C=US/ST=North Carolina/O=FOREMAN/OU=PUPPET/CN=satellite1.montleon.intra

but on RHEL 7 it is coming up as:
CN=satellite2.montleon.intra,OU=PUPPET,O=FOREMAN,ST=North Carolina,C=US

so on:
https://github.com/theforeman/foreman/blob/develop/app/controllers/concerns/foreman/controller/smart_proxy_auth.rb#L44

this is causing $1 one from the match above to be:
"satellite2.montleon.intra,OU=PUPPET,O=FOREMAN,ST=North"

by changing request_hosts = [$1] to request_hosts = [$1.gsub(/,(\S+)/i, '')] it seems to work around the issue. I'm not sure if this is the best approach to fixing it or if someone can foresee a better way.

Actions

Also available in: Atom PDF