Skip to content

[Bug]: Missing StorageAccount validation allows invalid Azure configurations #705

Closed

Description

@mnencia

The Azure credentials validation (inherited from barman-cloud dependency) allows users to specify storageKey or storageSasToken without specifying storageAccount in the ObjectStore resource. This configuration passes validation but fails at runtime.

Example invalid ObjectStore configuration that currently passes validation:

apiVersion: barmancloud.cnpg.io/v1
kind: ObjectStore
metadata:
  name: azure-store
spec:
  configuration:
    destinationPath: https://mystorageaccount.blob.core.windows.net/backups
    azureCredentials:
      storageKey:
        name: azure-secret
        key: storage-key
      # Missing storageAccount - passes validation but fails at runtime!
    wal:
      compression: gzip
    data:
      compression: bzip2

There is an existing PR on barman-cloud fixing the issue cloudnative-pg/barman-cloud#177

Activity

  1. dosubot commented on Dec 29, 2025

    @dosubot

    You're correct—currently, the plugin-barman-cloud relies on validation logic from the barman-cloud dependency, which (prior to the referenced upstream PR) does not enforce that storageAccount must be present when using storageKey or storageSasToken. This means invalid Azure ObjectStore configurations can pass validation but will fail at runtime, as storageAccount is required for authentication and forming the destination path (docs).

    There are no open issues or merged PRs in plugin-barman-cloud that address or track this specific validation bug or reference the upstream fix. The ObjectStoreSpec simply wraps the upstream BarmanObjectStoreConfiguration and does not implement its own Azure-specific validation (code).

    Until the upstream PR is merged and released, you'll need to manually ensure storageAccount is included in your Azure credentials when using storageKey or storageSasToken. Keep an eye on updates to the barman-cloud dependency and plugin-barman-cloud releases for when this validation fix is incorporated.

    To reply, just mention @dosu.


    Docs are dead. Just use Dosu.

    Leave Feedback Ask Dosu about plugin-barman-cloud Share Dosu with your team

  2. added a commit that references this issue on Jan 26, 2026
    0153abb
  3. added a commit that references this issue on Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions