From f5ac714a7b22687fbb5b12db7f41c283cee12aee Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Wed, 2 Feb 2022 11:36:14 +0200 Subject: [PATCH] Pass config to castellan Currently castellan can't be configured through octavia.conf as conf is not passed while initializing backend. Also document castellan configuration options in reference. Change-Id: I30b81866989c22b94fb77e62e7abd180f0f0af50 --- etc/config/octavia-config-generator.conf | 1 + octavia/certificates/manager/castellan_mgr.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/etc/config/octavia-config-generator.conf b/etc/config/octavia-config-generator.conf index 50ba5e0ffa..bb787bdd98 100644 --- a/etc/config/octavia-config-generator.conf +++ b/etc/config/octavia-config-generator.conf @@ -13,3 +13,4 @@ namespace = oslo.policy namespace = keystonemiddleware.audit namespace = keystonemiddleware.auth_token namespace = cotyledon +namespace = castellan.config diff --git a/octavia/certificates/manager/castellan_mgr.py b/octavia/certificates/manager/castellan_mgr.py index cfe592586f..37d67fd99e 100644 --- a/octavia/certificates/manager/castellan_mgr.py +++ b/octavia/certificates/manager/castellan_mgr.py @@ -19,12 +19,15 @@ Cert manager implementation for Castellan from castellan.common.objects import opaque_data from castellan import key_manager from OpenSSL import crypto +from oslo_config import cfg from oslo_log import log as logging from octavia.certificates.common import pkcs12 from octavia.certificates.manager import cert_mgr from octavia.common import exceptions +CONF = cfg.CONF + LOG = logging.getLogger(__name__) @@ -33,7 +36,7 @@ class CastellanCertManager(cert_mgr.CertManager): def __init__(self): super().__init__() - self.manager = key_manager.API() + self.manager = key_manager.API(CONF) def store_cert(self, context, certificate, private_key, intermediates=None, private_key_passphrase=None, expiration=None,