Skip to content

Commit abc37ae

Browse files
etewiahclaude
andcommitted
Use TenantAdminConstraint for Mission Control Jobs auth
Disable HTTP Basic auth for /jobs dashboard and rely on the existing TenantAdminConstraint route constraint for authentication. This provides consistent auth behavior with /tenant_admin. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 8f670f6 commit abc37ae

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

config/initializers/mission_control_jobs.rb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
# Mission Control Jobs 1.0+ requires authentication configuration
44
# See: https://github.com/rails/mission_control-jobs#authentication
55

6-
Rails.application.configure do
7-
# Use HTTP Basic authentication for the jobs dashboard
8-
# Credentials can be set via environment variables
9-
config.mission_control.jobs.http_basic_auth_enabled = true
10-
config.mission_control.jobs.http_basic_auth_user = ENV.fetch("JOBS_AUTH_USER", "admin")
11-
config.mission_control.jobs.http_basic_auth_password = ENV.fetch("JOBS_AUTH_PASSWORD") { SecureRandom.hex(16) }
6+
Rails.application.config.after_initialize do
7+
# Disable Mission Control's built-in HTTP Basic auth.
8+
# Authentication is handled by the TenantAdminConstraint route constraint
9+
# which uses the same logic as /tenant_admin (checks TENANT_ADMIN_EMAILS env var).
10+
MissionControl::Jobs.http_basic_auth_enabled = false
1211
end

0 commit comments

Comments
 (0)