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

azure role assignment delete will delete all assignments when --assignee is empty string #15278

Closed
yungezz opened this issue Sep 24, 2020 · 1 comment · Fixed by #15282
Closed
Assignees
Labels
RBAC az role
Milestone

Comments

@yungezz
Copy link
Member

yungezz commented Sep 24, 2020

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Describe the bug

Fork the issue from #13577, to track specific issue from customer when --assignee is empty string, az role assignment delete will delete all assignments. After fix, az will throw error when --assignee is empty string

I accidentally did this:

az role assignment create --assignee "$SOME_VAR" --role "Owner"

SOME_VAR was accidentally set to empty string. I did not get any prompt and EVERY OWNER WAS DELETED.I lost access to my subscription. Cannot even file a support ticket cause I lost permissions.
Is there a way to fix this?

To Reproduce

Expected behavior

Environment summary

Additional context

@ghost ghost added the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Sep 24, 2020
@yungezz yungezz added the RBAC az role label Sep 24, 2020
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Sep 24, 2020
@yungezz yungezz added this to the S176 milestone Sep 24, 2020
@yungezz
Copy link
Member Author

yungezz commented Sep 24, 2020

let's fix the specific issue firstly.

arrownj pushed a commit that referenced this issue Sep 30, 2020
…g arguments (#15282)

* Forbid empty string

* remove extra scope check

* rename test

* rename
Juliehzl pushed a commit to Juliehzl/azure-cli that referenced this issue Sep 30, 2020
…string arguments (Azure#15282)

* Forbid empty string

* remove extra scope check

* rename test

* rename
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RBAC az role
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants