Altinity / Altinity/altinity-sql-browser
[sup] Same-origin deployment: static artifact in ACM docroot, <Location> CSP, acm-ui link
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 8
- Fork
- 2
- Merge medio
- 1h 34m
- PR unite (30g)
- 6
Descrizione
Part of #352. Reworked: same-origin static deployment into ACM, not a public release tag.
Our SPA ships as a static file in the altinity/acm image docroot, served same-origin at a concrete path (e.g. /sql/), opened in a new tab from acm-ui.
Our repo (altinity-sql-browser)
- Build the artifact so it runs under ACM (see CSP below): either keep the single inline-
<script>file and rely on a scoped ACM<Location>CSP, or add a build mode emitting external JS from'self'(no inline/eval). - Select ACM cookie-auth mode at runtime (URL context) rather than a separate bundle if practical.
- Decide artifact delivery to ACM: committed asset, pinned GitHub release download, or built in acm-ui's pipeline.
acm repo (backend/distrib)
distrib/build.sh: place our built file into the docroot / tar (/var/www/html/sql/…).- vhost: add a
<Location /sql/>CSP block (mirror the existing/api/CSP:'self' 'unsafe-inline' 'unsafe-eval' *.gstatic.com data:). Needed because the strict page CSP blocks our inline bundle. - Serve as a real file at a concrete path (
FallbackResource /index.htmlwould otherwise return the Angular shell).
acm-ui repo
- Add a link on the cluster/explore page →
/sql/?cluster=<id>&node=<n>(target=_blank).
Do NOT
—vX.Y.Z-suptagrelease.ymlfires onv*anddocker.ymlonv*.*.*(+latest); a-suptag would enter public GitHub Release / Helm / Dockerlatest. Deployment here is via the ACM image, not this repo's public tags.
Acceptance
- Artifact served same-origin at
/sql/; cookie auth works end-to-end in the console. -
<Location /sql/>CSP allows the app; page loads with no CSP violations. - Concrete-path file (not swallowed by
FallbackResource). - acm-ui link opens the new tab with cluster/node context.
- No public-release/Helm/Docker path is triggered by this work.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia leggendo la discussione su artifact e build in questo repository, quindi esamina acm's distrib/build.sh e la configurazione vhost, oltre alla pagina cluster/explore di acm-ui. Risolvi l'approccio alla distribuzione degli artifact e a CSP nei tre repository, verificando anche release.yml e docker.yml alla ricerca di percorsi involontari di pubblicazione pubblica. Il lavoro è completato quando l'artifact /sql/, il flusso cookie-auth, CSP, il percorso concreto del file, il link contestuale e le salvaguardie per la pubblicazione soddisfano i controlli di accettazione elencati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- backend, devops, frontend
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100