Skip to content

feat(log-input): add HTTP ingest endpoint - #2466

Merged
JocLRojas merged 1 commit into
release/v12.0.0from
feature/log-input-http-ingest
Aug 14, 2026
Merged

feat(log-input): add HTTP ingest endpoint#2466
JocLRojas merged 1 commit into
release/v12.0.0from
feature/log-input-http-ingest

Conversation

@JocLRojas

Copy link
Copy Markdown
Contributor

A detailed explanation.

Adds POST /v1/ingest as an HTTP transport for log ingestion on port :50052, alongside the existing gRPC endpoint. Both transports now share the same authentication logic and NATS publisher.

Body accepts a single log or a batch ({"logs": [...]}, up to 1000 entries, max 10 MB). Response is 200 {accepted, failed} on success, 401 on missing/invalid credentials, 413 on oversized body, and 503 when NATS is unavailable. Tenant is always derived from the credential, never from the request body.

Authentication headers accepted:

  • Utm-Api-Key (Enterprise API keys, priority)
  • X-Connector-Key + X-Connector-Id + X-Connector-Type (existing agent/collector credentials)

The gRPC middleware was refactored to share a transport-agnostic resolveAuth function with the HTTP handler, so authentication logic lives in one place.

The reasoning behind these changes.

Customers who want to push events from external systems (webhooks, custom apps, third-party integrations.) currently need to write a gRPC client to talk to log-input. Adding an HTTP endpoint removes that integration barrier without changing anything about how agents, collectors, or forwarders work today.

A reference to the issue that this pull request addresses.

N/A

Adds POST /v1/ingest as an HTTP transport for log ingestion alongside
the existing gRPC endpoint, sharing the same auth logic and NATS
publisher through a small middleware refactor.
@github-actions

Copy link
Copy Markdown

🛑 AI review — Sensitive area, extra care recommended

This PR touches critical paths or introduces changes the model cannot judge with sufficient confidence. Review carefully before merging.

architecture (gemini-3-flash-lite) — clean

Summary: Added a TLS-secured HTTP ingest endpoint (/v1/ingest) alongside the gRPC server in log-input.

No findings.

bugs (gemini-3-flash-lite) — clean

Summary: Added HTTP ingest server alongside gRPC transport with proper validation, auth reuse, and shutdown handling.

No findings.

🛑 security (gemini-3-flash-lite) — high/critical — please review

Summary: Introduced an HTTP ingest endpoint with authentication and request handling in security-critical code paths.

No findings.

🔴 go-deps — pending updates

🔍 Discovered 30 Go projects

📦 Dependencies with updates available:

  📁 ./plugins/events:
     - github.com/threatwinds/go-sdk: v1.1.27-0.20260811073440-251cb9d842cd → v1.1.28

  📁 ./plugins/rule-flood-guard:
     - github.com/threatwinds/go-sdk: v1.1.27-0.20260811073440-251cb9d842cd → v1.1.28

  📁 ./plugins/stats:
     - github.com/threatwinds/go-sdk: v1.1.27-0.20260811073440-251cb9d842cd → v1.1.28

  📁 ./plugins/feeds:
     - github.com/threatwinds/go-sdk: v1.1.27-0.20260811073440-251cb9d842cd → v1.1.28

  📁 ./plugins/alerts:
     - github.com/threatwinds/go-sdk: v1.1.27-0.20260811073440-251cb9d842cd → v1.1.28

  📁 ./plugins/aws:
     - github.com/threatwinds/go-sdk: v1.1.27-0.20260811073440-251cb9d842cd → v1.1.28

  📁 ./backend:
     - github.com/threatwinds/go-sdk: v1.1.27-0.20260811073440-251cb9d842cd → v1.1.28

❌ Please update dependencies before merging.

@JocLRojas
JocLRojas merged commit 6e75496 into release/v12.0.0 Aug 14, 2026
1 check passed
@JocLRojas
JocLRojas deleted the feature/log-input-http-ingest branch August 14, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant