Commit Graph
371 Commits
Author SHA1 Message Date
Evan Jarrett f307d6ea85 fix upload blob to s3 2026-02-14 22:17:15 -06:00
Evan Jarrett 3085fc726b fix bluesky profile not emitting firehose event 2026-02-14 22:09:03 -06:00
Evan Jarrett cecf6d4b7c some request crawl relay fixes 2026-02-14 21:49:10 -06:00
Evan Jarrett f340158a79 tweaks related to did:plc, fix bluesky profile creation, update deploys to build locally then scp 2026-02-14 21:00:07 -06:00
Evan Jarrett e3843db9d8 Implement did:plc support for holds with the ability to import/export CARs.
did:plc Identity Support (pkg/hold/pds/did.go, pkg/hold/config.go, pkg/hold/server.go)

  The big feature — holds can now use did:plc identities instead of only did:web. This adds:
  - LoadOrCreateDID() — resolves hold DID by priority: config DID > did.txt on disk > create new
  - CreatePLCIdentity() — builds a genesis operation, signs with rotation key, submits to PLC directory
  - EnsurePLCCurrent() — on boot, compares local signing key + URL against PLC directory and auto-updates if they've drifted (requires rotation key)
  - New config fields: did_method (web/plc), did, plc_directory_url, rotation_key_path
  - GenerateDIDDocument() now uses the stored DID instead of always deriving did:web from URL
  - NewHoldServer wired up to call LoadOrCreateDID instead of GenerateDIDFromURL

  CAR Export/Import (pkg/hold/pds/export.go, pkg/hold/pds/import.go, cmd/hold/repo.go)

  New CLI subcommands for repo backup/restore:
  - atcr-hold repo export — streams the hold's repo as a CAR file to stdout
  - atcr-hold repo import <file>... — reads CAR files, upserts all records in a single atomic commit. Uses a bulkImportRecords method that opens a delta session, checks each record for
  create vs update, commits once, and fires repo events.
  - openHoldPDS() helper to spin up a HoldPDS from config for offline CLI operations

  Admin UI Fixes (pkg/hold/admin/)

  - Logout changed from GET to POST — nav template now uses a <form method=POST> instead of an <a> link (prevents CSRF on logout)
  - Removed return_to parameter from login flow — simplified redirect logic, auth middleware now redirects to /admin/auth/login without query params

  Config/Deploy

  - config-hold.example.yaml and deploy/upcloud/configs/hold.yaml.tmpl updated with the four new did:plc config fields
  - go.mod / go.sum — added github.com/did-method-plc/go-didplc dependency
2026-02-14 15:17:53 -06:00
Evan Jarrett 83e5c82ca4 lint 2026-02-14 11:22:13 -06:00
Evan Jarrett ec2063ef52 fix star not being filled in. add ability to deploy scanner on the same server as the hold 2026-02-13 20:41:36 -06:00
Evan Jarrett 8048921f5e show attestation details 2026-02-13 19:40:05 -06:00
Evan Jarrett de02e1f046 remove distribution from hold, add vulnerability scanning in appview.
1. Removing distribution/distribution from the Hold Service (biggest change)
  The hold service previously used distribution's StorageDriver interface for all blob operations. This replaces it with direct AWS SDK v2 calls through ATCR's own pkg/s3.S3Service:
  - New S3Service methods: Stat(), PutBytes(), Move(), Delete(), WalkBlobs(), ListPrefix() added to pkg/s3/types.go
  - Pull zone fix: Presigned URLs are now generated against the real S3 endpoint, then the host is swapped to the CDN URL post-signing (previously the CDN URL was set as the endpoint, which
  broke SigV4 signatures)
  - All hold subsystems migrated: GC, OCI uploads, XRPC handlers, profile uploads, scan broadcaster, manifest posts — all now use *s3.S3Service instead of storagedriver.StorageDriver
  - Config simplified: Removed configuration.Storage type and buildStorageConfigFromFields(); replaced with a simple S3Params() method
  - Mock expanded: MockS3Client gains an in-memory object store + 5 new methods, replacing duplicate mockStorageDriver implementations in tests (~160 lines deleted from each test file)
2. Vulnerability Scan UI in AppView (new feature)
  Displays scan results from the hold's PDS on the repository page:
  - New lexicon: io/atcr/hold/scan.json with vulnReportBlob field for storing full Grype reports
  - Two new HTMX endpoints: /api/scan-result (badge) and /api/vuln-details (modal with CVE table)
  - New templates: vuln-badge.html (severity count chips) and vuln-details.html (full CVE table with NVD/GHSA links)
  - Repository page: Lazy-loads scan badges per manifest via HTMX
  - Tests: ~590 lines of test coverage for both handlers
3. S3 Diagnostic Tool
  New cmd/s3-test/main.go (418 lines) — tests S3 connectivity with both SDK v1 and v2, including presigned URL generation, pull zone host swapping, and verbose signing debug output.
4. Deployment Tooling
  - New syncServiceUnit() for comparing/updating systemd units on servers
  - Update command now syncs config keys (adds missing keys from template) and service units with daemon-reload
5. DB Migration
  0011_fix_captain_successor_column.yaml — rebuilds hold_captain_records to add the successor column that was missed in a previous migration.
6. Documentation
  - APPVIEW-UI-FUTURE.md rewritten as a status-tracked feature inventory
  - DISTRIBUTION.md renamed to CREDENTIAL_HELPER.md
  - New REMOVING_DISTRIBUTION.md — 480-line analysis of fully removing distribution from the appview side
7. go.mod
  aws-sdk-go v1 moved from indirect to direct (needed by cmd/s3-test).
2026-02-13 15:26:24 -06:00
Evan Jarrett 434a5f1eee try and use pull_zone 2026-02-12 21:09:11 -06:00
Evan Jarrett 07bc924a60 forcepathstyle 2026-02-12 20:50:29 -06:00
Evan Jarrett 24c7b03ce5 minor fixup to update 2026-02-12 20:41:42 -06:00
Evan Jarrett c0cf3fb94f update dependencies 2026-02-12 20:28:00 -06:00
Evan Jarrett 92c31835e2 implement the ability to promote a hold as a successor as a way to migrate users to a new storage server 2026-02-12 20:14:19 -06:00
Evan Jarrett 8d39daa09d fit lint 2026-02-11 21:15:12 -06:00
Evan Jarrett ac32a98104 clean up GC implementation 2026-02-11 20:44:07 -06:00
Evan Jarrett 150975a9fa more admin ui changes 2026-02-11 09:50:45 -06:00
Evan Jarrett 22d5396589 optimize queries for admin panel 2026-02-10 22:51:51 -06:00
Evan Jarrett 8e45b2eee5 remove unused function 2026-02-10 22:24:00 -06:00
Evan Jarrett 9723de0bcd migate envs to use yaml configs 2026-02-10 22:11:21 -06:00
Evan Jarrett 914328dbf1 fix cloud-init sync and dns check 2026-02-10 21:20:13 -06:00
Evan Jarrett b251c8857f change to transactions for database 2026-02-10 20:58:24 -06:00
Evan Jarrett 4ac2b97c33 remote at sign from tangled urls 2026-02-10 20:48:24 -06:00
Evan Jarrett 53de92e5d3 improve unit tests 2026-02-09 23:19:01 -06:00
Evan Jarrett aad9ebfc8b fix lint and unit tests 2026-02-09 22:39:38 -06:00
Evan Jarrett 7ba42080c5 more admin panel fixes, allow for fallback relays and jetstreams, improve star lexicon to allow for repo_page backlinks 2026-02-09 21:53:02 -06:00
Evan Jarrett fbe7338492 add missing config keys on provision 2026-02-08 21:20:02 -06:00
Evan Jarrett bc034e3465 updated favicons, fix domain rerouting, fix deploy provisioning 2026-02-08 20:50:31 -06:00
Evan Jarrett 4d9452bb75 update configs, fix foreign key issues 2026-02-07 23:28:42 -06:00
Evan Jarrett cd47945301 add new upcloud cli deploy 2026-02-07 22:45:10 -06:00
Evan Jarrett ef0161fb0e update settings page, move admin-panel to tailwind/daisy 2026-02-06 11:23:12 -06:00
Evan Jarrett 834bb8d36c libsql instead of sqlite for turso/bunnydb replicated sqlite 2026-02-05 20:43:04 -06:00
Evan Jarrett 2c39a78ac2 minor fixes 2026-02-04 20:14:25 -06:00
Evan Jarrett 73109641e8 add scan reports to hold pds 2026-02-04 10:25:09 -06:00
Evan Jarrett d6114cf549 implementation of syft/grype scanner as a separate binary 2026-02-04 09:53:04 -06:00
Evan Jarrett 9c9c808eea begin scanner implementation 2026-02-03 21:52:56 -06:00
Evan Jarrett 35f7a47af3 add simple stripe billing implementation for quotas 2026-02-03 21:52:31 -06:00
Evan Jarrett 5d3b6c2047 begin billing 2026-02-03 20:54:35 -06:00
Evan Jarrett 6a52175d70 add theme overrides 2026-02-03 20:35:13 -06:00
Evan Jarrett 34f342f637 lots of refactor and cleanup to allow for branding overrides 2026-02-02 22:42:15 -06:00
Evan Jarrett ca56a7c309 allow domain name and short name to be replaced by config 2026-01-22 14:52:30 -06:00
Evan Jarrett 57593a8683 remove the filesystem and buffered upload ability on the holds. going forward the only supported storage is s3. adds extra mocks and tests around uploading 2026-01-19 16:59:03 -06:00
Evan Jarrett 3b7455a299 ignore js bundle 2026-01-18 17:44:15 -06:00
Evan Jarrett 865c597188 jk found more fixes 2026-01-18 17:27:55 -06:00
Evan Jarrett 536fa416d4 i don't think i can make this website any faster... 2026-01-18 16:54:03 -06:00
Evan Jarrett d8b0305ce8 use sprite sheet for lucide icons, fix logout button, various other improvements 2026-01-18 14:08:34 -06:00
Evan Jarrett f79d6027ad fix not able to star repos 2026-01-17 18:07:27 -06:00
Evan Jarrett 0358e2e5ad update api endpoints to use post body rather than url based handlers 2026-01-17 17:46:10 -06:00
Evan Jarrett faf63d8344 clean up unused endpoints and js, fix more a11y errors 2026-01-17 17:36:22 -06:00
Evan Jarrett 26f049fcbe more accessiblity tweaks 2026-01-17 16:43:54 -06:00