Skip to content

fix(admin-tools): let phpRedisAdmin 1.27.0 serve behind the admin-tools auth - #56

Open
mrrobot47 wants to merge 1 commit into
EasyEngine:developfrom
mrrobot47:fix/pra-allow-no-auth
Open

mrrobot47 wants to merge 1 commit into
EasyEngine:developfrom
mrrobot47:fix/pra-allow-no-auth

Conversation

@mrrobot47

Copy link
Copy Markdown
Member

Problem

phpRedisAdmin 1.27.0 (released 2026-10-19) refuses to run unless $config['login'], login_as_acl_auth or allow_no_auth is set, and answers every request with HTTP 403 "Authentication is required. Configure login credentials or explicitly set allow_no_auth…" (includes/common.inc.php). install_pra() fetches the latest release, and templates/pra.config.mustache sets none of those options, so /ee-admin/pra/ is a 403 on every admin-tools install since that release.

Fix

  • templates/pra.config.mustache: set $config['allow_no_auth'] = true when no ADMIN_USER login is configured. /ee-admin/ is already behind the admin-tools basic auth, so phpRedisAdmin doesn't need its own login. The assignment comes after the config.sample.inc.php include, which sets it to false in 1.27.0.
  • install(): rewrite admin-tools/pra/includes/config.inc.php when it differs from the template, the same way index.php is already refreshed, so installs that already fetched 1.27.0 recover on the next ee admin-tools enable.

Testing

phpRedisAdmin 1.27.0 and 1.26.0 (with predis 1.1.1, as install_pra() assembles them), each with the old and the new config, served by PHP 7.4 and 8.5 against a Redis container:

pra config no ADMIN_USER ADMIN_USER set
1.27.0 old 403 "Authentication is required" 401 (pra's own login)
1.27.0 new 200, keys listed, overview works 401 (pra's own login)
1.26.0 old 200 401
1.26.0 new 200 401

Behat scenarios for this (pra served on a site with cache, and an old config refreshed by ee admin-tools enable --force) follow with the suite in #55.

…ls auth

phpRedisAdmin 1.27.0 answers every request with 403 unless a login, login_as_acl_auth or allow_no_auth is configured, and EasyEngine's config sets none of them, so /ee-admin/pra/ is a 403 on every install since that release. /ee-admin/ is already behind the admin-tools basic auth, so set allow_no_auth when no ADMIN_USER login is configured.

Installs that already fetched 1.27.0 keep the old config file, so install() now rewrites the pra config when it differs from the template, as it already does for index.php.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The targeted changes address the authentication failure and existing installations without identified blocking issues.

No open issues 🎉

What changed in this PR

Restores phpRedisAdmin access behind EasyEngine’s admin-tools authentication for version 1.27.0 and later.

Changes:

  • Allows phpRedisAdmin to run without its own login when ADMIN_USER is unset.
  • Refreshes existing phpRedisAdmin configurations when they differ from the template.
File Description
templates/​pra.config.mustache Enables allow_no_auth when no application login is configured.
src/​Admin_Tools_Command.php Refreshes outdated phpRedisAdmin configuration during installation.

Review effort: Balanced

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.

2 participants