You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CamundaCloudTokenProvider class maintains a local token cache, using a local file as a means to persist the token. Azure Functions and other Windows hosting environments, don't recommend writes, and may even prohibit writes, to the default file location.
The default location is Environment.SpecialFolder.UserProfile. Below is the description for the UserProfile enumeration:
The user's profile folder. Applications should not create files or folders at this level; they should put their data under the locations referred to by ApplicationData. Source.
When I run with the default file location on an Azure Function, I observe the following exception.
Status(StatusCode="Unavailable", Detail="Getting metadata from plugin failed with error: Exception occurred in metadata credentials plugin. System.UnauthorizedAccessException: Access to the path 'C:\Program Files (x86)\SiteExtensions\Functions\4.5.1\32bit.zeebe' is denied.
at System.IO.FileSystem.CreateDirectory(String fullPath, Byte[] securityDescriptor)
at System.IO.Directory.CreateDirectory(String path)
at Zeebe.Client.Impl.Builder.CamundaCloudTokenProvider.RequestAccessTokenAsync()
at Grpc.Auth.GoogleAuthInterceptors.<>c__DisplayClass2_0.<b__0>d.MoveNext()
This issue is possibly more of a heads-up, as it may not be an objective of this project to maintain compatibility with Azure Functions, or any specific hosting platform for that matter.
Nevertheless, the CamundaCloudTokenProvider class could have a more agreeable default configuration, to avoid this trap for the uninitiated.
To Reproduce
Create a Zeebe client, using the default CamundaCloudTokenProvider class as the token supplier.
Supply a LoggingFactory and set the default log level to Trace.
Use the client to invoke a process.
Deploy process invocation as an HTTP-triggered Azure Function.
Trigger the HTTP Function several times over the course of a few hours.
Outcome
The call to invoke the process fails intermittently with an exception, owing to the Function's inability to write to the default file location.
Enviroment
Azure Function (Windows)
.NET 6
The text was updated successfully, but these errors were encountered:
The
CamundaCloudTokenProvider
class maintains a local token cache, using a local file as a means to persist the token. Azure Functions and other Windows hosting environments, don't recommend writes, and may even prohibit writes, to the default file location.The default location is
Environment.SpecialFolder.UserProfile
. Below is the description for theUserProfile
enumeration:When I run with the default file location on an Azure Function, I observe the following exception.
This issue is possibly more of a heads-up, as it may not be an objective of this project to maintain compatibility with Azure Functions, or any specific hosting platform for that matter.
Nevertheless, the
CamundaCloudTokenProvider
class could have a more agreeable default configuration, to avoid this trap for the uninitiated.To Reproduce
CamundaCloudTokenProvider
class as the token supplier.Outcome
The call to invoke the process fails intermittently with an exception, owing to the Function's inability to write to the default file location.
Enviroment
The text was updated successfully, but these errors were encountered: