Feature request: managed task hubs #1757
Replies: 11 comments 7 replies
-
Hi @vigouredelaruse. Thanks for this feedback. As you rightly point out, the developer has the burden of ensuring that there is no PII leak into the storage account since that account is owned by the developer. You mention that you'd prefer Durable Functions be more "opaque" such that you don't have to worry about such concerns. Is it fair to say that having the Azure Functions manage the underlying storage account for you (making this our burden instead of yours) would satisfy your concern? |
Beta Was this translation helpful? Give feedback.
-
hi @cgillum thanks for looking into it based on the documentation i referenced (sorry for being all legal about it here - one does have to careful what one asks for) and for my particular implementation, the functions runtime's use of 'opaque infrastructure' storage account resources would resolve my concerns, and the concerns of users of a docker appliance i'm implementing using durable functions and entities in this case, the appliance will enumerate storage accounts, retrieve keys and enumerate tables and entities all with the caller's token i would prefer the token to disappear from the user's browser session into an opaque infrastructure for delivery to the function endpoint. the persistence of such tokens would serve as an impediment to this implementation's survival of a rigorous risk vector review. obviously for the implementation i'm concerned about, all the above applies to the leakage of the storage account keys and other table entity meta-data via orchestration history at the very minimum it seems we're discussing something akin to managed disk vs unmanaged disk. and there's the pricing rub. one may need to be careful here not to produce a class system, where people pay for the security they can afford, and everybody still has to code defensively it's relevant to consider the situation over at azure devops, where public repositories are apparently under abuse, and have to be requested, whereupon the abuse shifted to private repositories. it's impossible to make anything foolproof because of course, fools like me are so ingenious |
Beta Was this translation helpful? Give feedback.
-
@cgillum couple of thoughts
I’m thinking similar to my idea of passing references to large object graphs, what if we pass around references to key vault secrets instead?(is this actually a KeyVault input/output binding?!?!) - Onus is on the customer to ensure all secrets are in KV, and customer manages the lifecycle of those secrets in KV. Imo this provides a stronger security story than opaque TaskHubs. Not to say that both ideas couldn’t be combined for even more depth of security. |
Beta Was this translation helpful? Give feedback.
-
@olitomlinson yeah, this is something I'd love to do (TaskHub RP), I just need to figure out how to make the business case for it to my management. :) Secrets is interesting. I can't really think of a scenario where it would make sense to pass secrets around an orchestration though. It feels like that scenario would be better served using input/output bindings for KeyVault on individual activity functions. |
Beta Was this translation helpful? Give feedback.
-
on the proactive risk management, regarding the proposed 'managed task hub' sku please don't forget disaster recovery and the need to promote security by default on the configuration blade. by this i mean
|
Beta Was this translation helpful? Give feedback.
-
Few ideas for the business case :
I would actually fully get behind a KeyVault input/output binding for Functions, so that I can resolve secrets dynamically at runtime per function call, and create new secrets in the same vein. I don’t think there is a KV binding? Where is the best place to raise this as a feature request? |
Beta Was this translation helpful? Give feedback.
-
i welcome your thoughts on the following. consider a potentially long-running situation where you have to mutate an unknowable number of table entities in an arbitrary user's storage account. for easy deployment you want to avoid having to keyvault creds for every single storage account users want to operate against. also dynamic environment discovery, starting with the user's auth token prevents the app from having hardcoded god permissions, albeit backed by keyvault. so the user's permissions enable activity. because of auth method impedance mismatch you decide to leverage impersonation to read the service keys of storage accounts within the user's rbac scope. you decide to embed this key retrieval in a function app orchestration, next to where they'll be used you don't want to post the keys to the orchestration for good reasons. but now you have locally scoped variables in an orchestration referring to secrets like table names and entity lookup keys. and then you pay closer attention to task hubs and realize you have a problem and now thanks to you we're discussing this as a feature request |
Beta Was this translation helpful? Give feedback.
-
I totally understand using RBAC / Managed Identity to discover storage accounts attached to an AAD User and subscription and list out the keys as secrets. I agree this can be done in an Activity. in the Activity, if there was such thing as a KeyVault output binding available at the point of listing out the keys, we could easily create KeyVault secrets and then pass references back to the orchestration. Subsequently, when it’s time to use those secrets we would use the KeyVault input binding in the Activity also. — Functions support for KeyVault comes from a different world where secrets are configuration driven constants accessible from app settings etc I think the problem here is that dynamically creating and reading secrets in Functions is not a well supported story, so people are put off completely from using it. When IMO, if KV was much easier to utilise from a Function it would get more adoption. |
Beta Was this translation helpful? Give feedback.
-
perhaps you're talking about a different product. consider: if the ambassador pattern (that what it is?) is embedded in the keyvault mythos (and indeed the pricing/transaction suggests lowish expected transaction rates) and instead you want arbitrary rates of secret production and consumption then maybe hosting your own keyvault might seem like good horse sense when you're fine with sitting grim faced at kubectl>. your idea starts to sound more like a 'opaque infrastructure' azure/kerberos key distribution center or something like it, where secret providers have endpoints (and transaction rates are prorated in the zillions) that can be surfaced by queue to a [binding] or something else like it that sounds like it involves a multitude of cross-cutting concerns. so- those concerns that i can see are pairing/paring the cost of the queue and the connector mechanism for all the secret repositories supported, and making this a default tls required choice for getting at your client secrets and certificate thumbprints everywhere on the internet uhhh - you could start the chain of trust with an auth token associated with a suitably armoured public/confidential client app. or is that firewall penetrating broker client. um and zone certificate authorities i'm not so sure this is just theoretical computer science. if i'm not mistaken there are doors slamming shut on the internet and security is a big deal |
Beta Was this translation helpful? Give feedback.
-
I am very intrigued by this conversation. Since this feature request is still pretty hazy and needs some more fleshing out, I'm going to move it to the new discussion format. |
Beta Was this translation helpful? Give feedback.
-
congrats to the functions team for noticeable plaudits from forrester here https://visualstudiomagazine.com/articles/2021/03/31/forrester-faas.aspx as per |
Beta Was this translation helpful? Give feedback.
-
a durable function orchestration places an onus on the developer to avoid pii leakage - see the additional context below from here https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-serialization-and-persistence?tabs=csharp
the summary is that function inputs may be persisted to a storage account visible to the tenant where a function app is deployed
Describe the solution you'd like
i'd prefer not to have to censor the various kinds of IDs and/or command channel data i send to my durable function orchestrations. other kinds of web apps deployed to azure app service don't bring quite such a visceral risk of implementation detail exposure to outsiders.
Describe alternatives you've considered
the mitigations are already described at the azure docs i reference here. what i'm suggesting is that the perhaps the need for mitigations ought to be factored out, given the increasingly grim security situation on the information highways of the internet
Additional context
the durable orchestration framework is not quite as opaque as other azure offerings. for example, i cannot directly examine the storage subsystem of azure ad without microsoft employee credentials. perhaps it should be so with durable functions
note that except perhaps for .mil and .gov type customers i do not believe these comments should be used as a justification for the eradication of all but the consumption plan, which is suitably opaque, but risky fiscally in the case of a ddos attack on a consumption plan endpoint for example
FROM THE DOCUMENTATION
The following is a list of the different types of data that will be serialized and persisted when using features of Durable Functions:
All inputs and outputs of orchestrator, activity, and entity functions, including any IDs and unhandled exceptions
Orchestrator, activity, and entity function names
External event names and payloads
Custom orchestration status payloads
Orchestration termination messages
Durable timer payloads
Durable HTTP request and response URLs, headers, and payloads
Entity call and signal payloads
Entity state payloads
Working with sensitive data
When using Azure Storage, all data is automatically encrypted at rest. However, anyone with access to the storage account can read the data in its unencrypted form.
Beta Was this translation helpful? Give feedback.
All reactions