Skip to content

feature/srtsp-support - #316

Merged
cedricve merged 6 commits into
masterfrom
feature/srtsp-support
Aug 13, 2026
Merged

feature/srtsp-support #316
cedricve merged 6 commits into
masterfrom
feature/srtsp-support

Conversation

@cedricve

@cedricve cedricve commented Aug 12, 2026

Copy link
Copy Markdown
Member

Description

Motivation

We need secure camera streaming support in Kerberos Agent that works in real deployments where IP cameras use TLS certificates (often issued by private CAs) and where correct server identity verification (SAN/IP match) is critical. Until now, the project documentation and implementation didn’t clearly cover RTSPS/TLS certificate handling, trust-bundle composition, and the safe way to validate end-to-end trust.

What changed / why it improves the project

  • RTSPS/TLS configuration is now supported and wired into the RTSP client

    • rtsps:// camera URLs now pass an explicit TLS configuration to gortsplib.
    • By default, certificate verification remains enabled, improving security vs “works on my camera” insecure setups.
  • A controlled insecure escape hatch is provided

    • Added AGENT_CAPTURE_IPCAMERA_RTSPS_INSECURE=true to opt into InsecureSkipVerify only when a trusted CA bundle can’t be installed.
    • This keeps insecure behavior explicit and testable, while making secure-by-default the normal path.
  • Project documentation explains the full certificate and trust flow

    • Added README-RTSPS-TLS.md with a step-by-step guide for Bosch RTSPS/TLS, including:
      • building the correct trust bundle (root + intermediate),
      • ensuring the certificate SAN matches the URL host/IP,
      • validating the live connection and diagnosing common “it still connects” edge cases.
    • Updated README.md with concise RTSPS usage, new env var, and references.
  • Test coverage for the TLS verification switch

    • Added TestRTSPSTLSConfig to ensure verification is on by default and correctly disabled only when explicitly requested.

Overall, this PR makes RTSPS support safer and more operational: users can deploy with proper private-CA trust bundles, get predictable identity verification behavior, and have clear validation guidance when troubleshooting camera TLS issues.

- Updated README.md to include instructions for using RTSPS camera URLs.
- Enhanced gortsplib.go to support insecure TLS configuration for self-signed certificates.
- Added unit tests for RTSPS TLS configuration in gortsplib_test.go.
Copilot AI lite review requested due to automatic review settings August 12, 2026 15:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds first-class documentation and an opt-in runtime escape hatch for connecting to IP cameras over RTSPS (RTSP over TLS), including guidance for private-CA trust distribution and Bosch-specific certificate behavior.

Changes:

  • Documented RTSPS usage and configuration in README.md, including a new AGENT_CAPTURE_IPCAMERA_RTSPS_INSECURE toggle.
  • Added a comprehensive RTSPS/TLS troubleshooting and deployment guide (README-RTSPS-TLS.md).
  • Wired an optional tls.Config into gortsplib clients (only when explicitly enabled via env var) and added unit tests for the toggle behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
README.md Adds RTSPS configuration section and documents the new insecure toggle.
README-RTSPS-TLS.md New detailed guide covering cert identity, private CA issuance, validation, and troubleshooting.
machinery/src/capture/gortsplib.go Adds TLSConfig plumbing for gortsplib with an explicit env-controlled insecure mode.
machinery/src/capture/gortsplib_test.go Adds unit tests to validate default secure behavior and explicit insecure opt-in.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@cedricve
cedricve merged commit 92d3311 into master Aug 13, 2026
14 checks passed
@cedricve
cedricve deleted the feature/srtsp-support branch August 13, 2026 08:00
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.

2 participants