Skip to content

Add gcp secret manager as a credential provider in its own go module - #1991

Merged
Lior Lieberman (LiorLieberman) merged 3 commits into
agent-substrate:mainfrom
yufan-su:gcp-secret-manager-provider
Sep 30, 2026
Merged

Lior Lieberman (LiorLieberman) merged 3 commits into
agent-substrate:mainfrom
yufan-su:gcp-secret-manager-provider

Conversation

@yufan-su

@yufan-su Yufan Su (yufan-su) commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Adds a credential provider for egress credential injection backed by Google Cloud Secret Manager.

It lives in its own Go module under plugins/gcp-secret-manager, temporally hosted here until it moves to a repository of its own.

What it does

  • Serves credproviderpb.CredentialProvider over mTLS and admits only the egress gateway's identity (--injector-identity).
  • Resolves global and regional secrets, optionally picking one key out of a JSON payload:
    ate-secret://secretmanager.googleapis.com/projects/<project>[/locations/<location>]/secrets/<secret>/versions/<version>[/keys/<key>]
  • Enforces a default-deny atespace→project policy (--project-policy-file), the counterpart of the Kubernetes provider's namespace policy.
  • Returns a retryable 503 only for transient Secret Manager failures, and caps each read with --fetch-timeout (default 3s).

Repository changes

  • New top-level plugins/ directory for self-contained plugins, documented in docs/dev/code-layout.md and AGENTS.md. The module imports only substrate's public pkg/ packages; a test enforces this.

  • CI runs the module's tests, make verify and golangci-lint. govulncheck scans the module too, with the action pinned by SHA.

  • docs/egress-credential-injection.md describes each provider's credential URI format. The plugin's README covers installing and using it.

  • Tests pass

  • Appropriate changes to documentation are included in the PR

@yufan-su
Yufan Su (yufan-su) force-pushed the gcp-secret-manager-provider branch 4 times, most recently from e04a74a to da8a262 Compare September 30, 2026 04:32
@bowei Bowei Du (bowei) added area/dev-infra area/network area/security Security related issue/pr kind/feature An enhancement / feature request or implementation labels Sep 30, 2026
@yufan-su
Yufan Su (yufan-su) force-pushed the gcp-secret-manager-provider branch 3 times, most recently from a59a6e9 to 214154e Compare September 30, 2026 20:42
@yufan-su
Yufan Su (yufan-su) marked this pull request as ready for review September 30, 2026 20:45
@yufan-su Yufan Su (yufan-su) changed the title [Draft] Add gcp secret manager as a credential provider in its own go module Add gcp secret manager as a credential provider in its own go module Sep 30, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread .github/workflows/govulncheck.yaml Resolved
Comment thread .github/workflows/pr-workflow.yaml Resolved
Comment thread docs/dev/code-layout.md Resolved
Comment thread docs/dev/code-layout.md Resolved
Comment thread docs/egress-credential-injection.md Resolved

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think its a bit odd its a special module for mtls handshake.. but we probably should leave the comment open for more opinions.

Comment thread plugins/gcp-secret-manager/README.md Resolved
Comment thread AGENTS.md Resolved
@yufan-su
Yufan Su (yufan-su) force-pushed the gcp-secret-manager-provider branch from 214154e to b417e0d Compare September 30, 2026 21:41

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, is anything install it by default or something?

@yufan-su

Copy link
Copy Markdown
Collaborator Author

no, I will have a followup change to update ate-setup to install it, maybe like

--credential-provider=k8s|gsm

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 30, 2026
Merged via the queue into agent-substrate:main with commit 10ba865 Sep 30, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/dev-infra area/network area/security Security related issue/pr kind/feature An enhancement / feature request or implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants