lightninglabs / lightninglabs/aperture

proxy: verify TLS identities for HTTPS backend services

Open
#265 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
268
Forks
78
Avg merge
22h 25m
Merged PRs (30d)
1

Description

## Summary

The reverse-proxy transport builds a `RootCAs` pool from service certificates but also sets `tls.Config.InsecureSkipVerify = true`. This disables certificate-chain and hostname verification, so the configured root pool does not authenticate the backend.

## Impact

A network-positioned attacker can impersonate an HTTPS backend and observe or alter proxied requests, responses, authorization material, or configured upstream credentials.

## Compatibility considerations

Simply changing the flag to false may break deployments that connect by IP address, use private/self-signed certificates, or have a certificate name different from `Service.Address`. The migration should be explicit rather than silently preserving insecure behavior.

Possible approaches:

- Add an explicit backend TLS server name and perform normal chain/hostname verification.
- Support deliberate certificate/SPKI pinning for private certificates.
- Keep insecure verification only as a clearly named opt-in compatibility setting, with a warning.

## Acceptance criteria

- An untrusted or wrong-identity backend certificate is rejected.
- A configured private CA or pinned certificate is accepted.
- IP-address backends have a documented secure configuration path.
- Plain HTTP service behavior is unchanged.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the reverse-proxy transport and inspect how its RootCAs pool and InsecureSkipVerify settings are populated for HTTPS services. Use the acceptance criteria to define done: reject untrusted or wrong-identity certificates, accept configured private CAs or pins, document secure IP-address configuration, and preserve plain HTTP behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, backend, security
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.