Repository navigation
add client provided aws secret support - #11
Merged
Merged
Conversation
The daemon resolves AWS credentials for `s3://` substituters as root, so per-user credential sources such as IAM Identity Center (SSO) profiles in `~/.aws/config` are invisible to it. With `forward-aws-credentials = true`, `RemoteStore::setOptions` resolves credentials for every AWS profile referenced by an `s3://` substituter in the client process (where the user's `HOME`, SSO cache and config are available) and sends them to the daemon as a reserved `forwarded-aws-credentials` entry alongside the other overrides. The daemon installs them into its `AwsCredentialProvider`, which serves them for matching profiles ahead of the CRT provider chain. The daemon forks one process per connection, so the state never leaks to other clients. Only trusted clients are honoured; untrusted clients get the same "you are not a trusted user" warning as for other restricted settings. A daemon built without AWS support warns and ignores the payload. Decoding errors never echo the (secret) input. Assisted-by: Devin:claude-opus-4.6 Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
ethancedwards8
added a commit
that referenced
this pull request
Sep 7, 2026
…aws-credentials Revert "libstore: Add `forward-aws-credentials` setting" (#11)
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.
Motivation
The daemon resolves AWS credentials for
s3://substituters as root, so per-user credential sources (IAM Identity Center / SSO profiles in~/.aws/config) are invisible to it. This lets a trusted client resolve the credentials itself and hand them to the daemon, so the Exa S3 cache works with SSO without giving root long-lived keys.Context
New setting
forward-aws-credentials(defaultfalse).RemoteStore::setOptions): for everys3://substituter, resolve credentials for itsprofilevia the existing CRT provider chain, JSON-encode{profile: {accessKeyId, secretAccessKey, sessionToken?}}, and send it as a reservedforwarded-aws-credentialsoverride alongside the otherSetOptionsoverrides.ClientSettings::apply): if the client is trusted, decode and install into the process-globalAwsCredentialProvider, which serves them for matching profiles ahead of the provider chain. The daemon forks one process per connection, so this never leaks between clients. Untrusted clients get the usual "not a trusted user" warning; a daemon built without AWS support warns and ignores it. Decode errors never echo the payload.Verified against
s3://exa-nix-cachewith a locally built daemon (no AWS env/config, IMDS disabled): 403 without the setting, successful substitution with it, ignored with a warning for an untrusted client.Link to Devin session: https://app.devin.ai/sessions/ffb6189ecd7347dd93cbd827fca01872
Open in Devin Desktop: https://app.devin.ai/desktop/session/ffb6189ecd7347dd93cbd827fca01872?variant=devin
Requested by: @ethancedwards8