Hello community,
here is the log from the commit of package python-castellan for
openSUSE:Factory checked in at 2020-06-05 20:09:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-castellan (Old)
and /work/SRC/openSUSE:Factory/.python-castellan.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-castellan"
Fri Jun 5 20:09:26 2020 rev:11 rq:803553 version:3.0.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-castellan/python-castellan.changes
2020-03-27 21:57:28.934799202 +0100
+++
/work/SRC/openSUSE:Factory/.python-castellan.new.3606/python-castellan.changes
2020-06-05 20:11:00.017890802 +0200
@@ -1,0 +2,18 @@
+Tue May 12 10:00:40 UTC 2020 - [email protected]
+
+- update to version 3.0.1
+ - Fix stale references to renamed constant
+ - Update master for stable/train
+ - Fix "is" usage with literals
+ - Implements KeyManager's option discovery.
+ - Fix coverage tests
+ - Switch to Ussuri jobs
+ - Removes context "validation".
+ - Add Wiki links to readme
+ - PDF Documentation Build tox target
+ - Reuse existing token from RequestContext
+ - [ussuri][goal] Drop python 2.7 support and testing
+ - Moving common objects under KeyManager.
+ - Drop use of six
+
+-------------------------------------------------------------------
Old:
----
castellan-1.3.1.tar.gz
New:
----
castellan-3.0.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-castellan.spec ++++++
--- /var/tmp/diff_new_pack.XE3Sqg/_old 2020-06-05 20:11:01.397895254 +0200
+++ /var/tmp/diff_new_pack.XE3Sqg/_new 2020-06-05 20:11:01.401895267 +0200
@@ -17,13 +17,13 @@
Name: python-castellan
-Version: 1.3.1
+Version: 3.0.1
Release: 0
Summary: Generic Key Manager interface for OpenStack
License: Apache-2.0
Group: Development/Languages/Python
URL: https://launchpad.net/castellan
-Source0:
https://files.pythonhosted.org/packages/source/c/castellan/castellan-1.3.1.tar.gz
+Source0:
https://files.pythonhosted.org/packages/source/c/castellan/castellan-3.0.1.tar.gz
BuildRequires: openstack-macros
BuildRequires: python3-barbicanclient >= 4.5.2
BuildRequires: python3-cryptography >= 2.1
@@ -31,7 +31,6 @@
BuildRequires: python3-oslo.config >= 6.4.0
BuildRequires: python3-oslo.log >= 3.36.0
BuildRequires: python3-oslotest
-BuildRequires: python3-pifpaf
BuildRequires: python3-reno
BuildRequires: python3-setuptools
BuildRequires: python3-stestr
@@ -54,7 +53,7 @@
Requires: python3-oslo.i18n >= 3.15.3
Requires: python3-oslo.log >= 3.36.0
Requires: python3-oslo.utils >= 3.33.0
-Requires: python3-requests >= 2.14.2
+Requires: python3-requests >= 2.18.0
Requires: python3-stevedore >= 1.20.0
%description -n python3-castellan
@@ -67,13 +66,14 @@
Group: Documentation/HTML
BuildRequires: python3-Sphinx
BuildRequires: python3-openstackdocstheme
+BuildRequires: python3-sphinxcontrib-svg2pdfconverter
%description -n python-castellan-doc
Castellan is a generic Key Manager interface for OpenStack.
This package contains the documentation
%prep
-%autosetup -p1 -n castellan-1.3.1
+%autosetup -p1 -n castellan-3.0.1
%py_req_cleanup
%build
@@ -81,7 +81,7 @@
# generate html docs
PBR_VERSION=%{version} %sphinx_build -b html doc/source doc/build/html
# remove the sphinx-build leftovers
-rm -rf html/.{doctrees,buildinfo}
+rm -rf doc/build/html/.{doctrees,buildinfo}
%install
%{py3_install}
++++++ _service ++++++
--- /var/tmp/diff_new_pack.XE3Sqg/_old 2020-06-05 20:11:01.433895370 +0200
+++ /var/tmp/diff_new_pack.XE3Sqg/_new 2020-06-05 20:11:01.433895370 +0200
@@ -1,8 +1,8 @@
<services>
<service mode="disabled" name="renderspec">
- <param
name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/train/openstack/castellan/castellan.spec.j2</param>
+ <param
name="input-template">https://opendev.org/openstack/rpm-packaging/raw/branch/stable/ussuri/openstack/castellan/castellan.spec.j2</param>
<param name="output-name">python-castellan.spec</param>
- <param
name="requirements">https://raw.githubusercontent.com/openstack/castellan/stable/train/requirements.txt</param>
+ <param
name="requirements">https://opendev.org/openstack/castellan/raw/branch/stable/ussuri/requirements.txt</param>
<param name="changelog-email">[email protected]</param>
<param name="changelog-provider">gh,openstack,castellan</param>
</service>
++++++ castellan-1.3.1.tar.gz -> castellan-3.0.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/castellan-1.3.1/.zuul.yaml
new/castellan-3.0.1/.zuul.yaml
--- old/castellan-1.3.1/.zuul.yaml 2019-09-04 16:25:06.000000000 +0200
+++ new/castellan-3.0.1/.zuul.yaml 2020-04-13 19:08:56.000000000 +0200
@@ -60,8 +60,7 @@
templates:
- check-requirements
- openstack-lower-constraints-jobs
- - openstack-python-jobs
- - openstack-python3-train-jobs
+ - openstack-python3-ussuri-jobs
- periodic-stable-jobs
- publish-openstack-docs-pti
- release-notes-jobs-python3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/castellan-1.3.1/AUTHORS new/castellan-3.0.1/AUTHORS
--- old/castellan-1.3.1/AUTHORS 2019-09-04 16:26:07.000000000 +0200
+++ new/castellan-3.0.1/AUTHORS 2020-04-13 19:09:45.000000000 +0200
@@ -1,6 +1,7 @@
Ade Lee <[email protected]>
Akihiro Motoki <[email protected]>
Alan Bishop <[email protected]>
+Alexandra Settle <[email protected]>
Andreas Jaeger <[email protected]>
Anusree <[email protected]>
Ben Nemec <[email protected]>
@@ -13,9 +14,11 @@
Davanum Srinivas <[email protected]>
Dave McCowan <[email protected]>
Doug Hellmann <[email protected]>
+Douglas Mendizábal <[email protected]>
Douglas Mendizábal <[email protected]>
Dung Ha <[email protected]>
Ellen Batbouta <[email protected]>
+Eric Harney <[email protected]>
Fernando Diaz <[email protected]>
Flavio Percoco <[email protected]>
Ghanshyam Mann <[email protected]>
@@ -48,6 +51,7 @@
Tim Kelsey <[email protected]>
Tom Cocozzello <[email protected]>
Van Hung Pham <[email protected]>
+Vladislav Kuzmin <[email protected]>
Vu Cong Tuan <[email protected]>
Yushiro FURUKAWA <[email protected]>
Zhao Lei <[email protected]>
@@ -64,6 +68,8 @@
ting.wang <[email protected]>
wu.chunyang <[email protected]>
xhzhf <[email protected]>
+xuanyandong <[email protected]>
yushangbin <[email protected]>
+zhangboye <[email protected]>
zhangzs <[email protected]>
“Fernando <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/castellan-1.3.1/ChangeLog
new/castellan-3.0.1/ChangeLog
--- old/castellan-1.3.1/ChangeLog 2019-09-04 16:26:07.000000000 +0200
+++ new/castellan-3.0.1/ChangeLog 2020-04-13 19:09:45.000000000 +0200
@@ -1,11 +1,40 @@
CHANGES
=======
+3.0.1
+-----
+
+* Fix stale references to renamed constant
+
+3.0.0
+-----
+
+* Removes context "validation"
+* Moving common objects under KeyManager
+* Drop use of six
+* Implements KeyManager's option discovery
+* Fix coverage tests
+
+2.0.0
+-----
+
+* [ussuri][goal] Drop python 2.7 support and testing
+* Add Wiki links to readme
+
+1.4.0
+-----
+
+* Fix "is" usage with literals
+* Switch to Ussuri jobs
+* PDF Documentation Build tox target
+* Update master for stable/train
+
1.3.1
-----
* Add bindep.txt
* Add Python 3 Train unit tests
+* Reuse existing token from RequestContext
1.3.0
-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/castellan-1.3.1/PKG-INFO new/castellan-3.0.1/PKG-INFO
--- old/castellan-1.3.1/PKG-INFO 2019-09-04 16:26:07.000000000 +0200
+++ new/castellan-3.0.1/PKG-INFO 2020-04-13 19:09:45.000000000 +0200
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 1.2
Name: castellan
-Version: 1.3.1
+Version: 3.0.1
Summary: Generic Key Manager interface for OpenStack
Home-page: https://docs.openstack.org/castellan/latest/
Author: OpenStack
@@ -17,6 +17,7 @@
* Source: https://opendev.org/openstack/castellan
* Bugs: https://bugs.launchpad.net/castellan
* Release notes: https://docs.openstack.org/releasenotes/castellan
+ * Wiki: https://wiki.openstack.org/wiki/Castellan
Team and repository tags
========================
@@ -32,8 +33,9 @@
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3 :: Only
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Requires-Python: >=3.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/castellan-1.3.1/README.rst
new/castellan-3.0.1/README.rst
--- old/castellan-1.3.1/README.rst 2019-09-04 16:25:06.000000000 +0200
+++ new/castellan-3.0.1/README.rst 2020-04-13 19:08:56.000000000 +0200
@@ -9,6 +9,7 @@
* Source: https://opendev.org/openstack/castellan
* Bugs: https://bugs.launchpad.net/castellan
* Release notes: https://docs.openstack.org/releasenotes/castellan
+* Wiki: https://wiki.openstack.org/wiki/Castellan
Team and repository tags
========================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/castellan-1.3.1/castellan/common/credentials/credential.py
new/castellan-3.0.1/castellan/common/credentials/credential.py
--- old/castellan-1.3.1/castellan/common/credentials/credential.py
2019-09-04 16:25:06.000000000 +0200
+++ new/castellan-3.0.1/castellan/common/credentials/credential.py
2020-04-13 19:08:56.000000000 +0200
@@ -23,11 +23,8 @@
import abc
-import six
-
[email protected]_metaclass(abc.ABCMeta)
-class Credential(object):
+class Credential(object, metaclass=abc.ABCMeta):
"""Base class to represent all credentials."""
def __init__(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/castellan-1.3.1/castellan/common/exception.py
new/castellan-3.0.1/castellan/common/exception.py
--- old/castellan-1.3.1/castellan/common/exception.py 2019-09-04
16:25:06.000000000 +0200
+++ new/castellan-3.0.1/castellan/common/exception.py 2020-04-13
19:08:56.000000000 +0200
@@ -17,7 +17,7 @@
Castellan exception subclasses
"""
-import six.moves.urllib.parse as urlparse
+import urllib
from castellan.i18n import _
@@ -26,7 +26,7 @@
class RedirectException(Exception):
def __init__(self, url):
- self.url = urlparse.urlparse(url)
+ self.url = urllib.parse.urlparse(url)
class CastellanException(Exception):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/castellan-1.3.1/castellan/common/objects/certificate.py
new/castellan-3.0.1/castellan/common/objects/certificate.py
--- old/castellan-1.3.1/castellan/common/objects/certificate.py 2019-09-04
16:25:06.000000000 +0200
+++ new/castellan-3.0.1/castellan/common/objects/certificate.py 2020-04-13
19:08:56.000000000 +0200
@@ -19,13 +19,8 @@
This module defines the Certificate class.
"""
-import abc
-
-import six
-
from castellan.common.objects import managed_object
[email protected]_metaclass(abc.ABCMeta)
class Certificate(managed_object.ManagedObject):
"""Base class to represent all certificates."""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/castellan-1.3.1/castellan/common/objects/key.py
new/castellan-3.0.1/castellan/common/objects/key.py
--- old/castellan-1.3.1/castellan/common/objects/key.py 2019-09-04
16:25:06.000000000 +0200
+++ new/castellan-3.0.1/castellan/common/objects/key.py 2020-04-13
19:08:56.000000000 +0200
@@ -21,14 +21,11 @@
from Java.
"""
-from castellan.common.objects import managed_object
-
import abc
-import six
+from castellan.common.objects import managed_object
[email protected]_metaclass(abc.ABCMeta)
class Key(managed_object.ManagedObject):
"""Base class to represent all keys."""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/castellan-1.3.1/castellan/common/objects/managed_object.py
new/castellan-3.0.1/castellan/common/objects/managed_object.py
--- old/castellan-1.3.1/castellan/common/objects/managed_object.py
2019-09-04 16:25:06.000000000 +0200
+++ new/castellan-3.0.1/castellan/common/objects/managed_object.py
2020-04-13 19:08:56.000000000 +0200
@@ -21,11 +21,8 @@
"""
import abc
-import six
-
[email protected]_metaclass(abc.ABCMeta)
-class ManagedObject(object):
+class ManagedObject(object, metaclass=abc.ABCMeta):
"""Base class to represent all managed objects."""
def __init__(self, name=None, created=None, id=None):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/castellan-1.3.1/castellan/key_manager/barbican_key_manager.py
new/castellan-3.0.1/castellan/key_manager/barbican_key_manager.py
--- old/castellan-1.3.1/castellan/key_manager/barbican_key_manager.py
2019-09-04 16:25:06.000000000 +0200
+++ new/castellan-3.0.1/castellan/key_manager/barbican_key_manager.py
2020-04-13 19:08:56.000000000 +0200
@@ -18,6 +18,7 @@
"""
import calendar
import time
+import urllib
from cryptography.hazmat import backends
from cryptography.hazmat.primitives import serialization
@@ -32,11 +33,6 @@
from castellan.common import exception
from castellan.common.objects import key as key_base_class
from castellan.common.objects import opaque_data as op_data
-from castellan.common.objects import passphrase
-from castellan.common.objects import private_key as pri_key
-from castellan.common.objects import public_key as pub_key
-from castellan.common.objects import symmetric_key as sym_key
-from castellan.common.objects import x_509
from castellan.i18n import _
from castellan.key_manager import key_manager
@@ -44,10 +40,9 @@
from barbicanclient import client as barbican_client_import
from barbicanclient import exceptions as barbican_exceptions
from oslo_utils import timeutils
-from six.moves import urllib
-barbican_opts = [
+_barbican_opts = [
cfg.StrOpt('barbican_endpoint',
help='Use this endpoint to connect to Barbican, for example: '
'"http://localhost:9311/"'),
@@ -78,7 +73,7 @@
]
-BARBICAN_OPT_GROUP = 'barbican'
+_BARBICAN_OPT_GROUP = 'barbican'
LOG = logging.getLogger(__name__)
@@ -86,20 +81,12 @@
class BarbicanKeyManager(key_manager.KeyManager):
"""Key Manager Interface that wraps the Barbican client API."""
- _secret_type_dict = {
- op_data.OpaqueData: 'opaque',
- passphrase.Passphrase: 'passphrase',
- pri_key.PrivateKey: 'private',
- pub_key.PublicKey: 'public',
- sym_key.SymmetricKey: 'symmetric',
- x_509.X509: 'certificate'}
-
def __init__(self, configuration):
self._barbican_client = None
self._base_url = None
self.conf = configuration
- self.conf.register_opts(barbican_opts, group=BARBICAN_OPT_GROUP)
- loading.register_session_conf_options(self.conf, BARBICAN_OPT_GROUP)
+ self.conf.register_opts(_barbican_opts, group=_BARBICAN_OPT_GROUP)
+ loading.register_session_conf_options(self.conf, _BARBICAN_OPT_GROUP)
def _get_barbican_client(self, context):
"""Creates a client to connect to the Barbican service.
@@ -144,7 +131,7 @@
return self._barbican_client
def _get_keystone_auth(self, context):
- if context.__class__.__name__ is 'KeystonePassword':
+ if context.__class__.__name__ == 'KeystonePassword':
return identity.Password(
auth_url=context.auth_url,
username=context.username,
@@ -160,7 +147,7 @@
project_domain_id=context.project_domain_id,
project_domain_name=context.project_domain_name,
reauthenticate=context.reauthenticate)
- elif context.__class__.__name__ is 'KeystoneToken':
+ elif context.__class__.__name__ == 'KeystoneToken':
return identity.Token(
auth_url=context.auth_url,
token=context.token,
@@ -174,14 +161,17 @@
reauthenticate=context.reauthenticate)
# this will be kept for oslo.context compatibility until
# projects begin to use utils.credential_factory
- elif context.__class__.__name__ is 'RequestContext':
- return identity.Token(
- auth_url=self.conf.barbican.auth_endpoint,
- token=context.auth_token,
- project_id=context.project_id,
- project_name=context.project_name,
- project_domain_id=context.project_domain_id,
- project_domain_name=context.project_domain_name)
+ elif context.__class__.__name__ == 'RequestContext':
+ if getattr(context, 'get_auth_plugin', None):
+ return context.get_auth_plugin()
+ else:
+ return identity.Token(
+ auth_url=self.conf.barbican.auth_endpoint,
+ token=context.auth_token,
+ project_id=context.project_id,
+ project_name=context.project_name,
+ project_domain_id=context.project_domain_id,
+ project_domain_name=context.project_domain_name)
else:
msg = _("context must be of type KeystonePassword, "
"KeystoneToken, or RequestContext.")
@@ -192,6 +182,10 @@
barbican = self.conf.barbican
if barbican.barbican_endpoint:
return barbican.barbican_endpoint
+ elif getattr(auth, 'service_catalog', None):
+ endpoint_data = auth.service_catalog.endpoint_data_for(
+ service_type='key-manager')
+ return endpoint_data.url
else:
service_parameters = {'service_type': 'key-manager',
'service_name': 'barbican',
@@ -199,9 +193,14 @@
return auth.get_endpoint(sess, **service_parameters)
def _create_base_url(self, auth, sess, endpoint):
+ api_version = None
if self.conf.barbican.barbican_api_version:
api_version = self.conf.barbican.barbican_api_version
- else:
+ elif getattr(auth, 'service_catalog', None):
+ endpoint_data = auth.service_catalog.endpoint_data_for(
+ service_type='key-manager')
+ api_version = endpoint_data.api_version
+ elif getattr(auth, 'get_discovery', None):
discovery = auth.get_discovery(sess, url=endpoint)
raw_data = discovery.raw_version_data()
if len(raw_data) == 0:
@@ -622,7 +621,7 @@
except (barbican_exceptions.HTTPAuthError,
barbican_exceptions.HTTPClientError,
barbican_exceptions.HTTPServerError) as e:
- LOG.error(_("Error listing objects: %s"), e)
+ LOG.error("Error listing objects: %s", e)
raise exception.KeyManagerError(reason=e)
for secret in secrets:
@@ -632,7 +631,10 @@
except (barbican_exceptions.HTTPAuthError,
barbican_exceptions.HTTPClientError,
barbican_exceptions.HTTPServerError) as e:
- LOG.warning(_("Error occurred while retrieving object "
- "metadata, not adding it to the list: %s"), e)
+ LOG.warning("Error occurred while retrieving object "
+ "metadata, not adding it to the list: %s", e)
return objects
+
+ def list_options_for_discovery(self):
+ return [(_BARBICAN_OPT_GROUP, _barbican_opts)]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/castellan-1.3.1/castellan/key_manager/key_manager.py
new/castellan-3.0.1/castellan/key_manager/key_manager.py
--- old/castellan-1.3.1/castellan/key_manager/key_manager.py 2019-09-04
16:25:06.000000000 +0200
+++ new/castellan-3.0.1/castellan/key_manager/key_manager.py 2020-04-13
19:08:56.000000000 +0200
@@ -19,17 +19,29 @@
import abc
-import six
+from castellan.common.objects import opaque_data as op_data
+from castellan.common.objects import passphrase
+from castellan.common.objects import private_key as pri_key
+from castellan.common.objects import public_key as pub_key
+from castellan.common.objects import symmetric_key as sym_key
+from castellan.common.objects import x_509
[email protected]_metaclass(abc.ABCMeta)
-class KeyManager(object):
+class KeyManager(object, metaclass=abc.ABCMeta):
"""Base Key Manager Interface
A Key Manager is responsible for managing encryption keys for volumes. A
Key Manager is responsible for creating, reading, and deleting keys.
"""
+ _secret_type_dict = {
+ op_data.OpaqueData: "opaque",
+ passphrase.Passphrase: "passphrase",
+ pri_key.PrivateKey: "private",
+ pub_key.PublicKey: "public",
+ sym_key.SymmetricKey: "symmetric",
+ x_509.X509: "certificate"}
+
@abc.abstractmethod
def __init__(self, configuration):
"""Instantiate a KeyManager object.
@@ -123,3 +135,16 @@
found, an empty list should be returned instead.
"""
return []
+
+ def list_options_for_discovery(self):
+ """Lists the KeyManager's configure options.
+
+ KeyManagers should advertise all supported options through this
+ method for the purpose of sample generation by oslo-config-generator.
+ Each item in the advertised list should be tuple composed by the group
+ name and a list of options belonging to that group. None should be used
+ as the group name for the DEFAULT group.
+
+ :returns: the list of supported options of a KeyManager.
+ """
+ return []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/castellan-1.3.1/castellan/key_manager/vault_key_manager.py
new/castellan-3.0.1/castellan/key_manager/vault_key_manager.py
--- old/castellan-1.3.1/castellan/key_manager/vault_key_manager.py
2019-09-04 16:25:06.000000000 +0200
+++ new/castellan-3.0.1/castellan/key_manager/vault_key_manager.py
2020-04-13 19:08:56.000000000 +0200
@@ -31,22 +31,18 @@
from oslo_log import log as logging
from oslo_utils import timeutils
import requests
-import six
from castellan.common import exception
-from castellan.common.objects import opaque_data as op_data
-from castellan.common.objects import passphrase
from castellan.common.objects import private_key as pri_key
from castellan.common.objects import public_key as pub_key
from castellan.common.objects import symmetric_key as sym_key
-from castellan.common.objects import x_509
from castellan.i18n import _
from castellan.key_manager import key_manager
-DEFAULT_VAULT_URL = "http://127.0.0.1:8200"
-DEFAULT_MOUNTPOINT = "secret"
+_DEFAULT_VAULT_URL = "http://127.0.0.1:8200"
+_DEFAULT_MOUNTPOINT = "secret"
-vault_opts = [
+_vault_opts = [
cfg.StrOpt('root_token_id',
help='root token for vault'),
cfg.StrOpt('approle_role_id',
@@ -54,13 +50,13 @@
cfg.StrOpt('approle_secret_id',
help='AppRole secret_id for authentication with vault'),
cfg.StrOpt('kv_mountpoint',
- default=DEFAULT_MOUNTPOINT,
+ default=_DEFAULT_MOUNTPOINT,
help='Mountpoint of KV store in Vault to use, for example: '
- '{}'.format(DEFAULT_MOUNTPOINT)),
+ '{}'.format(_DEFAULT_MOUNTPOINT)),
cfg.StrOpt('vault_url',
- default=DEFAULT_VAULT_URL,
+ default=_DEFAULT_VAULT_URL,
help='Use this endpoint to connect to Vault, for example: '
- '"%s"' % DEFAULT_VAULT_URL),
+ '"%s"' % _DEFAULT_VAULT_URL),
cfg.StrOpt('ssl_ca_crt_file',
help='Absolute path to ca cert file'),
cfg.BoolOpt('use_ssl',
@@ -68,7 +64,7 @@
help=_('SSL Enabled/Disabled')),
]
-VAULT_OPT_GROUP = 'vault'
+_VAULT_OPT_GROUP = 'vault'
_EXCEPTIONS_BY_CODE = [
requests.codes['internal_server_error'],
@@ -84,18 +80,10 @@
class VaultKeyManager(key_manager.KeyManager):
"""Key Manager Interface that wraps the Vault REST API."""
- _secret_type_dict = {
- op_data.OpaqueData: 'opaque',
- passphrase.Passphrase: 'passphrase',
- pri_key.PrivateKey: 'private',
- pub_key.PublicKey: 'public',
- sym_key.SymmetricKey: 'symmetric',
- x_509.X509: 'certificate'}
-
def __init__(self, configuration):
self._conf = configuration
- self._conf.register_opts(vault_opts, group=VAULT_OPT_GROUP)
- loading.register_session_conf_options(self._conf, VAULT_OPT_GROUP)
+ self._conf.register_opts(_vault_opts, group=_VAULT_OPT_GROUP)
+ loading.register_session_conf_options(self._conf, _VAULT_OPT_GROUP)
self._session = requests.Session()
self._root_token_id = self._conf.vault.root_token_id
self._approle_role_id = self._conf.vault.approle_role_id
@@ -174,11 +162,11 @@
json=params,
verify=self._verify_server)
except requests.exceptions.Timeout as ex:
- raise exception.KeyManagerError(six.text_type(ex))
+ raise exception.KeyManagerError(str(ex))
except requests.exceptions.ConnectionError as ex:
- raise exception.KeyManagerError(six.text_type(ex))
+ raise exception.KeyManagerError(str(ex))
except Exception as ex:
- raise exception.KeyManagerError(six.text_type(ex))
+ raise exception.KeyManagerError(str(ex))
if resp.status_code in _EXCEPTIONS_BY_CODE:
raise exception.KeyManagerError(resp.reason)
@@ -200,11 +188,11 @@
try:
resp = method(resource, headers=headers, json=json, verify=verify)
except requests.exceptions.Timeout as ex:
- raise exception.KeyManagerError(six.text_type(ex))
+ raise exception.KeyManagerError(str(ex))
except requests.exceptions.ConnectionError as ex:
- raise exception.KeyManagerError(six.text_type(ex))
+ raise exception.KeyManagerError(str(ex))
except Exception as ex:
- raise exception.KeyManagerError(six.text_type(ex))
+ raise exception.KeyManagerError(str(ex))
if resp.status_code in _EXCEPTIONS_BY_CODE:
raise exception.KeyManagerError(resp.reason)
@@ -217,11 +205,6 @@
expiration=None, name=None):
"""Creates an asymmetric key pair."""
- # Confirm context is provided, if not raise forbidden
- if not context:
- msg = _("User is not authorized to use key manager.")
- raise exception.Forbidden(msg)
-
if algorithm.lower() != 'rsa':
raise NotImplementedError(
"VaultKeyManager only implements rsa keys"
@@ -293,11 +276,6 @@
def create_key(self, context, algorithm, length, name=None, **kwargs):
"""Creates a symmetric key."""
- # Confirm context is provided, if not raise forbidden
- if not context:
- msg = _("User is not authorized to use key manager.")
- raise exception.Forbidden(msg)
-
if length % 8:
msg = _("Length must be multiple of 8.")
raise ValueError(msg)
@@ -315,22 +293,12 @@
def store(self, context, key_value, **kwargs):
"""Stores (i.e., registers) a key with the key manager."""
- # Confirm context is provided, if not raise forbidden
- if not context:
- msg = _("User is not authorized to use key manager.")
- raise exception.Forbidden(msg)
-
key_id = uuid.uuid4().hex
return self._store_key_value(key_id, key_value)
def get(self, context, key_id, metadata_only=False):
"""Retrieves the key identified by the specified id."""
- # Confirm context is provided, if not raise forbidden
- if not context:
- msg = _("User is not authorized to use key manager.")
- raise exception.Forbidden(msg)
-
if not key_id:
raise exception.KeyManagerError('key identifier not provided')
@@ -371,11 +339,6 @@
def delete(self, context, key_id):
"""Represents deleting the key."""
- # Confirm context is provided, if not raise forbidden
- if not context:
- msg = _("User is not authorized to use key manager.")
- raise exception.Forbidden(msg)
-
if not key_id:
raise exception.KeyManagerError('key identifier not provided')
@@ -388,11 +351,6 @@
def list(self, context, object_type=None, metadata_only=False):
"""Lists the managed objects given the criteria."""
- # Confirm context is provided, if not raise forbidden
- if not context:
- msg = _("User is not authorized to use key manager.")
- raise exception.Forbidden(msg)
-
if object_type and object_type not in self._secret_type_dict:
msg = _("Invalid secret type: %s") % object_type
raise exception.KeyManagerError(reason=msg)
@@ -412,7 +370,10 @@
if object_type is None or isinstance(obj, object_type):
objects.append(obj)
except exception.ManagedObjectNotFoundError as e:
- LOG.warning(_("Error occurred while retrieving object "
- "metadata, not adding it to the list: %s"), e)
+ LOG.warning("Error occurred while retrieving object "
+ "metadata, not adding it to the list: %s", e)
pass
return objects
+
+ def list_options_for_discovery(self):
+ return [(_VAULT_OPT_GROUP, _vault_opts)]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/castellan-1.3.1/castellan/options.py
new/castellan-3.0.1/castellan/options.py
--- old/castellan-1.3.1/castellan/options.py 2019-09-04 16:25:06.000000000
+0200
+++ new/castellan-3.0.1/castellan/options.py 2020-04-13 19:08:56.000000000
+0200
@@ -12,10 +12,12 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
+from stevedore import ExtensionManager
+
from oslo_config import cfg
from oslo_log import log
-from castellan import key_manager as km
+from castellan import key_manager
try:
from castellan.key_manager import barbican_key_manager as bkm
except ImportError:
@@ -66,11 +68,16 @@
:param barbican_endpoint_type: Use this to specify the type of URL.
: Valid values are: public, internal or admin.
"""
- conf.register_opts(km.key_manager_opts, group='key_manager')
- if bkm:
- conf.register_opts(bkm.barbican_opts, group=bkm.BARBICAN_OPT_GROUP)
- if vkm:
- conf.register_opts(vkm.vault_opts, group=vkm.VAULT_OPT_GROUP)
+ conf.register_opts(key_manager.key_manager_opts, group='key_manager')
+
+ ext_mgr = ExtensionManager(
+ "castellan.drivers",
+ invoke_on_load=True,
+ invoke_args=[cfg.CONF])
+
+ for km in ext_mgr.names():
+ for group, opts in ext_mgr[km].obj.list_options_for_discovery():
+ conf.register_opts(opts, group=group)
# Use the new backend option if set or fall back to the older api_class
default_backend = backend or api_class
@@ -80,48 +87,48 @@
if bkm is not None:
if barbican_endpoint is not None:
conf.set_default('barbican_endpoint', barbican_endpoint,
- group=bkm.BARBICAN_OPT_GROUP)
+ group=bkm._BARBICAN_OPT_GROUP)
if barbican_api_version is not None:
conf.set_default('barbican_api_version', barbican_api_version,
- group=bkm.BARBICAN_OPT_GROUP)
+ group=bkm._BARBICAN_OPT_GROUP)
if auth_endpoint is not None:
conf.set_default('auth_endpoint', auth_endpoint,
- group=bkm.BARBICAN_OPT_GROUP)
+ group=bkm._BARBICAN_OPT_GROUP)
if retry_delay is not None:
conf.set_default('retry_delay', retry_delay,
- group=bkm.BARBICAN_OPT_GROUP)
+ group=bkm._BARBICAN_OPT_GROUP)
if number_of_retries is not None:
conf.set_default('number_of_retries', number_of_retries,
- group=bkm.BARBICAN_OPT_GROUP)
+ group=bkm._BARBICAN_OPT_GROUP)
if verify_ssl is not None:
conf.set_default('verify_ssl', verify_ssl,
- group=bkm.BARBICAN_OPT_GROUP)
+ group=bkm._BARBICAN_OPT_GROUP)
if barbican_endpoint_type is not None:
conf.set_default('barbican_endpoint_type', barbican_endpoint_type,
- group=bkm.BARBICAN_OPT_GROUP)
+ group=bkm._BARBICAN_OPT_GROUP)
if vkm is not None:
if vault_root_token_id is not None:
conf.set_default('root_token_id', vault_root_token_id,
- group=vkm.VAULT_OPT_GROUP)
+ group=vkm._VAULT_OPT_GROUP)
if vault_approle_role_id is not None:
conf.set_default('approle_role_id', vault_approle_role_id,
- group=vkm.VAULT_OPT_GROUP)
+ group=vkm._VAULT_OPT_GROUP)
if vault_approle_secret_id is not None:
conf.set_default('approle_secret_id', vault_approle_secret_id,
- group=vkm.VAULT_OPT_GROUP)
+ group=vkm._VAULT_OPT_GROUP)
if vault_kv_mountpoint is not None:
conf.set_default('kv_mountpoint', vault_kv_mountpoint,
- group=vkm.VAULT_OPT_GROUP)
+ group=vkm._VAULT_OPT_GROUP)
if vault_url is not None:
conf.set_default('vault_url', vault_url,
- group=vkm.VAULT_OPT_GROUP)
+ group=vkm._VAULT_OPT_GROUP)
if vault_ssl_ca_crt_file is not None:
conf.set_default('ssl_ca_crt_file', vault_ssl_ca_crt_file,
- group=vkm.VAULT_OPT_GROUP)
+ group=vkm._VAULT_OPT_GROUP)
if vault_use_ssl is not None:
conf.set_default('use_ssl', vault_use_ssl,
- group=vkm.VAULT_OPT_GROUP)
+ group=vkm._VAULT_OPT_GROUP)
def enable_logging(conf=None, app_name='castellan'):
@@ -151,12 +158,16 @@
:returns: a list of (group_name, opts) tuples
"""
key_manager_opts = []
- key_manager_opts.extend(km.key_manager_opts)
+ key_manager_opts.extend(key_manager.key_manager_opts)
key_manager_opts.extend(utils.credential_opts)
opts = [('key_manager', key_manager_opts)]
- if bkm is not None:
- opts.append((bkm.BARBICAN_OPT_GROUP, bkm.barbican_opts))
- if vkm is not None:
- opts.append((vkm.VAULT_OPT_GROUP, vkm.vault_opts))
+ ext_mgr = ExtensionManager(
+ "castellan.drivers",
+ invoke_on_load=True,
+ invoke_args=[cfg.CONF])
+
+ for driver in ext_mgr.names():
+ opts.extend(ext_mgr[driver].obj.list_options_for_discovery())
+
return opts
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/castellan-1.3.1/castellan/tests/functional/key_manager/test_key_manager.py
new/castellan-3.0.1/castellan/tests/functional/key_manager/test_key_manager.py
---
old/castellan-1.3.1/castellan/tests/functional/key_manager/test_key_manager.py
2019-09-04 16:25:06.000000000 +0200
+++
new/castellan-3.0.1/castellan/tests/functional/key_manager/test_key_manager.py
2020-04-13 19:08:56.000000000 +0200
@@ -77,6 +77,7 @@
def setUp(self):
super(KeyManagerTestCase, self).setUp()
self.key_mgr = self._create_key_manager()
+ self.ctxt = None
def _get_valid_object_uuid(self, managed_object):
object_uuid = self.key_mgr.store(self.ctxt, managed_object)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/castellan-1.3.1/castellan/tests/functional/key_manager/test_vault_key_manager.py
new/castellan-3.0.1/castellan/tests/functional/key_manager/test_vault_key_manager.py
---
old/castellan-1.3.1/castellan/tests/functional/key_manager/test_vault_key_manager.py
2019-09-04 16:25:06.000000000 +0200
+++
new/castellan-3.0.1/castellan/tests/functional/key_manager/test_vault_key_manager.py
2020-04-13 19:08:56.000000000 +0200
@@ -15,12 +15,10 @@
Note: This requires local running instance of Vault.
"""
-import abc
import os
import uuid
from oslo_config import cfg
-from oslo_context import context
from oslo_utils import uuidutils
from oslotest import base
import requests
@@ -34,7 +32,8 @@
CONF = config.get_config()
-class VaultKeyManagerTestCase(test_key_manager.KeyManagerTestCase):
+class VaultKeyManagerTestCase(test_key_manager.KeyManagerTestCase,
+ base.BaseTestCase):
def _create_key_manager(self):
key_mgr = vault_key_manager.VaultKeyManager(cfg.CONF)
@@ -46,26 +45,6 @@
key_mgr._vault_url = os.environ['VAULT_TEST_URL']
return key_mgr
- @abc.abstractmethod
- def get_context(self):
- """Retrieves Context for Authentication"""
- return
-
- def setUp(self):
- super(VaultKeyManagerTestCase, self).setUp()
- self.ctxt = self.get_context()
-
- def tearDown(self):
- super(VaultKeyManagerTestCase, self).tearDown()
-
- def test_create_null_context(self):
- self.assertRaises(exception.Forbidden,
- self.key_mgr.create_key, None, 'AES', 256)
-
- def test_create_key_pair_null_context(self):
- self.assertRaises(exception.Forbidden,
- self.key_mgr.create_key_pair, None, 'RSA', 2048)
-
def test_create_key_pair_bad_algorithm(self):
self.assertRaises(
NotImplementedError,
@@ -73,24 +52,10 @@
self.ctxt, 'DSA', 2048
)
- def test_delete_null_context(self):
- key_uuid = self._get_valid_object_uuid(
- test_key_manager._get_test_symmetric_key())
- self.addCleanup(self.key_mgr.delete, self.ctxt, key_uuid)
- self.assertRaises(exception.Forbidden,
- self.key_mgr.delete, None, key_uuid)
-
def test_delete_null_object(self):
self.assertRaises(exception.KeyManagerError,
self.key_mgr.delete, self.ctxt, None)
- def test_get_null_context(self):
- key_uuid = self._get_valid_object_uuid(
- test_key_manager._get_test_symmetric_key())
- self.addCleanup(self.key_mgr.delete, self.ctxt, key_uuid)
- self.assertRaises(exception.Forbidden,
- self.key_mgr.get, None, key_uuid)
-
def test_get_null_object(self):
self.assertRaises(exception.KeyManagerError,
self.key_mgr.get, self.ctxt, None)
@@ -100,18 +65,6 @@
self.assertRaises(exception.ManagedObjectNotFoundError,
self.key_mgr.get, self.ctxt, bad_key_uuid)
- def test_store_null_context(self):
- key = test_key_manager._get_test_symmetric_key()
-
- self.assertRaises(exception.Forbidden,
- self.key_mgr.store, None, key)
-
-
-class VaultKeyManagerOSLOContextTestCase(VaultKeyManagerTestCase,
- base.BaseTestCase):
- def get_context(self):
- return context.get_admin_context()
-
TEST_POLICY = '''
path "{backend}/*" {{
@@ -128,7 +81,7 @@
APPROLE_ENDPOINT = 'v1/auth/approle/role/{role_name}'
-class VaultKeyManagerAppRoleTestCase(VaultKeyManagerOSLOContextTestCase):
+class VaultKeyManagerAppRoleTestCase(VaultKeyManagerTestCase):
mountpoint = 'secret'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/castellan-1.3.1/castellan/tests/unit/key_manager/test_barbican_key_manager.py
new/castellan-3.0.1/castellan/tests/unit/key_manager/test_barbican_key_manager.py
---
old/castellan-1.3.1/castellan/tests/unit/key_manager/test_barbican_key_manager.py
2019-09-04 16:25:06.000000000 +0200
+++
new/castellan-3.0.1/castellan/tests/unit/key_manager/test_barbican_key_manager.py
2020-04-13 19:08:56.000000000 +0200
@@ -94,6 +94,54 @@
endpoint)
self.assertEqual(endpoint + "/" + version, base_url)
+ def test_base_url_service_catalog(self):
+ endpoint_data = mock.Mock()
+ endpoint_data.api_version = 'v321'
+
+ auth = mock.Mock(spec=['service_catalog'])
+ auth.service_catalog.endpoint_data_for.return_value = endpoint_data
+
+ endpoint = "http://localhost/key_manager"
+
+ base_url = self.key_mgr._create_base_url(auth,
+ mock.Mock(),
+ endpoint)
+ self.assertEqual(endpoint + "/" + endpoint_data.api_version, base_url)
+ auth.service_catalog.endpoint_data_for.assert_called_once_with(
+ service_type='key-manager')
+
+ def test_base_url_raise_exception(self):
+ auth = mock.Mock(spec=['get_discovery'])
+ sess = mock.Mock()
+ discovery = mock.Mock()
+ discovery.raw_version_data = mock.Mock(return_value=[])
+ auth.get_discovery = mock.Mock(return_value=discovery)
+
+ endpoint = "http://localhost/key_manager"
+
+ self.assertRaises(exception.KeyManagerError,
+ self.key_mgr._create_base_url,
+ auth, sess, endpoint)
+ auth.get_discovery.asser_called_once_with(sess, url=endpoint)
+ self.assertEqual(1, discovery.raw_version_data.call_count)
+
+ def test_base_url_get_discovery(self):
+ version = 'v100500'
+ auth = mock.Mock(spec=['get_discovery'])
+ sess = mock.Mock()
+ discovery = mock.Mock()
+ auth.get_discovery = mock.Mock(return_value=discovery)
+ discovery.raw_version_data = mock.Mock(return_value=[{'id': version}])
+
+ endpoint = "http://localhost/key_manager"
+
+ base_url = self.key_mgr._create_base_url(auth,
+ mock.Mock(),
+ endpoint)
+ self.assertEqual(endpoint + "/" + version, base_url)
+ auth.get_discovery.asser_called_once_with(sess, url=endpoint)
+ self.assertEqual(1, discovery.raw_version_data.call_count)
+
def test_create_key(self):
# Create order_ref_url and assign return value
order_ref_url = ("http://localhost:9311/v1/orders/"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/castellan-1.3.1/castellan/tests/unit/test_options.py
new/castellan-3.0.1/castellan/tests/unit/test_options.py
--- old/castellan-1.3.1/castellan/tests/unit/test_options.py 2019-09-04
16:25:06.000000000 +0200
+++ new/castellan-3.0.1/castellan/tests/unit/test_options.py 2020-04-13
19:08:56.000000000 +0200
@@ -40,34 +40,34 @@
barbican_endpoint = 'http://test-server.org:9311/'
options.set_defaults(conf, barbican_endpoint=barbican_endpoint)
self.assertEqual(barbican_endpoint,
- conf.get(bkm.BARBICAN_OPT_GROUP).barbican_endpoint)
+ conf.barbican.barbican_endpoint)
barbican_api_version = 'vSomething'
options.set_defaults(conf, barbican_api_version=barbican_api_version)
self.assertEqual(barbican_api_version,
- conf.get(bkm.BARBICAN_OPT_GROUP).barbican_api_version)
+ conf.barbican.barbican_api_version)
auth_endpoint = 'http://test-server.org/identity'
options.set_defaults(conf, auth_endpoint=auth_endpoint)
self.assertEqual(auth_endpoint,
- conf.get(bkm.BARBICAN_OPT_GROUP).auth_endpoint)
+ conf.barbican.auth_endpoint)
retry_delay = 3
options.set_defaults(conf, retry_delay=retry_delay)
self.assertEqual(retry_delay,
- conf.get(bkm.BARBICAN_OPT_GROUP).retry_delay)
+ conf.barbican.retry_delay)
number_of_retries = 10
options.set_defaults(conf, number_of_retries=number_of_retries)
self.assertEqual(number_of_retries,
- conf.get(bkm.BARBICAN_OPT_GROUP).number_of_retries)
+ conf.barbican.number_of_retries)
verify_ssl = True
options.set_defaults(conf, verify_ssl=True)
self.assertEqual(verify_ssl,
- conf.get(bkm.BARBICAN_OPT_GROUP).verify_ssl)
+ conf.barbican.verify_ssl)
barbican_endpoint_type = 'internal'
options.set_defaults(conf, barbican_endpoint_type='internal')
- result_type = conf.get(bkm.BARBICAN_OPT_GROUP).barbican_endpoint_type
+ result_type = conf.barbican.barbican_endpoint_type
self.assertEqual(barbican_endpoint_type, result_type)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/castellan-1.3.1/castellan/tests/utils.py
new/castellan-3.0.1/castellan/tests/utils.py
--- old/castellan-1.3.1/castellan/tests/utils.py 2019-09-04
16:25:06.000000000 +0200
+++ new/castellan-3.0.1/castellan/tests/utils.py 2020-04-13
19:08:56.000000000 +0200
@@ -19,8 +19,6 @@
import functools
import types
-import six
-
def construct_new_test_function(original_func, name, build_params):
"""Builds a new test function based on parameterized data.
@@ -32,10 +30,10 @@
:return: A new function object
"""
new_func = types.FunctionType(
- six.get_function_code(original_func),
- six.get_function_globals(original_func),
+ original_func.__code__,
+ original_func.__globals__,
name=name,
- argdefs=six.get_function_defaults(original_func)
+ argdefs=original_func.__defaults__,
)
for key, val in original_func.__dict__.items():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/castellan-1.3.1/castellan.egg-info/PKG-INFO
new/castellan-3.0.1/castellan.egg-info/PKG-INFO
--- old/castellan-1.3.1/castellan.egg-info/PKG-INFO 2019-09-04
16:26:07.000000000 +0200
+++ new/castellan-3.0.1/castellan.egg-info/PKG-INFO 2020-04-13
19:09:45.000000000 +0200
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 1.2
Name: castellan
-Version: 1.3.1
+Version: 3.0.1
Summary: Generic Key Manager interface for OpenStack
Home-page: https://docs.openstack.org/castellan/latest/
Author: OpenStack
@@ -17,6 +17,7 @@
* Source: https://opendev.org/openstack/castellan
* Bugs: https://bugs.launchpad.net/castellan
* Release notes: https://docs.openstack.org/releasenotes/castellan
+ * Wiki: https://wiki.openstack.org/wiki/Castellan
Team and repository tags
========================
@@ -32,8 +33,9 @@
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3 :: Only
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Requires-Python: >=3.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/castellan-1.3.1/castellan.egg-info/SOURCES.txt
new/castellan-3.0.1/castellan.egg-info/SOURCES.txt
--- old/castellan-1.3.1/castellan.egg-info/SOURCES.txt 2019-09-04
16:26:07.000000000 +0200
+++ new/castellan-3.0.1/castellan.egg-info/SOURCES.txt 2020-04-13
19:09:45.000000000 +0200
@@ -88,6 +88,7 @@
castellan/tests/unit/objects/test_public_key.py
castellan/tests/unit/objects/test_symmetric_key.py
castellan/tests/unit/objects/test_x_509.py
+doc/requirements.txt
doc/source/conf.py
doc/source/index.rst
doc/source/_extra/.htaccess
@@ -103,7 +104,9 @@
playbooks/devstack/run.yaml
releasenotes/notes/add-vault-provider-29a4c19fe67ab51f.yaml
releasenotes/notes/deprecate-auth-endpoint-b91a3e67b5c7263f.yaml
+releasenotes/notes/drop-python-2-7-73d3113c69d724d6.yaml
releasenotes/notes/fix-vault-create-key-b4340a3067cbd93c.yaml
+releasenotes/notes/implements-keymanager-option-discovery-13a46c1dfc036a3f.yaml
releasenotes/notes/support-legacy-fixed-key-id-9fa897b547111610.yaml
releasenotes/notes/vault-approle-support-5ea04daea07a152f.yaml
releasenotes/notes/vault-kv-mountpoint-919eb547764a0c74.yaml
@@ -113,6 +116,7 @@
releasenotes/source/queens.rst
releasenotes/source/rocky.rst
releasenotes/source/stein.rst
+releasenotes/source/train.rst
releasenotes/source/unreleased.rst
releasenotes/source/_static/.placeholder
releasenotes/source/_templates/.placeholder
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/castellan-1.3.1/castellan.egg-info/pbr.json
new/castellan-3.0.1/castellan.egg-info/pbr.json
--- old/castellan-1.3.1/castellan.egg-info/pbr.json 2019-09-04
16:26:07.000000000 +0200
+++ new/castellan-3.0.1/castellan.egg-info/pbr.json 2020-04-13
19:09:45.000000000 +0200
@@ -1 +1 @@
-{"git_version": "54af64d", "is_release": true}
\ No newline at end of file
+{"git_version": "f8bcee0", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/castellan-1.3.1/castellan.egg-info/requires.txt
new/castellan-3.0.1/castellan.egg-info/requires.txt
--- old/castellan-1.3.1/castellan.egg-info/requires.txt 2019-09-04
16:26:07.000000000 +0200
+++ new/castellan-3.0.1/castellan.egg-info/requires.txt 2020-04-13
19:09:45.000000000 +0200
@@ -9,4 +9,4 @@
oslo.utils>=3.33.0
stevedore>=1.20.0
keystoneauth1>=3.4.0
-requests!=2.20.0,>=2.14.2
+requests!=2.20.0,>=2.18.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/castellan-1.3.1/doc/requirements.txt
new/castellan-3.0.1/doc/requirements.txt
--- old/castellan-1.3.1/doc/requirements.txt 1970-01-01 01:00:00.000000000
+0100
+++ new/castellan-3.0.1/doc/requirements.txt 2020-04-13 19:08:56.000000000
+0200
@@ -0,0 +1,4 @@
+sphinx>=1.8.0,!=2.1.0 # BSD
+sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD
+reno>=2.5.0 # Apache-2.0
+openstackdocstheme>=1.18.1 # Apache-2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/castellan-1.3.1/doc/source/conf.py
new/castellan-3.0.1/doc/source/conf.py
--- old/castellan-1.3.1/doc/source/conf.py 2019-09-04 16:25:06.000000000
+0200
+++ new/castellan-3.0.1/doc/source/conf.py 2020-04-13 19:08:56.000000000
+0200
@@ -23,6 +23,7 @@
'sphinx.ext.autodoc',
#'sphinx.ext.intersphinx',
'openstackdocstheme',
+ 'sphinxcontrib.rsvgconverter',
]
# autodoc generation is a bit aggressive and a nuisance when doing heavy
@@ -71,13 +72,20 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
# [howto/manual]).
+
latex_documents = [
('index',
- '%s.tex' % project,
+ 'doc-castellan.tex',
u'%s Documentation' % project,
u'OpenStack Foundation', 'manual'),
]
+latex_elements = {
+ 'extraclassoptions': 'openany,oneside',
+}
+
+latex_use_xindy = False
+
# Example configuration for intersphinx: refer to the Python standard library.
#intersphinx_mapping = {'https://docs.python.org/3/': None}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/castellan-1.3.1/doc/source/index.rst
new/castellan-3.0.1/doc/source/index.rst
--- old/castellan-1.3.1/doc/source/index.rst 2019-09-04 16:25:06.000000000
+0200
+++ new/castellan-3.0.1/doc/source/index.rst 2020-04-13 19:08:56.000000000
+0200
@@ -15,10 +15,11 @@
user/index
contributor/index
-Indices and tables
-==================
+.. only:: html
-* :ref:`genindex`
-* :ref:`modindex`
-* :ref:`search`
+ Indices and tables
+ ==================
+ * :ref:`genindex`
+ * :ref:`modindex`
+ * :ref:`search`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/castellan-1.3.1/lower-constraints.txt
new/castellan-3.0.1/lower-constraints.txt
--- old/castellan-1.3.1/lower-constraints.txt 2019-09-04 16:25:06.000000000
+0200
+++ new/castellan-3.0.1/lower-constraints.txt 2020-04-13 19:08:56.000000000
+0200
@@ -17,7 +17,7 @@
gitdb==0.6.4
GitPython==1.0.1
hacking==0.12.0
-idna==2.6
+idna==2.5
imagesize==0.7.1
iso8601==0.1.11
Jinja2==2.10
@@ -31,7 +31,6 @@
msgpack-python==0.4.0
netaddr==0.7.18
netifaces==0.10.4
-openstackdocstheme==1.18.1
os-client-config==1.28.0
oslo.config==6.4.0
oslo.context==2.19.2
@@ -56,15 +55,11 @@
python-subunit==1.0.0
pytz==2013.6
PyYAML==3.12
-reno==2.5.0
-requests==2.14.2
+requests==2.18.0
requestsexceptions==1.2.0
rfc3986==0.3.1
-six==1.10.0
smmap==0.9.0
snowballstemmer==1.2.1
-Sphinx==1.6.2
-sphinxcontrib-websupport==1.0.1
stevedore==1.20.0
stestr==2.0.0
testscenarios==0.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/castellan-1.3.1/releasenotes/notes/drop-python-2-7-73d3113c69d724d6.yaml
new/castellan-3.0.1/releasenotes/notes/drop-python-2-7-73d3113c69d724d6.yaml
---
old/castellan-1.3.1/releasenotes/notes/drop-python-2-7-73d3113c69d724d6.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/castellan-3.0.1/releasenotes/notes/drop-python-2-7-73d3113c69d724d6.yaml
2020-04-13 19:08:56.000000000 +0200
@@ -0,0 +1,5 @@
+---
+upgrade:
+ - |
+ Python 2.7 support has been dropped. The minimum version of Python now
+ supported by castellan is Python 3.6.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/castellan-1.3.1/releasenotes/notes/implements-keymanager-option-discovery-13a46c1dfc036a3f.yaml
new/castellan-3.0.1/releasenotes/notes/implements-keymanager-option-discovery-13a46c1dfc036a3f.yaml
---
old/castellan-1.3.1/releasenotes/notes/implements-keymanager-option-discovery-13a46c1dfc036a3f.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/castellan-3.0.1/releasenotes/notes/implements-keymanager-option-discovery-13a46c1dfc036a3f.yaml
2020-04-13 19:08:56.000000000 +0200
@@ -0,0 +1,15 @@
+---
+features:
+ - |
+ Enhance the global option listing to discover available key managers and
+ their options. The purpose of this feature is to have a correct listing of
+ the supported key managers, now each key manager is responsible for
+ advertising the oslo.config groups/options they consume.
+other:
+ - |
+ The visibility of module variables and constants related to oslo.config
+ options changed to private in both barbican and vault key managers. The
+ key managers are only responsible for overloading the method
+ list_options_for_discovery() in order to advertise their own options.
+ This way, the global options doesn't need to know which variables to look
+ for.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/castellan-1.3.1/releasenotes/source/index.rst
new/castellan-3.0.1/releasenotes/source/index.rst
--- old/castellan-1.3.1/releasenotes/source/index.rst 2019-09-04
16:25:06.000000000 +0200
+++ new/castellan-3.0.1/releasenotes/source/index.rst 2020-04-13
19:08:56.000000000 +0200
@@ -6,6 +6,7 @@
:maxdepth: 1
unreleased
+ train
stein
rocky
queens
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/castellan-1.3.1/releasenotes/source/train.rst
new/castellan-3.0.1/releasenotes/source/train.rst
--- old/castellan-1.3.1/releasenotes/source/train.rst 1970-01-01
01:00:00.000000000 +0100
+++ new/castellan-3.0.1/releasenotes/source/train.rst 2020-04-13
19:08:56.000000000 +0200
@@ -0,0 +1,6 @@
+==========================
+Train Series Release Notes
+==========================
+
+.. release-notes::
+ :branch: stable/train
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/castellan-1.3.1/requirements.txt
new/castellan-3.0.1/requirements.txt
--- old/castellan-1.3.1/requirements.txt 2019-09-04 16:25:06.000000000
+0200
+++ new/castellan-3.0.1/requirements.txt 2020-04-13 19:08:56.000000000
+0200
@@ -13,4 +13,4 @@
oslo.utils>=3.33.0 # Apache-2.0
stevedore>=1.20.0 # Apache-2.0
keystoneauth1>=3.4.0 # Apache-2.0
-requests>=2.14.2,!=2.20.0 # Apache-2.0
+requests>=2.18.0,!=2.20.0 # Apache-2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/castellan-1.3.1/setup.cfg
new/castellan-3.0.1/setup.cfg
--- old/castellan-1.3.1/setup.cfg 2019-09-04 16:26:07.000000000 +0200
+++ new/castellan-3.0.1/setup.cfg 2020-04-13 19:09:45.000000000 +0200
@@ -6,6 +6,7 @@
author = OpenStack
author-email = [email protected]
home-page = https://docs.openstack.org/castellan/latest/
+python-requires = >=3.6
classifier =
Environment :: OpenStack
Intended Audience :: Information Technology
@@ -13,11 +14,11 @@
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
Programming Language :: Python
- Programming Language :: Python :: 2
- Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
+ Programming Language :: Python :: 3 :: Only
+ Programming Language :: Python :: Implementation :: CPython
[files]
packages =
@@ -33,15 +34,6 @@
barbican = castellan.key_manager.barbican_key_manager:BarbicanKeyManager
vault = castellan.key_manager.vault_key_manager:VaultKeyManager
-[build_sphinx]
-source-dir = doc/source
-build-dir = doc/build
-all_files = 1
-warning-is-error = 1
-
-[upload_sphinx]
-upload-dir = doc/build/html
-
[compile_catalog]
directory = castellan/locale
domain = castellan
@@ -56,9 +48,6 @@
mapping_file = babel.cfg
output_file = castellan/locale/castellan.pot
-[wheel]
-universal = 1
-
[egg_info]
tag_build =
tag_date = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/castellan-1.3.1/test-requirements.txt
new/castellan-3.0.1/test-requirements.txt
--- old/castellan-1.3.1/test-requirements.txt 2019-09-04 16:25:06.000000000
+0200
+++ new/castellan-3.0.1/test-requirements.txt 2020-04-13 19:08:56.000000000
+0200
@@ -6,14 +6,10 @@
coverage!=4.4,>=4.0 # Apache-2.0
python-barbicanclient>=4.5.2 # Apache-2.0
python-subunit>=1.0.0 # Apache-2.0/BSD
-sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
-sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD
-openstackdocstheme>=1.18.1 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0
stestr>=2.0.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=2.2.0 # MIT
bandit>=1.1.0,<1.6.0 # Apache-2.0
-reno>=2.5.0 # Apache-2.0
pifpaf>=0.10.0 # Apache-2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/castellan-1.3.1/tox.ini new/castellan-3.0.1/tox.ini
--- old/castellan-1.3.1/tox.ini 2019-09-04 16:25:06.000000000 +0200
+++ new/castellan-3.0.1/tox.ini 2020-04-13 19:08:56.000000000 +0200
@@ -1,11 +1,12 @@
[tox]
-minversion = 2.0
-envlist = py27,py37,pep8
+minversion = 3.1.1
+envlist = py37,pep8
+ignore_basepython_conflict = True
skipsdist = True
[testenv]
usedevelop = True
-install_command = pip install {opts} {packages}
+basepython = python3
setenv =
VIRTUAL_ENV={envdir}
OS_TEST_PATH=./castellan/tests/unit
@@ -15,17 +16,12 @@
-r{toxinidir}/test-requirements.txt
commands = stestr run --slowest {posargs}
-[testenv:py27]
-basepython = python2.7
-
[testenv:pep8]
-basepython = python3
commands =
flake8
bandit -r castellan -x tests -s B105,B106,B107,B607
[testenv:bandit]
-basepython = python3
# This command runs the bandit security linter against the castellan
# codebase minus the tests directory. Some tests are being excluded to
# reduce the number of positives before a team inspection, and to ensure a
@@ -38,30 +34,46 @@
bandit -r castellan -x tests -s B105,B106,B107,B607
[testenv:venv]
-basepython = python3
commands = {posargs}
[testenv:debug]
-basepython = python3
commands = oslo_debug_helper {posargs}
[testenv:cover]
-basepython = python3
setenv =
- PYTHON=coverage run --source $project --parallel-mode
+ PYTHON=coverage run --source castellan --parallel-mode
commands =
- stestr run {posargs}
+ coverage erase
+ {[testenv]commands}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
- coverage report
+ coverage report --show-missing
[testenv:docs]
-basepython = python3
-commands = python setup.py build_sphinx
+# This environment is called from CI scripts to test and publish
+# the main docs to https://docs.openstack.org/castellan
+description = Build main documentation
+deps = -r{toxinidir}/doc/requirements.txt
+commands=
+ rm -rf doc/build doc/build/doctrees
+ sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
+whitelist_externals = rm
+
+[testenv:pdf-docs]
+deps = {[testenv:docs]deps}
+envdir = {toxworkdir}/docs
+whitelist_externals =
+ rm
+ make
+commands =
+ rm -rf doc/build/pdf
+ sphinx-build -W -b latex doc/source doc/build/pdf
+ make -C doc/build/pdf
[testenv:releasenotes]
-basepython = python3
+deps = {[testenv:docs]deps}
+envdir = {toxworkdir}/docs
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html
releasenotes/source releasenotes/build/html
[testenv:functional]
@@ -83,7 +95,6 @@
{toxinidir}/tools/setup-vault-env.sh pifpaf -e VAULT_TEST run vault --
stestr run --slowest {posargs}
[testenv:genconfig]
-basepython = python3
commands =
oslo-config-generator
--config-file=etc/castellan/functional-config-generator.conf
oslo-config-generator
--config-file=etc/castellan/sample-config-generator.conf
@@ -99,14 +110,12 @@
import_exceptions = castellan.i18n
[testenv:lower-constraints]
-basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
[testenv:bindep]
-basepython = python3
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed