Skip to content

feat(netbird): compute PAT hash at seed time, remove hashedToken requirement#6

Merged
mikkeldamsgaard merged 1 commit intomainfrom
issue-5-remove-hashed-token-requirement
Feb 26, 2026
Merged

feat(netbird): compute PAT hash at seed time, remove hashedToken requirement#6
mikkeldamsgaard merged 1 commit intomainfrom
issue-5-remove-hashed-token-requirement

Conversation

@mikkeldamsgaard
Copy link
Contributor

@mikkeldamsgaard mikkeldamsgaard commented Feb 26, 2026

Summary

  • Leverage Initium v1.0.4's sha256 and base64encode MiniJinja filters to compute the hashed_token at seed time from the plaintext PAT
  • Remove pat.secret.hashedTokenKey from values — users only need to supply the plaintext token in their Kubernetes Secret
  • Simplify README: no hash computation step, single --from-literal Secret creation

Changes

File Change
values.yaml Remove hashedTokenKey, update PAT comments
_helpers.tpl env.PAT_HASHED_TOKENenv.PAT_TOKEN | sha256(bytes=true) | base64encode
pat-seed-job.yaml Env var PAT_HASHED_TOKENPAT_TOKEN with tokenKey
server-deployment.yaml Same env var change in SQLite sidecar
README.md Simplified PAT generation, removed hash step
CHANGELOG.md Breaking change with migration notes
ci/scripts/e2e.sh Simplified Secret creation (no hash)
Unit tests (3 files) Updated assertions for new env var and MiniJinja pattern

Test plan

  • helm unittest charts/netbird — 167 tests passing
  • helm lint charts/netbird — no errors
  • E2E: ci/scripts/e2e.sh sqlite
  • E2E: ci/scripts/e2e.sh postgres
  • E2E: ci/scripts/e2e.sh mysql

How to verify

helm unittest charts/netbird
helm lint charts/netbird

Closes #5

🤖 Generated with Claude Code

…irement (#5)

Leverage Initium v1.0.4's sha256/base64encode MiniJinja filters to
compute the hashed_token at seed time from the plaintext PAT. Users
no longer need to pre-compute and supply the base64-encoded SHA256
hash in their Kubernetes Secret.

- Remove pat.secret.hashedTokenKey from values.yaml
- Update seed spec to use {{ env.PAT_TOKEN | sha256(bytes=true) | base64encode }}
- Rename PAT_HASHED_TOKEN env var to PAT_TOKEN in Job and sidecar templates
- Simplify README PAT generation (no hash computation needed)
- Simplify e2e Secret creation (single --from-literal)
- Update unit tests (167 passing)

Closes #5

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mikkeldamsgaard mikkeldamsgaard force-pushed the issue-5-remove-hashed-token-requirement branch from 10225fd to c791dcc Compare February 26, 2026 07:38
@mikkeldamsgaard mikkeldamsgaard merged commit 23a0090 into main Feb 26, 2026
4 checks passed
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.

Remove hashedToken requirement from PAT secret by computing hash in Initium seed spec

1 participant