Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

feat: persisted Station ID passed to Zinnia#424

Merged
bajtos merged 27 commits intomainfrom
feat-station-id
Apr 25, 2024
Merged

feat: persisted Station ID passed to Zinnia#424
bajtos merged 27 commits intomainfrom
feat-station-id

Conversation

@bajtos
Copy link
Copy Markdown
Member

@bajtos bajtos commented Apr 23, 2024

Introduce the concept of a Station instance ID that's represented as a public key of an Ed25119 keypair.

Generate the keypair on the first start and store it in a state file. Load the keypair from the state file on subsequent starts.

Introduce an optional env var PASSPHRASE allowing operators to specific a passphrase that will be used to encrypt & decrypt the file storing the keypair.

Implement an upgrade path allowing users to start with an empty PASSPHRASE and later upgrade their deployment with a PASSPHRASE string. Station will load the plaintext keypair and encrypt it using the new PASSPHRASE when it detects this situation.

Forward the Station ID to Zinnia via env vars and include it in the telemetry data written to InfluxDB.

Closes #406

@bajtos bajtos requested a review from juliangruber April 23, 2024 14:25
Signed-off-by: Miroslav Bajtoš <oss@bajtos.net>
Comment thread README.md Outdated
Signed-off-by: Miroslav Bajtoš <oss@bajtos.net>
@socket-security
Copy link
Copy Markdown

socket-security Bot commented Apr 23, 2024

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/cross-env@7.0.3 environment Transitive: filesystem, shell +6 81.2 kB kentcdodds

View full report↗︎

Signed-off-by: Miroslav Bajtoš <oss@bajtos.net>
Comment thread .github/workflows/ci.yml
Comment thread README.md Outdated
Comment thread lib/paths.js Outdated
Comment thread lib/station-id.js Outdated
bajtos added 4 commits April 24, 2024 13:19
Signed-off-by: Miroslav Bajtoš <oss@bajtos.net>
Signed-off-by: Miroslav Bajtoš <oss@bajtos.net>
Signed-off-by: Miroslav Bajtoš <oss@bajtos.net>
@bajtos bajtos requested a review from juliangruber April 24, 2024 12:08
Signed-off-by: Miroslav Bajtoš <oss@bajtos.net>
Signed-off-by: Miroslav Bajtoš <oss@bajtos.net>
@bajtos
Copy link
Copy Markdown
Member Author

bajtos commented Apr 24, 2024

@juliangruber @PatrickNercessian I addressed the comments, and the pull request is ready for final review and merging.

@juliangruber if we manage to land this PR today, could you please land #414 as well, before publishing a new Station Core release.

@bajtos bajtos enabled auto-merge (squash) April 24, 2024 12:40
Comment thread lib/station-id.js Outdated
Signed-off-by: Miroslav Bajtoš <oss@bajtos.net>
Comment thread README.md Outdated
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants