Skip to content

feat: secure secrets and enable offline-first mode - #135

Open
Bhavik-ag wants to merge 1 commit into
mainfrom
feat/secure-offline
Open

Bhavik-ag wants to merge 1 commit into
mainfrom
feat/secure-offline

Conversation

@Bhavik-ag

Copy link
Copy Markdown
Contributor

Summary

  • encrypt database credentials and cached session tokens with Electron safeStorage
  • migrate plaintext secrets and keep credentials memory-only when OS encryption is unavailable
  • make authentication optional for connections, queries, saved queries, and dashboards

Validation

  • pnpm --filter @dbdesk/desktop typecheck
  • pnpm --filter @dbdesk/db typecheck
  • pnpm --filter @dbdesk/desktop test
  • pnpm --filter @dbdesk/desktop lint

@vercel

vercel Bot commented Sep 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
dbdesk-web Ignored Ignored Sep 19, 2026 2:51am UTC
dbdesk-server Skipped Skipped Sep 19, 2026 2:51am UTC

@vercel
vercel Bot temporarily deployed to Preview – dbdesk-server September 18, 2026 17:18 Inactive
@vercel
vercel Bot temporarily deployed to Preview – dbdesk-server September 18, 2026 17:20 Inactive
@greptile-apps

greptile-apps Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

The PR is not yet safe to merge because desktop-created connections can no longer use their stored credentials from the shared CLI workflow.

Summary

This PR encrypts desktop connection credentials and cached session tokens with Electron safe storage, migrates existing plaintext secrets, and makes local database workflows available without authentication.

  • Keeps credentials memory-only when OS encryption is unavailable.
  • Adds non-blocking recovery of sessions persisted by the authentication plugin.
  • Moves dashboards and other local workflows to an offline-first model.
  • Documents that the CLI must obtain credentials through PostgreSQL environment variables or ~/.pgpass.

Reviews (3) · Last reviewed commit: "feat: add secure offline-first local mod..."

Comment thread apps/desktop/src/main/storage.ts
Comment thread apps/desktop/src/main/storage.ts
@vercel
vercel Bot temporarily deployed to Preview – dbdesk-server September 18, 2026 17:27 Inactive
@vercel
vercel Bot temporarily deployed to Preview – dbdesk-server September 18, 2026 17:33 Inactive
Comment thread apps/desktop/src/main/ipc/auth-handlers.ts
Comment thread apps/desktop/src/renderer/src/features/auth/components/user-menu.tsx Outdated
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.

1 participant