File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -113,9 +113,10 @@ INTERNAL_JWT_SECRET=
113113# ===========================================
114114# Sidekiq Web UI (production access)
115115# ===========================================
116- # Password for /sidekiq dashboard. Protected by HTTP Basic Auth (user: prostaff).
117- # Leave blank to keep the UI inaccessible (safe default).
118- # Set a strong random value in production (e.g. openssl rand -hex 32).
116+ # Credentials for /sidekiq dashboard (HTTP Basic Auth).
117+ # Both must be set — UI stays inaccessible if either is blank (safe default).
118+ # Generate password: openssl rand -hex 32
119+ SIDEKIQ_WEB_USER =
119120SIDEKIQ_WEB_PASSWORD =
120121
121122# ===========================================
Original file line number Diff line number Diff line change 502502
503503 require 'sidekiq/web'
504504 Sidekiq ::Web . use ( Rack ::Auth ::Basic ) do |user , password |
505- user == 'prostaff' && ActiveSupport ::SecurityUtils . secure_compare (
505+ expected_user = ENV . fetch ( 'SIDEKIQ_WEB_USER' , nil )
506+ expected_password = ENV . fetch ( 'SIDEKIQ_WEB_PASSWORD' , nil )
507+
508+ next false if expected_user . blank? || expected_password . blank?
509+
510+ user_match = ActiveSupport ::SecurityUtils . secure_compare ( user , expected_user )
511+ password_match = ActiveSupport ::SecurityUtils . secure_compare (
506512 ::Digest ::SHA256 . hexdigest ( password ) ,
507- ::Digest ::SHA256 . hexdigest ( ENV . fetch ( 'SIDEKIQ_WEB_PASSWORD' , '' ) )
513+ ::Digest ::SHA256 . hexdigest ( expected_password )
508514 )
515+
516+ user_match && password_match
509517 end
510518 mount Sidekiq ::Web => '/sidekiq'
511519end
Original file line number Diff line number Diff line change 11services :
22 filebeat :
33 image : docker.elastic.co/beats/filebeat:8.19.0
4- user : root
4+ user : root # required to read /var/lib/docker/containers (owned by root on host)
55 restart : unless-stopped
66 volumes :
77 - /var/lib/docker/containers:/var/lib/docker/containers:ro
Original file line number Diff line number Diff line change @@ -10,7 +10,9 @@ filebeat.autodiscover:
1010 - type : container
1111 paths :
1212 - /var/lib/docker/containers/${data.docker.container.id}/*.log
13- json.keys_under_root : false
13+ json.keys_under_root : true
14+ json.overwrite_keys : true
15+ json.add_error_key : true
1416 fields :
1517 service : api
1618 - condition :
You can’t perform that action at this time.
0 commit comments