Repository navigation
feat(keyring): revocable share link for SSH public keys - #267
Merged
Merged
Conversation
…son|.keys) Migration 009_keyring_shares (one per user, sha256(token) only). POST/GET/DELETE /api/keyring/share for a person key or a browser session (CSRF header on writes; machine keys 403). Public /k/<lks_ token>.json and .keys expose only ssh-* public halves with ssh-keygen fingerprints computed from the key, CORS *, public max-age=60, 404 when unknown or revoked, per-IP rate limit. /keyring gets a Share public keys box (create, copy, rotate, revoke); docs updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ThreatCrush Security Scan60 finding(s) HIGH/CRITICAL: 6 | MEDIUM: 24 | LOW: 30
…and 10 more. Full results in the Security tab. Snippets are redacted; ThreatCrush never prints matched credential material. |
…eatCrush) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Piece 1 of fleetbar (w3bs.org/fleet + threatcrush.com/fleet via crawlproof SSH checks).
009_keyring_shares(SQLite + Postgres):keyring_shares (id, user_id unique, token_hash unique, created_at, rotated_at). Only sha256(token) stored.POST /api/keyring/sharecreates or rotates and returns{ url, keys_url_text, token }once;GETreturns{ exists, created_at, rotated_at };DELETErevokes. Auth: a person'sBearer lsk_key or a browser session (session writes need theX-CSRF-Tokendouble-submit header, since the app-wide guard skips /api). Machine keys 403.GET /k/<lks_token>.json->{ keys: [{ name, type, public_key, fingerprint, comment }] }and/k/<token>.keys(authorized_keys). Onlyssh-*entries whose public key parses (blob algorithm must match); fingerprint computed from the key as ssh-keygen prints it.Access-Control-Allow-Origin: *,Cache-Control: public, max-age=60, CORP cross-origin, no Set-Cookie (mounted before the session middleware). Unknown/revoked -> 404. Per-IP in-memory limit, 120/min -> 429.Tests: apps/pwa/test/keyring-share.test.mjs (auth, CSRF, create/rotate/revoke, public halves only, fingerprints, CORS, cross-user isolation, rate limit). Full PWA suite 96/96.
🤖 Generated with Claude Code