man-group / dapr-sidekick-dotnet

Dapr Sidekick for .NET - a lightweight lifetime management component for Dapr
Apache License 2.0
175 stars 21 forks source link

Local Dapr secrets file not found after 1.0.1-rc.0.6 #38

Closed Deltids closed 2 years ago

Deltids commented 2 years ago

Expected Behavior

Local dapr secrets file is found and loaded

Actual Behavior

Local dapr secrets file is not found

Steps to Reproduce the Problem

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: azurekeyvault
  namespace: default
spec:
  type: secretstores.local.file
  version: v1
  metadata:
  - name: secretsFile
    value: dapr.secrets.local
  - name: nestedSeparator
    value: ":"

Start application and see that there are no errors in the debug logs.

badgeratu commented 2 years ago

I don't believe this is a Sidekick issue, the Dapr local secret store component expects the secret JSON file path to be relative to the daprd binary location, not the components path. So if you drop your secrets file into your Dapr bin folder (on Windows it is %USERPROFILE%\.dapr\bin) or specify the full path to the file then the runtime will find it. I believe it's been this way for some time. If you would prefer daprd to locate the secrets file from a different default location suggest you raise an issue in the components-contrib project against the local secret store.