https://prefect.io logo
Title
a

Andreas Nord

03/20/2023, 3:37 PM
Hi! If I want to have user specific access to Secrets in prefect cloud I need to use enterprise subscription, correct?
r

redsquare

03/20/2023, 3:52 PM
There is no specific UAC on secret blocks - more so workspaces - so typically only certain users have access to a production workspace
ah you can - create custom roles
forgot sorry:(
but that is ent
c

Chris Reuter

03/20/2023, 3:54 PM
Correct - but RBAC permissions are only "View blocks" or "Create/edit/delete blocks". I don't believe we give the ability to control individual block access (yet). In Organization or Enterprise tier you have the runner role which is limited to starting & viewing flows.
a

Andreas Nord

03/20/2023, 3:56 PM
How would you implement multiple users having access to prod workspace, but when they run flows they should use secrets that are connected to their user?
it seems this is not supported then
r

redsquare

03/20/2023, 4:04 PM
not sure I quite understand your end goal
a

Andreas Nord

03/20/2023, 4:07 PM
user A and B both have access to some production database. When user A runs the prefect flow (locally), the credentials of user A should be used. E.g we want to be able to see who accessed our production db at which point
In the actual prefect deployment a 3rd set of credentials should be used
r

redsquare

03/20/2023, 4:08 PM
can use a .env file locally without loading a block
we do this - production uses k8 secrets that are pushed into the job manifest as env vars, locally .env is used
a

Andreas Nord

03/20/2023, 4:13 PM
yes I mean it can be done without Prefect Secrets, I found it to be quite convenient.
r

redsquare

03/20/2023, 4:15 PM
nothing stopping you dynamically loading a different block using some other value from somewhere - as long as all the blocks have the same kv's should be ok
a

Andreas Nord

03/20/2023, 4:17 PM
you mean having two blocks like "credentials-userA" and "credentials-userB"? Nothing would stop user A from using credentials of user B
r

redsquare

03/20/2023, 4:18 PM
true true
y

YSF

03/24/2023, 3:54 AM
@Taylor Curran, do you know how I would adapt this to my pattern possibly?