Skip to content

feat(bigtable/accelerator): add daemon binary with identity verification - #20330

Merged
mutianf merged 3 commits into
googleapis:mainfrom
mutianf:acc-6
Aug 6, 2026
Merged

mutianf merged 3 commits into
googleapis:mainfrom
mutianf:acc-6

Conversation

@mutianf

@mutianf mutianf commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

cmd/main.go wires NewChannel + NewServer and publishes an identity document before binding the socket; cmd/identity.go writes/handles the on-disk handshake payload.

mutianf added 2 commits August 6, 2026 02:35
cmd/main.go wires NewChannel + NewServer and publishes an identity document before binding the socket; cmd/identity.go writes/handles the on-disk handshake payload.

Change-Id: Id89ca14f069942ba30d8363b493bec51cb2609b6
Resolve ADC once in the daemon binary and reuse the credentials for both
the channel dial and identity publication, instead of calling
FindDefaultCredentials twice:

- Export accelerator.DataScope and use it to compute the effective dial
  scopes, resolve creds once, and force them onto NewChannel via
  option.WithCredentials so the dial can't re-resolve to a different
  principal than the one published in identity.json.
- Split resolveAndWriteIdentity into principalFromCreds (takes the
  pre-resolved creds) and writeIdentity, dropping the second ADC lookup.
- Bound principal resolution with a 15s timeout so a hung metadata
  server can't stall daemon startup.
- Handle SIGTERM/SIGINT alongside the existing watchdog shutdown.
- Record effectiveScopes in identity.json so it reflects the scope the
  daemon actually dials with.

Change-Id: I4ba2a47b286f0ce8f4be4cc14ae0a3fbd743b291
@mutianf
mutianf requested review from a team as code owners August 6, 2026 02:38
@product-auto-label product-auto-label Bot added the api: bigtable Issues related to the Bigtable API. label Aug 6, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the accelerator daemon binary along with local identity resolution logic to write a secure handshake identity document next to the Unix domain socket. It also exports the default OAuth scope to ensure consistent credential resolution. The review feedback highlights an issue where errors from the GCE metadata server are swallowed, preventing proper error propagation and logging.

principalFromCreds swallowed the error from metadata.EmailWithContext,
so it always returned a nil error on the GCE path and the warning log in
main.go was dead code. Return the error instead so the caller logs it as
a warning; startup stays non-fatal (empty principal -> client falls back
to native).

Change-Id: I929bbcd53b59129b3b897d588165a0b325b97600
@mutianf mutianf added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Aug 6, 2026
@mutianf mutianf removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Aug 6, 2026
@mutianf
mutianf merged commit 2f9cf89 into googleapis:main Aug 6, 2026
19 checks passed
sushanb pushed a commit that referenced this pull request Aug 28, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.53.0](bigtable/v1.52.0...bigtable/v1.53.0)
(2026-08-27)


### Features

* **bigtable/accelerator:** Add --user-agent flag to daemon
([#20341](#20341))
([6b33c06](6b33c06))
* **bigtable/accelerator:** Add daemon binary with identity verification
([#20330](#20330))
([2f9cf89](2f9cf89))
* **bigtable/accelerator:** Add proxy channel scaffold owning a sessi…
([#20310](#20310))
([d65ca7d](d65ca7d))
* **bigtable/accelerator:** Add stdin-EOF and parent-PID lifecycle wa…
([#20328](#20328))
([dc1c6ae](dc1c6ae))
* **bigtable/accelerator:** Add UDS server with authenticated proxy i…
([#20320](#20320))
([a837020](a837020))
* **bigtable/accelerator:** Add V2-to-session request adapters
([#20271](#20271))
([4cb6f16](4cb6f16))
* **bigtable/accelerator:** Authenticate UDS callers with a stdin tok…
([#20324](#20324))
([7847ab7](7847ab7))
* **bigtable/accelerator:** Dispatch MutateRow and single-row ReadRow…
([#20312](#20312))
([c89f336](c89f336))
* Update API sources and regenerate
([#20369](#20369))
([bfe3aaf](bfe3aaf))
* Update sources and regenerate
([#20399](#20399))
([a6b5cdb](a6b5cdb))


### Bug Fixes

* **bigtable/internal/transport:** Drop redundant defer p.Close() in AFE
picker tests
([#20311](#20311))
([c05b767](c05b767))
* **bigtable:** Register c2p resolver + RLS balancer for accelerator
daemon DirectPath
([#20362](#20362))
([95f372f](95f372f))
* **bigtable:** Session client — set AllowNonDefaultServiceAccount on
DirectPath dial
([#20343](#20343))
([b9c76ec](b9c76ec))
* **bigtable:** Session client — single ownership + single-flight pool
loading
([#20368](#20368))
([f4ad950](f4ad950))
* **bigtable:** Session pool — re-drive creation after a never-activated
close so the consecutive-failure breaker is reachable
([#20355](#20355))
([ee74949](ee74949))
* **bigtable:** Use composed user agent as CSM client_name
([#20383](#20383))
([cb02335](cb02335))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigtable Issues related to the Bigtable API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants