Skip to content

ptp wireguard#391

Open
sechmann wants to merge 20 commits intomainfrom
ptp_wireguard
Open

ptp wireguard#391
sechmann wants to merge 20 commits intomainfrom
ptp_wireguard

Conversation

@sechmann
Copy link
Copy Markdown
Contributor

  • feat(tunnel): add tunnel domain types and business logic
  • feat(tunnel): add DB migration for tunnel authorization
  • feat(tunnel): add CanCreateTunnel authorization check
  • feat(tunnel): add GraphQL schema, resolvers, and regenerate code
  • feat(tunnel): wire tunnel module into API server

This comment was marked as outdated.

sechmann and others added 14 commits April 20, 2026 16:51
Tunnel module with types, DB queries (CRUD + STUN endpoint update),
context helpers, dataloader, activity log, error definitions, and tests.

Supports point-to-point WireGuard tunnels between CLI and gateway pods.

Co-authored-by: Thomas Krampl <thomas.siegfried.krampl@nav.no>
Adds tunnels:create authorization to the RBAC system.

Co-authored-by: Thomas Krampl <thomas.siegfried.krampl@nav.no>
Adds team-scoped tunnels:create authorization function.

Co-authored-by: Thomas Krampl <thomas.siegfried.krampl@nav.no>
Tunnel GraphQL API: createTunnel, updateTunnelSTUNEndpoint, deleteTunnel
mutations, tunnel/tunnelsByTeam queries, and real-time tunnel status subscription.

Includes gqlgen config binding and all regenerated resolver/generated files.

Co-authored-by: Thomas Krampl <thomas.siegfried.krampl@nav.no>
Register tunnel dataloader context and Kubernetes watcher.

Co-authored-by: Thomas Krampl <thomas.siegfried.krampl@nav.no>
Co-authored-by: Thomas Krampl <thomas.siegfried.krampl@nav.no>
Co-authored-by: Thomas Krampl <thomas.siegfried.krampl@nav.no>
…pdateSTUNEndpoint mutation

- Replace UUID-based TunnelID with ident (team+env+name, type code TU)
- Remove UpdateTunnelSTUNEndpoint mutation; clientSTUNEndpoint is now
  part of CreateTunnelInput so STUN is discovered before tunnel creation
- Change DeleteTunnelInput to use explicit teamSlug/environmentName/tunnelName
- Change TeamEnvironment.tunnel field to query by name instead of ID
- Add name field to Tunnel type
- Remove InstanceName from CreateTunnelInput
- Update activity log entries: tunnelID/teamSlugForTunnel → tunnelName
- Remove Valkey-specific references from tunnel package
- Regenerate all GraphQL artifacts
- Update tunnel_test.go to match new struct shapes

Co-authored-by: Thomas Krampl <thomas.siegfried.krampl@nav.no>
Co-authored-by: Thomas Krampl <thomas.siegfried.krampl@nav.no>
… main

Co-authored-by: Thomas Krampl <thomas.siegfried.krampl@nav.no>
…st panic

Co-authored-by: Thomas Krampl <thomas.siegfried.krampl@nav.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants