Permissions & Bad gRPC responses

Permissions & Bad gRPC responses

avatar
(anonymous user)

First a bit of context, previously my setup was integrated mode for everything, I’ve since changed to the strict security model and I’m trying to create a more secure environment.

Mostly everything works, I’m able to create a role with granular permissions to view, read, execute specific scripts etc, the user can login to the admin menu and see & do what they need to.

Though I’m having trouble with apps & the PSU module. Here’s my example code which is sat on it’s own on a new app page:

New-UDHtml -markup (Get-PSUScript -Name "ScriptName.ps1" | ConvertTo-Json)


Now, as an admin, I can visit that page and see the JSON without issue.

As a user in my custom role, they get the ‘Bad gRPC response invalid content-type value’. Which is odd, because they have the ability to see that script in the admin portal, they have the view, and read permissions on it.

Here’s their permissions currently:

automation.scripts/view
automation.jobs/view
automation.jobs/read
automation.scripts.Script Folder A\Script Folder B\ScriptName.ps1/read
automation.scripts.Script Folder A\Script Folder B\ScriptName.ps1/execute


If I give that role automation/* permission, then it works, but obviously opens it up to everything, I’m trying to understand on a granular basis, what I need to give the role, in order for the above line of code to work in an app without such broad access? Am I missing something or is this a bug?

Edit: Tested on a script at the root level incase folders were causing an issue though it behaves the same way.

All Comments (0)