Update GCS storage driver to use non-deprecated credential validation API
Summary
The GCS storage driver currently uses the deprecated google.CredentialsFromJSONWithParams function, which prevents upgrading to newer versions of the Google Cloud SDK due to golangci-lint staticcheck failures.
Background
In !2779 (merged), we reverted a version upgrade because it exposed deprecation warnings:
storage/driver/gcs/common.go:276:16: SA1019: google.CredentialsFromJSONWithParams is deprecated
storage/driver/gcs/common.go:304:16: SA1019: google.CredentialsFromJSONWithParams is deprecated
The deprecated function has a potential security risk as it doesn't validate credential configuration when accepting credentials from untrusted sources.
Tasks
-
Research the recommended replacement for
google.CredentialsFromJSONWithParams -
Update
storage/driver/gcs/common.goto use the secure credential validation approach - Ensure credential configuration is properly validated
- Test GCS storage driver functionality with the updated implementation
- Re-apply the version upgrade that was reverted in !2779 (merged)
Files Affected
-
storage/driver/gcs/common.go(lines 276 and 304)
References
- Revert MR: !2779 (merged)