[bug]: Export download links are still signed for us-east-1 when AWS_S3_ENDPOINT_URL is set (follow-up to #7199)

Aperta Adatta ai principianti
#10,426 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
84/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
aws, python
Ambito
backend, cloud

Direzione di ricerca

Leggi apps/api/plane/bgtasks/export_task.py e confronta la configurazione del client S3 con plane/settings/storage.py, che secondo l’issue passa la regione. Aggiungi la regione AWS configurata al client dell’endpoint, quindi esegui i test pertinenti del task di esportazione e verifica che i link di download generati usino la regione configurata.

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

Descrizione

Is there an existing issue for this?
  • I have searched the existing issues
Current behavior

Issue exports (CSV/JSON/XLSX) finish with status "completed" and the file is uploaded to S3, but the download link
fails with HTTP 400:

<Code>AuthorizationQueryParametersError</Code>
<Message>Error parsing the X-Amz-Credential parameter; the region 'us-east-1' is wrong; expecting 'ap-southeast-1'</Message>

#7199 reported this and was closed, but on current master (and v1.5.0/v1.5.1)
apps/api/plane/bgtasks/export_task.py only passes region_name in the branch without an endpoint:

if settings.AWS_S3_ENDPOINT_URL:
    s3 = boto3.client(
        "s3",
        endpoint_url=settings.AWS_S3_ENDPOINT_URL,
        aws_access_key_id=settings.AWS_ACCESS_KEY_ID,
        aws_secret_access_key=settings.AWS_SECRET_ACCESS_KEY,
        config=Config(signature_version="s3v4"),
    )  # no region_name -> boto3 falls back to us-east-1

The self-host compose always sets AWS_S3_ENDPOINT_URL (it defaults to http://plane-minio:9000 when empty), so
everyone using AWS S3 outside us-east-1 takes this branch. Uploads still work because botocore's S3 region redirect
retries them; presigned URLs are created without a request, so they keep the wrong region.

Expected behavior

Add region_name=settings.AWS_REGION to the endpoint_url client as well (as plane/settings/storage.py already does).

Steps to reproduce
  1. Self-hosted, USE_MINIO=0, AWS_REGION=ap-southeast-1, AWS_S3_ENDPOINT_URL=https://s3.ap-southeast-1.amazonaws.com.
  2. Export issues from Settings → Exports.
  3. Open the download link → 400 (X-Amz-Credential contains /us-east-1/s3/).

Workaround: set AWS_DEFAULT_REGION on the worker service.

Environment

Production

Variant

Self-hosted

Version

v1.5.0 (code unchanged on master as of 2026-11-27)

Lingua principale
TypeScript
Stelle
63k
Fork
6.5k
Merge medio
2g 16h
PR unite (30g)
70

Preparare l'ambiente

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 makeplane/plane

Tutte le issue di makeplane/plane

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.