Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

feat: implement AWS temporary session based interactions

Aperta
#167 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
aws, rust
Ambito
backend, cli, security

Direzione di ricerca

Inizia con la struttura Alias in crates/core e leggi AGENTS.md per il processo relativo alle breaking changes. Segui S3Client, AdminClient, il punto di ingresso della CLI per impostare un alias, migrations/ e schemas/output_v2.json, quindi esamina i test golden. Il lavoro è completato quando la configurazione del session-token, la gestione della scadenza, la redaction, la migrazione, gli aggiornamenti dello schema e i controlli cargo elencati hanno tutti esito positivo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Description

Implement support for AWS session tokens to enable temporary, role-based interactions with S3-compatible backends. To maintain a seamless user experience, aliases utilizing expired session tokens will be automatically pruned from the configuration upon detection.

Requirements

  • Core Alias Updates: Update the Alias configuration to support an optional session token using #[serde(default)] for backward compatibility.
  • Security: Implement a custom fmt::Debug for the Alias struct to ensure session tokens and secret keys are scrubbed from logs.
  • Credential Injection: Modify S3Client and AdminClient to inject the session token into the AWS credentials provider.
  • Error Handling: Introduce a TokenExpired(String) error variant and map AWS ExpiredToken / InvalidToken errors to it.
  • CLI Auto-Pruning: Intercept TokenExpired errors at the CLI boundary to log a clear message, automatically remove the dead alias from config.toml, and exit gracefully.

Acceptance Criteria

  • rc alias set supports a new --session-token flag.
  • Configuration changes include a schema_version bump and a migration path (migrations/).
  • schemas/output_v2.json is updated to include the session_token field in the aliasInfo definition.
  • Static credentials continue to function normally when the session token is omitted.
  • CLI correctly identifies an expired token, logs a helpful warning, deletes the alias, and exits with AUTH_ERROR (Code 4).
  • Debug/verbose logs strictly mask the session token as ***REDACTED***.
  • Golden tests are successfully regenerated (UPDATE_GOLDEN=1 cargo test --features golden) and pass.
  • Pre-commit checks (cargo fmt --all, cargo clippy --workspace -- -D warnings) pass with zero warnings.

Notes

This change impacts the Alias struct in crates/core, triggering the Breaking Change process outlined in AGENTS.md. The aws-sigv4 crate automatically handles the X-Amz-Security-Token header during request signing.

Lingua principale
Rust
Stelle
152
Fork
21
Merge medio
1g 4h
PR unite (30g)
23

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rustfs/cli

Tutte le issue di rustfs/cli

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.