Skip to content

Gate the site behind HTTP Basic Auth for pre-release#33

Merged
kcdragon merged 1 commit into
mainfrom
add-basic-auth
Jun 12, 2026
Merged

Gate the site behind HTTP Basic Auth for pre-release#33
kcdragon merged 1 commit into
mainfrom
add-basic-auth

Conversation

@kcdragon

Copy link
Copy Markdown
Collaborator

The app is deployed but not ready for public release, so this adds a coarse shared-password HTTP Basic Auth lock in front of the entire site, layered on top of the existing session auth. ApplicationController runs http_basic_authenticate_with in production only, reading the username/password from environment-specific Rails credentials (config/credentials/production.yml.enc); the /up health check is unaffected since Rails::HealthController doesn't inherit from it, so Kamal proxy health checks keep working. .kamal/secrets now pulls RAILS_MASTER_KEY (the production key) from 1Password with an env-var fallback, and .gitignore excludes config/credentials/*.key so the production key is never committed. Dev and test environments stay open, so the existing Minitest suite is unaffected.

🤖 Generated with Claude Code

The app is deployed but not ready for public release, so add a coarse
shared-password lock in front of the whole site, on top of the existing
session auth.

- ApplicationController runs http_basic_authenticate_with in production
  only, reading credentials from Rails encrypted credentials. The /up
  health check is unaffected (Rails::HealthController doesn't inherit it),
  so Kamal proxy health checks keep working.
- Store the basic_auth username/password in environment-specific
  production credentials (config/credentials/production.yml.enc).
- .kamal/secrets pulls RAILS_MASTER_KEY (the production key) from
  1Password with an env-var fallback.
- Ignore config/credentials/*.key so the production key is never committed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kcdragon kcdragon merged commit c75dac7 into main Jun 12, 2026
4 of 5 checks passed
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