feat: Add Client Authentication and Provisioning Plugin - #21
Merged
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This Pull Request implements the Client Authentication and Provisioning flow. It enables secure onboarding of new client devices and authorization by administrators using SSH Ed25519 key verification and
ageencryption.Closes #20
Changes Proposed
1. Cryptographic Client Plugin (
plugins/auth.sh)plugins/auth.shhandling both requester (me) and approver (trust) roles.b me):~/.config/bootstrap-client/.hostname,os) alongside the public key to/api/register.user_codeandchallenge_nonce./api/challenge/pollby signing the nonce usingssh-keygen -Y sign(namespace:bootstrap).age -d -i ~/.config/bootstrap-client/id_ed25519and writes it tosecrets.decrypted.b trust <user_code>):/api/pending/<user_code>.ssh-keygen -Y sign) and submits the base64 signature alongside the fingerprint to/api/approve.2. Router Integration (
lib/routes.sh)meandtrustcommands to lazy-load theauthplugin viarun_plugin "auth".3. Autocompletion (
b.sh)meandtrustcommands afterb.4. Local Installation Updates (
bootstrap.sh)plugins/directory (similar toinstallers/) to$BOOTSTRAP_DIRduring local development bootstrapping.5. Plugin Manifest (
plugins.json)authin the local plugin catalog.Verification & Testing
bootstrap.shto sync the changes locally./tmpupon script termination.