Commit Graph

2941 Commits

Author SHA1 Message Date
Zuul ead054ecf5 Merge "Update master for stable/2024.1" 2024-03-29 07:35:09 +00:00
Zuul 8051116321 Merge "Tacker Installation via Openstack-Helm" 2024-03-21 16:37:48 +00:00
Ashutosh Mishra 435dd86f35 Tacker Installation via Openstack-Helm
This patch is to add tacker installation guide via Openstack-helm.

Change-Id: I09a42d61266ba2efe2c9acbffe6bdf8dc74f2653
2024-03-18 06:46:38 +00:00
Zuul a0eb01ee44 Merge "Reduce duplication under SOL v2 API framework" 2024-03-17 17:34:34 +00:00
Zuul eff547cf3d Merge "Add Tacker RBAC change documentation and release notes" 2024-03-17 14:53:22 +00:00
Zuul 036f150f4d Merge "Add new default roles in vnf-package API policies" 2024-03-17 14:53:21 +00:00
Zuul c617a73609 Merge "Introduce project scope_types in VNF Package policy" 2024-03-17 14:53:19 +00:00
Zuul 3331164442 Merge "Add new default roles in vnf-lcm API policies" 2024-03-17 07:07:33 +00:00
Zuul 80b5ad3ced Merge "Sample of deploying Kubernetes cluster with cilium" 2024-03-16 14:20:05 +00:00
OpenStack Release Bot aa5602f913 Update master for stable/2024.1
Add file to the reno documentation build to show release notes for
stable/2024.1.

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

Sem-Ver: feature
Change-Id: Ic3db90536b004fa0606cb3920212dcdaa04bb4b0
2024-03-15 14:14:36 +00:00
Zuul b4d82e774c Merge "Introduce project scope_types in VNF LCM policy" 2024-03-15 09:39:24 +00:00
Zuul 9c797d08e4 Merge "Replace CRLF by LF" 2024-03-15 05:50:49 +00:00
Zuul 8a80f7d2bf Merge "Obsolete Legacy APIs excluding VIM feature" 2024-03-15 03:10:11 +00:00
Ken Fujimoto 2c1a90a05a Sample of deploying Kubernetes cluster with cilium
This patch is a sample of mgmt driver for vnflcm v2 API
which deploying Kubernetes cluster using cilium CNI.

Implements: blueprint intro-cilium
Change-Id: Ibfd6958048204b53da7ebc8dd1d1694dfb7ee8f1
Co-Author: Yasufumi Ogawa <yasufum.o@gmail.com>
2024-03-14 23:58:49 +00:00
Takashi Kajinami def6216576 Replace CRLF by LF
... because LF is now commonly used as newline code.

Change-Id: Iaebf9330fb1305d9314d9fec05f9923efd7e61c6
2024-03-15 01:02:00 +09:00
Zuul 31176777c7 Merge "Add new default base rules and mapping in policy base class" 2024-03-14 13:19:38 +00:00
Zuul d1f907aec1 Merge "Set system scope in oslo policy creds object" 2024-03-14 13:19:35 +00:00
Zuul a2de64286d Merge "Add RBAC tests for VNF Package APIs" 2024-03-14 11:39:51 +00:00
Zuul 552b9f5ad8 Merge "Fix output regarding PM Job/Threshold response" 2024-03-14 07:56:40 +00:00
Zuul aac06464a0 Merge "reno: Update master for unmaintained/victoria" 2024-03-14 07:36:43 +00:00
Zuul 23f34db2ad Merge "reno: Update master for unmaintained/wallaby" 2024-03-14 07:36:41 +00:00
Zuul 8181e35d25 Merge "reno: Update master for unmaintained/xena" 2024-03-14 07:36:40 +00:00
Ayumu Ueha f410d66e83 Obsolete Legacy APIs excluding VIM feature
This patch obsoletes Legacy APIs excluding VIM feature.
And this patch mainly contains the following changes:

* Drop the implementation/db of NS and VNFFG functions.
* Remove the implementation that was used only by Legacy VNFM features.
* Remove the following components used only by Legacy features.
  * ceilometer
  * fenix
  * blazar
* Drop the functional test jobs for Legacy features.
* Delete the unnecessary files that were used in Legacy tests.

Implements: blueprint deprecate-legacy-apis
Change-Id: I76ba79f42cf7c3f04c48a87de4ae893f2d53e467
2024-03-14 05:32:30 +00:00
Kaori Mitani 715fdf699f Fix output regarding PM Job/Threshold response
There are two corrections:

First, according to SOL003, "authentication" should not appear
in the PmJobModifications response.
Therefore, it has been removed from the output obtained
when running "openstack vnfpm job update".

Second, the data type of PmJob href, as defined in SOL003,
has been changed to match the format of the Uri and
Link href defined in SOL013. This adjustment ensures
that the endpoints will now be displayed correctly.

Closes-Bug: #2054420
Change-Id: Id79ed19090271de4e32742f37cf54b6853acba2e
2024-03-14 04:36:34 +00:00
Itsuro Oda ef30b1d7e8 Reduce duplication under SOL v2 API framework
Previously SOL v2 related APIs such as prometheus plugin APIs
use SOL v2 API framework but there are a lot of duplication.

This patch reduces duplicate codes under SOL v2 API framework.

This patch also fixes wrong media type
'application/mergepatch+json' to 'application/merge-patch+json'
correctly.

Change-Id: Ic64fb5c1c18977198a7ff2746bde45400632abef
2024-03-14 02:15:33 +00:00
Ghanshyam Mann d4579bbebb Add Tacker RBAC change documentation and release notes
Tacker v1 API policies adopted the RBAC new defaults and
this document try to explain the changes and how operator
can use those. Also, adding the migration plan to move
from old default to new default.

Adding release notes also.

Implement blueprint implement-project-personas

Change-Id: Ib37cf65b79451a98e58b470726214e69624751a3
2024-03-13 14:40:42 -07:00
Zuul 0ec99497f6 Merge "Separate UseCaseGuide for v1 API and v2 API" 2024-03-13 18:36:43 +00:00
Ghanshyam Mann ba24a89998 Add new default roles in vnf-package API policies
This adds new defaults roles in vnf-package API policies.

Backward compatibility:
- Old Rules and Defaults will keep working as it is because they
  are added as deprecated rules and not removed. They are enabled
  by default. This means existing deployement will continue working
  in same way till deprecated rules are there and enabled by default.
- Legacy/current admin stays same and no change in their access permission
- Deprecation warning is added for old defaults so that operators will
  know that new defaults are available to opt-in.

New defaults(project personas):
- Add new defaults but they are disabled by defaults and operators can adopt them
  by enabling the oslo.policy config option. Basically add below in tacker.conf

  [oslo_policy]
  enforce_new_defaults=True

- All GET (read only) APIs are default to PROJECT_READER_OR_ADMIN
- Rest other APIs (write operations) are default to PROJECT_MEMBER_OR_ADMIN

Adding tests also to check permissions of new defaults.

Partial implement blueprint implement-project-personas

Change-Id: Ic7f5a9cd5aa10d93dfa491e5e60befb1f4bf2fcd
2024-03-13 18:17:04 +00:00
Ghanshyam Mann 204def5d54 Introduce project scope_types in VNF Package policy
oslo.policy introduced the scope_type feature which can
control the access level at system-level and project-level.
 - https://docs.openstack.org/oslo.policy/latest/user/usage.html#setting-scope

As per the SRBAC design, OpenStack does not support system scope so
we need to make scope type of each policy rule to project.

- https://governance.openstack.org/tc/goals/selected/consistent-and-secure-rbac.html#phase-1

