Repository navigation
feat(aws): add native SSM discovery and sessions with web sign-in - #344
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9ec9df672c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
| AwsCmd::Logout { id } => { | ||
| find_source(&sources, &id)?; | ||
| auth.logout(&id).await |
There was a problem hiding this comment.
Coordinate CLI logout with the host's active SSM sessions
When a native SSM session is open in the GUI or headless host, CLI logout deletes its persisted refresh grant without closing that host's session. Unlike commands::aws_signin::aws_signin_logout, this path never calls close_source_sessions. If the session remains open until its temporary credentials expire, subsequent cleanup cannot refresh credentials, and AwsService::terminate can only fall back to the expired cached credentials; closing the tab then leaves remote termination failing on every retry. Coordinate logout with the owning host before deleting the grant, using the existing local IPC channel; CLI source removal needs the same protection.
AGENTS.md reference: AGENTS.md:L24-L26
Useful? React with 👍 / 👎.
Add AWS SSM (Native) alongside the existing AWS SSM (CLI) provider. Users sign in on the AWS website, paste the authorization response, and enter the Region to query. EC2 discovery and Session Manager shells run in Rust without AWS CLI or session-manager-plugin; the existing CLI provider and saved configurations remain supported.
Authorization stays in backend memory until the discovery source is saved. Save commits through SecretStore; cancel preserves the previous saved grant. Login uses PKCE, DPoP and STS identity verification, with serialized credential refresh and owner-bound drafts. Concurrent source edits are checked before deleting credentials, and failed saves restore previous grants. The form uses one shared form-error display.
Native SSM uses the session lifecycle registry, signed WebSockets, ordered/acknowledged frames, bounded retransmission, ResumeSession, remote cleanup and optional KMS encryption, including the Agent's challenge context. Continuous output no longer starves terminal input. Discovery results remain transient launch targets. Disabling or removing a discovery source clears its cached targets without closing existing tabs. AWS sign-out and source removal clear the saved grant; an already connected shell can keep using its open channel. New connections and automatic resumes require valid credentials.
SSM cleanup skips redundant termination after a session-bound remote close notification. API failures count as successful cleanup only for an explicit missing session or matching terminated history. An owner-scoped, read-only status command clears stale notices after backend recovery; unresolved notices can be collapsed while retaining retry controls and now use connection names.
Entry points:
rssh awssupports source CRUD, login/logout/status and discovery. Native interactive SSM shell and SFTP/file download are not included.Validation:
npm test: 127 files, 1,467 tests passed.npm run build: passed; existing accessibility/CSS/chunk-size warnings remain.cargo test --workspace --all-features --locked: 1,087 tests passed; one doc test ignored.cargo fmt --all --check,git diff --check: passed.cargo check -p rssh-app --features tauri,server --bins --lockedandcargo check -p rssh-cli --locked: passed.AWS browser sign-in was confirmed by the user during development. A live EC2-to-native-SSM end-to-end run and physical mobile-device testing remain unverified. IAM Identity Center SSO is intentionally outside this change; native WebSocket HTTP CONNECT proxy support is not included.