8000 feat(shares): the graph over S3 and WebDAV, read-only by adeelahmad · Pull Request #324 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content
8000

feat(shares): the graph over S3 and WebDAV, read-only - #324

Merged
adeelahmad merged 7 commits into
mainfrom
claude/project-thread-88khx4
Oct 11, 2026
Merged

adeelahmad merged 7 commits into
mainfrom
claude/project-thread-88khx4

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Description

Before: the graph as files (#290) could only be browsed through the API and MCP.

After: an admin can turn on Settings → File shares. Any S3 client (rclone, Cyberduck, the AWS CLI, boto3) or WebDAV client (Finder, Windows Explorer, GNOME Files, Dolphin) can then list and read the same tree, read-only: each namespace is a bucket or top folder, with Collections/, Topics/ and Entities/ inside. Each person makes their own access keys on their API tokens page (shown once, revocable, expiring like API keys). A key reads as its owner and sees exactly what they see in the web app. Docker publishes S3 on 9555 (LENS_S3_PORT) and WebDAV on 9556 (LENS_WEBDAV_PORT), on the same bind as the web app.

For the SMB and NFS threads, it also adds s3.lookup_key, s3.touch, s3.service_key, s3.revoke_service_key and s3.internal_endpoint, so those servers sign in with the same keys.

Motivation and Context

Adeel asked for the graph as a file tree over S3 and WebDAV (SMB and NFS are in their own threads). This builds on #290.

Steps to reproduce (if appropriate):

I tested it with a real rclone against both servers (lsd, lsf -R, cat, copy, check all matched), and with botocore in the tests.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project.
  • I added or updated tests.
  • My change requires documentation updates, and I have updated docs/ accordingly.
  • Users need more than the title to understand it, so I wrote it under ## Unreleased in CHANGELOG.md.

Done questions

  • Goal: delivers what the user wanted, merged on green CI.
  • Agents: /api/v1/shares/s3 reports state and keys; agents read the same tree through MCP.
  • Zero setup: one switch in Settings; ports are already published by Docker.
  • Fewest clicks: making a key shows a ready-to-paste rclone config and WebDAV address.
  • Configurable: shares section in Settings (on/off, per protocol, ports) with defaults.
  • Light: the servers are stdlib threads in the worker, and they're off by default.
  • Private and secure: off by default, read-only, per-person keys made only while signed in with a passkey, secrets sealed, sign-in throttled. Threat model has a new P-SHARES entry.
  • Cost: no model calls.
  • User decides: off until an admin turns it on; existing defaults are unchanged.
  • Upgrades: the new file_key table only, so no data to migrate.
  • Honest: docs label S3/WebDAV built and SMB/NFS in progress.
  • Tests, docs and generated files updated (make openapi, client regenerated).
  • Open standards (S3 API, WebDAV RFC 4918); botocore is a dev-only dependency (Apache-2.0).
  • Result reported with evidence; "refine later" items are in docs/file-tree.md (built-in TLS, WebDAV locks, folder dates).

🤖 Generated with Claude Code

https://claude.ai/code/session_017MjvZcE48RUyNdztPNBgid


Generated by Claude Code

S3 (SigV4, path-style) and WebDAV (class 1, Basic with an access key)
servers in the worker, off until an admin turns on File shares; each person
makes access keys on their API tokens page, which read as them. Docker
publishes them on 9555 and 9556 (LENS_S3_PORT, LENS_WEBDAV_PORT).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017MjvZcE48RUyNdztPNBgid
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017MjvZcE48RUyNdztPNBgid
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017MjvZcE48RUyNdztPNBgid
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017MjvZcE48RUyNdztPNBgid
…-88khx4

# Conflicts:
#	CHANGELOG.md
#	fastapi_backend/app/cli.py
#	install.sh
#	threat-model.md
#	threat-model.yaml
… limit

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017MjvZcE48RUyNdztPNBgid
…-88khx4

# Conflicts:
#	nextjs-frontend/app/openapi-client/index.ts
#	nextjs-frontend/app/openapi-client/sdk.gen.ts
#	threat-model.yaml
@adeelahmad
adeelahmad merged commit 2a07a74 into main Oct 11, 2026
18 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-88khx4 branch October 11, 2026 00:54
adeelahmad pushed a commit that referenced this pull request Oct 11, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EKnSy4KKeNYsqhnXvWVz97
adeelahmad added a commit that referenced this pull request Oct 11, 2026
…monitoring switch as built (#351)

"Ask" names the built-in Telegram bot (#293) and Slack app (#287); "Connect your agents" adds mounting the graph's
files read-only over S3, WebDAV, NFS or SMB (#324, #295, #305) and copying the MCP address from the account menu
(#340); "Watch it run" says one switch in the web app starts Prometheus and Grafana (#337); "Light by default" adds
the cloud model presets (#334). The docs index gains the NFS and SMB pages, and "In progress" keeps only open PRs.


Claude-Session: https://claude.ai/code/session_01HDx7PPUauyjMn1LZs8JAsS

Co-authored-by: Adeel Ahmad <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0