Skip to content

Credentials

FlexBlock never takes credentials on the command line. It asks each provider’s own credential chain, so the common identities that work for aws, az, oci or Google’s client libraries work for flexBlock; the per-provider pages list exactly which are supported.

Every command that touches the bucket performs the same small set of operations under the grant’s prefix: list the objects there, read them, write them (sometimes with a create-only or compare-and-swap condition), and delete them. Nothing is created or changed outside the prefix, so the identity can be scoped to the bucket and, on providers that support it, to the prefix.

OperationUsed for
List under the prefixRebuilding the object index at start, orphan checks, show --remote
Read an objectCache misses, the volume superblock, the ownership marker
Write an object, including overwriteFlushing chunks, the superblock, the access check at init, attach and start; the ownership marker with create-only and compare-and-swap conditions
Delete an object, singly or in batchesDiscarded chunks, the access check, wipe
List one key under the prefix (S3, GCS, OCI) or read the container (Blob)The reachability check every command runs first

Three habits keep this simple in production:

  • Prefer the platform identity of the host: an instance role, a service account, a managed identity or an instance principal, over static keys. Nothing to rotate, nothing on disk.
  • Keep static secrets out of unit files. When a static secret is unavoidable, put it in the per-instance environment file the systemd unit reads (see Running Under systemd), owned by root with mode 0600, never in the unit file or a shell history.
  • Test before touching a device. Check the pairing of grant and identity with show --remote, which proves list and read only. init, attach and start check write, overwrite and delete before they change anything.
Terminal window
sudo -E flexblock show --remote
  • A permission problem surfaces as a permanent storage error naming the provider, the operation and the HTTP status, for example gcs LIST flexblock/acme-0001/ [403], and the command exits with code 14.
  • If listing works but init, attach or start finds the credentials cannot write, read, list or delete, it names the missing permission and exits with code 10.

The daemon does not retry permanent errors, so a missing permission shows up at the first command rather than as a slow failure later.

ProviderCredential chainRecommended production identityDetails
Amazon S3AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, then AWS_PROFILE and the shared config files, then web identity, or the container or instance roleEC2 instance profile with a policy scoped to the prefixAmazon S3
Google Cloud StorageGOOGLE_APPLICATION_CREDENTIALS, then gcloud application-default credentials, then the instance metadata serverService account with roles/storage.objectUser on the bucketGoogle Cloud Storage
Azure Blob StorageAZURE_STORAGE_KEY, otherwise Entra ID: service principal, workload identity, managed identity, then an Azure CLI or Azure Developer CLI loginSystem-assigned managed identity with Storage Blob Data Contributor on the containerAzure Blob Storage
OCI Object StorageOCI_CLI_AUTH, or when unset: resource principal, then the ~/.oci/config profile, then instance principalInstance principal in a dynamic group with manage objectsOracle Cloud