Commit Graph

7 Commits

Author SHA1 Message Date
Grzegorz Grasza 96027e9cff Implement force parameter
This change adds the force parameter to the secret delete
method. By default, a secret cannot be deleted if it
contains consumers.

This code cannot be merged without a corresponding release and
bump of version for the barbicanclient.

Co-Authored-By: Mauricio Harley <mharley@redhat.com>
Change-Id: I84fd870b1cd19975a5bb832ed6fd6d18ec56eb5a
2023-02-17 10:00:07 +00:00
Grzegorz Grasza bc6d87b969 Add secret consumers
This change adds the ability to add or remove consumers to a
managed object to allow services to indicate which object is
associated with a specific secret.  At this time, only barbican
supports consumers.

This code cannot be merged without a corresponding release and
bump of version for the barbicanclient.

Co-Authored-By: Mauricio Harley <mharley@redhat.com>
Depends-On: https://review.opendev.org/c/openstack/requirements/+/873906
Change-Id: Ic25ac329f87db5992e32ef0b2d7d4020f37b2dee
2023-02-16 13:45:16 +01:00
Kaitlin Farr 1a13c2b203 Add list capability
Adds ability to list secrets, and adds initial filtering ability. Can
filter by secret_type.

Depends-On: I583f27f91cb3c6bdb23438dff6b539407b4005ed
Depends-On: I99cd72724e11bab362bcaaeb773f33b2abfe815c
Change-Id: I245d5846aa8d3b9586bea6dc4e0b24db86c911c9
2017-07-18 09:46:59 -04:00
“Fernando e80a6010ee Fix typo and add name to not_implemented and mock key_manager
Fixes a typo, and adds the name parameter to the functions in
the not_imlemented_key_manager and mock_key_manager.

Change-Id: Ic0954325750782e830f597969278ce1c257263b1
2015-10-22 15:17:19 -05:00
Michael McCune d768fbc97d refactoring castellan configuration
This change adds a module for listing configuration options and setting
their defaults. It also changes the key manager base class to
incorporate a configuration during creation. By default, the key manager
will continue to use the global CONF object from the oslo.config
package.

For the most part, this change will be backwards compatible. The one
exception is the creation of sample configuration files. Previously,
importing castellan was sufficient to add these options to the global
configuration object. Now, these options will need to be applied by
using the castellan.options.list_opts function, or adding them through
other means, to create sample configuration files. Similar applies for
setting configuration before instantiating a key manager.

changes
* adding castellan.options with list_opts and set_defaults functions
* changing KeyManager abc to include a configuration option to __init__
* changing barbican and not_implemented key managers to accept
  configuration parameters
* adding tests for set_defaults function
* fixing barbican tests to accomodate new configuration parameter
* adding documentation about configuration usage
* adding castellan configs to oslo entry point in setup.cfg
* adding a genconfig target to tox for producing a sample castellan
  configuration file
* adding the sample configuration file to the git ignore
* renaming barbican option api_version to barbican_api_version

Change-Id: I86d6d7d49a893beaae6f311060ec593e0482d889
Implements: blueprint improved-configuration-options
2015-08-12 12:03:36 -04:00
Kaitlin Farr 3d031cb5af Update the key manager API
Includes changes to the base API class to support managed objects
and creation of asymmetric key pairs. The current implementations
of the key manager only support symmetric keys for retrieval, and raise
NotImplementedErrors for generation of asymmetric key pairs. Full
functionality coming in later commits.

Change-Id: I69e0c22729413e95808f9419df59017011f14d99
2015-08-10 17:30:26 -04:00
Douglas Mendizábal d4fadcb521 Renames for consistent namespaces
Castellan was using both key_mgr and keymgr for module names, leading to
inconsistent namespaces such as:

castellan.keymgr.key_mgr.KeyManager

This CR renames both instances to key_manager to be consistent with the
program name.

Change-Id: Ie07a70c14939b6c797e812c441d29218c2940ade
2015-03-19 10:50:13 -05:00