3509 Commits

Author SHA1 Message Date
Stephen Finucane
029233a1a4 Remove unnecessary hacking checks
The B319 check to ensure no use of xrange is not an issue in a Python
3-only codebase, while the unittest assert-focused B311, B312 and B321
checks duplicate H203, H204 and H203 (again) from hacking respectively.

An unnecessary 'py3pep8' tox environment is removed since the standard
'pep8' environment uses Python 3 now.

Change-Id: I8eb8c6accd1c2f2c7851a08b372235699a971ad9
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2022-09-26 15:24:51 +00:00
Douglas Mendizábal
33d42acb04 Update devstack plugin installation doc
This patch updates the installation doc for the devstack plugin.  It
also removes the Vagrant option as it has not been maintained in quite
some time.

Change-Id: I97fc2fac0cb29b1059b668bbe817a2778a8a4a70
2022-09-23 15:56:47 +00:00
Douglas Mendizábal
d8ffdf91e5 Fix Barbican gate
This patch fixes a zuul syntax error due to a deprecated definition that
was still in use in our configuration.

It also makes the grenade job non-voting as it is currently failing.  A
follow up patch will fix grenade and re-enable voting.

Change-Id: I271a3d50dba5f1c7c58c01838fa68b4c8adbd72c
2022-09-23 11:54:54 -04:00
OpenStack Proposal Bot
55cc970bc7 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I67dc7101fa4861d6539ce301b3a8521f65a15e65
2022-09-16 03:56:19 +00:00
Zuul
44cdbc6865 Merge "Drop python3.6/3.7 support in testing runtime" 2022-09-13 13:30:27 +00:00
OpenStack Proposal Bot
bf82d41e11 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Icff31c12583d257b83199ca5215fb12dc1aeab38
2022-09-13 03:54:48 +00:00
Zuul
62862f2768 Merge "Fix wrong assert statements" 2022-09-12 21:37:43 +00:00
Zuul
304d5c0434 Merge "zuul: fix the grenade job to actually test barbican" 15.0.0.0rc1 2022-09-12 09:14:37 +00:00
Takashi Natsume
7844b72e0c Fix wrong assert statements
Replace 'called_once_with' with 'assert_called_once_with'.

Change-Id: Ib041b8a42ecb47b1304228ec03fca0e54ee9d862
Story: 2010285
Task: 46256
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
2022-09-11 14:22:06 +09:00
Douglas Mendizábal
950420f3c9 Fix remaining Secure RBAC policies
This patch fixes the remaining default policies to ensure they are only
evaluated when enforce_new_defaults=True.

The 'reader' role is removed from the policy tests in thise codebase
because they now correctly fail.

The 'reader' role in was introduced into the policy tests in
060ca2ee369af1fff3bf833d466f33d1889fb72e and the dynamic tests that were
generated passed because of the issue being resolved in this patch.

Now that the new default policies are not being evaluated when
enforce_new_defaults=False the requests using the 'reader' role are
correctly denied.

Story: 2010235
Task: 46036
Change-Id: Ief495c50bb120e2aa671dbcc80734ccb5a839b74
2022-08-26 14:31:32 -05:00
Zuul
708b00d340 Merge "Fix Secure RBAC policies for Containers API" 2022-08-25 22:27:41 +00:00
Zuul
81ede2b9f8 Merge "Fix Secure RBAC policies for Consumers" 2022-08-25 22:27:36 +00:00
Douglas Mendizábal
6e53363f52 Fix Secure RBAC policies for Containers API
This patch fixes the Consumers API policies to ensure
that they are only evaluated when enforce_new_defaults = True

Change-Id: I4e91ca55e3d4030dfdc55d78b92ec3ad3f94bd64
2022-08-25 15:54:33 -05:00
Douglas Mendizábal
b6002aa3d0 Fix Secure RBAC policies for Consumers
This patch fixes the Consumers API policies to ensure
that they are only evaluated when enforce_new_defaults = True

Story: 2010235
Change-Id: I191f41372a5c0b334ff858743a9303325db40cb6
2022-08-25 15:39:22 -05:00
Ade Lee
328087af6f Fix Secure RBAC policies for secret_metadata
This patch fixes policy issues for deployments that have not yet opted
into the Secure RBAC defaults by making sure that the new policies are
only evaluated when enforce_new_defaults = True.

This prevents policy side-effects where some users with roles used in
the new policy defaults are able to access APIs that they were not
allowed to access with the legacy deprecated policies.

This patch also deprecates the old policies using DeprecatedRule objects
from olso_policy to ensure that the enforce_new_defaults option works as
expected.

Story: 2010235
Change-Id: I758cd5030e56c6268017a8b133baba7b74db74cb
2022-08-25 12:19:32 -05:00
Ade Lee
0c8efcd2ac Fix Secure RBAC policies for Orders
This patch fixes policy issues for deployments that have not yet opted
into the Secure RBAC defaults by making sure that the new policies are
only evaluated when enforce_new_defaults = True.

This prevents policy side-effects where some users with roles used in
the new policy defaults are able to access APIs that they were not
allowed to access with the legacy deprecated policies.

This patch also deprecates the old policies using DeprecatedRule objects
from olso_policy to ensure that the enforce_new_defaults option works as
expected.

Story: 2010235
Change-Id: I8131987a5b3fc200674b61a52eebb93717d84baa
2022-08-25 11:47:48 -05:00
Zuul
ea4c511918 Merge "Fix Secure RBAC policies for Secret ACLs" 2022-08-25 09:56:31 +00:00
Zuul
61742800b9 Merge "Fix deprecation cycle for Secret policies" 2022-08-25 09:56:29 +00:00
Douglas Mendizábal
bbad16f70e Fix Secure RBAC policies for Secret ACLs
This patch fixes the Secure RBAC Secret ACL policies to ensure that they
are only evaluated when enforce_new_defaults = True

Story: 2010235
Change-Id: I176091f8658fff75ba2d55aa937203c22a7f43b4
2022-08-24 17:06:42 -05:00
Zuul
198aee70a4 Merge "Fix Secure RBAC policies for Secrets" 2022-08-24 21:51:06 +00:00
Douglas Mendizábal
62964b6106 Fix deprecation cycle for Secret policies
This patch fixes the deprecated_since parameter for deprecated rules
form ZED to WALLABY when the new policies were introduced.

Change-Id: I1b5f9b925a6fa961ea5bbc29a79927075ba707e0
2022-08-24 16:17:38 -05:00
Douglas Mendizábal
cd9b0ba9f0 Fix Secure RBAC policies for Secrets
This patch fixes policy issues for deployments that have not yet opted
into the Secure RBAC defaults by making sure that the new policies are
only evaluated when enforce_new_defaults = True.

This prevents policy side-effects where some users with roles used in
the new policy defaults are able to access APIs that they were not
allowed to access with the legacy deprecated policies.

This patch also deprecates the old policies using DeprecatedRule objects
from olso_policy to ensure that the enforce_new_defaults option works as
expected.

Story: 2010235

Depends-On: I16ed904eeb27ab7110a7e4e56ef7ea89c8c3c2ab
Change-Id: I224c50a8bf9f540f8f643339a4beeaff36ca6509
2022-08-24 12:01:56 -05:00
Luigi Toscano
1ed258e940 zuul: fix the grenade job to actually test barbican
Add the required services and run a few barbican-specific tests
to validate the upgrade.

The grenade plugin contains a few settings which don't need to be
set anymore explicitly and they are not in the job configuration
(as devstack/upgrade/settings is not used anymore):
- all the image-related variables don't need to be overridden anymore,
  the default one from devstack should be used
- Image API v1 has been disabled since tempest 20.0

The job can be switched to voting again.

Change-Id: Id0682aea57d4d1fc49334f2dd11ef9a0ffb355fb
2022-08-23 01:32:26 +02:00
Alan Bishop
b8b83a16fa devstack: make create_barbican_accounts idempotent
Make devstack's create_barbican_accounts function idempotent by
using get_or_create_XXX functions to configure resources (users,
roles, endpoints, etc.).

This avoids problems in situations such [1], where the cinder service
needs the "creator" role. Cinder ends up creating the role first,
which would cause create_barbican_accounts to subsequently fail if
barbican assumes that it will create the role.

[1] Ia3f414c4b9b0829f60841a6dd63c97a893fdde4d

Change-Id: I216f78e8a300ab3f79bbcbb38110adf2bbec2196
2022-08-11 09:43:59 -07:00
Ade Lee
ff7fef6211 Fix versions for new microversion
Fix versions endpoint to match what is expected in the microversion spec.
https://specs.openstack.org/openstack/api-wg/guidelines/microversion_specification.html

We will return what we previously returned for < 1.1

Change-Id: I7db1fa9f1fccb3638911f0c90ad0718e1c53334d
2022-07-20 14:57:53 -04:00
Zuul
ae22ab0080 Merge "Imported Translations from Zanata" 2022-07-11 17:36:06 +00:00
Zuul
1abd566686 Merge "Revert "Temporarily disable voting for FIPS job"" 2022-07-11 17:36:03 +00:00
OpenStack Proposal Bot
2ac710eb6e Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I307006ec863ee795b736cb2b415b29ee87d48e5a
2022-06-21 02:11:27 +00:00
Zuul
ad1649c81e Merge "Remove the invalid quotes" 2022-06-07 22:44:00 +00:00
Ade Lee
aac3061fad Revert "Temporarily disable voting for FIPS job"
This reverts commit 57fb686b20451753e609729e96a7f04729769bbc.

Reason for revert: FIPS job working now
Depends-On: https://review.opendev.org/c/zuul/zuul-jobs/+/844704

Change-Id: I262ace1bb54192a9c998cf17a0dcd2b9fc7ae0a2
2022-06-04 16:38:32 +00:00
Zuul
4bb724c50e Merge "Allow users with "creator" role to edit ACLs" 2022-05-27 16:18:24 +00:00
likui
6e1a7edeff Drop python3.6/3.7 support in testing runtime
In Zed cycle testing runtime, we are targetting to drop the
python 3.6/3.7 support, project started adding python 3.8 as minimum

[1] https://governance.openstack.org/tc/reference/runtimes/zed.html

Change-Id: I4ad4c5cc59800bc187a0ac0722c487726f7e18b3
2022-05-23 10:26:10 +01:00
Douglas Mendizábal
c86b11fb8e Allow users with "creator" role to edit ACLs
This patch updates the default policy to allow users with the
"creator" role to edit Secret and Container ACLs.

Secrets that have an ACL set to private will only be able to be edited
by the user who owns the secret.

Change-Id: I0dc603a3e3a894fee774483a70285d47b57abdf8
2022-05-19 17:32:03 -05:00
Zuul
f177c30ff6 Merge "Remove undercloud job" 2022-05-18 22:05:45 +00:00
Takashi Kajinami
50c713769a Remove undercloud job
... because Barbican is no longer used in Undercloud.

Change-Id: I63747e39a7dbb7b328798054fa8f023bfbb535c7
2022-05-18 00:01:38 +09:00
Takashi Kajinami
37edca24d0 Include options for Vault secret store
... in the barbican.conf file generated by `tox -e genconfig`.

Change-Id: I175be34ec79eaf4297e108b25ba98a0f220721e5
2022-05-12 11:46:25 +00:00
Zuul
ad5f900151 Merge "Temporarily disable voting for FIPS job" 2022-05-11 20:56:44 +00:00
zhu.boxiang
8dc2be3b5e Remove the invalid quotes
Remove the invalid quotes to set as 'GET' from 'GET"'.

Change-Id: I1f8d224e7d9befd73979c4b368f131a3bfd547ef
2022-05-09 19:48:18 +00:00
Douglas Mendizábal
57fb686b20 Temporarily disable voting for FIPS job
The gate job barbican-tox-functional-fips is failing at the gate due to
a dependency issue when building the environment.  Specifically, it
appears that the package "liberasurecode-devel" fails to be found in the
CentOS 9 repositories.

This patch temporarily disables gate-voting for the FIPS job.  We should
be able to re-enable voting once this dependency issue is solved.

Change-Id: I9d8028454468f95bae405677dcd492fa2e52f93f
2022-05-09 12:45:55 -05:00
OpenStack Proposal Bot
40ef6c8b4a Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I853cd063273cdc2ae52babf9989bbe66b33882a6
2022-05-07 02:09:36 +00:00
Grzegorz Grasza
0f74877c77 Implement microversions, bring back secret consumers API
The implementation follows nova and implements an is_supported
function, that can be used in controllers, to check the requested
version and take different code paths depending on the result.

This reverts commit 7b14d983e0dce6dcffe9781b05c52335b8203fc7.

Change-Id: I5651a69f93288ac1dfdc1c8b1ad0f904e370c127
2022-05-04 15:02:32 +00:00
Douglas Mendizábal
935c7158b0 Replace TripleO CentOS 8 jobs with CentOS 9 jobs
The TripleO team has replaced their CentOS 8 jobs with CentOS 9.
Unfortunately, this broke our gate because we're still looking for the
CentOS 8 jobs.  This patch updates our jobs to use CentOS 9, which
should fix the gate.

Change-Id: Id54d0581dfc1426fea50302ea6b5b5ab217fe48d
2022-05-04 10:00:53 -05:00
Zuul
33579d4c07 Merge "Add Python3 zed unit tests" 2022-04-25 14:50:44 +00:00
Zuul
b9b836931d Merge "Update master for stable/yoga" 2022-04-25 14:50:41 +00:00
Takashi Kajinami
335a55aaf5 Add missing oslo.service options to barbican.conf
The options used by service launchers in the oslo.service library were
missing from barbican.conf. This change ensures that these parameters
are picked up by oslo-config-generator.

Change-Id: Ib90fee2d09eec2d6e2755a7d56ec46c9c0154bcc
2022-03-12 11:31:41 +00:00
Takashi Kajinami
83a805065c Include healthcheck middleware options
This change ensures the options of the healthcheck middleware, which is
enabled in api pipeline since [1] was merged, are included in
barbican.conf generated by the oslo-config-generator command.

[1] 3fc072d986f141b7153e4cd4543028f665f04ad0

Change-Id: I95418a2413591f326148fb1ab0954ada8941bfb1
2022-03-12 11:31:35 +00:00
a61bfdeb36 Add Python3 zed unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for zed.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I701083129c93255f21597bb20b843053e05175ab
2022-03-11 11:29:11 +00:00
271aeb9421 Update master for stable/yoga
Add file to the reno documentation build to show release notes for
stable/yoga.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/yoga.

Sem-Ver: feature
Change-Id: Ibf5116796e53b70424a7c3fc45e1c91b345ec1a9
2022-03-11 11:29:10 +00:00
Zuul
ffea7f79c9 Merge "Allow secret delete by users with "creator" role" 14.0.0 2022-02-14 15:42:14 +00:00
Douglas Mendizábal
9601593328 Fix container consumers rbac policy
This patch modifies the Consumer controller to enable the use of
ownership information in policy checks. e.g. policies that use a target
container:

   project_id:%(target.container.project_id)

Story: 2009664
Task: 43872

Depends-On: I8698fc7a9ac849b8c24adfe824ca44dd3e42b999
Change-Id: I1724152839f0f5850f8d32d40b36d1670c0ad996
2022-02-07 16:21:38 -06:00