Incorrect ssl-public-key causes silent failure of landscape-client

Bug #1829276 reported by Drew Freiberger
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
landscape-client-charm
New
Undecided
Unassigned

Bug Description

If you deploy landscape without SSL and you then go about enabling SSL, if you have an incorrectly configured ssl-public-key in the landscape-charm (meaning the cert is failing to handshake properly with the server (subject name mismatch, expiration, etc), the charm just happily sets up the CA and shows success while the landscape-client broker is spinning on the following in the log:

2019-05-15 17:16:27,172 INFO [MainThread] Message exchange failed.
2019-05-15 17:16:27,172 INFO [MainThread] Message exchange completed in 0.14s.
2019-05-15 17:17:27,319 INFO [MainThread] Starting urgent message exchange with https://CMOOSINCFUP7306.nonprod.maas/message-system.
2019-05-15 17:17:27,455 ERROR [PoolThread-twisted.internet.reactor-0] Error contacting the server at https://CMOOSINCFUP7306.nonprod.maas/message-system.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/landscape/broker/transport.py", line 71, in exchange
    message_api)
  File "/usr/lib/python2.7/dist-packages/landscape/broker/transport.py", line 45, in _curl
    headers=headers, cainfo=self._pubkey, curl=curl))
  File "/usr/lib/python2.7/dist-packages/landscape/lib/fetch.py", line 113, in fetch
    raise PyCurlError(e.args[0], e.args[1])
PyCurlError: Error 51: SSL: certificate subject name (CN=myhost.maas) does not match target host name 'myhost.maas'

Of course, the above error was operator error in creating a subject with "CN=myhost.maas" resulting in the subject actually being CN=CN=myhost.maas, however, this needs to either be alerted on or needs to be shown as blocking/error in the juju model.

Revision history for this message
Alexander Litvinov (alitvinov) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.