import re import subprocess # nosec from tempfile import mkstemp import uuid from OpenSSL import crypto from oslo_config import cfg from oslo_utils import fnmatch from barbican.common import config from barbican.common import utils from barbican import i18n as u import barbican.plugin.interface.certificate_manager as cert_manager CONF = config.new_config() LOG = utils.getLogger(__name__) snakeoil_ca_plugin_group = cfg.OptGroup(name='snakeoil_ca_plugin', title="Snakeoil CA Plugin Options") snakeoil_ca_plugin_opts = [ cfg.StrOpt('ca_cert_path', help=u._('Path to CA certicate file')), cfg.StrOpt('ca_cert_key_path', help=u._('Path to CA certificate key file')), cfg.StrOpt('ca_cert_chain_path', help=u._('Path to CA certicate chain file')), cfg.StrOpt('ca_cert_pkcs7_path', help=u._('Path to CA chain pkcs7 file')), cfg.StrOpt('subca_cert_key_directory',
""" Task resources for the Barbican API. """ import abc from barbican import api from barbican.common import resources as res from barbican.common import utils from barbican.common import verifications as ver from barbican.crypto import extension_manager as em from barbican.model import models from barbican.model import repositories as rep from barbican.openstack.common import gettextutils as u LOG = utils.getLogger(__name__) class BaseTask(object): """Base asychronous task.""" __metaclass__ = abc.ABCMeta @abc.abstractmethod def get_name(self): """A hook method to return a short localized name for this task. The returned name in the form 'u.('Verb Noun')'. For example: u._('Create Secret') """ def process(self, *args, **kwargs):