Commit Graph

34 Commits

Author SHA1 Message Date
Takashi Kajinami 291ad9c778 Bump hacking
hacking 3.0.x is too old.

Change-Id: Ic6d33295b33cff8a68fbb8181973480bc17e7711
2024-02-02 01:50:46 +09:00
Grzegorz Grasza fe10397ac0 Initial change to add secret consumers
This adds consumers to the objects. Unit tests are
also covered.

Co-Authored-By: Ade Lee <alee@redhat.com>
Co-Authored-By: Mauricio Harley <mharley@redhat.com>
Change-Id: I598209e30d8f0e4515292b1f8c9a89aa952bac4e
2023-01-27 13:11:05 +01:00
Moisés Guimarães de Medeiros 883e9603fa Add to_dict and from_dict conversions to managed objects
This patch centralizes the managed objects conversion in order to be
used across multiple key_manager backends.

Change-Id: Ia2e15d46eb2e504b815a7f51173aecaf82978402
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-07-13 13:44:22 +02:00
Moisés Guimarães de Medeiros 3ccf918c98 Drop use of six
nit: Certificate inherits from ManagedObject which already has
ABCMeta as metaclass.

Change-Id: I17b12980b88e306fbdc99a3e92b1fa22d8e96471
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-03-09 11:14:16 +01:00
Kaitlin Farr d8fb4f1794 Add ID to managed objects
The managed objects did not have an ID associated with them. This is most
helpful for the list command, where once you have more than one object,
it's hard to track unique identifiers for the objects.

Change-Id: Ibc48762e7c2c71659fb96826c53301bc6f55ddf7
2017-08-31 21:08:08 +00:00
Paul Bourke 17e8b29067 Fix retrieving barbican endpoint from service catalog
The context wrapper classes under castellan.common.credentials were
missing an auth_url property resulting in calls to get_endpoint()
failing with 'Could not determine a suitable URL for the plugin' unless
users set barbican/auth_endpoint.

Change-Id: I1be3a1e11e3f4c2170062927ad359bf679eb25d9
Closes-Bug: #1497993
2017-07-19 09:40:25 +00:00
bhavani.cr 04874c25cb Remove log translations
Log messages are no longer being translated. This removes all use of the
_LE, _LI, and _LW translation markers to simplify logging and to avoid
confusion with new contributions.

See:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html

Change-Id: I410ac1eaa0a3c9bfa68ec1634e74aae369dde1cf
2017-07-03 07:12:25 +00:00
Jeremy Liu 749db70b68 Fix error in credential_factory
project_domain_id and project_domain_name are not correctly referenced
in credential_factory. This patch fixes that.

Change-Id: I0ea96cbdb97c7bf3b4c385b5aa9d9db71f6bdab5
2017-06-05 14:23:09 +08:00
Kaitlin Farr d1d8568d2b Add ability to get only metadata
Adds the ability to retrieve only the metadata of a secret. This is
helpful in situations when the caller wants to know information about
the secret, but doesn't want to unnecessarily handle the secret data.

Change-Id: I63aec037973aad2555190ca3eb6bba765955399a
2017-02-06 12:35:14 -05:00
Steve Martinelli fccb2fef4b remove obsolete oslo incubator code
as part of the openstack wide community goals, oslo
incubator code should be removed from all projects [1]

[1] https://governance.openstack.org/goals/ocata/remove-incubated-oslo-code.html

Change-Id: Ifa3564df125ed002dc1710d7a7c0e9346c34c9f1
2016-11-01 14:16:50 +00:00
Jenkins 3dab2cc7ee Merge "Correct castellan reraising of exception" 2016-10-12 11:35:46 +00:00
Jiong Liu 02144d04dd Remove default=None when set value in Config
By default oslo.cfg sets the default values as None [1], there is no need
to explicitly do this.

[1] https://github.com/openstack/oslo.config/blob/master/oslo_config/cfg.py#L829

Change-Id: I97c70439c76fd17712f79371dd0ebc0ab12caabf
Closes-bug: #1323975
2016-10-06 11:57:28 +00:00
gengchc2 9bed38d12c Correct castellan reraising of exception
When an exception was caught and rethrown, it should call 'raise'
without any arguments because it shows the place where an exception
occured initially instead of place where the exception re-raised.

Change-Id: I121c004082d37a5af1671060e3bdf6655ebeffc2
2016-08-29 05:37:06 +00:00
liujiong 05de73fb76 Use international logging message
Change-Id: I2dd77e34c4877131229f735bb6bf8ae6a3fa2bfd
2016-08-18 15:30:46 +08:00
Robert Clark 72e8950478 Making sensitive parameters secret to avoid logging
oslo config has an option called 'secret' setting this to true
will avoid accidental logging of sensitive parameters during
operation.

Change-Id: If95d6a2d31527b2ce42205d2603f5bf345a91e10
Closes-Bug: #1576251
2016-04-28 09:40:40 -05:00
Jenkins 84e88ce8e7 Merge "Add help to Castellan Credential Factory Opts" 2016-02-26 20:02:00 +00:00
Fernando Diaz 886ba88e6c Add help to Castellan Credential Factory Opts
This patch adds help documentation to the Castellan Credential
Factory Options when a configuration is generated.

Change-Id: I132923954ef70342eb31b048ff443d894988b320
2016-02-22 18:34:07 +00:00
Jenkins 3de8dada7a Merge "Introduce Castellan Credential Factory" 2016-02-17 17:05:40 +00:00
Fernando Diaz 28e0dcaf76 Introduce Castellan Credential Factory
This patch introduces the credential factory which creates a
credential object based upon the values in the configuration file.
It is the second of several patches which will implement the
"Allow different Keystone Auth Support in Castellan" blueprint.

Other patches will add:
1.) barbican key manager logic and tests
2.) documentation on usage

Change-Id: I34243c7a2523d9d0aa4e86d823dd28f1beed821a
Implements: blueprint remove-keystone-dependency
2016-02-16 22:12:04 +00:00
Jenkins 53159c3b4d Merge "Introduce Castellan Credential Objects" 2016-02-08 14:09:16 +00:00
Fernando Diaz db3c7a4e02 Introduce Castellan Credential Objects
This patch introduces the credential class in Castellan. It
includes Credential, Token, Password, Keystone Token, and
Keystone Password classes.
It is the first of several patches which will implement the
"Allow different Keystone Auth Support in Castellan" blueprint.

Other patches will add:
1.) credential factory
2.) barbican key manager logic and tests
3.) documentation on usage

Implements: blueprint remove-keystone-dependency
Change-Id: I4a4a85a108403d832e2bba91c901aaede605168d
2016-02-05 16:46:01 +00:00
Jenkins b535a10532 Merge "Add created property to Managed Objects" 2016-02-05 12:38:06 +00:00
“Fernando 31d467a35e Add created property to Managed Objects
Adds the property 'created' to managed objects in Castellan.
The property is None until the secret has been stored.

Change-Id: I83e79cd3dbc07b90f4526a36aaf4ee76e902e228
2016-02-02 17:16:37 +00:00
“Fernando b018f15e2e Allow for default logging configuration to be user enabled
Allows a user to be able to set logging defaults if they have not
created a configuration for logging.

Change-Id: I7e7ce2f7904aefa30db63264d9e0702f0db57513
Co-Authored-By: Michael McCune <msm@redhat.com>
Closes-Bug: #1521265
2015-11-30 16:39:00 -06:00
Jenkins 0c877d424e Merge "Update managed object __eq__ and __ne__" 2015-11-30 14:22:40 +00:00
Kaitlin Farr 2e9d25c242 Update managed object __eq__ and __ne__
In the unit tests for managed objects, add tests to check changes for
each attribute of the objects to check that __eq__ and __ne__ are
working correctly.

Change-Id: If8bb85cc8e08d99e2c7f30e04945925538f53730
2015-11-23 08:57:05 -05:00
“Fernando 28f74a1861 Allow log statements to be printed out in stdout
This patch allows for log statements to be displayed in stdout.

Change-Id: Ib430dd51cad125a8d0a4a4d054d45ed9346ca9fb
2015-11-04 13:29:51 -06:00
Jenkins c347f4d4b2 Merge "Add name to Castellan Objects and Barbican Key Manager" 2015-10-05 16:53:01 +00:00
Fernando Diaz 9e0b3c9588 Add name to Castellan Objects and Barbican Key Manager
Allows for Castellan Objects to be created with a unique name
using the Barbican Key Manager.

Change-Id: If4b00bbf1d94e084d69dc38d5065d92b2e66fd07
2015-10-02 15:30:12 -05:00
Kaitlin Farr 14db1346e7 Add ManagedObjectNotFoundError
Adding this new error type will allow Castellan to distinguish between
whether an error occurred because the could not be found or some other sort
of error with communicating with Barbican.

Change-Id: Ie8fc3cf457009522349285c750adeeedd75e9a60
2015-09-21 13:16:40 -04:00
Kaitlin Farr 0be6648f6f Standardize Barbican error messages
Wrap Barbican's errors with a KeyManagerError instead of reraising the
Barbican exception.

Change-Id: Ib49bad7336534df75ef8165c7229c656fae04dd8
2015-09-14 12:08:10 -04:00
Kaitlin Farr 39e139f88e Add managed objects hierarchy
Castellan will support multiple objects, not just symmetric keys. The bytes of
the managed object are returned as bytestrings.

Change-Id: If75ff5d458604a8210980a4f50d1e4fc27d2b037
2015-08-07 15:27:18 -04:00
Kaitlin Farr 4a0d606f74 Add Barbican key manager
Adds the first usable key manager plugin to Castellan. While there is an
implementation of a mock key manager in the test directories, it is used
only for testing.

This code is based on the barbican key manager code in Nova written by
Brianna Poulos. See: https://review.openstack.org/#/c/104001/

The Barbican API version info will be read from a config option until
the Barbican Version API is fixed.  See fix-version-api blueprint.

Implements: blueprint add-barbican-key-manager
Co-authored-by: Brianna Poulos <brianna.poulos@jhuapl.edu>
Change-Id: Ia27cd831f42c6b027778240b3396b1c4149dc689
2015-07-05 20:08:49 -04:00
Brianna Poulos e43302cc52 Copy cinder.keymgr to castellan
This patch adds the code found in cinder.keymgr
to castellan, except for the barbican wrapper
and the barbican test case.

The ConfKeyManager is also not included, since
it is insecure and not suitable for production,
and the MockKeyManager is suitable for testing.

Change-Id: I1139262581720be47a09b46f01f4bfb85a764d9a
2015-03-06 12:39:13 -05:00