Project

General

Profile

Actions

Bug #27847

closed

foreman-proxy-certs-generate uses a value for --foreman-proxy-cname to add a DNS record even if it is invalid

Added by Ewoud Kohl van Wijngaarden about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Category:
Foreman modules
Target version:

Description

foreman-proxy-certs-generate uses the value for --foreman-proxy-cname to add a DNS record in the SAN field regardless of that setting making sense or not. E.g. DNS:[] and DNS: <= empty string.

This is what foreman-proxy-certs-generate is generating for qpid-router-server.crt: (used by capsules' qdrouterd on port 5647 to listen to clients' goferds)

X509v3 Subject Alternative Name: 
DNS:mycapsule.example.com, DNS:[]

The DNS:[] comes from the default value for --foreman-proxy-cname:
~~~
[root@sat65a ~]# foreman-proxy-certs-generate --help

(...snip...)

= Module foreman_proxy_certs:
--certs-tar Path to tar file with certs to generate (current: UNDEF)
--foreman-proxy-cname additional names of the foreman proxy (current: ["[]"]) <========= here
--foreman-proxy-fqdn FQDN of the foreman proxy (current: "sat65a.usersys.redhat.com")

Turns out, if you use `--foreman-proxy-cname ""` with `foreman-proxy-certs-generate` it will still generate certs with DNS:<fqdn>, DNS: <==== second DNS entry empty.

The problem is that puppet-strings parses the default as the string "[]" rather than an empty array [].

Actions #1

Updated by The Foreman Bot about 5 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/puppet-certs/pull/256 added
Actions #2

Updated by The Foreman Bot about 5 years ago

  • Fixed in Releases 1.24.0 added
Actions #3

Updated by Ewoud Kohl van Wijngaarden about 5 years ago

  • Status changed from Ready For Testing to Closed
Actions #4

Updated by The Foreman Bot about 5 years ago

  • Pull request https://github.com/theforeman/foreman-packaging/pull/4115 added
Actions #5

Updated by Ewoud Kohl van Wijngaarden about 5 years ago

  • Pull request deleted (https://github.com/theforeman/foreman-packaging/pull/4115)
Actions #6

Updated by Ewoud Kohl van Wijngaarden about 5 years ago

  • Category set to Foreman modules
  • Assignee changed from Eric Helms to Ewoud Kohl van Wijngaarden
  • Target version set to 1.24.0
  • Triaged changed from No to Yes
Actions #7

Updated by The Foreman Bot about 5 years ago

  • Pull request https://github.com/theforeman/puppet-certs/pull/259 added
Actions #8

Updated by The Foreman Bot about 5 years ago

  • Pull request https://github.com/theforeman/foreman-installer/pull/397 added
Actions #9

Updated by The Foreman Bot about 5 years ago

  • Pull request https://github.com/theforeman/puppet-certs/pull/260 added
Actions

Also available in: Atom PDF