Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New integration tests development: RBAC database upgrade and migration #2913

Closed
1 of 14 tasks
damarisg opened this issue May 23, 2022 · 4 comments
Closed
1 of 14 tasks

Comments

@damarisg
Copy link
Member

damarisg commented May 23, 2022

Version Component Framework development branch QA development branch
4.5.0 Master dev-13109-rbac-upgrade-migration

Introduction

Wazuh version 4.5.0 applies some modifications to the existing RBAC.db.
Considering that the user may have applied some changes to the database, like adding new roles, policies, etc.

As a QA team we must verify that the migration process applies the new changes without affecting the existing information stored in the database.
Our team must develop new integration tests to cover these changes.

This issue is part of wazuh/wazuh#13109 and wazuh/wazuh#13110.

Development stage

  • In research
  • Planning and estimating
  • In development
  • In testing phase
  • In Review
  • Completed

Use cases

  • Migrate from an older version all kind of resources and relations (cloud and user).
  • Migrate from an older version having an identical user policy defined as DEFAULT in the new version. The policy should be migrated to a new ID range along with its relationships.
  • Migrate from an older version removing some of the DEFAULT resources. These resources must be related to other USER ones. When migrated, those relationships should disappear.
  • Migrate from an older version modifying one of the DEFAULT resources. These resources must be related to other USER ones. Relationships must be kept.
  • Migrate from an older version deleting a DEFAULT resource and adding a new one with the same ID. This resource must be related to other USER one. After the migration, previous relationships should be deleted as the resources are not the same.
  • Faulty migration leads to the Wazuh API not starting.
  • Proper logs must be retrieved when user resources are modified.
  • Proper logs must be retrieved when default resources are modified.

Note

Cases proposed by the framework team, but we need to check if there are new cases to add.

Related Issues

@jmv74211 jmv74211 changed the title IT: RBAC database upgrade and migration New integration tests development: RBAC database upgrade and migration May 24, 2022
@jmv74211 jmv74211 added this to the Development 4.5 milestone Jun 9, 2022
@jmv74211 jmv74211 removed this from the Development 4.5 milestone Jan 25, 2023
@wazuhci wazuhci moved this to Backlog in Release 4.5.0 Apr 21, 2023
@wazuhci wazuhci moved this from Backlog to Triage in Release 4.5.0 Apr 25, 2023
@juliamagan juliamagan added level/task Task issue and removed level/epic labels Apr 26, 2023
@wazuhci wazuhci moved this to Triage in Release 4.5.0 May 4, 2023
@wazuhci wazuhci moved this from Triage to Backlog in Release 4.5.0 May 10, 2023
@EduLeon12 EduLeon12 self-assigned this May 19, 2023
@wazuhci wazuhci moved this from Backlog to In progress in Release 4.5.0 May 19, 2023
@wazuhci wazuhci moved this from In progress to On hold in Release 4.5.0 May 22, 2023
@wazuhci wazuhci moved this from On hold to Backlog in Release 4.5.0 May 23, 2023
@EduLeon12 EduLeon12 removed their assignment May 23, 2023
@EduLeon12 EduLeon12 self-assigned this Jun 15, 2023
@wazuhci wazuhci moved this from Backlog to In progress in Release 4.5.0 Jun 15, 2023
@EduLeon12
Copy link
Contributor

Issue Update

The first approach will be to test the current ITs and UTs to understand the current reach and status of tests, then a first mock-up of the design for the migration test. I will be testing on a fresh ec2 installation to have records or logs from scratch.

@EduLeon12
Copy link
Contributor

A Meeting has been scheduled to begin with the design and first implementation of the ITs.

@wazuhci wazuhci moved this from In progress to On hold in Release 4.5.0 Jun 22, 2023
@wazuhci wazuhci moved this to On hold in Release 4.6.0 Jun 26, 2023
@wazuhci wazuhci removed this from Release 4.5.0 Jun 26, 2023
@Selutario Selutario added level/epic and removed level/task Task issue labels Jun 27, 2023
@EduLeon12
Copy link
Contributor

Issue Update

After Analyzing with the help of the team the proposed use cases for the tests it was decided that instead of creating them inside API/test and following the tavern framework specifications, system tests will be developed instead.

The reason behind this decision is that to test all the use cases we will need to constantly upgrade and downgrade the manager to specific versions and since downgrading is not currently supported it would be extremely inefficient to build multiple containers instead of using only one.

System tests will allow us to design the test to address this issue and install the version needed for every use case.

@damarisg
Copy link
Member Author

We decided to close them.

@damarisg damarisg closed this as not planned Won't fix, can't repro, duplicate, stale Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants