Skip to content

feat: create admin account on setup - #81

Merged
Vtec234 merged 30 commits into
mainfrom
install-admin
Aug 17, 2026
Merged

feat: create admin account on setup#81
Vtec234 merged 30 commits into
mainfrom
install-admin

Conversation

@Vtec234

@Vtec234 Vtec234 commented Aug 12, 2026

Copy link
Copy Markdown
Member
  • Generate initial admin password in install.sh.
  • Create admin account by default.
  • Listen on localhost only, not 0.0.0.0.
    • But make this configurable? Default to localhost for now until someone complains. Rob complained, this hit him trying to run workbench within a VM
  • Simplify docker-compose setup to a single file.
  • Automated security review (Fable 5).
  • Protect /setup page with admin authentication.
  • Get rid of target host setup from /setup page.
  • [-] Complain on /setup login page if window.location.URL is not baseURL. This requires some baseURL adaptations, left for a follow-up PR.
  • Adapt README.md.
  • [-] Allow admin login post-setup In a follow-on PR.
  • Revisit/separate out layout.tsx changes
  • Really disable pre-rendering (CI failure).

Comment thread install.sh Outdated
@robsimmons
robsimmons force-pushed the install-admin branch 2 times, most recently from f42895b to 37ea165 Compare August 14, 2026 18:59
@robsimmons
robsimmons changed the base branch from main to push-opmoywspnvpy August 14, 2026 19:00
@robsimmons
robsimmons force-pushed the install-admin branch 2 times, most recently from bd60fd5 to fdf53d4 Compare August 14, 2026 19:29
Base automatically changed from push-opmoywspnvpy to main August 14, 2026 19:54
@robsimmons
robsimmons marked this pull request as ready for review August 14, 2026 20:54
Comment thread README.md
Comment on lines +108 to +111
Run the installer on your Linux server:

```bash
curl -sSf https://raw.githubusercontent.com/leanprover/lean-workbench/main/install.sh | bash
bash <(curl -sSf https://raw.githubusercontent.com/leanprover/lean-workbench/main/install.sh)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for changing this? curl-pipe-to-bash is a tragic but common idiom

@Vtec234 Vtec234 Aug 17, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't work - it closes stdin for the script which thus does not ask the questions it would normally ask. We could alternatively fix this by accessing /dev/tty directly in the script.

Comment thread src/lib/server/auth.ts
// ? [env.ORIGIN.replace('https:', 'http:'), env.ORIGIN.replace('http:', 'https:')]
// : [],
trustedOrigins: isDevMode()
? /* allow anything in dev mode */ req => [req?.headers.get('origin')]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remark for future: we may want to read Host here, Origin is not set on same-origin GET requests.

@Vtec234
Vtec234 merged commit 757697e into main Aug 17, 2026
1 check passed
@Vtec234
Vtec234 deleted the install-admin branch August 17, 2026 16:39
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