Conversation
The wallets worker needs the Kinesis destination and its own S3 bucket. Pod Identity binds one role to one ServiceAccount, so the worker cannot hold two. Sharing `SynthesiaKinesis` with the streaming worker gives both workers every grant of the other, which is not acceptable. The producer now reads `LAGO_STREAMING_INTERMEDIATE_ROLE_ARN`. When it is set, the STS client that assumes the destination role is itself signed by that role. The destination sees the intermediate principal, so the trust policy of the stream owner needs no change. When the variable is empty, the code path is the same as before: one AssumeRole from the ambient Pod Identity credentials. The credentials for the intermediate role are cached per region, apart from the per-destination cache, because one process uses one intermediate role for every destination. `client_timeouts` becomes the `CLIENT_TIMEOUTS` constant, because the new class method needs the same values. The variable is read at class load. A change to it needs a pod restart. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
|
Automated pre-review (advisory, not a required check) — verdict: HOLD · CI green HOLD —
|
toommz
approved these changes
Sep 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The wallets worker must reach the same Kinesis destination as the streaming
worker, and it must also read and write its own S3 bucket. EKS Pod Identity
binds one IAM role to one ServiceAccount, so the worker cannot hold two roles.
We tried to share one role between the two workers
(lago-infrastructure 771e1800) and reverted it (7e1a567b): two workers on one
role means each worker holds every grant of the other.
What this does
The producer reads a new variable,
LAGO_STREAMING_INTERMEDIATE_ROLE_ARN.When it is set, the STS client that assumes the destination role is itself
signed by that intermediate role. The destination therefore sees the
intermediate principal, and the trust policy of the stream owner needs no
change.
When the variable is empty, the code path is the same as before: one
AssumeRole from the ambient Pod Identity credentials. The streaming worker
leaves it unset and does not change.
Other changes:
is separate from the per-destination cache. One process uses one
intermediate role for every destination.
client_timeoutsbecomes theCLIENT_TIMEOUTSconstant. The new classmethod needs the same values, and a class method cannot call an instance
method.
Tests
bundle exec rspec spec/lib/lago/kinesis/producer_spec.rb— 29 examples, 0failures. Four examples are new:
identity in one hop
Notes for the reviewer
AssumeRoleCredentialsrefreshesitself, so no code handles the expiry.
without the variable in the lago-deploy values file, this change is inert.
🤖 Generated with Claude Code