microsoft / microsoft/AzureStorageExplorer

After PIM activation into group membership, Storage Explorer needs Reset > Authentication to pickup new rights

Open
#8,000 8 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

:grey_question: external
Dominant language
No language data
Stars
452
Forks
92
Avg merge
15h 20m
Merged PRs (30d)
3

Description

Preflight Checklist
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
  1. 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.
  2. Start Storage Explorer. Navigate to the queue. Check you can read the test message.
  3. Attempt to delete the message: permission denied (expected) because you only have QueueReader membership.
  4. PIM activate membership of QueueWriter group.
  5. Attempt to delete the message: permission denied - unexpected, because user is now elevated. BUG.
  6. Help > Reset chose authentication only
  7. Re-add the user account
  8. 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.