gateway-tls-overview

Maps Edgion Gateway TLS termination and upstream TLS behavior to TLS store and SNI matchers.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Pandaala/Edgion --skill gateway-tls-overview
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gateway-tls-overview
Source: https://github.com/Pandaala/Edgion/tree/main/skills/01-architecture/02-gateway/04-tls
Command: npx skills add https://github.com/Pandaala/Edgion --skill gateway-tls-overview

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you understand how Edgion Gateway selects certificates, enforces TLS policies, and performs both downstream and upstream TLS (including mTLS) so you can diagnose handshake issues and configuration gaps.

Core Features & Use Cases

  • End-to-end TLS subsystem map: Downstream TLS termination (SNI-based selection, mTLS verification) and upstream TLS to backends (BackendTLSPolicy-driven mTLS and certificate SAN validation) are clearly separated with a storage/matcher layer in between.
  • Precise handshake callback timing: Explains how Pingora/BoringSSL callback stages chain together (select_certificate_callback → certificate_callback → handshake_complete_callback) and why min_tls_version must be set during select_cb.
  • Operational guardrails and audit coverage: Describes fail-closed behavior, single-log principles, snapshot-based certificate application, and the early-abort audit path when cert_cb never runs.

Quick Start

Use the gateway-tls-overview skill to explain, step by step, what happens during a client TLS handshake that fails due to min_tls_version, including which component logs the result and why.

Frequently Asked Questions about gateway-tls-overview

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does TLS certificate selection work in a gateway using SNI matchers?

TLS certificate selection uses SNI matchers to map the client's requested server name to the appropriate certificate in the TLS store during the downstream TLS termination handshake. The gateway evaluates SNI to select the correct certificate before completing the handshake.

Why does my mTLS handshake fail when using BackendTLSPolicy SAN validation?

mTLS handshake failures during BackendTLSPolicy SAN validation often occur when the upstream backend certificate Subject Alternative Names do not match the expected policy configuration. The gateway enforces fail-closed behavior, aborting the connection if SAN validation fails.

What is the correct callback ordering for Pingora BoringSSL handshake tracing?

Pingora BoringSSL handshake tracing follows a strict callback order: select_certificate_callback, then certificate_callback, and finally handshake_complete_callback. The min_tls_version must be set during the select_certificate_callback stage to ensure proper handshake execution.

How do I troubleshoot a TLS early-abort when the certificate callback never runs?

TLS early-abort troubleshooting requires checking the early-abort audit path when certificate_callback never executes. The gateway logs this fail-closed event to audit the connection termination, indicating the handshake failed before reaching the certificate verification stage.

What are the BoringSSL vs OpenSSL feature differences for gateway TLS termination?

BoringSSL and OpenSSL differ in callback lifecycle management and snapshot ex_data requirements for gateway TLS termination. Pingora relies on BoringSSL specific callback ordering and snapshot-based certificate application, which affects how TLS states are managed during handshakes.

When should I configure mTLS verification modes for upstream TLS connections?

Upstream mTLS verification modes should be configured when the gateway acts as a TLS client connecting to secure backends requiring mutual authentication. BackendTLSPolicy drives this upstream mTLS behavior, enforcing certificate SAN validation against the backend's presented credentials.