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

Read-only RBAC has the UI showing workflow as deleted when it is not #2145

Closed
2 tasks
ddseapy opened this issue Feb 3, 2020 · 6 comments · Fixed by #2235
Closed
2 tasks

Read-only RBAC has the UI showing workflow as deleted when it is not #2145

ddseapy opened this issue Feb 3, 2020 · 6 comments · Fixed by #2235
Assignees
Labels

Comments

@ddseapy
Copy link
Contributor

ddseapy commented Feb 3, 2020

Checklist:

  • [X ] I've included the version.
  • [X ] I've included reproduction steps.
  • I've included the workflow YAML.
  • I've included the logs.

What happened:
EDIT - This looks to be JUST a UI issue, and not a security concern

When setting the RBAC for the server pod to the following, I am able to delete workflows from the archive, but not from the cluster.

rules:
- apiGroups:
  - ""
  resources:
  - configmaps
  verbs:
  - get
  - watch
  - list
- apiGroups:
  - ""
  resources:
  - secrets
  verbs:
  - get
- apiGroups:
  - ""
  resources:
  - pods
  - pods/log
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - ""
  resources:
  - secrets
  verbs:
  - get
- apiGroups:
  - argoproj.io
  resources:
  - workflows
  - workflowtemplates
  - cronworkflows
  verbs:
  - get
  - list
  - watch

What you expected to happen:

I should get permission denied trying to delete the workflow from postgres

How to reproduce it (as minimally and precisely as possible):

Set the rbac to what is listed above for the server. Run a workflow. Try to delete the workflow from the archive in the UI. It will succeed even though it should fail.

Anything else we need to know?:

Environment:

  • Argo version: 2.5.0-rc7
  • Kubernetes version : 1.16.4

Message from the maintainers:

If you are impacted by this bug please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.

@ddseapy
Copy link
Contributor Author

ddseapy commented Feb 3, 2020

In slack @sarabala1979 pointed me to https://github.com/argoproj/argo/blob/4cda9a05bf8cee20027132e4b3428ca9654bed5a/server/workflowarchive/archived_workflow_server.go#L106

I'm not sure yet why this doesn't seem to be taking affect.

@ddseapy
Copy link
Contributor Author

ddseapy commented Feb 3, 2020

@alexec @sarabala1979 ok, so it actually doesn't delete the workflow.

For other actions (kubernetes-based ones) the UI shows a Red pop-up saying permission denied.

For postgres is does not show the pop-up, and shows the workflow gone. If you do a refresh or query the table it's still there.

@ddseapy ddseapy changed the title Read-only RBAC allows deleting workflows from archive Read-only RBAC has the UI shoding workflow as deleted when it is not Feb 3, 2020
@ddseapy
Copy link
Contributor Author

ddseapy commented Feb 3, 2020

renamed the ticket

@ddseapy ddseapy changed the title Read-only RBAC has the UI shoding workflow as deleted when it is not Read-only RBAC has the UI showing workflow as deleted when it is not Feb 3, 2020
@alexec
Copy link
Contributor

alexec commented Feb 3, 2020

Can I please confirm this is a UI only issue (which isn't great) - and that it not actually deleted (which is worse).

@alexec alexec added this to the v2.5 milestone Feb 3, 2020
@alexec alexec self-assigned this Feb 3, 2020
@ddseapy
Copy link
Contributor Author

ddseapy commented Feb 3, 2020

@alexec correct, that appears to be the case. I am much less concerned about this now. Apologies for not checking the database directly sooner.

@alexec
Copy link
Contributor

alexec commented Feb 3, 2020

Thank you @ddseapy

@alexec alexec added the ui label Feb 3, 2020
@alexec alexec modified the milestones: v2.5, v2.6 Feb 3, 2020
@alexec alexec added good first issue Good for newcomers backlog labels Feb 3, 2020
@alexec alexec removed this from the v2.6 milestone Feb 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants