Skip to content

GCS env-var-based auth broken by FLAGD_ prefix decoration #834

@toddbaert

Description

@toddbaert

decorateEnvVarName exempts AZURE_STORAGE-prefixed env vars (and AWS_-prefixed vars per #832) from having the FLAGD_ prefix applied. However, GCS auth env vars like GOOGLE_APPLICATION_CREDENTIALS and GOOGLE_CLOUD_PROJECT are not exempted.

This means GCS sync setups using env-var-based auth (as opposed to Workload Identity) will have their Google env vars incorrectly prefixed (e.g., FLAGD_GOOGLE_APPLICATION_CREDENTIALS), breaking authentication.

Relevant code: api/core/v1beta1/featureflagsource_types.go:268-273

func (fc *FeatureFlagSourceSpec) decorateEnvVarName(original string) string {
	if strings.HasPrefix(original, "AZURE_STORAGE") {
		return original
	}
	return common.EnvVarKey(fc.EnvVarPrefix, original)
}

Requirements

  • Add a GOOGLE_ (or similar) prefix exemption to decorateEnvVarName, consistent with the AZURE_STORAGE and AWS_ exemptions.
  • Document the env var prefix exemption behavior for all three cloud providers (Azure Blob, GCS, S3) so users understand which env vars are passed through undecorated. If this is already documented for some providers, ensure consistency across all three.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions