Skip to content

RPC Sink Token-Based Authentication #710

@Fathimah1210

Description

@Fathimah1210

The issues:

  1. Current Authenticated RPC Access, the RPC endpoints like for metric collection lack authentication, allowing any client to submit fake triggers or metric alerts.
  2. Plaintext communication for all RPC traffic, including sensitive database metrics, is transmitted over unencrypted HTTP.
  3. No audit trails, failed authentication attempts, or unauthorized access are logged, making intrusion detection impossible.

The solution:

  1. Token-based RPC Auth for implementing a mandatory token system via the AuthRequest wrapper for all RPC calls. The clients must provide a valid token to submit metrics in internal/sinks/rpc.go
  2. Centralized validation for auth logic is isolated in AuthenticatedWrapper (token verification, data extraction, and error logging)
  3. Audit logging to log authentication failures, like invalid tokens, with the timestamps in log.Println("[ERROR] Authentication failed")

Alternatives you have considered:
TLS Encryption: It will prioritize the auth login at first.

Thank you for your time and consideration. Looking forward to your feedback!

PR #711

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestsinksWhere and how to store monitored data

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions