15 Commits
Author SHA1 Message Date
Danny Kulchinsky 04fa4f98ac regenerate swagger docs for /fault_injection endpoints 2026-06-03 16:14:43 -04:00
Danny Kulchinsky 6614fe3543 address review comments 2026-06-03 16:04:17 -04:00
Danny Kulchinsky 18230d8fc5 feat(http): add fault injection mode for circuit breaker testing
Adds a process-wide toggle that makes podinfo respond with HTTP 500 to all application endpoints while keeping Kubernetes probes, metrics, pprof and the control endpoints functional. This allows a single replica to be made selectively 'sick' to test client-side circuit breakers / outlier detection (Envoy, Istio DestinationRule.outlierDetection, etc.) without Kubernetes evicting the pod.

New endpoints:

  POST /fault_injection/enable

  POST /fault_injection/disable

  GET  /fault_injection/status

Includes unit tests for the handlers, the middleware behavior, and the path exclusion list.
2026-06-02 23:18:28 -04:00
Piotr Roszatycki 51f14f8fc5 Add support for configurable URL path prefix in podinfo application 2026-05-25 12:47:45 +02:00
Stefan Prodan 2ca58cf0a4 Migrate JWT to registered claims
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2026-05-20 11:11:58 +03:00
Stefan Prodan 4920afdafb Improve test coverage of the HTTP API
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2026-05-20 11:07:35 +03:00
Stefan Prodan 7d8e7005b1 Refactor response header settings
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2026-05-20 10:50:31 +03:00
Niccolò ParlantiandClaude Opus 4.7 6210e0a920 test(echo): assert nosniff Content-Type on echo direct-response
Regression test for CVE-2026-43644, mirroring the TestStoreReadHandler_ContentType
test added in #463. Verifies the echoHandler direct-response branch returns
application/octet-stream, X-Content-Type-Options: nosniff, and a restrictive CSP
so an HTML payload cannot be MIME-sniffed and executed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 23:47:28 +02:00
Niccolò Parlanti b65271f0d9 fix(echo): set Content-Type to prevent MIME-sniff XSS (CVE-2026-43644)
Use tab indentation to match gofmt.

Signed-off-by: Niccolò Parlanti <54103711+Niccolo10@users.noreply.github.com>
2026-05-15 12:51:00 +02:00
Stefan Prodan 620b9b7e2c Fix path traversal in /store endpoint
Validate that the hash URL parameter matches the expected SHA1 hex
format (40 lowercase hex characters) before using it in file path
operations.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2026-03-14 15:02:25 +02:00
Stefan Prodan 550ee9f7b9 Fix stored XSS in /store endpoint (CVE-2025-70849)
Set Content-Type to application/octet-stream in storeReadHandler
to prevent Go's content sniffing from serving HTML payloads as
text/html. Add X-Content-Type-Options: nosniff to prevent browsers
from overriding Content-Type via MIME sniffing, and
Content-Security-Policy: default-src 'none' to block script
execution as defense-in-depth.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2026-03-14 14:40:55 +02:00
Hans van den Bogert 7cc399463c feat(logging): add trace_id to debug log line
... if exists in context
2025-03-10 21:48:25 +01:00
Rodrigo Fior Kuntzer eba7fe186e fix: panic when the WebSocket endpoint is under load 2024-05-23 10:01:01 +02:00
Michael KebeandMichael Kebe 16191504d1 Removed reference to localhost from swagger
Now it is possible to use the swagger webinterface
running on a host other than localhost e.g. in docker
or kubernetes.

Removed the @host line from pkg/api/server.go and
ran make swagger.

Fixes probably #179
2024-04-09 08:54:38 +02:00
JayKaku c305843105 restructured api to api/http, api/grpc, pkg http 2024-02-24 23:44:12 +05:30