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

Snapshot create/restore and rotate certificate actions not available for a Standard user (RKE1) #5011

Closed
timhaneunsoo opened this issue Jan 31, 2022 · 16 comments
Assignees
Milestone

Comments

@timhaneunsoo
Copy link

Setup

  • Rancher version: v2.6-head 7efbeab
  • Browser type & version: Chrome Version 97.0.4692.99

Describe the bug

The following snapshot related actions are not available for a Std user.

  • Take Snapshot
  • Restore Snapshot
  • Rotate Certificates

To Reproduce

  1. Deploy an RKE1 custom cluster
  2. Take a few snapshots
  3. On the Cluster Management page, find snapshot related actions

Result
On the Cluster Management page, snapshot related actions are not available

  • I can access Restore when I navigate to Cluster details --> Snapshot -->Select snapshot --> Restore.

Expected Result

Restore Snapshot should be available to standard user on Cluster Management page

Screenshots

Screen Shot 2022-01-31 at 1 16 36 PM

Context

The behavior for the snapshot related actions need to be consistent between standard users and admin

Standard users will be able to access the snapshot related functions as intended

@timhaneunsoo timhaneunsoo added this to the v2.6.4 milestone Jan 31, 2022
@timhaneunsoo timhaneunsoo self-assigned this Jan 31, 2022
@sowmyav27 sowmyav27 assigned neillsom and unassigned jtravee Jan 31, 2022
@sowmyav27 sowmyav27 changed the title Snapshot related actions not available for a Std user Snapshot related actions not available for a Standard user Jan 31, 2022
@neillsom
Copy link
Contributor

The issue appears to be that a standard user does not have backupEtcd as an available k8s action

As admin
admin-with-action.jpg

As standard user
standarduser-without-action.jpg

We can bypass the logic to enable a standard user to have the UI 'take snapshot' and 'restore snapshot' functionality, but these will result in a 403 error

Non-admin user attempting to take snapshot
403-error.jpg

@nwmac
Copy link
Member

nwmac commented Feb 23, 2022

@neillsom This is labelled in Review, but I don't see a PR for this. If the backend is not proving the backupEtcd action for a standard user, and they should be able to snapshot, then we need a backend fix, so we should open an issue in rancher/rancher.

@timhaneunsoo
Copy link
Author

timhaneunsoo commented Mar 3, 2022

@neillsom For clarification, the standard user is also the cluster owner in this case.
Screen Shot 2022-03-03 at 10.30.41 AM.png

Screen Shot 2022-03-03 at 10.27.57 AM.png

@neillsom
Copy link
Contributor

neillsom commented Mar 4, 2022

Rancher/rancher issue rancher/rancher#36757

@gaktive
Copy link
Member

gaktive commented Mar 9, 2022

Based on rancher/rancher#36757 (comment), the backend appears to be working as designed.

@neillsom can you review @MbolotSuse's comment and see if there is anything else that we need the backend to help out with?

@gaktive
Copy link
Member

gaktive commented Mar 10, 2022

Backend ticket marked as closed with comments indicating it's working as designed there. @neillsom do you have enough now to work on this?

@nwmac
Copy link
Member

nwmac commented Mar 11, 2022

I have updated the backend issue and re-opened it - this works for RKE2 but NOT for RKE1

@nwmac nwmac changed the title Snapshot related actions not available for a Standard user Snapshot related actions not available for a Standard user (RKE1) Mar 11, 2022
@slickwarren slickwarren changed the title Snapshot related actions not available for a Standard user (RKE1) Snapshot create/restore and rotate certificate actions not available for a Standard user (RKE1) Mar 11, 2022
@gaktive gaktive removed this from the v2.6.4 milestone Mar 16, 2022
@catherineluse
Copy link
Contributor

catherineluse commented Mar 19, 2022

Should this be in the v2.6.4 release notes under known issues? Cc @jtravee

@jtravee
Copy link

jtravee commented Mar 21, 2022

Should this be in the v2.6.4 release notes under known issues? Cc @jtravee

I think it should be. I'll add it to the RN and add the label here as well, thanks!

@gaktive
Copy link
Member

gaktive commented Apr 13, 2022

Backend may have a fix now. It's in QA's hands so UI may be unblocked. @MbolotSuse is that true?

@gaktive
Copy link
Member

gaktive commented Apr 13, 2022

@neillsom we're unblocked on this again.

@MbolotSuse
Copy link

@gaktive Sorry for not letting you know. We have the fix code available in master. Still needs to go through QA and all though.

@gaktive
Copy link
Member

gaktive commented Apr 13, 2022

Thanks @MbolotSuse; we'll keep this in Next Up but lower on the stack in case.

@gaktive
Copy link
Member

gaktive commented Apr 22, 2022

Backend work passed QA yesterday. Not sure if UI has time to get this in for 2.6.5 but we'll see.

@nwmac nwmac assigned nwmac and unassigned neillsom Apr 26, 2022
@nwmac
Copy link
Member

nwmac commented Apr 26, 2022

I have validated that given the backend changes, this is now working in the UI - moving to Test for QA to validate and sign-off.

@timhaneunsoo
Copy link
Author

timhaneunsoo commented Apr 27, 2022

timhaneunsoo said: ### Test Environment: ###
Rancher version: v2.6-head 7db4fe4
Rancher cluster type: HA
Docker version: 20.10

Downstream cluster type: EC2 rke1 node driver


Testing:

Tested this issue with the following steps:

  1. Create rke1 node driver cluster as Standard user

Result - Pass

Standard users are now able to access snapshot related functions as intended on Cluster Management page

image.png

@zube zube bot closed this as completed Apr 27, 2022
@zube zube bot assigned thaneunsoo and unassigned timhaneunsoo Jul 25, 2022
@zube zube bot removed the [zube]: Done label Jul 27, 2022
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

8 participants