The policy with 'project' scope means user with 'project-scoped'
token have permission to access which is nothing but the current
case so no change in permission level. By adding the scope_type
to project explicitly gives benefit of better error message. For
example, if any user with system scope token try to access tacker
APIs then oslo policy will fail early (instead of failing in lower
layer at DB or VIM level) and give clear error message of invalid
scope.

This commit adds project scope in VNF Package policies and its tests
also.

Partial implement blueprint implement-project-personas

Change-Id: I835817a87b6274662a9d612d9004eca1463bc586
2024-03-13 18:17:00 +00:00
Ghanshyam Mann 2de67c771b Add new default roles in vnf-lcm API policies
This adds new defaults roles in vnf-lcm API policies.

Backward compatibility:
- Old Rules and Defaults will keep working as it is because they
  are added as deprecated rules and not removed. They are enabled
  by default. This means existing deployment will continue working
  in same way till deprecated rules are there and enabled by default.
- Legacy/current admin stays same and no change in their access permission
- Deprecation warning is added for old defaults so that operators will
  know that new defaults are available to opt-in.

New defaults(project personas):
- Add new defaults but they are disabled by defaults and operators can adopt them
  by enabling the oslo.policy config option. Basically add below in tacker.conf

  [oslo_policy]
  enforce_new_defaults=True

- All GET (read only) APIs are default to PROJECT_READER_OR_ADMIN
- Rest other APIs (write operations) are default to PROJECT_MEMBER_OR_ADMIN

Adding tests also to check permissions of new defaults.

Partial implement blueprint implement-project-personas

Change-Id: Id4b4b9f2ed4029352ccd6564f757ec7f6a69419d
2024-03-13 18:16:55 +00:00
Ghanshyam Mann f421f25d65 Introduce project scope_types in VNF LCM policy
oslo.policy introduced the scope_type feature which can
control the access level at system-level and project-level.
 - https://docs.openstack.org/oslo.policy/latest/user/usage.html#setting-scope

As per the SRBAC design, OpenStack does not support system scope so
we need to make scope type of each policy rule to project.

- https://governance.openstack.org/tc/goals/selected/consistent-and-secure-rbac.html#phase-1

The policy with 'project' scope means user with 'project-scoped'
token have permission to access which is nothing but the current
case so no change in permission level. By adding the scope_type
to project explicitly gives benefit of better error message. For
example, if any user with system scope token try to access tacker
APIs then oslo policy will fail early (instead of failing in lower
layer at DB or VIM level) and give clear error message of invalid
scope.

This commit adds project scope in VNF LCM policies and its tests
also.

Partial implement blueprint implement-project-personas

Change-Id: Iead7f82b8c22c0c67981f5a7ae3a86016ee64734
2024-03-13 18:16:50 +00:00
Ghanshyam Mann 0d9984199f Add new default base rules and mapping in policy base class
We are introducing new default roles (project personas) in
Tacker  policies. To reuse those new default roles among policies,
default base rules have been defined in base class.

Those are basically:
- admin: stay same
- project member or admin: this is replacement of admin-or-owner for write operations
- Project reader or admin: this is replacement of admin-or-owner for reader operations

Partial implement blueprint implement-project-personas

Change-Id: Id95d07e6f2bb66eddc4205c541d606af9271ef44
2024-03-13 18:16:46 +00:00
Ghanshyam Mann bd2ff5e817 Set system scope in oslo policy creds object
In tacker.policy.authorize() method, it convert the context
object to policy value by context.to_policy_values() and then
pass that into oslo.policy enforcer authorize() method.

This is fine till now and does not cause any issue but as per
SRABC, we need to set if token is system scope (for project
scope it is all fine) in oslo policy creds via key 'system'.
But context.to_policy_values() method does not set the 'system'
key in creds because there it is named as `system_scope`.

To fix that we need to explicitly set the 'system' key in creds.

Partial implement blueprint implement-project-personas

Change-Id: I65d28749a4584661f7f4f596c4d2c39a84730963
2024-03-13 18:16:40 +00:00
Zuul 738336d8d9 Merge "Fix kubernetes resource existence check in v2 API" 2024-03-13 13:40:47 +00:00
Ai Hamano 700b6a3bfd Separate UseCaseGuide for v1 API and v2 API
This patch separates the documents for v1 API and v2 API
that are described in the same document in UseCaseGuide.
Existing documents are modified for v1 API, and
v2 API documents are newly placed under `doc/source/user/v2`.

And some VNF Package samples have also been added.

Change-Id: I6d99a660df32b457ea70a64bfd153bc76ac2d9fe
2024-03-13 19:23:06 +09:00
Ghanshyam Mann 71970bc665 Add RBAC tests for VNF Package APIs
Current tests do not have good test coverage of VNF LCM
APIs policies. Either tests for policies do not exist or
if they exist then they do not cover the actual negative
and positive testing.

Basically this commit does the following:

* Add RBAC tests:
  As we are implementing the project personas (project member
  and reader role) in policies, we need to have the enough
  testing coverage of existing policy behavior and to know
  that with new defaults how the access permissions will
  looks like.

* Pass correct target to oslo policy:
  Currently, APIs are not passing the right targets to oslo
  policy, means VNF instance project_id was not passed as target.
  We need to pass the project_id so that we can check the 'onwer'
  permission correctly at RBAC level and RBAC checks pass and
  request goes to fetch the data from DB where project_id
  is checked. For example, GET VNF API requests by a non
  admin user does not check if requester users is from same
  project of requested VNF or not and request pass the oslo
  policy checks and make DB request. Passing the right project_id
  in oslo policy will return the request (if projectA request projectB
  VNF) from policy checks itself. This can be seen in modified
  test_controller.py tests.

Partial implement blueprint implement-project-personas

Change-Id: I1e8d98d6b94507783ba34d149642c019609247e6
2024-03-12 18:59:25 -07:00
Zuul b21072efc7 Merge "Change path to test sample" 2024-03-12 08:08:33 +00:00
Zuul 0aa4c760f2 Merge "Update installer for virtualbox/ubuntu-jammy" 2024-03-08 13:36:09 +00:00
Zuul d19541340a Merge "Add RBAC tests for VNF LCM APIs" 2024-03-06 17:09:17 +00:00
Zuul f280f5a4d0 Merge "Add testing framework for RBAC" 2024-03-06 17:04:42 +00:00
Ghanshyam Mann c2ef23210f Add RBAC tests for VNF LCM APIs
Current tests do not have good test coverage of VNF LCM
APIs policies. Either tests for policies do not exist or
if they exist then they do not cover the actual negative
and positive testing.

Basically this commit does the following:

* Add RBAC tests:
  As we are implementing the project personas (project member
  and reader role) in policies, we need to have the enough
  testing coverage of existing policy behavior and to know
  that with new defaults how the access permissions will
  looks like.

* Pass correct target to oslo policy:
  Currently, APIs are not passing the right targets to oslo
  policy, means VNF instance project_id was not passed as target.
  We need to pass the project_id so that we can check the 'onwer'
  permission correctly at RBAC level and RBAC checks pass and
  request goes to fetch the data from DB where project_id
  is checked. For example, GET VNF API requests by a non
  admin user does not check if requester users is from same
  project of requested VNF or not and request pass the oslo
  policy checks and make DB request. Passing the right project_id
  in oslo policy will return the request (if projectA request projectB
  VNF) from policy checks itself. This can be seen in modified
  test_controller.py tests.

Partial implement blueprint implement-project-personas

Change-Id: Ib022397f715c6aa08718a6867d2f2ea19c517c00
2024-03-06 05:15:39 +00:00
Ghanshyam Mann 9eac5d363f Add testing framework for RBAC
Current tests do not have good test coverage of existing
RBAC policies. Either tests for policies do not exist or
if they exist then they do not cover the actual negative
and positive testing.

