Commit c75dac7
Gate the site behind HTTP Basic Auth for pre-release (#33)
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>1 parent f5ef3f0 commit c75dac7
4 files changed
Lines changed: 18 additions & 2 deletions
File tree
- .kamal
- app/controllers
- config/credentials
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
2 | 12 | | |
3 | 13 | | |
4 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments