microsoft / microsoft/finops-toolkit

[PowerShell] Grant-FinOpsHubBlobAccess

Open
#146 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Tool: FinOps hubs Tool: PowerShell Type: Feature 💎
Dominant language
PowerShell
Stars
603
Forks
249
Avg merge
7d 11h
Merged PRs (30d)
11

Description

📝 Scenario

As a hub admin, I need to grant users access to blob storage in order to connect to Power BI reports

💎 Solution

Create an Grant-FinOpsHubBlobAccess command that assigns access to read/update storage blob data.

Synopsis

Grants storage blob access to a user, group, or service principal.

Syntax
# Grant access to an object ID
Grant-FinOpsHubBlobAccess `
    [-HubName] <string> `
    [-ResourceGroupName <string>] `
    -ObjectId <string> `
    [-Access <string>]

# Grant access via an email address lookup
Grant-FinOpsHubBlobAccess `
    [-HubName] <string> `
    [-ResourceGroupName <string>] `
    -Mail <string> `
    [-Access <string>]

# Grant access to the current user
Grant-FinOpsHubBlobAccess `
    [-HubName] <string> `
    [-ResourceGroupName <string>] `
    -CurrentUser `
    [-Access <string>]
Description

The Grant-FinOpsHubBlobAccess command grants the specified user, group, or service principal access to the storage account in the hub instance. Access is only granted using the built-in Storage Blob Data roles.

Parameters
Parameter Description
-HubName Required. Name of the hub instance.
-ResourceGroupName Optional. Name of the resource group where the hub is deployed.
-ObjectId Optional. Unique ID of the user, group, or service principal to grant access to.
-Mail Optional. Email address to look up the user's object ID. Ignored if ObjectId is specified.
-CurrentUser Optional. Indicates that the current user should be granted access. Ignored if ObjectId is specified.
-Access Optional. Level of blob data access to grant to the specified user, group, or service principal. Allowed values: Reader, Contributor, Owner. Default: Reader.

ℹ️ Additional info

Each -Access value maps to the corresponding storage blob data role:

🙋‍♀️ Ask for the community

We could use your help:

  1. Please vote this issue up (👍) to prioritize it.
  2. Do you feel this is needed given it's a fairly standard RBAC operation (albeit hard to discover)?
  3. Do we need an -ObjectType parameter? Description: "Indicates the type of the object ID specified. Allowed values: User, Group, ServicePrincipal. Default: User."
  4. Leave comments to help us solidify the vision.

Contributor guide

Open the contributing guide

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 from the proposed Grant-FinOpsHubBlobAccess command syntax and parameter descriptions. Resolve the open questions about object types and the required RBAC behavior, then implement the ObjectId, Mail, and CurrentUser paths with Reader, Contributor, and Owner mappings. Done means the command grants the selected built-in Storage Blob Data role for each supported target.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, powershell
Domain
authorization, cli, cloud
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.