Along with what all users have access, it is important to
test what all users does not have access.

For Example, if any policy with default rule as admin only then
test should verify:
- policy check pass with context having admin role
- policy check fail with context having non-admin role

As we are implementing the project personas (project member
and reader role) in policies, we need to have the enough
testing coverage of existing policy behavior and to know
that with new defaults how the access permissions will
looks like. These test coverage will be extended to adopt
the new changes and also make sure we do not break the
existing behavior.

This commit adds the testing framework for RBAC and implement
create VNF test as example. It will cover other APIs in further
changes in this series.

Partial implement blueprint implement-project-personas

Change-Id: I5b0d039c6aebda6ba0653032ac5a1963a704cb59
2024-03-05 18:28:44 -08:00
OpenStack Release Bot e6c3f95c6a reno: Update master for unmaintained/xena
Update the xena release notes configuration to build from
unmaintained/xena.

Change-Id: Ie089762176c51dad36329cfc1514116f033960db
2024-03-05 18:38:33 +00:00
OpenStack Release Bot 781938b333 reno: Update master for unmaintained/wallaby
Update the wallaby release notes configuration to build from
unmaintained/wallaby.

Change-Id: I57a2e03ab2ecd1662bdb403d99041c6605b19104
2024-03-05 18:37:53 +00:00
OpenStack Release Bot af61865e99 reno: Update master for unmaintained/victoria
Update the victoria release notes configuration to build from
unmaintained/victoria.

Change-Id: I022c3c2702e5d24edb8f0a515b946a6fbc14895a
2024-03-05 18:37:10 +00:00
Zuul a38c1736b6 Merge "Fix db-migration-tool issues" 2024-03-05 09:53:57 +00:00
Ken Fujimoto 03b3fe6f98 Fix kubernetes resource existence check in v2 API
This patch fixes the problem that instantiating a vnf instance
succeeds wrongly when a resource made by another instance with
the same name exists.
This patch adds "tacker_vnf_instance_id" to metadata.labels
when creating kubernetes resources in CNF v2 API Instantiate,
and when creating or deleting resources, if the resource already
exists, it checks if it was created in own vnf instance by
metadata.labels.

Closes-Bug: #2053098
Change-Id: I4a22fc50706750f9689d89d24c1db28de8e2dc90
2024-03-05 06:31:07 +00:00
Ayumu Ueha b885f93d64 Fix broken gate jobs caused by oslo.db upgrades
This patch fixes an issue where the filter attribute of vnflcm
subscription (v1 API) could not be retrieved because oslo.db version
was updated to 15.0.0 [1].
The reason of the issue was that obj's data type, which was obtained
when oslo.db was 14.1.0 and 15.0.0, was different as below:

* oslo.db==14.1.0: sqlalchemy.engine.row.LegacyRow
* oslo.db==15.0.0: sqlalchemy.engine.row.Row

This patch changes the existence validation of the filter key for
`vnf_lcm_subscription` in the `sqlalchemy.engine.row.Row` case.

[1] https://review.opendev.org/c/openstack/requirements/+/909930
[2] https://pydoc.dev/sqlalchemy/latest/sqlalchemy.engine.row.Row.html

Closes-Bug: #2055431
Change-Id: I8c1543bb724b6f2c4f3f4f7edecdfef063d3d9a4
2024-03-01 10:55:40 +00:00
Zuul 8102bc3a08 Merge "Standardize log format" 2024-02-28 16:30:20 +00:00
Yasufumi Ogawa 04d2c197d9 Update installer for virtualbox/ubuntu-jammy
This patch is to fix a lack of required packages for building devstack
environment and drop old focal support.

* Add pip installation of pbr for ovn-metadata agent and netaddr for
  kuryr-kubernetes.

* Remove boxes and playbooks for focal.

Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
Change-Id: Ie345e50e09a3236d0c2ab9ff1494058bdc6c010b
2024-02-28 20:07:24 +09:00