Skip to content

feat: separate ticket issuer and subject identities#1

Merged
David Mireles (louzt) merged 3 commits into
mainfrom
feat/issuer-subject-tickets
Jun 25, 2026
Merged

feat: separate ticket issuer and subject identities#1
David Mireles (louzt) merged 3 commits into
mainfrom
feat/issuer-subject-tickets

Conversation

@louzt

@louzt David Mireles (louzt) commented Apr 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR strengthens the SnapPipe control plane by separating the identity that signs a ticket from the identity the ticket authorizes.

What this changes

  • adds explicit issuer and subject claims to tickets
  • allows the CLI to issue a ticket for a different peer via --subject-public-key
  • keeps self-issued tickets as the default when no subject override is provided
  • adds CI for cargo fmt --check and cargo test
  • adds CONTRIBUTING.md with the short-lived branch + PR workflow

Why it matters

A self-hosted relay/operator often needs to sign access for a client peer. That is a different model from a purely self-issued ticket. This PR makes that distinction explicit in the signed data model instead of leaving it implicit.

Verification

  • cargo test

Summary by CodeRabbit

  • New Features

    • Added QUIC profile support in the CLI, including preset profiles and JSON output.
    • Ticket issuance now supports an optional subject key, and verification output includes the issuer identity.
  • Documentation

    • Expanded the README with clearer architecture details, CLI examples, QUIC notes, and contribution guidance.
    • Added architecture and contributor documentation for the project’s transport and workflow model.
  • Chores

    • Added automated CI checks for formatting and tests on pushes and pull requests.

Separate ticket issuer and subject identities so an operator-controlled relay can sign access for a different peer instead of assuming self-issued tickets only.\n\nAlso adds CI and a contribution guide so the repository can evolve through short-lived feature branches and PRs instead of direct main-only changes.
Add a compiled Quinn-based transport profile layer with low-latency and relay-oriented presets, plus an ARCHITECTURE.md that documents the control-plane/data-plane split and transport strategy with Mermaid diagrams.
Add a CLI surface for emitting named Quinn transport profiles so the QUIC foundation is directly inspectable and reusable without embedding library code.
@louzt David Mireles (louzt) force-pushed the feat/issuer-subject-tickets branch from e6a1787 to 9a2d14e Compare June 25, 2026 07:34
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d4ba8a29-3549-4aa5-baab-b1810a7b1cf5

📥 Commits

Reviewing files that changed from the base of the PR and between 0f5359f and 9a2d14e.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (8)
  • .github/workflows/ci.yml
  • ARCHITECTURE.md
  • CONTRIBUTING.md
  • Cargo.toml
  • README.md
  • src/lib.rs
  • src/main.rs
  • src/quic.rs

📝 Walkthrough

Walkthrough

SnapPipe now models QUIC transport profiles, wires a quic profile CLI command, extends ticket claims with issuer and optional subject handling, and adds supporting docs, CI, and contributor guidance.

Changes

QUIC transport and ticket flow

Layer / File(s) Summary
QUIC transport profile contract
src/lib.rs, src/quic.rs, Cargo.toml, ARCHITECTURE.md, README.md
QuicTransportProfile and QuicProfileError are added, preset values are converted into quinn::TransportConfig, and the architecture docs describe the new QUIC transport model.
Ticket issuer and subject claims
src/lib.rs, src/main.rs, README.md
TicketClaims gains issuer, ticket issuance accepts an optional subject key, verification prints issuer, and the ticket example and tests are updated for the new claim shape.
QUIC profile subcommand
src/main.rs, README.md
snappipe quic profile is added, its preset arguments select a transport profile, and the README shows the JSON output example.
Repo guidance and CI
.github/workflows/ci.yml, CONTRIBUTING.md, README.md
A Rust CI workflow, contributor validation guidance, and README notes about QUIC transport profiles and contribution flow are added.

Sequence Diagram(s)

sequenceDiagram
  participant main
  participant quic_profile as quic_profile(args)
  participant QuicTransportProfile
  main->>quic_profile: Command::Quic::Profile
  quic_profile->>QuicTransportProfile: low_latency_interactive() / relay_backhaul()
  quic_profile-->>main: pretty JSON profile
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

Hoppity hop, I tuned the QUIC!
Tickets got an issuer, shiny and quick.
Profile carrots JSON-glow bright,
Tests sniffed the burrows, everything right.
Snip snap—SnapPipe leaps through the night. 🐇

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/issuer-subject-tickets

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@louzt David Mireles (louzt) merged commit 0bc9b25 into main Jun 25, 2026
0 of 3 checks passed
David Mireles (louzt) added a commit that referenced this pull request Jun 25, 2026
This commit reverts PR #1 (3 commits: feat(ticket), feat(quic),
feat(cli) for the issuer/subject separation and QUIC transport
foundation) and switches the license from dual MIT OR Apache-2.0 to
Apache-2.0 only.

License change rationale: the explicit patent grant and retaliation
clause in Apache-2.0 are the right fit for B2B/infra tooling. The
remaining lib.rs public API surface still benefits from that protection.

Files affected:
- .github/workflows/ci.yml, ARCHITECTURE.md, CONTRIBUTING.md, src/quic.rs:
  removed (were added in PR #1)
- LICENSE-MIT: removed (license)
- Cargo.toml: quinn dep removed, license = "Apache-2.0", repository URL
  updated to LOUST-PRO/SnapPipe (matches 2026-06-25 transfer)
- Cargo.lock: quinn deps pruned
- README.md: PR #1 sections reverted, Licensing section rewritten to
  reflect the single-license choice with note recording the date and
  reason for the switch
- src/lib.rs, src/main.rs: PR #1's ticket feature and CLI additions
  reverted

Verification:
- cargo check --offline: clean
- LICENSE-APACHE confirmed canonical (Apache 2.0, January 2004)
- No published crates.io versions to update
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