Skip to content

Conversation

@putsuka
Copy link

@putsuka putsuka commented Oct 14, 2025

Add SOPS_GCP_KMS_CLIENT_TYPE environment variable support

Summary

This PR adds support for selecting GCP KMS client type (gRPC or REST) via the SOPS_GCP_KMS_CLIENT_TYPE environment variable.

Motivation

Currently, the client type is hardcoded, making it difficult to integrate with different environments. This change provides flexibility while maintaining backward compatibility. Additionally, selecting the REST client can help avoid errors that occur when SOPS operates through a VPN, addressing the issues outlined in issue #1570 .

Changes

  • Added SOPS_GCP_KMS_CLIENT_TYPE environment variable support
  • Default behavior: gRPC client (when not set or set to 'grpc')
  • REST client: when set to 'rest'
  • Updated README.rst with usage examples

Backward Compatibility

  • Fully backward compatible
  • Default behavior uses gRPC client
  • No breaking changes

This change allows users to select between gRPC and REST clients for GCP KMS
by setting the SOPS_GCP_KMS_CLIENT_TYPE environment variable.

- Default: gRPC client (when not set or set to 'grpc')
- REST client: when set to 'rest'
- Updated documentation

Fixes getsops#1570)

Signed-off-by: shin.fukami.nd <[email protected]>
@putsuka putsuka changed the title feat(gcpkms): Add SOPS_GCP_KMS_CLIENT_TYPE environment variable support Add SOPS_GCP_KMS_CLIENT_TYPE environment variable support Oct 14, 2025
@felixfontein felixfontein requested a review from a team October 18, 2025 07:49
@putsuka
Copy link
Author

putsuka commented Oct 29, 2025

@felixfontein
Currently, there is no version of Cloud KMS on Google Cloud that supports authentication via Work Force Identity in environments using a proxy. This pull request addresses that issue, so we would appreciate an early review. What is the status?

@felixfontein
Copy link
Contributor

I don't know, I've requested a review from the maintainer group since I don't feel confident enough to review this one.

@putsuka
Copy link
Author

putsuka commented Oct 31, 2025

わかりません。これをレビューする自信がないので、メンテナー グループにレビューを依頼しました。

Thank you. I hope it gets reviewed and merged soon.

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.

2 participants