[UI] Restore page keeps on getting refreshed if the user does not have restore permissions

Description

Tested with Everest v1.2.0-rc2 version.

Installed mysql operator in a1 namespace and pg operator in a2 namespace.

Created a mysql database with namespace1 backup storage. Enable scheduled backups and PITR.

Created a pg database with namespace2 backup storage. Enable scheduled backups and PITR.

Create a user dbadmin using cli.

./everestctl-1.2.0-rc2 accounts create

Add the following permissions in the RBAC policy

p, dbadmin:role, namespaces, read, * p, dbadmin:role, database-clusters, *, */* p, dbadmin:role, database-cluster-backups, create, */* p, dbadmin:role, database-cluster-backups, read, */* p, dbadmin:role, backup-storages, *, */* g, dbadmin, dbadmin:role

Now login in Everest UI using dbadmin user and view the Restores page of a database. The Restores page keeps on getting refreshed, this happens for 8 seconds.

After 8 seconds, this page is displayed

After 4 seconds, the Restores page again starts getting refreshed. Please see the attached video.

Environment

None

Attachments

5
  • 16 Sep 2024, 01:52 PM
  • 16 Sep 2024, 09:34 AM
  • 13 Sep 2024, 08:16 AM
  • 13 Sep 2024, 08:16 AM
  • 13 Sep 2024, 08:16 AM

Activity

Show:

Manish Chawla September 16, 2024 at 1:52 PM

Another issue, since the user does not have monitoring-instances permissions if we create a new db from backup, then the monitoring page in db wizard starts refreshing. Attaching the video for the issue

The namespaces/a2/monitoring-instances GET request is getting a 403 forbidden response from the backend.

Manish Chawla September 16, 2024 at 9:34 AM

The same issue is observed with the databases page as well. The scenario is as follows:

There are two namespaces a1 and a2. Mysql operator is installed in a1 and mongodb, pg operators are installed in a2 namespace. Create a mysql database in a1 namespace and mongodb, pg databases in a2 namespace.

Use cli to add a user dbadmin

In the configmap, give the dbadmin access to only database clusters in a2 namespace

p, dbadmin:role, namespaces, read, * p, dbadmin:role, database-clusters, read, a2/* p, dbadmin:role, backup-storages, read, a2/* p, dbadmin:role, database-cluster-backups, read, a2/* p, dbadmin:role, database-cluster-credentials, read, a2/* p, dbadmin:role, database-cluster-restores, create, a2/* g, dbadmin, dbadmin:role

Now view the databases page using dbadmin user, it starts refreshing continuously. Attaching a video for the issue

Unresolved

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

Smart Checklist

Created September 13, 2024 at 8:16 AM
Updated November 18, 2024 at 12:45 PM