Sidekiq UI no longer accessible, even with SELF_HOSTED=true
OS & Hardware Kubernetes on Linux, running the official Dawarich docker container
Version 0.25.9
Describe the bug
Visit /sidekiq triggers an authentication error, perhaps a type error?
TypeError: no implicit conversion of nil into String
ActiveSupport::SecurityUtils.secure_compare(
::Digest::SHA256.hexdigest(username),
::Digest::SHA256.hexdigest(ENV['SIDEKIQ_USERNAME'])
) &
ActiveSupport::SecurityUtils.secure_compare(
::Digest::SHA256.hexdigest(password),
To Reproduce Steps to reproduce the behavior:
- Go to
/sidekiq
Expected behavior I should be able to access sidekiq UI on a self-hosted deployment of dawarich.
Screenshots
Logs N/A
Additional context
I set SELF_HOSTED = "true" on both app and sidekiq containers.
env:
- name: SELF_HOSTED
value: "true"
This commit https://github.com/Freika/dawarich/commit/dae1733320bc05e6ebc87cc40f8a687afe45ecb5 seems to indicate "Sidekiq Web UI is now protected by basic auth in non-self-hosted mode. (Needs to be tested)".
I guess it was not tested 😓 specifically, it looks like self-hosted mode is now broken. I didn't see any docs that ask us to set SIDEKIQ_USERNAME. The commit also seems to get rid of the self-hosted mode check.
When you provide SIDEKIQ_USERNAME and SIDEKIQ_PASSWORD as environment variables, it will be accessible again (using those provided credentials)
From my perspective, I can confirm this issue. I set both variables in docker-compose.yml (with and without quotation marks) and get the same screen.
From my perspective, I can confirm this issue. I set both variables in docker-compose.yml (with and without quotation marks) and get the same screen.
for dawarich_app or dawarich_sidekiq?
SELF_HOSTED in both sections, SIDEKIQ_USERNAME and SIDEKIQ_PASSWORD in dawarich_sidekiq: only.
SELF_HOSTED in both sections, SIDEKIQ_USERNAME and SIDEKIQ_PASSWORD in dawarich_sidekiq: only.
you need to provide the SIDEKIQ_ variables to the app process, as that's the one serving the web views :)
... good point, sounds logical and works for me ;-) Sorry for confusion. sidekiq now is available again, as long as I am signed in with admin account. Thanks!
When you provide
SIDEKIQ_USERNAMEandSIDEKIQ_PASSWORDas environment variables, it will be accessible again (using those provided credentials)
Thanks! I can confirm this works, but I assume this is a workaround for the root issue? Based on the recent commit, I don't think @Freika meant for authentication on the selfhosted version
ye had the same thing it works with only settings the envs for app
Should be fixed in 0.25.10