apiVersion: jenkins.io/v1 kind: PipelineActivity metadata: annotations: lighthouse.jenkins-x.io/cloneURI: https://github.com/greencapitaltrade/flash.git lighthouse.jenkins-x.io/job: release pipeline.jenkins-x.io/traceID: 3fd4d8a40d1104c0b77aed16464797a1 creationTimestamp: "2026-06-03T21:02:23Z" generation: 7 labels: branch: main build: "90" context: release created-by-lighthouse: "true" event-GUID: 8259743c-5f8f-11f1-8ddc-d5a6bbf248b2 lighthouse.jenkins-x.io/baseSHA: c8da1103a0c60f0f44b8bc559f308cd534097b41 lighthouse.jenkins-x.io/branch: main lighthouse.jenkins-x.io/buildNum: "1780520543711" lighthouse.jenkins-x.io/context: release lighthouse.jenkins-x.io/id: ncapitaltrade-flash-main-release-knjqx lighthouse.jenkins-x.io/job: release lighthouse.jenkins-x.io/lastCommitSHA: c8da1103a0c60f0f44b8bc559f308cd534097b41 lighthouse.jenkins-x.io/refs.org: greencapitaltrade lighthouse.jenkins-x.io/refs.repo: flash lighthouse.jenkins-x.io/type: postsubmit owner: greencapitaltrade podName: ncapitaltrade-flash-main-release-7x5kc-from-build-pack-pod provider: github repository: flash tekton.dev/pipeline: ncapitaltrade-flash-main-release-7x5kc managedFields: - apiVersion: jenkins.io/v1 fieldsType: FieldsV1 fieldsV1: f:metadata: f:labels: f:branch: {} f:context: {} f:owner: {} f:provider: {} f:repository: {} f:spec: f:lastCommitMessage: {} f:lastCommitSHA: {} f:releaseNotesURL: {} f:version: {} manager: jx-changelog-0.10.18 operation: Update time: "2026-06-03T21:06:45Z" - apiVersion: jenkins.io/v1 fieldsType: FieldsV1 fieldsV1: f:metadata: f:annotations: .: {} f:lighthouse.jenkins-x.io/cloneURI: {} f:lighthouse.jenkins-x.io/job: {} f:labels: .: {} f:build: {} f:created-by-lighthouse: {} f:event-GUID: {} f:lighthouse.jenkins-x.io/baseSHA: {} f:lighthouse.jenkins-x.io/branch: {} f:lighthouse.jenkins-x.io/buildNum: {} f:lighthouse.jenkins-x.io/context: {} f:lighthouse.jenkins-x.io/id: {} f:lighthouse.jenkins-x.io/job: {} f:lighthouse.jenkins-x.io/lastCommitSHA: {} f:lighthouse.jenkins-x.io/refs.org: {} f:lighthouse.jenkins-x.io/refs.repo: {} f:lighthouse.jenkins-x.io/type: {} f:podName: {} f:tekton.dev/pipeline: {} f:spec: .: {} f:baseSHA: {} f:batchPipelineActivity: {} f:build: {} f:completedTimestamp: {} f:context: {} f:gitBranch: {} f:gitOwner: {} f:gitRepository: {} f:gitUrl: {} f:message: {} f:pipeline: {} f:startedTimestamp: {} f:status: {} f:steps: {} manager: jx-build-controller operation: Update time: "2026-06-03T21:07:27Z" name: greencapitaltrade-flash-main-90 namespace: jx resourceVersion: "75222161" uid: 83e73f6c-c419-4dd4-90d6-893058bee67a spec: baseSHA: c8da1103a0c60f0f44b8bc559f308cd534097b41 batchPipelineActivity: {} build: "90" buildLogsUrl: s3://logs-gct-prod-20260425045301534100000007/jenkins-x/logs/greencapitaltrade/flash/main/90.log completedTimestamp: "2026-06-03T21:07:26Z" context: release gitBranch: main gitOwner: greencapitaltrade gitRepository: flash gitUrl: https://github.com/greencapitaltrade/flash.git lastCommitMessage: | fix(ws): authenticate WS upgrade from cookie, not JS-readable token Bug: 0 successful WebSocket connections in 24h on prod. Map markers never updated, status pills frozen. Diagnosis on flash#134. Pipeline verified healthy end-to-end: - Deadpool TCP → deadpool.iot.raw ✓ - deadpool-deadpool-consumer parses + republishes to deadpool.iot.telemetry (88 msgs / 10 min, 0 publish failures) ✓ - Flash WS server consumer joined group, 6 partitions assigned ✓ - Istio ingress accepts WS upgrades (GET /ws → HTTP 101) ✓ The break was in the auth handshake: the client built the WS URL as `${wsUrl}?token=${document.cookie...authorization}`, but the prod `authorization` cookie is HttpOnly. `document.cookie` returned no value → URL became `?token=undefined` → server rejected every connection with `4001 Authentication required`. Fix: - `apps/next/server.ts` — read the `authorization` cookie from `req.headers.cookie` first (the cookie travels with the upgrade request automatically, even when HttpOnly). Keep `?token=` and the `Authorization: Bearer` header as fallbacks for native shells and server-to-server tests. - `packages/app/features/asset/hooks/useAssetTelemetry.ts` — drop the `if (!token) { return }` guard that short-circuited every browser connection. Build the URL as plain `wsUrl` when no token is provided; the browser cookie path takes over from there. Still appends `?token=...` conditionally when a token prop is passed (for native shells without a cookie store). - `packages/app/features/asset/screen.tsx` — drop the `token: document.cookie...authorization` field from the useAssetTelemetry call. The browser doesn't need it. Tests: - `packages/app/features/asset/hooks/__tests__/ telemetry-cookie-auth.test.ts` — pins that the hook no longer reads document.cookie, no longer hard-fails on missing token, and still supports the conditional `?token=` form for native. - `apps/next/__tests__/ws-cookie-auth.test.ts` — pins that the server reads `req.headers.cookie`, extracts `authorization=`, and orders cookieToken BEFORE the query string in the token resolution chain. 7/7 green. Manual verification owed on the preview env: hit /5/assets, then `kubectl logs ... | grep "authenticated with WebSocket access"` should fire. lastCommitSHA: 2d5394848f324a717ff1db6dc913181715450d29 message: 'Tasks Completed: 1 (Failed: 0, Cancelled 0), Skipped: 0' pipeline: greencapitaltrade/flash/main releaseNotesURL: https://github.com/greencapitaltrade/flash/releases/tag/v0.11.10 startedTimestamp: "2026-06-03T21:02:23Z" status: Succeeded steps: - kind: Stage stage: completedTimestamp: "2026-06-03T21:07:26Z" name: from build pack startedTimestamp: "2026-06-03T21:02:29Z" status: Succeeded steps: - completedTimestamp: "2026-06-03T21:02:35Z" name: Git Clone startedTimestamp: "2026-06-03T21:02:29Z" status: Succeeded - completedTimestamp: "2026-06-03T21:02:37Z" name: Next Version startedTimestamp: "2026-06-03T21:02:36Z" status: Succeeded - completedTimestamp: "2026-06-03T21:02:40Z" name: Jx Variables startedTimestamp: "2026-06-03T21:02:38Z" status: Succeeded - completedTimestamp: "2026-06-03T21:04:13Z" name: Build Yarn Install startedTimestamp: "2026-06-03T21:02:40Z" status: Succeeded - completedTimestamp: "2026-06-03T21:04:40Z" name: Next Build startedTimestamp: "2026-06-03T21:04:13Z" status: Succeeded - completedTimestamp: "2026-06-03T21:04:42Z" name: Check Registry startedTimestamp: "2026-06-03T21:04:40Z" status: Succeeded - completedTimestamp: "2026-06-03T21:06:35Z" name: Build Container Build startedTimestamp: "2026-06-03T21:04:42Z" status: Succeeded - completedTimestamp: "2026-06-03T21:06:45Z" name: Promote Changelog startedTimestamp: "2026-06-03T21:06:35Z" status: Succeeded - completedTimestamp: "2026-06-03T21:06:48Z" name: Promote Helm Release startedTimestamp: "2026-06-03T21:06:46Z" status: Succeeded - completedTimestamp: "2026-06-03T21:07:26Z" name: Promote Jx Promote startedTimestamp: "2026-06-03T21:06:48Z" status: Succeeded - kind: Promote promote: environment: staging pullRequest: pullRequestURL: https://github.com/greencapitaltrade/mcu/pull/4124 startedTimestamp: "2026-06-03T21:07:07Z" status: Succeeded startedTimestamp: "2026-06-03T21:07:07Z" status: Succeeded - kind: Promote promote: environment: production pullRequest: pullRequestURL: https://github.com/greencapitaltrade/mcu/pull/4125 startedTimestamp: "2026-06-03T21:07:23Z" status: Succeeded startedTimestamp: "2026-06-03T21:07:23Z" status: Succeeded version: 0.11.10 status: {}