Skip to content

Conversation

@chikamura
Copy link
Contributor

Summary

Add Workload Identity Federation authentication method for AWS-to-GCP authentication

Changes

  • Uses Google Auth Library's AwsCredentials for secure STS token exchange
  • Implements WorkloadIdentityFederationCredentials extending GoogleCredentials with caching and token refresh support
  • Updates dependencies: google-auth-library-oauth2-http:1.41.0, google-http-client-gson:1.45.3

New authentication method: workload_identity_federation

This allows users to authenticate to Google Cloud using AWS credentials through Workload Identity Federation, eliminating the need to store Google Cloud service account keys.

Configuration options

Option Type Required Description
workload_identity_federation.config string required Path to WIF JSON config file
workload_identity_federation.aws_access_key_id string required AWS Access Key ID
workload_identity_federation.aws_secret_access_key string required AWS Secret Access Key
workload_identity_federation.aws_session_token string optional AWS Session Token (for temporary credentials)
workload_identity_federation.aws_region string optional AWS Region (default: ap-northeast-1)

Example configuration

out:
  type: bigquery_java
  auth_method: workload_identity_federation
  workload_identity_federation:
    config: /path/to/workload-identity-federation-config.json
    aws_access_key_id: AKIAXXXXXXXXXXXXXXXX
    aws_secret_access_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    aws_session_token: xxxxxxxx  # optional
    aws_region: ap-northeast-1

chikamura and others added 7 commits December 13, 2025 09:02
Add access_token as a new authentication method for BigQuery. This allows
direct authentication using OAuth access tokens without requiring a service
account JSON keyfile.

- PluginTask: Add access_token option, make json_keyfile Optional
- Auth: Add access_token authentication handling
- BigqueryClient: Update to handle Optional json_keyfile
- README: Add documentation for access_token option

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add support for authenticating to BigQuery using AWS credentials via
Workload Identity Federation. This allows users to authenticate without
storing Google Cloud service account keys by leveraging AWS IAM credentials.

- Add WorkloadIdentityFederationConfig for nested configuration
- Add WorkloadIdentityFederationAuth for AWS signed request and token exchange
- Add WorkloadIdentityFederationCredentials with token refresh support
- Update Auth to support workload_identity_federation auth method
- Update PluginTask with workload_identity_federation config option
- Update README with documentation and examples

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove the access_token auth method in favor of workload_identity_federation
which provides better security by not requiring direct token handling.

- Remove access_token field and getter from PluginTask
- Remove access_token handling from Auth class
- Update README to remove access_token documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Extract TOKEN_LIFETIME_SECONDS constant for token expiration time
- Add debug logging for non-sensitive response fields (expires_in, token_type, etc.)
- Remove unnecessary devstorage.read_write scope, keep only bigquery scope

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Simplify the configuration parameter name from json_keyfile to config
for better clarity and consistency.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…AwsCredentials

- Replace manual AWS signature implementation with AwsCredentials and AwsSecurityCredentialsSupplier
- Use ImpersonatedCredentials for service account impersonation
- Add aws_session_token support for temporary credentials
- Add scopes parameter to credential caching
- Upgrade google-auth-library-oauth2-http to 1.41.0
- Add google-http-client-gson 1.45.3 for Gson support

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
chikamura and others added 2 commits December 23, 2025 10:43
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…tion

Allow accessing BigQuery directly without service account impersonation
by making service_account_impersonation_url optional. When omitted from
the WIF config, the federated token is used directly instead of
impersonating a service account.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@katamotokosuke katamotokosuke merged commit 48449ee into master Jan 7, 2026
1 check passed
@katamotokosuke katamotokosuke deleted the feature/add-workload-identity-federation-auth branch January 7, 2026 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants