fix(aws): copy-at-connect review fixes — lock, ~/.ssh off EFS, secret history
- triple-c-apply-connect: the background re-clone closes the apply lock's fd, so a later connect never waits on it; --prepare takes the lock. - R6: under copy-at-connect Hybrid/EFS no longer link ~/.ssh to EFS; the copied keys vanish with the task (UI says so, and that old keys on EFS stay until removed). - R7: a copy-at-connect start that finds credentials still in the secret force-deletes it and creates it again (retrying ~30 s while AWS finishes), so no AWSPREVIOUS version keeps them. - TRIPLE_C_CUSTOM_ENV (unsalted fingerprint) left out of the secret. - Terminals get only the credential pairs (no file reads; keychain off the runtime), so a bad SSH/CA file never drops the API keys. - ConnectBundle values are Zeroizing; UI copy updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8510797c22
commit
820bfab25c
15 files changed
+502
-59
No files matched your search
@@ -442,11 +442,25 @@ pub(crate) fn workspace_env_from_settings(
|
||||
project: &Project,
|
||||
settings: &crate::models::AppSettings,
|
||||
) -> Result<crate::host::aws_host::AwsEnv, String> {
|
||||
let shared_claude = super::container::shared_claude_auth(project);
|
||||
let effective_ca_path =
|
||||
resolve_with_global(project.ca_cert_path.as_deref(), settings.ca_cert_path.as_deref());
|
||||
let resolved_ca = ca_certs::resolve(effective_ca_path)?;
|
||||
let pairs = workspace_env(
|
||||
let pairs = workspace_env_with_ca(project, settings, resolved_ca.as_ref());
|
||||
Ok((pairs, resolved_ca))
|
||||
}
|
||||
|
||||
/// [`workspace_env`] resolved from `settings` like
|
||||
/// [`workspace_env_from_settings`] but with the CA given (`None`: no CA
|
||||
/// variables) — so nothing is read from disk. The keychain is (the shared
|
||||
/// Claude token). Copy-at-connect's terminal environment uses it: the
|
||||
/// credential pairs never depend on the CA.
|
||||
pub(crate) fn workspace_env_with_ca(
|
||||
project: &Project,
|
||||
settings: &crate::models::AppSettings,
|
||||
resolved_ca: Option<&ResolvedCa>,
|
||||
) -> Vec<(String, String)> {
|
||||
let shared_claude = super::container::shared_claude_auth(project);
|
||||
workspace_env(
|
||||
project,
|
||||
&WorkspaceEnvInputs {
|
||||
global_aws: &settings.global_aws,
|
||||
@@ -459,11 +473,10 @@ pub(crate) fn workspace_env_from_settings(
|
||||
global_claude_code_settings: settings.global_claude_code_settings.as_ref(),
|
||||
default_git_user_name: settings.default_git_user_name.as_deref(),
|
||||
default_git_user_email: settings.default_git_user_email.as_deref(),
|
||||
resolved_ca: resolved_ca.as_ref(),
|
||||
resolved_ca,
|
||||
shared_claude_token: shared_claude.as_ref().map(|(token, _)| token.as_str()),
|
||||
},
|
||||
);
|
||||
Ok((pairs, resolved_ca))
|
||||
)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in new issue
Block a user