Skip to content

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

@mnencia

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

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