WIP: Add local certificate authority infrastructure #85
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/local-ca-infrastructure"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
fyt-ca-init, fyt-ca-run, fyt-ca-trust, fyt-ca-health) with proper error handling and auto-initialization.step/within the project folder (viaSTEPPATHenv var) instead of~/.stepfyt-ca-runnow auto-initializes and trusts the CA if not yet donefyt-ca-healthchecks CA reachability from both host and VMfyt-vm-run) verifies CA health before proceedingfyt_info, fyt_warn, fyt_error, fyt_header) intocommon.shset -euo pipefailfromcommon.shintocreate-fyt-command.nixwrappertesting) to VM commandsTest plan
fyt-ca-init— should create CA in .step/ with auto-generated passwordfyt-ca-run— should start CA on :8443 (auto-init + trust if needed)fyt-ca-health— should report healthy when CA is runningfyt-ca-healthwithout CA running — should show helpful errorfyt-vm-run— should check CA health before starting VM.step/is in.gitignore51b6e62aa2tod7a343987cd7a343987cto3c0e92fc12I would suggest to submit a PR with one specific feature. It will be harder to get through everything in this PR in one go. I think it will be easier to talk through and agree on one specific change, and then follow those agreements for the ones that come after.
@ -1,9 +1,16 @@# Better error handlingwhy remove this part?
@ -7,0 +5,4 @@fyt_warn() { echo -e "${_FYT_PREFIX} \033[1;33m$*\033[0m" >&2; }fyt_error() { echo -e "${_FYT_PREFIX} \033[1;31m$*\033[0m" >&2; }fyt_header() {echo ""could we use multiline strings to reduce the noise from repeating echo -e "..." every line?
@ -25,6 +25,7 @@ let);in(pkgs.writeShellScriptBin name ''set -euo pipefailwhy put it here instead of the commonsh?
@ -58,3 +63,1 @@fyt-ca-init.exec = "step ca init --name \"Free Your Tech\" --dns \"localhost,10.0.2.2\" --address \":8443\" --provisioner \"admin\" --acme";fyt-ca-trust.exec = "step certificate install ~/.step/certs/root_ca.crt";fyt-ca-run.exec = "step-ca ~/.step/config/ca.json";fyt-ca-init.exec = "bash ${./scripts/fyt-ca-init.sh}";exec = "bash ${name}";, you can just doexec = name;@ -0,0 +1,16 @@#!/usr/bin/env bashwhy include the sheband when it's never used? adds noise.
@ -0,0 +1,16 @@#!/usr/bin/env bashset -euo pipefailwhy was this removed from common and then put into every script individually, when it also sources common?
@ -0,0 +1,34 @@#!/usr/bin/env bashset -euo pipefailagain, why?
@ -0,0 +1,34 @@#!/usr/bin/env bashset -euo pipefailsource "$FYT_COMMON"and this too, it's already sourced, no?
@ -1,22 +0,0 @@require_commands cat chmod mktempwhy rename this file, and also all the other files with having fyt- in the filename, what value does it add in exchange for adding noise to the filenames?
Add local certificate authority infrastructureto WIP: Add local certificate authority infrastructureView command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.