microsoft / microsoft/AzureStorageExplorer
After PIM activation into group membership, Storage Explorer needs Reset > Authentication to pickup new rights
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 452
- Forks
- 92
- Avg merge
- 15h 20m
- Merged PRs (30d)
- 3
Description
Preflight Checklist
- I have installed the latest version of Storage Explorer.
- I have checked existing resources, including the troubleshooting guide and the release notes.
- I have searched for similar issues.
Storage Explorer Version
1.34.0 (99)
Regression From
No response
Architecture
x64
Storage Explorer Build Number
20240523.2
Platform
Windows
OS Version
Windows 11 24H2
Bug Description
Our RBAC config for a storage account grants Storage Queue Data Reader role permanently to a group, called QueueReaders - this is for normal monitoring use. If we need to edit the queue, we require users to PIM-activate into membership of a group called QueueWriters. The QueueWriters group is permanently granted Storage Queue Data Contributor access to the storage account, but normally has zero members until someone PIM activates their membership.
This works, but there's a long delay between activating group membership, and being able to operate on the queue in Storage Explorer. This can be sped up by going Help > Reset and resetting the authentication. This then forces a reconnect via the normal Account Management flow, and has the side-effect to getting a new user token.
The user JWT token lists the group memberships as part of the token, so I imagine that the token gets cached, and the effect of elevation isn't seen until the token is refreshed.
Would it be possible to have a "Refresh token" option in the menu somewhere, so we can get a new token faster?
Repro steps:
Steps to Reproduce
- Setup RBAC groups as described in the report:
a. create a QueueReader group, grant Storage Queue Data Reader to storage account. Add the test user to this group.
b. create a QueueWriter group, grant Storage Queue Data Contributor to storage account
c. configure QueueWriter group to be a PIM-enabled group, and configure the test user as eligible to activate into a member of the group.
d. enqueue a test message into the queue. - Start Storage Explorer. Navigate to the queue. Check you can read the test message.
- Attempt to delete the message: permission denied (expected) because you only have QueueReader membership.
- PIM activate membership of QueueWriter group.
- Attempt to delete the message: permission denied - unexpected, because user is now elevated. BUG.
- Help > Reset chose authentication only
- Re-add the user account
- Attempt to delete the message: delete succeeds
Actual Experience
Delete queue message fails with a permission denied type error
Expected Experience
Delete queue message should succeed.
Additional Context
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Help > Reset authentication flow and the normal Account Management reconnect described in the report. Reproduce the PIM group-membership change, compare behavior before and after resetting authentication, and trace where the refreshed user token is obtained. Done means users can refresh authentication from the menu and gain the newly activated queue permissions without removing and re-adding the account.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- authentication, authorization, cloud, desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100