feat: support Azure ClientSecretCredential authentication #4477
+39
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pyroscope currently supports Client Secret authentication by way of implicit Thanos objstore behavior. If
storage.azure.account-name
&storage.azure.container-name
are set alongside theAZURE_TENANT_ID
,AZURE_CLIENT_ID
, &AZURE_CLIENT_SECRET
environment variables, then Thanos will fallback to the default Azure credential pattern. This usage pattern is undocumented in the Pyroscope documentation. An example snippet that works with this flow in the base-url example is the following:These changes plumb the configuration for the Thanos-supported explicit Client Secret authentication. Since Thanos already supports this flow, the changes are simple. This allows the following structure to be used via the CLI or configuration file specification:
Validations
I built the image with
make GOOS=linux GOARCH=amd64 docker-image/pyroscope/build
as per the contributing documentation.I tested this with my own storage account values using the following snippet in the base-url example:
I was able to validate that this successfully connected to my storage account, created the container, and used it as the storage backend.
I was not able to find tests for the Azure storage backend nor does Azurite support client secret credentials as an authentication pattern. I would appreciate if someone else could test this against their storage account too.