Re-creating root CA on vault causes Horizon services to not function correctly

Bug #1898032 reported by Diko Parvanov
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard Charm
Fix Released
High
Liam Young
vault-charm
Invalid
Undecided
Unassigned

Bug Description

After a vault generate-root-ca action is performed and a new root CA is issued, all related openstack services certificates are renewed, however testing from some units to, for example, curl keystone API fails with 'SSL certificate problem: unable to get local issuer certificate'.

Either this information is not properly propagated by the relations or not properly handled by the related charms.

Manually fixing this by adding the new ca certificate, run-action get-root-ca on vault and then upload to /usr/loca/share/ca-certificates and running update-ca-certificates as root.

Diko Parvanov (dparv)
summary: - Re-creating root CA on vault causes multiple services to not function
+ Re-creating root CA on vault causes Horizon services to not function
correctly
Revision history for this message
Chris Sanders (chris.sanders) wrote :

Subscribing field high due to the impact on operations as well as handovers and deployments which sometimes need to re-generate certificates.

Revision history for this message
Liam Young (gnuoy) wrote :

I'm not sure what I'm missing but I can't reproduce this. When I run generate-root-ca and reissue certs I see /usr/local/share/ca-certificates/keystone_juju_ca_cert.crt change on the dashboard units and running curl from the openstack-dashboard against the keystone endpoint continues to work.

Is this problem intermittent or is it consistently reproducible ? Is it only the ca certificate on the dashboard units that need updating or are other applications affected too?

Revision history for this message
Diko Parvanov (dparv) wrote :

How about when you have a external ssl certifiated installed in the openstack-dashboard units?

I know that putting openstack-dashboard ssl_cert/ssl_key/ssl_ca takes precedence over what vault issues (by the internal root CA) which probably only updates the ca-certificates with the one configured on openstack-dashboard ssl_ca option and just drops the information via the vault certificates relation

Revision history for this message
Liam Young (gnuoy) wrote :

Am I right in saying that scenario is:

1) Deploy with vaults relations
2) Issue certificates via vault
3) Add certs to openstack-dashboard application via ssl_* config options
4) vault reissues certs
5) openstack-dashboard application now has CA cert from vault installed. The CA from ssl_ca is no longer installed.

If this is correct then what behaviour are you after ? Both CAs installed simultaneously ?

Liam Young (gnuoy)
Changed in charm-openstack-dashboard:
status: New → Incomplete
Changed in vault-charm:
status: New → Incomplete
Liam Young (gnuoy)
Changed in vault-charm:
status: Incomplete → Invalid
Changed in charm-openstack-dashboard:
status: Incomplete → In Progress
importance: Undecided → High
assignee: nobody → Liam Young (gnuoy)
Revision history for this message
Diko Parvanov (dparv) wrote :

Not quite. The scenario is:

1) Deploy with vault relations
2) Issue certificates via vault
[some time later customer decides to use different ssl certs on Horizon]
3) Add certificates, provided by customer via ssl_* config option to openstack-dashboard
4) Re-issue vault root certificate
5) Openstack-dashboard now doesn't trust new root CA from vault, only has the CA from ssl_ca config option and can't access keystone endpoints, as keystone doesn't have custom ssl_* installed, only vault issued certificates.

When vault re-issues certificates and openstack-dashboard has a custom ssl_ca assigned the charm should combine the new vault certificates via the relation with the configured ssl_ca, otherwise the communication to keystone will stop.

Changed in vault-charm:
status: Invalid → New
Revision history for this message
Diko Parvanov (dparv) wrote :

I guess it's something openstack-dashboard charm should handle, vault has nothing wrong, as it correctly issues the certificates. Thus marking vault-charm as invalid.

Changed in vault-charm:
status: New → Invalid
Revision history for this message
Liam Young (gnuoy) wrote :

I haven't been able to reproduce this but from the description of the issue I think this change will help:

https://github.com/juju/charm-helpers/pull/522

Revision history for this message
Liam Young (gnuoy) wrote :

I am hopeful that https://review.opendev.org/c/openstack/charm-openstack-dashboard/+/764551 will fix the issue. Please can you see if the bug still exists with cs:~openstack-charmers-next/openstack-dashboard ?

Changed in charm-openstack-dashboard:
status: In Progress → Fix Committed
David Ames (thedac)
Changed in charm-openstack-dashboard:
milestone: none → 21.01
David Ames (thedac)
Changed in charm-openstack-dashboard:
status: Fix Committed → Fix Released
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.