Commit graph

7 commits

Author SHA1 Message Date
ced6c5ac20
security: lock blog backup table, revoke trigger/default EXECUTE (#259)
Some checks failed
CI / build (push) Has been cancelled
Deploy to dev2 / deploy (push) Has been cancelled
test / test (push) Has been cancelled
Applied to prod by hand.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 14:09:03 -07:00
580817b06f
feat(hire-us): CoinPay hosted checkout sessions for Hire Us (#254)
Some checks failed
CI / build (push) Has been cancelled
Deploy to dev2 / deploy (push) Has been cancelled
test / test (push) Has been cancelled
POST /api/hire-us/coinpay-checkout now opens a CoinPay checkout session
instead of a single-chain USDC_POL /api/payments/create. The buyer picks
any coin the business has a wallet for, or PayPal. Each session sends
customer_email (required), account_id (CoinPay OAuth sub when signed in,
else the buyer email for guests), property logicsrc.com and the Hire Us
metadata. The cs_ id is recorded in the new hire_us_checkouts table.

The webhook records session payments from the session fields
(checkout_session_id, account_id, customer_email, property), stores the
session id on hire_us_payments, marks the checkout paid, and stays
idempotent on payment_id across confirmed, forwarded and replays.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 06:22:17 -07:00
54ec1a4925
fix(coinpay): settle paid Hire Us checkouts from the signed webhook (#252)
The CoinPay webhook only logged. It now verifies X-CoinPay-Signature
(t=,v1= over t.rawBody), reads the nested payload (data.payment_id, not
the top-level event id), and records a confirmed/forwarded Hire Us
payment once in hire_us_payments (payment_id primary key), mapped to the
buyer via metadata.account_id/email. Unknown or pending payments are a
200 no-op. Hire Us checkout now sends property, account_id (CoinPay
session) and email in metadata.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 05:02:09 -07:00
f057589d66 feat(credential-sharing): end-to-end-encrypted team credential sharing
Adds a `team` credential provider + team/member management so teammates can
share secrets by email instead of passing .env files over chat. Fully E2E:
the server only ever stores ciphertext, per-member sealed vault keys, and
public keys — it never sees a plaintext value or the vault DEK.

Plugin (@logicsrc/plugin-credential-sharing)
- crypto.ts: X25519 identity keys, per-vault DEK (secretbox), DEK sealed to
  each member's pubkey (crypto_box_seal), value encrypt/decrypt (libsodium)
- identity.ts: local ~/.logicsrc/identity.json (0600) holding the device key
  + API token; never uploads the secret key
- client.ts: typed /api/credshare client
- providers/team.ts: `team:<slug>/<vault>` CredentialProvider (inspect,
  readValues=decrypt, write=encrypt, rollback); fingerprints match env so
  env<->team diffs line up
- fixes latent libsodium-wrappers ESM load bug (createRequire) here + in
  github-secrets

Server (commandboard-api /api/credshare)
- zero-knowledge router: email-code auth, keys, teams, members, invites,
  vaults, sealed grants, ciphertext secrets, audit; membership authz in app
- CredShareStore abstraction: in-memory (dev/tests) + Supabase (prod)
- Resend email transport for login codes + invites (no-op -> echoes locally)
- supabase migration: credshare_* tables, deny-by-default RLS

CLI
- real `logicsrc login` (email code -> token + key upload)
- `logicsrc teams create/list/invite/accept/members/vaults/grant/push/pull`

Web (logicsrc.com/teams + /teams/accept)
- management surface only (browser holds no private key, never decrypts):
  login, view teams/members/vaults, invite, accept

Tests: crypto round-trip, server contract (invite->accept->push->grant->pull
+ authz boundaries), and a real HTTP+client+crypto E2E asserting the server
never holds plaintext. Full workspace build + tests green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-13 13:11:32 +00:00
FuturMix
13e921c7af
fix(supabase): enable RLS on communication account tables (fixes #69) (#70) 2026-06-13 22:44:13 -07:00
c23ce42948 Add communication account plugin scaffolds 2026-06-09 10:02:07 +00:00
cf99e93c53 feat(web): blog-post ingestion webhook + /blog, dynamic RSS & sitemap
Add an autoblog webhook receiver and a Supabase-backed blog to logicsrc-web
(the app had no Supabase usage before).

- Migration: blog_posts table (RLS: public reads published, service-role
  writes). Applied to the linked project.
- POST /api/webhooks/blog: verifies the Standard Webhooks signature against
  BLOG_WEBHOOK_SECRET via @profullstack/autoblog verifyAndParse (no admin
  user — shared secret only) and upserts the post by slug.
- /blog index + /blog/[slug] render published posts from the table.
- /blog/rss.xml and /sitemap.xml are now dynamic, generated from the table;
  removed the static public/sitemap.xml and public/blog/rss.xml.
- BLOG_WEBHOOK_SECRET added to .env.example.

Verified end-to-end: a signed sample post delivered 200 and appeared in the
index, post page, RSS, and sitemap; build + typecheck pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 11:53:43 +00:00