-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat(e2e): Add tunnel establishment E2E tests (T-6.1) #5176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
obtFusi
wants to merge
30
commits into
netbirdio:main
from
silentspike:feature/t6.1-e2e-tunnel-tests
Closed
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
dfcaebe
ci: add GitHub configuration from network-agent pattern
obtFusi 3d1defe
Merge pull request #1 from obtFusi/ci/github-config
obtFusi b036814
feat(auth): Add mTLS authentication for Machine Tunnel (S-1 Spikes)
obtFusi 634bd3c
chore: add AUDIT files to gitignore
obtFusi 5357588
feat(spike): Add S-1 Windows mTLS spikes - CNG signer and SAN parser
obtFusi e594b07
feat(lab): Add CA bootstrap and verification scripts
obtFusi f52cd3d
fix(lab): Fix verify-lab-ca.ps1 parsing bugs
obtFusi 6f72ca7
feat(proto): Generate Go code for Machine Tunnel RPCs
obtFusi a4deec3
feat(mtls): Add per-account AllowedDomains for multi-tenant isolation
obtFusi 648b532
feat(mtls): Add Machine Tunnel RPC handlers (T-3.6)
obtFusi 4d79421
feat(server): Complete T-3.6 Server Peer Registration Handler with fu…
obtFusi 0e45951
feat(mtls): Add DNSLabel uniqueness check for machine peers (T-3.7)
obtFusi 0fcdd70
feat(server): Add separate mTLS port for Machine Tunnel clients (T-3.8)
obtFusi 2ab03ec
fix(lint): Address golangci-lint errors in mTLS implementation
obtFusi aa06ac6
fix(ci): Remove duplicate PR template causing macOS case conflict
obtFusi aef47cc
fix(ci): Remove duplicate PR template causing macOS case conflict
obtFusi 625c120
Merge pull request #92 from obtFusi/feature/server-mtls
obtFusi e876f3d
feat(build): Add multi-stage Dockerfile for management server
obtFusi 71e11ae
feat(client): Add machine tunnel bootstrap with Setup-Key fallback (T…
obtFusi be66b2d
feat(client): Add domain join over tunnel functionality (T-5.2)
obtFusi 581cbf6
fix(domainjoin): Fix lint errors for IPv6 and gosec G101
obtFusi 5d04701
Merge pull request #95 from obtFusi/feature/multistage-dockerfile
obtFusi 4851c75
Merge pull request #96 from obtFusi/feature/t-5.1-bootstrap-setup-key…
obtFusi 66218ea
feat(tunnel): Add certificate enrollment after domain join (T-5.3)
obtFusi ff700e2
feat(scripts): Add reset and test scripts for Windows VM testing (T-5.5)
obtFusi 6b081f6
Merge pull request #98 from obtFusi/feature/t-5.5-reset-scripts
obtFusi f8641ac
Merge pull request #97 from obtFusi/feature/t-5.3-cert-enrollment
obtFusi da666f0
feat(scripts): Update bootstrap-new-client.ps1 for v3.6 Smart Selection
obtFusi 30d0bdd
Merge pull request #102 from obtFusi/feature/t-5.4-bootstrap-script
obtFusi 1bf2aed
feat(e2e): Add tunnel establishment E2E tests (T-6.1)
obtFusi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| #!/bin/bash | ||
|
|
||
| echo "Running pre-commit hook..." | ||
|
|
||
| # Check for unformatted Go files (only staged files) | ||
| STAGED_GO_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep '\.go$') | ||
|
|
||
| if [ -n "$STAGED_GO_FILES" ]; then | ||
| UNFORMATTED=$(echo "$STAGED_GO_FILES" | xargs gofmt -l 2>/dev/null) | ||
| if [ -n "$UNFORMATTED" ]; then | ||
| echo "ERROR: Unformatted Go files:" | ||
| echo "$UNFORMATTED" | ||
| echo "" | ||
| echo "Run 'gofmt -w <file>' to fix, then 'git add' again" | ||
| echo "Or run 'gofmt -w .' to fix all" | ||
| exit 1 | ||
| fi | ||
| fi | ||
|
|
||
| # Check for secrets in staged files | ||
| SECRETS_PATTERN='(PRIVATE KEY|password.*=|api[_-]?key|secret[_-]?key|-----BEGIN)' | ||
| if git diff --cached --name-only | xargs grep -l -E "$SECRETS_PATTERN" 2>/dev/null; then | ||
| echo "" | ||
| echo "WARNING: Potential secrets detected in staged files!" | ||
| echo "Please review before committing." | ||
| echo "" | ||
| echo "To bypass this check (only if you're sure): git commit --no-verify" | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "Pre-commit checks passed!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| --- | ||
| name: Bug Report | ||
| about: Fehler oder Problem melden | ||
| title: '[Bug] ' | ||
| labels: type:bug, priority:high | ||
| assignees: '' | ||
| --- | ||
|
|
||
| ## Beschreibung | ||
| Was ist passiert? | ||
|
|
||
| ## Schritte zum Reproduzieren | ||
| 1. ... | ||
| 2. ... | ||
| 3. ... | ||
|
|
||
| ## Erwartetes Verhalten | ||
| Was sollte passieren? | ||
|
|
||
| ## Tatsächliches Verhalten | ||
| Was passiert stattdessen? | ||
|
|
||
| ## Umgebung | ||
| - OS: [z.B. Windows 11, Ubuntu 22.04] | ||
| - NetBird Version: [z.B. 0.31.0] | ||
| - Go Version: [z.B. 1.22] | ||
|
|
||
| ## Logs/Screenshots | ||
| (Optional) Fehlermeldungen oder Screenshots |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| blank_issues_enabled: false | ||
| contact_links: | ||
| - name: NetBird Documentation | ||
| url: https://docs.netbird.io | ||
| about: Official NetBird documentation | ||
| - name: NetBird Discussions | ||
| url: https://github.com/netbirdio/netbird/discussions | ||
| about: Ask questions and discuss NetBird |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| --- | ||
| name: Epic | ||
| about: Großes Feature das mehrere Stories umfasst | ||
| title: '[Epic] E-X: ' | ||
| labels: type:epic, priority:critical, phase:mvp | ||
| assignees: '' | ||
| --- | ||
|
|
||
| ## Epic Beschreibung | ||
| Was ist das übergeordnete Ziel dieses Epics? | ||
|
|
||
| ## Business Value | ||
| Welchen Wert bringt dieses Epic für den User/das Projekt? | ||
|
|
||
| ## Scope | ||
| Was ist Teil dieses Epics? Was ist NICHT Teil? | ||
|
|
||
| **In Scope:** | ||
| - | ||
|
|
||
| **Out of Scope:** | ||
| - | ||
|
|
||
| ## Stories | ||
| <!-- Liste der zugehörigen Stories --> | ||
| - [ ] S-1: ... | ||
| - [ ] S-2: ... | ||
|
|
||
| ## Acceptance Criteria | ||
| <!-- Wann gilt das Epic als abgeschlossen? --> | ||
| - [ ] ... | ||
|
|
||
| ## Dependencies | ||
| <!-- Abhängigkeiten zu anderen Epics/externen Systemen --> | ||
| - | ||
|
|
||
| ## Risks | ||
| <!-- Bekannte Risiken --> | ||
| - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| --- | ||
| name: User Story | ||
| about: Feature aus Nutzersicht beschreiben | ||
| title: '[Story] S-X: ' | ||
| labels: type:story, priority:high, phase:mvp | ||
| assignees: '' | ||
| --- | ||
|
|
||
| ## Parent Epic | ||
| <!-- Link zum Epic --> | ||
| Refs # | ||
|
|
||
| ## User Story | ||
| Als [Rolle] | ||
| möchte ich [Funktion] | ||
| damit [Nutzen] | ||
|
|
||
| ## Acceptance Criteria | ||
| <!-- Wann gilt die Story als abgeschlossen? --> | ||
| - [ ] ... | ||
|
|
||
| ## Tasks | ||
| <!-- Liste der zugehörigen Tasks --> | ||
| - [ ] T-X.1: ... | ||
| - [ ] T-X.2: ... | ||
|
|
||
| ## Technical Notes | ||
| <!-- Technische Hinweise für die Implementierung --> | ||
| - | ||
|
|
||
| ## Branch | ||
| `feature/...` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| --- | ||
| name: Technical Task | ||
| about: Technische Aufgabe für die Implementierung | ||
| title: '[Task] T-X.Y: ' | ||
| labels: type:task, phase:mvp | ||
| assignees: '' | ||
| --- | ||
|
|
||
| ## Parent Story | ||
| <!-- Link zur Story --> | ||
| Refs # | ||
|
|
||
| ## Beschreibung | ||
| Was muss technisch umgesetzt werden? | ||
|
|
||
| ## Dateien/Komponenten | ||
| <!-- Welche Files werden geändert/erstellt? --> | ||
| - | ||
|
|
||
| ## Implementation Notes | ||
| <!-- Technische Details --> | ||
| - | ||
|
|
||
| ## Definition of Done | ||
| - [ ] Code implementiert | ||
| - [ ] Tests geschrieben | ||
| - [ ] Code reviewed | ||
| - [ ] Dokumentation aktualisiert (falls nötig) | ||
|
|
||
| ## Estimated Complexity | ||
| <!-- Simple | Medium | Complex --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| version: 2 | ||
| updates: | ||
| # Go dependencies | ||
| - package-ecosystem: "gomod" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| commit-message: | ||
| prefix: "deps" | ||
| labels: | ||
| - "type:deps" | ||
|
|
||
| # GitHub Actions | ||
| - package-ecosystem: "github-actions" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| commit-message: | ||
| prefix: "ci" | ||
| labels: | ||
| - "type:ci" | ||
|
|
||
| # Docker dependencies | ||
| - package-ecosystem: "docker" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| commit-message: | ||
| prefix: "deps" | ||
| labels: | ||
| - "type:deps" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| name: Auto Label | ||
|
|
||
| on: | ||
| issues: | ||
| types: [opened] | ||
| pull_request: | ||
| types: [opened] | ||
|
|
||
| permissions: | ||
| issues: write | ||
| pull-requests: write | ||
Check noticeCode scanning / SonarCloud Write permissions should be defined at the job level Low
Move this write permission from workflow level to job level. See more on SonarQube Cloud
|
||
|
|
||
| jobs: | ||
| label-issues: | ||
| if: github.event_name == 'issues' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| const title = context.payload.issue.title.toLowerCase(); | ||
| const labels = ['status:backlog']; | ||
|
|
||
| // Epic/Story/Task detection (Machine Tunnel Plan) | ||
| if (title.includes('[epic]') || title.startsWith('e-')) { | ||
| labels.push('type:epic', 'priority:critical'); | ||
| } else if (title.includes('[story]') || title.startsWith('s-')) { | ||
| labels.push('type:story', 'priority:high'); | ||
| } else if (title.includes('[task]') || title.startsWith('t-')) { | ||
| labels.push('type:task'); | ||
| } | ||
|
|
||
| // Type detection from title prefix | ||
| if (title.includes('[bug]') || title.startsWith('bug:') || title.startsWith('fix:')) { | ||
| labels.push('type:bug', 'priority:high'); | ||
| } else if (title.includes('[feature]') || title.startsWith('feat:')) { | ||
| labels.push('type:feature'); | ||
| } else if (title.includes('[docs]') || title.startsWith('docs:')) { | ||
| labels.push('type:docs'); | ||
| } else if (title.includes('[refactor]') || title.startsWith('refactor:')) { | ||
| labels.push('type:refactor'); | ||
| } else if (title.includes('[ci]') || title.startsWith('ci:')) { | ||
| labels.push('type:ci'); | ||
| } else if (title.includes('[spike]') || title.startsWith('spike:')) { | ||
| labels.push('type:spike'); | ||
| } | ||
|
|
||
| // Phase detection | ||
| if (title.includes('[mvp]') || title.includes('phase:mvp')) { | ||
| labels.push('phase:mvp'); | ||
| } | ||
|
|
||
| await github.rest.issues.addLabels({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: context.issue.number, | ||
| labels: labels | ||
| }); | ||
|
|
||
| label-prs: | ||
| if: github.event_name == 'pull_request' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| const title = context.payload.pull_request.title.toLowerCase(); | ||
| const labels = []; | ||
|
|
||
| // Type detection from Conventional Commit prefix | ||
| if (title.startsWith('feat:') || title.startsWith('feat(')) { | ||
| labels.push('type:feature'); | ||
| } else if (title.startsWith('fix:') || title.startsWith('fix(')) { | ||
| labels.push('type:bug'); | ||
| } else if (title.startsWith('docs:') || title.startsWith('docs(')) { | ||
| labels.push('type:docs'); | ||
| } else if (title.startsWith('refactor:') || title.startsWith('refactor(')) { | ||
| labels.push('type:refactor'); | ||
| } else if (title.startsWith('ci:') || title.startsWith('ci(')) { | ||
| labels.push('type:ci'); | ||
| } else if (title.startsWith('deps:') || title.startsWith('chore(deps)')) { | ||
| labels.push('type:deps'); | ||
| } | ||
|
|
||
| // Dependabot PRs | ||
| if (context.payload.pull_request.user.login === 'dependabot[bot]') { | ||
| labels.push('type:deps'); | ||
| } | ||
|
|
||
| if (labels.length > 0) { | ||
| await github.rest.issues.addLabels({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: context.issue.number, | ||
| labels: labels | ||
| }); | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check notice
Code scanning / SonarCloud
Write permissions should be defined at the job level Low